PECompact 2
API Hook Plug-ins
LoadLibraryAHook
HMODULE LoadLibraryAHook(TCHAR *ptszModule);
This function is invoked by the loader each
time a module is loaded or its reference count incremented. If a hook requires
that it exist in some pseudo-module that doesn't really exist, then this
function should return the pseudo handle. Otherwise, it should return the module
handle as returned by the LoadLibraryA function supplied to the
Initialize function.
The parameter is identical to the LoadLibrary parameter.
Since code is injected into compressed executables, it can not reference anything outside the bounds of the HOOK_DATA object or reference anything by static addresses, since those addresses will change. Therefore, it inherently can not have any references that require a base relocation.
ptszModule is the asciiz name of the module to be loaded.