7
Answers

API.UnhookWindowsHookEx Problem?

Raysefo

Raysefo

12y
2.9k
1
Hi,

I am getting key strokes from keyboard. First I start listening keystrokes as follows:

Process _this = Process.GetCurrentProcess();             ProcessModule mod = _this.MainModule;             hd = HookFunc;             kh = _kh;               hhk = API.SetWindowsHookEx(13, hd, API.GetModuleHandle(mod.ModuleName), 0);

Then according to some condition I stop listening keystrokes as follows:
return API.UnhookWindowsHookEx(hhk); 

The problem is, when I want to listen to keystrokes again, It does NOT capture them.

Any help please?

Best Regards.




Answers (7)