Hi,
I want to get key presses on my application. The problem is when I use API.UnhookWindowsHookEx and after sometime to restart hooking as follows, application does NOT gets the key presses anymore.
How can I fix this?
Best Regards.
Dim _this As Process = Process.GetCurrentProcess
Dim modu As ProcessModule = _this.MainModule
hd = HookFunc
kh = _kh
hhk = API.SetWindowsHookEx(13, hd, API.GetModuleHandle(modu.ModuleName), 0)
I want to get key presses on my application. The problem is when I use API.UnhookWindowsHookEx and after sometime to restart hooking as follows, application does NOT gets the key presses anymore.
How can I fix this?
Best Regards.
Dim _this As Process = Process.GetCurrentProcess
Dim modu As ProcessModule = _this.MainModule
hd = HookFunc
kh = _kh
hhk = API.SetWindowsHookEx(13, hd, API.GetModuleHandle(modu.ModuleName), 0)
Last edited by a moderator: