Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock
You last visited: Today at 06:45

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

Advertisement



d3d hooking problem

Discussion on d3d hooking problem within the WarRock forum part of the Shooter category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2010
Posts: 250
Received Thanks: 21
d3d hooking problem

hey ich mach grad des d3d hooking tut von purple.d1amond und habe als erstes um zu testen obs geht den code kopiert und versucht zu testen.

problem is nur, dass warrock crasht direkt nachdem ich beim patcher auf spiel starten geklickt habe.

weis einer, warum es nicht geht?

PS die endscene adresse habe ich die richtige reingemacht.

code:
-->
->
>

PHP Code:
#pragma once
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")

#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>

typedef HRESULT (WINAPItEndScene)(LPDIRECT3DDEVICE9 pDevice);
tEndScene pEndScene NULL;


D3DCOLOR txtPink D3DCOLOR_ARGB(255,2550255);


void Funktionen();
void *DetourFunc(BYTE *src, const BYTE *dst, const int len);


void Rechteck (LPDIRECT3DDEVICE9 Device_tint Xint Yint Lint HD3DCOLOR color)
{
D3DRECT rect = {XYX+LY+H};
Device_t->Clear(1, &rectD3DCLEAR_TARGETcolor00); 
}


HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{  

    
Rechteck (pDevice1010200200txtPink);


    return 
pEndScene(pDevice); 
}
 
void Funktionen()
{
        
HMODULE hModule NULL;
        while( !
hModule )
        {
                
hModule GetModuleHandleA"d3d9.dll" );
                
Sleep100 );                            
        }
      
        
pEndScene = (tEndScene )DetourFunc((PBYTE)  0x7542CE09 ,(PBYTE)hkEndScene5); 
}

int WINAPI DllMain(HINSTANCE hInst,DWORD reason,LPVOID reserved
{
        switch(
reason)
        {
        case 
DLL_PROCESS_ATTACH:

                
CreateThread(00, (LPTHREAD_START_ROUTINEFunktionen000); 
                
                break;
        }
        return 
true;
}

void *DetourFunc(BYTE *src, const BYTE *dst, const int len)
{                                                            
    
BYTE *jmp = (BYTE*)malloc(len+5);
    
DWORD dwback;
    
VirtualProtect(srclenPAGE_READWRITE, &dwback);
    
memcpy(jmpsrclen); jmp += len;
        
jmp[0] = 0xE9;
    *(
DWORD*)(jmp+1) = (DWORD)(src+len jmp) - 5;
    
src[0] = 0xE9;
    *(
DWORD*)(src+1) = (DWORD)(dst src) - 5;
    
VirtualProtect(srclendwback, &dwback);
    return (
jmp-len);

bammes is offline  
Old 02/12/2011, 22:18   #2
 
elite*gold: LOCKED
Join Date: Feb 2011
Posts: 661
Received Thanks: 724
Poste es doch bitte in den Sticky <:

#closerequest
.ɖєaη is offline  
Thanks
1 User
Old 02/12/2011, 22:27   #3


 
elite*gold: 1091
Join Date: Jun 2007
Posts: 19,836
Received Thanks: 7,180
#closed
Mostey is offline  
Closed Thread


Similar Threads Similar Threads
[How To]D3D Hooking erstellen...
06/11/2011 - WarRock Guides, Tutorials & Modifications - 28 Replies
D3D Hooking Tutorial Inhalt Einleitung Vorraussetzungen Die DLL Coden Rechtecke && Schrift Zeichnen Memoryhacks aus der DLL heraus
[C++] Function Hooking.
08/25/2010 - CO2 Programming - 4 Replies
Well I hate writing tutorials where you need no brain at all, but this is as simple as its gonna get! Here's an example i whipped together for Minesweeper :p Ofcourse within CO theres stuff you can do aswell, once you know a function! (for example sending magic attacks like stig *hint hint*) So after trying this out I suggest you to read more about this subject! (if you're not experienced with function hooks) And share your sources in this section!
Text Hooking
07/09/2010 - General Coding - 5 Replies
Hallo Leute, ich wollte mal fragen ob jemand erfahrungen mit Texthooking hat? Ich und ein Team wollen eine Visual Novel übersetzen Das Problem: Wenn wir das mit den bisher herrausgefundenen Methoden machen müssen wir erst jedes Spiel 100% Durchspiel und das kostet einfach zu viel Zeit Mit OllyDbg hab ich es auch versucht nur leider ohne erfolg :/ Kann uns evtl. jemand helfen?
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...
[CODING] DLL and hooking..
12/14/2006 - Conquer Online 2 - 0 Replies
.



All times are GMT +1. The time now is 06:46.


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.