Yea i agree. Does anyone kno where to get updated detours?
EnginePK Source
that is really smart, nice 

I dont know if this is from the updated detours or not but it works perfectly for me:
Works just the same way as the other in the PK Source but you just have to cast the function arguments to BYTE*
EDIT: NOT made by me, i dont take any credits, i found it somewhere on internet a long time ago.
Code:
void* DetourFunc(BYTE *src, const BYTE *dst, const int len)
{
BYTE *jmp = (BYTE*)VirtualAlloc(NULL, len+5, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
DWORD dwback, dwback2;
VirtualProtect(src, len, PAGE_READWRITE, &dwback);
VirtualProtect(jmp, len+5, PAGE_READWRITE, &dwback2);
memcpy(jmp, src, len); jmp += len;
jmp[0] = 0xE9;
*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
src[0] = 0xE9;
*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
VirtualProtect(jmp, len+5, dwback2, &dwback2);
VirtualProtect(src, len, dwback, &dwback);
return (jmp-len);
}
EDIT: NOT made by me, i dont take any credits, i found it somewhere on internet a long time ago.
I can hook Present & Reset with it UD, atleast the game doesnt say anything and lets me play for hours with them on.
This thread is closed for replies.
