DELPHI HOOK所有窗体创建源代码
通过全局DLL注入,HOOK一切窗体创建的源代码,运行任何带窗体的EXE文件都会被HOOK住,然后可以对其进行各种操作,用途你懂的; 关键代码: function CallWndProc(nCode: Integer; WParam: WPARAM; LParam: LPARAM): LRESULT; stdcall; var winStruct: TCWPStruct; arr: array[0..254] of Char; begin winStruct := PCWPSTRUCT(LParam)^; if nCode >= 0 then begin if winStruct.message = WM_SHOWWINDOW then begin SendMessage(winStruct.hwnd,WM_GETTEXT,255,Longint(@arr)); if arr='AIDA64 Extreme' then begin sendMessage(winStruct.hwnd,WM_CLOSE,0,0); end; SaveInfo('发现窗口创建:::' + inttostr(winStruct.hwnd)+arr); end; end;
用户评论
不是我想要的代码,只能说帮助不大