Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Help with DLLCall

$
0
0
Hi community, a new member here! :D
I'll come from AHK but now i'm tired and i want to use a better coding software like autoit

I have some problem with DLLCall, this was the original script:

#NoEnv
SetWorkingDir %A_ScriptDir%
OnExit, ExitSub
hDLL := DllCall("LoadLibrary", Str, "Library86.dll", Ptr) ;for x86
;hDLL := DllCall("LoadLibrary", Str, "Library64.dll", Ptr) ;for x64

if (hDLL)
{
hTest := DllCall("SetWindowsHookEx", Int, 5, Ptr, DllCall("GetProcAddress", Ptr, hDLL, AStr, "CBProc", ptr), Ptr, hDLL, Ptr, 0, Ptr)
if (!hHook)
{
MsgBox, SetWindowsHookEx is failed
ExitApp
}
}
else
{
MsgBox, LoadLibrary is failed
ExitApp
}

MsgBox, Good Work, LoadLibrary is load
Return

Esc::ExitApp

ExitSub:
if (hTest)
DllCall("UnhookWindowsHookEx", Ptr, hTest)
if (hDLL)
DllCall("FreeLibrary", Ptr, hDLL)

ExitApp


Some advice? Many thanks, i'm glad to stay here :D

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>