Leaf API Hooking Solution

hook callback function & API function variable
Download

Leaf API Hooking Solution Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Free
  • Publisher Name:
  • THE LAST LEAF
  • Publisher web site:
  • http://leafsolution.googlepages.com/
  • Operating Systems:
  • Windows 2000, Windows Vista, Windows NT, Windows XP
  • File Size:
  • 26.37K

Leaf API Hooking Solution Tags


Leaf API Hooking Solution Description

When hooking an API, we need to write some kind of hook callback function and original API function variable var MessageBoxANext : function (hWnd: HWND; lpText, lpCaption: PAnsiChar; uType: UINT): Integer; stdcall; function MessageBoxACallback(hWnd: HWND; lpText, lpCaption: PAnsiChar; uType: UINT): Integer; stdcall; begin Result := MessageBoxANext(hWnd, lpText, 'Message From Dll', uType); end; Put all of code in a dll for global API hook like this procedure DllMain(dwReason: DWORD); begin case dwReason of DLL_PROCESS_ATTACH: begin HookAPI('user32.dll', 'MessageBoxA', @MessageBoxACallback, @MessageBoxANext); end; DLL_PROCESS_DETACH: begin UnHookAPI('user32.dll', 'MessageBoxA', @MessageBoxANext); end; end; end; begin DllProc := @DllMain; DllMain(DLL_PROCESS_ATTACH); end.


Leaf API Hooking Solution Related Software