Jump to content

  • Log In with Google      Sign In   
  • Create Account


DirectX 9 hooking.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 farmdve   Members   -  Reputation: 194

Like
0Likes
Like

Posted 23 November 2012 - 05:06 AM

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;
MessageBoxA(NULL, "DX", "DX", MB_ICONEXCLAMATION);
__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, 23 November 2012 - 05:29 AM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS