OldSchoolHack

Register / Login English

User Search: TrIxO

Search-Information
TrIxO
Threads
Thread Forum Last Post Posts Views
icon

Go to first new post C++ Dll Problem Posted on: Sun 23. Dec 2012, 00:34

TrIxO

preview Preview

Go To Post

Hallo ich bin neu beim Game-Hacking lernen und habe mich dran gesetzt in C++ einen Doom95 Hack zu schreiben als übung

hier der Source Code:


#include <windows.h>

// Die 3 Adressen sind für Munition.
#define Ammo1_Adress 0x005F22EC
#define Ammo2_Adress 0x005F244C
#define Ammo3_Adress 0x004825B4

void RewriteValues() {
    int *Ammo1Ptr;
    int *Ammo2Ptr;
    int *Ammo3Ptr;
   
// Die Adresse wird hier übergeben.    
Ammo1Ptr=(int *)Ammo1_Adress;
Ammo2Ptr=(int *)Ammo2_Adress;
Ammo3Ptr=(int *)Ammo3_Adress;

// Die Adresse wird hier Deferenziert.
*Ammo1Ptr=9999;
*Ammo2Ptr=9999;
*Ammo3Ptr=9999;

}

BOOL WINAPI DllMain(HINSTANCE hinstDll,DWORD Reason,LPVOID Reserved){


switch(Reason){
        //5.
case DLL_PROCESS_ATTACH:
RewriteValues();
break;
       //6.
case DLL_PROCESS_DETACH:
MessageBox(NULL,"DLL Hack is Detached","Hey",0);
break;

}


return TRUE;
}

Aber der Source code lässt sich nicht kompilieren weil eine fehlermeldung kommt was habe ich falsch gemacht?
VB, C/C++, Delphi, etc

Mon 24. Dec 2012, 13:04

by TrIxO Go to last post
5 561
icon

Go to first new post C++ Dll Problem Posted on: Sun 23. Dec 2012, 00:34

TrIxO

preview Preview

Go To Post

Ich benutze Dev C++ wollte ich nur sagen weil auf Release kann man nur bei Visual Studio umschalten ausserdem habe ich Dll Projekt ausgewählt wenn ich es Kompiliere dann kommt die fehlermeldung [Linker error] undefined reference to WinMain@16 Id returned 1 exit status
VB, C/C++, Delphi, etc

Mon 24. Dec 2012, 13:04

by TrIxO Go to last post
5 561
icon

Go to first new post C++ Dll Problem Posted on: Sun 23. Dec 2012, 00:34

TrIxO

preview Preview

Go To Post

Ok danke SilverFire habe mir visualstudio geholt und hat geklappt
VB, C/C++, Delphi, etc

Mon 24. Dec 2012, 13:04

by TrIxO Go to last post
5 561
Downloads
No downloads found.