Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 19:10

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: wolf et wallhack
PostPosted: 30 Dec 2008 22:36 

Joined: 30 Dec 2008 22:31
Posts: 1
okay ive been learning c++ im currently using devc++ and im coming accross this error. im a complete noob if this is easy answer but. i get this error




Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\notsure\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\notsure\Makefile.win" all
dllwrap.exe --output-def libfsdfsd.def --implib libfsdfsd.a dllmain.o -L"C:/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias -o fsdfsd.dll

dllmain.o(.text+0xf3):dllmain.c: undefined reference to `DetourFunction'
dllmain.o(.text+0x110):dllmain.c: undefined reference to `DetourFunction'
dllmain.o(.text+0x12d):dllmain.c: undefined reference to `DetourFunction'
dllmain.o(.text+0x159):dllmain.c: undefined reference to `DetourFunction'
collect2: ld returned 1 exit status

dllwrap.exe: no export definition file provided.
Creating one, but that may not be what you want
dllwrap.exe: gcc exited with status 1

make.exe: *** [fsdfsd.dll] Error 1

Execution terminated

and this is the thing im trying to put into dll. i have made 1 thing sinners trigger bot and i compiled and works. but i cant get this to work....
#include <string.h>
#include <windows.h>
#include <detours.h>

static int wallhack = 0;
static int isPlayer = 0;

HMODULE (WINAPI *oLoadLibrary)(LPCSTR);
void (*oCG_DrawActiveFrame)(int, int, int);
void (*otrap_R_AddRefEntityToScene)(int *);
void (*oCG_Player)(int *);

void (hCG_Player)(int *data) {
isPlayer = 1;
oCG_Player(data);
isPlayer = 0;
}

void htrap_R_AddRefEntityToScene(int *data) {
if (wallhack&&isPlayer) data[1] |= 8;
otrap_R_AddRefEntityToScene(data);
}

void hCG_DrawActiveFrame(int serverTime, int stereoView, int demoPlayback) {
if (GetAsyncKeyState(VK_RBUTTON)&1) wallhack = !wallhack;
oCG_DrawActiveFrame(serverTime, stereoView, demoPlayback);
}

HMODULE __stdcall hLoadLibraryA(LPCSTR lpLibFileName) {
HMODULE oModule = oLoadLibrary(lpLibFileName);

if (strstr(lpLibFileName, "\\etpro\\cgame_mp_x86.dll")) {
oCG_DrawActiveFrame = (void (__cdecl *)(int,int,int))
DetourFunction((PBYTE)oModule+0x9CFC0, (PBYTE)hCG_DrawActiveFrame);
otrap_R_AddRefEntityToScene = (void (__cdecl *)(int *))
DetourFunction((PBYTE)oModule+0x96DC0, (PBYTE)htrap_R_AddRefEntityToScene);
oCG_Player = (void (__cdecl *)(int *))
DetourFunction((PBYTE)oModule+0x7EA20, (PBYTE)hCG_Player);
}

return oModule;
}

BOOL WINAPI DllMain(HINSTANCE module_handle, DWORD event, LPVOID reserved) {
if (event == DLL_PROCESS_ATTACH) oLoadLibrary = (HMODULE (__stdcall *)(LPCSTR))
DetourFunction((PBYTE)LoadLibraryA, (PBYTE)hLoadLibraryA);

return TRUE;
}


Top
 Profile  
 
 
 Post subject: Re: wolf et wallhack
PostPosted: 30 Dec 2008 23:51 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
don't know, anyway try to add detours.lib to your compiling command


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: