Trying to convert my home app from vb6 to .net but have a problem. I am using the code in the tut by Paul Kimmel but it is returning Err.LastDllError = 126.
I am using this code as posted on Win7 and VS2010.
KeyboardHandle is retuning 0 but Im not sure which part of it is the problem. There is a lot of new stuff there for me.
Thanks for any help.Code:Public Sub HookKeyboard() callback = New KeyboardHookDelegate(AddressOf KeyboardCallback) KeyboardHandle = SetWindowsHookEx(WH_KEYBOARD_LL, callback, Marshal.GetHINSTANCE([Assembly].GetExecutingAssembly.GetModules()(0)).ToInt32, 0) Call CheckHooked() End Sub




Reply With Quote