clean up, fix NPE (http://ea.jetbrains.com/browser/ea_problems/18498)
[fedora-idea.git] / native / focusKiller / HookImportFunction.h
blob325a71e141ffa66a5b2a771e475582193899aaa4
1 /*
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.
7 All rights reserved.
9 */
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__