I am trying to Hook EndScene via Detour: Nukem9/detours
My problem is when I want to detour the Function:
HRESULT _stdcall hkEndScene(LPDIRECT3DDEVICE9 pDevice);
oEndScene = (EndScene)Detours::X86::DetourFunction((uintptr_t)d3d9Device,(uintptr_t)Hooks::hkEndScene);
This is a simple D3D9 EndScene Hook Template, you can hit compile and inject it into any Direct3D9 game and it will show a red box on the screen.
Credits to @Broihon @0xDEC0DE @Solaire their code was instrumental in creating this little template.
This template gets the D3D9 Device Pointer and...