hey i have a code for a dll hack but if i whant to compile it i get 8 errors 0 warnings - errors:
Code:
--------------------Configuration: HM - Win32 Debug--------------------
Compiling...
main.cpp
C:\Documents and Settings\Luc\Bureaublad\OP7 Teleport\HM\main.cpp(44) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\Luc\Bureaublad\OP7 Teleport\HM\main.cpp(44) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\Luc\Bureaublad\OP7 Teleport\HM\main.cpp(44) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\Luc\Bureaublad\OP7 Teleport\HM\main.cpp(46) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\Luc\Bureaublad\OP7 Teleport\HM\main.cpp(46) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\Luc\Bureaublad\OP7 Teleport\HM\main.cpp(46) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\Luc\Bureaublad\OP7 Teleport\HM\main.cpp(50) : error C2143: syntax error : missing ';' before '{'
C:\Documents and Settings\Luc\Bureaublad\OP7 Teleport\HM\main.cpp(50) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.
main.obj - 8 error(s), 0 warning(s)
The Project Code
Code:
#include <windows.h>
#include <stdio.h>
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <float.h>
using namespace std;
DWORD WINAPI LoopFunction( LPVOID lpParam )
{
BYTE StandingON[] = {0x8B, 0x02, 0x90};
BYTE CrouchingON[] = {0x8B, 0x11, 0x90};
BYTE StandingOFF[] = {0x8B, 0x42, 0x4C};
BYTE CrouchingOFF[] = {0x8B, 0x51, 0x50};
bool Crosshair = false;
HANDLE operation7 = GetCurrentProcess();
while(1) {
if (GetAsyncKeyState(VK_F3)&0x80000) {
if (Crosshair == true) {
WriteProcessMemory(operation7, (void*)(0x05E2C88), &StandingOFF, 3, 0);
WriteProcessMemory(operation7, (void*)(0x05E2C93), &CrouchingOFF, 3, 0);
Crosshair = false;
}
else if( Crosshair == false) {
WriteProcessMemory(operation7, (void*)(0x05E2C88), &StandingON, 3, 0);
WriteProcessMemory(operation7, (void*)(0x05E2C93), &CrouchingON, 3, 0);
Crosshair = true;
}
}
}
//some CPU relief
Sleep(200);
return 0;
}
;}
return 0;
}
BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH) {
CreateThread(NULL,0,&LoopFunction,NULL,0,NULL);
}
return 1;
}
What is wrong?
PS:Using Microsoft visual c++ 6.0 no eclipse
Its from a tutorial (the code)
TY luckie12