SetWindowsHookEx and HINSTANCE;
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
I am tring to build a keyboard hook that blocks the windows keys. It has to be in a seperate dll. The call to SetWindowsHookEx requires a HINSTANCE to the dll. How do I get an HINSTANCE to my dll with out having to use CWinApp. There is way more stuff in the CWinApp class than I would like to use.
//This works class CTaskKeyHookDll : public CWinApp { public : CTaskKeyHookDll(){ } ~CTaskKeyHookDll(){ } } MyDll; //This don't work class CTaskKeyHookDll { public : HINSTANCE hInstance; CTaskKeyHookDll(){ } ~CTaskKeyHookDll(){ } } MyDll;
Anyone know how to do this? Thank You Bo Hunter
-
I am tring to build a keyboard hook that blocks the windows keys. It has to be in a seperate dll. The call to SetWindowsHookEx requires a HINSTANCE to the dll. How do I get an HINSTANCE to my dll with out having to use CWinApp. There is way more stuff in the CWinApp class than I would like to use.
//This works class CTaskKeyHookDll : public CWinApp { public : CTaskKeyHookDll(){ } ~CTaskKeyHookDll(){ } } MyDll; //This don't work class CTaskKeyHookDll { public : HINSTANCE hInstance; CTaskKeyHookDll(){ } ~CTaskKeyHookDll(){ } } MyDll;
Anyone know how to do this? Thank You Bo Hunter