Skip to content

Commit

Permalink
Fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
evilC committed Apr 22, 2018
1 parent 2a02845 commit 1c20a69
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Lib/AutoHotInterception.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ class AutoHotInterception {
ExitApp
}

hModule := DllCall("LoadLibrary", "Str", dllFile, "Ptr")
if (hModule == 0){
this_bitness := A_PtrSize == 8 ? "64-bit" : "32-bit"
other_bitness := A_PtrSize == 4 ? "64-bit" : "32-bit"
MsgBox % "Bitness of Interception.dll does not match bitness of AHK.`nAHK is " this_bitness ", but Interception.dll is " other_bitness
ExitApp
}
DllCall("FreeLibrary", "Ptr", hModule)

dllName := "AutoHotInterception.dll"
dllFile := A_LineFile "\..\" dllName
hintMessage := "Try right-clicking lib\" dllName ", select Properties, and if there is an 'Unblock' checkbox, tick it`nAlternatively, running Unblocker.ps1 in the lib folder (ideally as admin) can do this for you."
Expand Down

0 comments on commit 1c20a69

Please sign in to comment.