• Advertisement
Sign in to follow this  

DirectX 9 hooking.

This topic is 1918 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I used this code right here https://github.com/t...e/D3D-Hook-Test to hook Directx's EndScene method.

The code is hooking properly, but the new EndScene method is just never called...at all.

This is the new function

HRESULT WINAPI D3DEndScene_hook(IDirect3DDevice9* device)
__asm pushad;
__asm popad;
return D3DEndScene_orig(device);

Basically a popup should appear every time EndScene is called, but it isn't. I am not sure where I am wrong.

Since the game uses LoadLibraryA to load d3d9.dll, I also used code from http://www.rohitab.c...ion-and-vtable/ to get the address of the loaded d3d9.dll and patch that.

EDIT:Fixed the problem, the code on github called device->Release(); Edited by farmdve

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement