BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc > Class Template Reference

Allows patching import table of both local and remote processes. More...

#include <pepatch.h>

List of all members.

Classes

struct  _IMAGE_DATA_DIRECTORY
class  ImportTable

Public Member Functions

 ImportTablePatcher (void *pAddr, void *pContext)
LPVOID QueryImportedFunction (const char *pszLibName, const char *pszFuncName)
LPVOID PatchImportedFunction (const char *pszLibName, const char *pszFuncName, LPVOID pNewPointer)

Protected Member Functions

char * LocatePEHeader ()
char * LocateSectionList ()
char * LocateObjectDirectory (int *pSectionCount)
ImportTable LocateImportsSection (int *pSize=NULL)

Private Types

typedef struct
BazisLib::Win32::ImportTablePatcher::_IMAGE_DATA_DIRECTORY 
IMAGE_DATA_DIRECTORY
typedef struct
BazisLib::Win32::ImportTablePatcher::_IMAGE_DATA_DIRECTORY
PIMAGE_DATA_DIRECTORY

Private Attributes

char * m_pAddr
void * m_pContext


Detailed Description

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
class BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >

Allows patching import table of both local and remote processes.

This class is used to patch image import table after the image is loaded to memory. It allows analyzing PE headers, finding the import table pointers, and modifying them.


Member Typedef Documentation

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
typedef struct BazisLib::Win32::ImportTablePatcher::_IMAGE_DATA_DIRECTORY BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::IMAGE_DATA_DIRECTORY [private]

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
typedef struct BazisLib::Win32::ImportTablePatcher::_IMAGE_DATA_DIRECTORY * BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::PIMAGE_DATA_DIRECTORY [private]


Constructor & Destructor Documentation

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::ImportTablePatcher ( void *  pAddr,
void *  pContext 
) [inline]


Member Function Documentation

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
ImportTable BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::LocateImportsSection ( int *  pSize = NULL  )  [inline, protected]

Here is the call graph for this function:

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
char* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::LocateObjectDirectory ( int *  pSectionCount  )  [inline, protected]

Here is the call graph for this function:

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
char* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::LocatePEHeader (  )  [inline, protected]

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
char* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::LocateSectionList (  )  [inline, protected]

Here is the call graph for this function:

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
LPVOID BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::PatchImportedFunction ( const char *  pszLibName,
const char *  pszFuncName,
LPVOID  pNewPointer 
) [inline]

Here is the call graph for this function:

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
LPVOID BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::QueryImportedFunction ( const char *  pszLibName,
const char *  pszFuncName 
) [inline]

Here is the call graph for this function:


Member Data Documentation

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
char* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::m_pAddr [private]

template<ptr_LocateImportsSection _LocateImportsSectionFunc = NULL, copyfunc rdfunc = _simplecpy, copyfunc wrfunc = _simplecpy>
void* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::m_pContext [private]


The documentation for this class was generated from the following file:
SourceForge.net Logo