D3D Hook
Hey guys my menu shows up, works fine, i just need a hook
i found this on the Net:
i am learning D3D soo calm down if i am not right....
see the red text? are addys of the game, but where can i find it...?
And... the hook should be in anothere .h file and include to my menu base? or how?
(could you answear to all my questions ?
)
i found this on the Net:
Code:
DWORD dwES_HOOK = 0x57341E;
DWORD dwES_RESTORE = dwES_HOOK+0x5;
DWORD dwRES_HOOK = 0x570E4E;
DWORD dwRES_RESTORE = dwRES_HOOK+0x7;
DWORD dwPRES_HOOK = 0x65B316;
DWORD dwPRES_RESTORE = dwPRES_HOOK+0x5;
__declspec( naked ) void Present_Hook( )
{
_asm
{
MOV ECX, DWORD PTR DS:[EAX]
MOV EDX, DWORD PTR DS:[ECX+0x44]
PUSHAD
}
//call your shit here
_asm
{
POPAD
JMP[ dwPRES_RESTORE ]
}
}
_declspec( naked ) void Reset_Hook( )
{
_asm
{
MOV ECX, DWORD PTR DS:[EAX]
MOV EDX, DWORD PTR DS:[ECX+0x40]
PUSHAD
}
main->OnLostDevice( );
_asm
{
POPAD
CALL EDX
PUSHAD
}
main->OnResetDevice( );
_asm
{
POPAD
JMP[ dwRES_RESTORE ]
}
}
see the red text? are addys of the game, but where can i find it...?
And... the hook should be in anothere .h file and include to my menu base? or how?
(could you answear to all my questions ?
)