关于键盘钩子的问题,请教大家 Delphi / Windows SDK/APIhttp://www.delphi2007.net/DelphiAPI/html/delphi_20061122084602187.html
function StartHookMouse:boolean;
const
WH_MOUSE_LL = 14;
begin
if hhkLowLevelMouse = 0 then hhkLowLevelMouse := SetWindowsHookEx(WH_MOUSE_LL, LowlevelMouseProc, HInstance, 0);
//if hhkLowLevelMouse = 0 then hhkLowLevelMouse := SetWindowsHook(WH_MOUSE_LL, @LowlevelMouseProc);
result := (hhkLowLevelMouse <> 0) ;
end;
这段放在自己的程序里面,没有放在dll里面,在xp里面可以做到全局钩子,但是在
98中钩子无效,何解????
请问高手
kernel32.dll?
function StartHookMouse:boolean;
begin
if hhkLowLevelMouse = 0 then hhkLowLevelMouse := SetWindowsHookEx(WH_MOUSE_LL, LowlevelMouseProc, HInstance, 0);
result := (hhkLowLevelMouse <> 0) ;
end;
const
WH_KEYBOARD_LL = 13;
WH_MOUSE_LL = 14;
98中钩子无效!
文章来源:
http://www.delphi2007.net/DelphiAPI/html/delphi_20061122084602187.html