1
16cy
Unregistered / Unconfirmed
GUEST, unregistred user!
case wParam of<br> Ord('1'):<br> begin<br> if Messagebox(GetActiveWindow, 'Hook ExtTextOut', 'Message',MB_YESNO) = ID_YES then<br> begin<br> try<br> AA:= TAPI.Create;<br> AA.API1:= TAPIHooker.Create(nil);<br> AA.API1.DllName:= 'gdi32.dll';<br> AA.API1.DllFunction:= 'ExtTextOutA';<br> AA.API1.Params:= 8;<br> AA.API1.OnAPIHook:= aa.OnHookMSG;<br> AA.API1.OnAPIUnHook:= aa.OnHookMSG;<br> AA.API1.OnAPIHookProc:= AA.HookProc1;<br> AA.API1.HookEnabled:= True;<br> except<br> end;<br> end else<br> try<br> AA.API1.HookEnabled:= False;<br> AA.API1.Free;<br> AA.Free;<br> except<br> end;<br>function TAPI.HookProc1(const aParam: array of DWORD): DWORD;<br>var<br>ap5 :string;<br>begin<br> ap5:='我笨,白大哥别见怪'+pchar(aParam[5]);<br> Result:= dword(ExtTextOutA(aParam[0], aParam[1], aParam[2], aParam[3],PRect(aParam[4]),pchar(ap5),aParam[6],pointer(aParam[7])));<br> //MessageBox(GetActiveWindow, pchar(aParam[5]), '信息', 0);<br>end;<br><br>我把白大哥的这段程序改成上面的,怎么不能正确钩到消,请白大哥指点