Whoops, my mistake, I posted code I was using to test different configurations. It should beVB Code:
Public Function DLLMain(hInst As Long, ByVal fdwReason As Long, _ lpvReserved As Long) As LongVB Code:
Public Function DLLMain(ByVal hInst As Long, ByVal fdwReason As Long, _ ByVal lpvReserved As Long) As Long
The hInst value passed to DllMain needs to be passed as is to SetWindowsHookExit's a handle (which is a pointer) and this function needs that pointer.Code:HHOOK SetWindowsHookEx( int idHook, HOOKPROC lpfn, HINSTANCE hMod, DWORD dwThreadId );
I don't know why the code is giving a breakpoint at that line. Again we don't need subclassing now so let's just disable it for the time being.




Reply With Quote