error C2664: 'SetWindowsHookExA' : cannot convert parameter 4 from 'void *' to 'unsigned long'
void SetHook()
{
g_hMouse=SetWindowsHookEx(WH_MOUSE,MousePROC,NULL,GetCurrentThread());
// g_hKeyboard=SetWindowsHookEx(WH_KEYBOARD,KeyboardPROC,GetModuleHandle("HOOK"),0);
}
解决办法:错误很小,构造函数中的参数少写了
void SetHook()
{
g_hMouse=SetWindowsHookEx(WH_MOUSE,MousePROC,NULL,GetCurrentThreadId());
// g_hKeyboard=SetWindowsHookEx(WH_KEYBOARD,KeyboardPROC,GetModuleHandle("HOOK"),0);
}