2 Module : HookImportFunction.h
3 Purpose: Defines the interface for code to hook a call to any imported Win32 SDK
4 Created: PJN / 23-10-1999
6 Copyright (c) 1999 by PJ Naughter.
11 #ifndef __HOOKIMPORTFUNCTION_H__
12 #define __HOOKIMPORTFUNCTION_H__
16 ////////////// Structures ///////////////////////////
18 typedef struct tag_HOOKFUNCDESC
20 LPCSTR szFunc
; // The name of the function to hook.
21 PROC pProc
; // The procedure to blast in.
22 } HOOKFUNCDESC
, * LPHOOKFUNCDESC
;
26 ////////////// Functions ////////////////////////////
28 PIMAGE_IMPORT_DESCRIPTOR
GetNamedImportDescriptor(HMODULE hModule
, LPCSTR szImportMod
);
29 BOOL
HookImportFunctionsByName(HMODULE hModule
, LPCSTR szImportMod
, UINT uiCount
,
30 LPHOOKFUNCDESC paHookArray
, PROC
* paOrigFuncs
, UINT
* puiHooked
);
33 #endif //__HOOKIMPORTEDFUNCTION_H__