_declspec(dllimport) BOOL installhook(DWORD thread_id);
DWORD thread_id=GetWindowThreadProcessId(thread_hwnd,NULL);//在这里thread_id是有值的
installhook(thread_id);//到这里thread_id就变为0了,小弟不懂啊!为何这样呢?
BOOL installhook(DWORD thread_id)
{
hKeyHook=SetWindowsHookEx(WH_KEYBOARD,(HOOKPROC)KeyboardProc,GetModuleHandle("HookApiOtherDll.dll"),thread_id);
return TRUE;}
DWORD thread_id=GetWindowThreadProcessId(thread_hwnd,NULL);//在这里thread_id是有值的
installhook(thread_id);//到这里thread_id就变为0了,小弟不懂啊!为何这样呢?
BOOL installhook(DWORD thread_id)
{
hKeyHook=SetWindowsHookEx(WH_KEYBOARD,(HOOKPROC)KeyboardProc,GetModuleHandle("HookApiOtherDll.dll"),thread_id);
return TRUE;}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货