Whats wrong with my base
Hey guys, so i was making my base and everything was going well, so i though i should try it and when i did i got into a match and played for a few mins and then the game exited -_-
Can someone please tell me what happened oh and i think the problem may exist within this code:
Can someone please tell me what happened oh and i think the problem may exist within this code:
Code:
void APIENTRY HookAPI(LPVOID param)
{
DWORD hD3D, adr, *vTable;
hD3D=0;
do {
hD3D = (DWORD)GetModuleHandleA("d3d9.dll");
Sleep(25);
} while(!hD3D);
adr = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
if(adr){
memcpy(&vTable,(void *)(adr+2),4);
oPresent = (HRESULT (WINAPI *)(LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect,CONST RECT* pDestRect, HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion))(DetourFunction((PBYTE)vTable[17],(PBYTE)dPresent));
//oEndScene = (HRESULT (WINAPI *)(LPDIRECT3DDEVICE9 pDevice))(DetourFunction((PBYTE)vTable[42],(PBYTE)dEndScene));
}
else
MessageBoxA(NULL,"~Shit", "Hook", MB_OK);
};
make a bypass or a new detours