Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 15:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C++] Hooking IDirect3DDevice9::Present

Discussion on [C++] Hooking IDirect3DDevice9::Present within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
Xorg's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 87
Received Thanks: 3
[C++] Hooking IDirect3DDevice9::Present

Hi
I am trying to hook this function.
Code:
HRESULT (WINAPI IDirect3DDevice9::*pOrigPresent)(CONST RECT * pSourceRect,CONST RECT * pDestRect,HWND hDestWindowOverride,CONST RGNDATA * pDirtyRegion) = &IDirect3DDevice9::Present;

HRESULT WINAPI m_Present(CONST RECT * pSourceRect,CONST RECT * pDestRect,HWND hDestWindowOverride,CONST RGNDATA * pDirtyRegion)
{
	printf("Hooked\n");
    return pOrigPresent(pSourceRect,pDestRect,hDestWindowOverride,pDirtyRegion);
}
Problem with compilation:
Code:
Error C2064: term does not evaluate to a function taking 4 arguments
Error moves to return pOrigPresent(pSourceRect,pDestRect,hDestWindowOver ride,pDirtyRegion);

Help please
Xorg is offline  
Reply


Similar Threads Similar Threads
C++ D3D Hooking
08/24/2009 - C/C++ - 12 Replies
Hallo zusammen, ich stehe gerade vor folgendem Problem: ich habe eine DLL und einen Loader gecoded, jedoch will ich anstelle des Loader einen Injecter haben, sprich: das spiel, in das injected werden soll, soll schon laufen. Natürlich hab ich das ganze schon probiert, jedoch werden die D3D-funktionen nicht wirklich gehookt, da die DLL auf ein Direct3DCreate9 wartet. Da diese Funktion aber wahrscheinlich direkt beim Starten des "Opfer-Spiels" ausgeführt wird, werden deswegen die anderen...
present for pets up pot
05/18/2009 - EO PServer Hosting - 0 Replies
bug present in the pets, increases of 50 each pot help me? Bug Resolved!
My Christmas Present To You
12/30/2008 - SRO Private Server - 18 Replies
Well, today when I was looking around in my computer for see what I have shit on my computer, I got to a dark place I hardly ever visit anymore, yes that's right the ECSRO folder!!!!!! Well, in this folder I found different stuff to ECSRO and there it was, a txt document I clicked on it, and guess what it was in it? Empty ECSRO Accs I created for a long time ago, I dont know which one that will work, but hopefully all will, and yes there is a email for them. I will be gone rest of this...
CR 1.0.4 up to the present
07/07/2008 - Cabal Hacks, Bots, Cheats, Exploits & Macros - 6 Replies
guy's i've been reading a lot of topics here in the forums that is really repetetive, even when some of them have already been answered... if some you guys are still having difficulties trying to run the newest version of Cabal Riders maybe here are some quick solutions... 1. if you have anti-virus installed whatever the heck it is, disable it, cuz it's messing with the 1.0.4 version of CR... 2. for PC's with DeepFreeze programs installed, disable it as well, in order for the 1.0.5 and...



All times are GMT +1. The time now is 15:22.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.