15,473
社区成员




DllExport void WINAPI Install()
{
Hook=(HHOOK)SetWindowsHookEx(WH_KEYBOARD,(HOOKPROC)LauncherHook,theApp.m_hInstance,0);
}
LRESULT CALLBACK LauncherHook(int nCode,WPARAM wParam,LPARAM lParam)
{
LRESULT Result=CallNextHookEx(Hook,nCode,wParam,lParam);
//这里做按键判断
if(nCode==HC_ACTION)
{
if(lParam & 0x80000000)
{
//按下 bit 31 set 1 按下响应 set 0 弹起响应
}
return Result;
}