PECompact 2
API Hook Plug-ins
HOOK_DATA_INFO object
typedef struct _HOOK_DATA_INFO
{
WORD dwVersion;
WORD dwStructSize;
DWORD dwOffsetInitialize;
DWORD dwOffsetInitializeEx;
DWORD dwOffsetLoadLibraryA;
DWORD dwOffsetGetProcAddressWithHint;
DWORD dwOffsetTranslateAPIAddressToHookAddress;
} HOOK_DATA_INFO, *PHOOK_DATA_INFO;
This object prefixes the HOOK_DATA block of memory and describes the location of key functions inside the memory block. It also provides the version information of the API Hook Plug-in.
dwVersion that contains the version of the PECompact Plug-in SDK used to compile this API hook plug-in. This is defined in the pec2_hooks header file as PEC2_HOOKS_VERSION.
dwStructSize provides the size of the HOOK_DATA_INFO structure. This is included simply as an additional check to make sure that the PECompact version in use is compatible with your plug-in.
dwOffsetInitialize provides the offset of the Initialize function inside the HOOK_DATA block. For instance, if the function immediately follows the HOOK_DATA_INFO object, then its offset would be sizeof(HOOK_DATA_INFO).
dwOffsetInitializeEx provides the offset of the InitializeEx function inside the HOOK_DATA block. For instance, if the function immediately follows the HOOK_DATA_INFO object, then its offset would be sizeof(HOOK_DATA_INFO).
dwOffsetLoadLibraryA provides the offset of the LoadLibraryAHook function inside the HOOK_DATA block. For instance, if the function immediately follows the HOOK_DATA_INFO object, then its offset would be sizeof(HOOK_DATA_INFO).
dwOffsetGetProcAddressWithHint provides the offset of the GetProcAddressWithHintHook function inside the HOOK_DATA block. For instance, if the function immediately follows the HOOK_DATA_INFO object, then its offset would be sizeof(HOOK_DATA_INFO).
dwOffsetTranslateAPIAddressToHookAddress is the offset to TranslateAPIAddressToHookAddress.