When i compile this code i get a few errors (i guess are simple for you guys)
void WriteMem(DWORD MemOffset, DWORD DataPtr, DWORD dataLen) {
{ DWORD OldProt;
VirtualProtect((void*) MemOffset, dataLen, PAGE_EXECUTE_READWRITE, &OldProt);
RtlMoveMemory((void*) MemOffset, (const void*) DataPtr, dataLen);
VirtualProtect((void*) MemOffset, dataLen, OldProt, &OldProt);
}
void EnableHack(BYTE* AddrToChange, BYTE* To, DWORD len); {
for(DWORD i = 0; i < len; i++)
WriteMem((DWORD)AddrToChange+i, (DWORD)To+i, 1);
}
Errors
--------------------Configuration: DLL - Win32 Debug--------------------
Compiling...
Main.cpp
error C2601: 'WriteMem' : local function definitions are illegal
error C2601: 'Initialize' : local function definitions are illegal
error C2601: 'Shutdown' : local function definitions are illegal
error C2601: 'DllMain' : local function definitions are illegal
fatal error C1004: unexpected end of file found
Error executing cl.exe.
DLL.dll - 5 error(s), 0 warning(s)