代码一:
if hook = 0 then begin
hook:=SetWindowsHookEx(WH_KEYBOARD_LL,@HookProc,hInstance,GetCurrentProcessId);
MessageBox(0, PChar(IntToStr(hook)), 'b', 0);
end;
============================
代码二:
if hook = 0 then begin
hook:=SetWindowsHookEx(WH_KEYBOARD_LL,@HookProc,hInstance,0);
MessageBox(0, PChar(IntToStr(hook)), 'b', 0);
end;
============================
我想钩当前线程,为何“代码一”,显示0,也就是没有成功。“代码二”是全局钩子,显示成功。
我想在非DLL下做钩子,请求帮助。
if hook = 0 then begin
hook:=SetWindowsHookEx(WH_KEYBOARD_LL,@HookProc,hInstance,GetCurrentProcessId);
MessageBox(0, PChar(IntToStr(hook)), 'b', 0);
end;
============================
代码二:
if hook = 0 then begin
hook:=SetWindowsHookEx(WH_KEYBOARD_LL,@HookProc,hInstance,0);
MessageBox(0, PChar(IntToStr(hook)), 'b', 0);
end;
============================
我想钩当前线程,为何“代码一”,显示0,也就是没有成功。“代码二”是全局钩子,显示成功。
我想在非DLL下做钩子,请求帮助。
解决方案 »
- ★★★★ 当爹不容易,做父母也不容易,感谢父母养育之恩 ★★★★
- winexec函数的路径调用问题!在线等!
- 在Delphi8中还可以使用Ado控件吗?
- sql求救!!!!!!!!!!!!!!!!!!!!
- delphi里自带的InstallShield在哪里呀?帮忙指引一下!
- 求救 ,请帮忙
- excel导入数据库时如何判断导入的excel里有多少记录?这循环要怎么写?
- sql求和函数sum的使用疑问?
- 关于事物的问题?
- 请提供一份小型软件发布会的提纲及开场白和结束语。
- delphi exception eolesyserror in module project1.exe
- Delphi用ExcelApp操作03Excel表格,如果Excel是07的不兼容
看微软的介绍
A handle to the DLL containing the hook procedure pointed to by the lpfn parameter. The hMod parameter must be set to NULL if the dwThreadId parameter specifies a thread created by the current process and if the hook procedure is within the code associated with the current process.