Sign in to follow this  

DirectX 9 hooking.

Recommended Posts

I used this code right here [url=""][/url] to hook Directx's EndScene method.

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

This is the new function

[code]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 [url=""]http://www.rohitab.c...ion-and-vtable/[/url] 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this