G
Guest
Hi!
I have some problems to create keyboard hook with Visual Studio 2005.
I have created this small solution:
http://www.igordamiani.it/WindowsApplication2.zip
With VS2003, it's all correct.
With VS2005, i obtain an exception
In particular, this is the line that fails:
keybhook = SetWindowsHookEx(WH_KEYBOARD_LL, kbcatcher,
Marshal.GetHINSTANCE(typeof(KeyboardHook).Module),0);
keybhook equals 0, and no hook on keyboard is created...
Can you help me, please?
I have some problems to create keyboard hook with Visual Studio 2005.
I have created this small solution:
http://www.igordamiani.it/WindowsApplication2.zip
With VS2003, it's all correct.
With VS2005, i obtain an exception
In particular, this is the line that fails:
keybhook = SetWindowsHookEx(WH_KEYBOARD_LL, kbcatcher,
Marshal.GetHINSTANCE(typeof(KeyboardHook).Module),0);
keybhook equals 0, and no hook on keyboard is created...
Can you help me, please?