Einzelnen Beitrag anzeigen

smc

Registriert seit: 21. Dez 2005
49 Beiträge
 
#1

c++ zu delphi (kleines snippet)

  Alt 2. Aug 2006, 10:22
kann mir zufällig jemand dieses c++ snippet delphinizen?

Code:
VOID stilleto_Hook(PDWORD pstilletoHook, DWORD dwstilletoOffset)
{
   DWORD dwOldProtect;
   
   g_stilletoOffset = dwstilletoOffset;
   
   if(pstilletoHook && g_stilletoOffset && VirtualProtect(pstilletoHook, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect))
   {
      g_pOrigstilletoFunc = *pstilletoHook + (PtrToUlong(pstilletoHook) + 4);
      *pstilletoHook = PtrToUlong(stilleto_Stub) - (PtrToUlong(pstilletoHook) + 4);
      VirtualProtect(pstilletoHook, 4, dwOldProtect, &dwOldProtect);
   }
}
danke schonmal
  Mit Zitat antworten Zitat