[C++]Call a Game Function

08/27/2013 20:38 LoveCpp#1
Hello guys here is a quick tutorial :


Source :

PHP Code:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"

// We will call our function.
// int sub_56E1B0 this is our function so lets call it
int (*WriteToSyserr)(const char*) = (int (*)(const char*) )0x0056E1B0;

extern int "C" _delspec(dllexport)Main(){
    
WriteToSyserr("We Rocked!!!!");
    return 
0;
}

BOOL APIENTRY DllMainHMODULE hModule,
                       
DWORD  ul_reason_for_call,
                       
LPVOID lpReserved
                     
)
{
    switch (
ul_reason_for_call)
    {
    case 
DLL_PROCESS_ATTACH:
        
Sleep(5000);
        
CreateThread(0NULLreinterpret_cast<LPTHREAD_START_ROUTINE>(Main), hModule0NULL);
    case 
DLL_THREAD_ATTACH:
    case 
DLL_THREAD_DETACH:
    case 
DLL_PROCESS_DETACH:
        break;
    }
    return 
TRUE;

Stay tuned for more!
Its basic calling for game hacking & game editing.
That offset for revision 26070 , you have to update it.
08/27/2013 21:26 [The]Domco#2
Nice :-)
08/27/2013 22:04 redoname#3
Hm, you just use pointer to a function and execute her, so nothing new.
08/27/2013 22:49 LoveCpp#4
i have already said dont write silly comments i did write there its for new c++ coders.