|
HANDLE WINAPI MyGetCurrentProcess (VOID) // Replace the original GetCurrentProcess
{
HMODLE hMod = GetModelHandle ("npggNT.des");
if (hMod! = NULL) {
FreeLibrary (hMod); // Free it directly
}
UnhookGetCurrentProcess (); // Resume the function header when the thread we want to protect calls
HANDLE hProcess = GetCurrentProcess (); // Let it call
RehookGetCurrentProcess (); // Rehook
return hProcess; // Return the result of the call
}
Delphi does not seem to have GetModelHandle? How does GetModelHandle () in the above code be implemented in Delphi? |
|