-4

This error I've managed to solve once more had some problems with the computer and I lost everything. Could you help me? I lack only resolve this error, More can not in any way.

------ Build started: Project: Ruby, Configuration: Release Win32 ------
main.cpp
main.cpp(172): error C2660: 'EscanerProcessoMemoria' :
function does not take 0 arguments
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The line :

    // main.cpp

#include "StdAfx.h"
#include "MNameColor.h"
#include "MRealHooks.h"
#include "MMrsDecryptor.h"
#include "MInitialCostume.h"
#include "MD5Wrapper.h"
#include "ZGameClient.h"
#include "ZPost.h"
#include "Globais.h"
#include "D3D.h"
#include "MrsCheck.h"
#include "GunzEXP.h"
#include "Hack.h"
#include "HotKeys.h"
#include "Contador.h"
#include "Heuristica.h"
void Exchange1( DWORD Pointer, BYTE Value ){
    DWORD Old;

    VirtualProtect( (LPVOID)Pointer, 1, PAGE_EXECUTE_READWRITE, &Old );
    *(BYTE*)Pointer = Value;
    VirtualProtect( (LPVOID)Pointer, 1, Old, &Old );
}

void Exchange2( DWORD Pointer, WORD Value ){
    DWORD Old;

    VirtualProtect( (LPVOID)Pointer, 2, PAGE_EXECUTE_READWRITE, &Old );
    *(WORD*)Pointer = Value;
    VirtualProtect( (LPVOID)Pointer, 2, Old, &Old );
}

void Exchange4( DWORD Pointer, DWORD Value ){
    DWORD Old;

    VirtualProtect( (LPVOID)Pointer, 4, PAGE_EXECUTE_READWRITE, &Old );
    *(DWORD*)Pointer = Value;
    VirtualProtect( (LPVOID)Pointer, 4, Old, &Old );
}

DWORD ToDword( ... ){
    __asm{
        mov eax, dword ptr ss:[esp + 4]
        retn
    }
}

void Apply( void ){
    md5wrapper mRunnable;

    char szModule[ 256 ];
    GetModuleFileName( GetModuleHandle( NULL ), szModule, 256 );

    string mPath = string( szModule );

    unsigned long Old;
    MColor1Detour.Detour( (PBYTE)0x621C00, (PBYTE)GetUserGradeIDColor );
    MColor1Detour.Apply();

    MColor2Detour.Detour( (PBYTE)0x4A17A0, (PBYTE)GetUserGradeIDColor );
    MColor2Detour.Apply();

    StageDetour.Detour( (PBYTE)0x44BF40, (PBYTE)StageCreateHandler );
    StageDetour.Apply();

    ZAppUpdateDetour.Detour( (PBYTE)0x499720, (PBYTE)ZAppOnUpdate, true );
    ZAppUpdateDetour.Apply();

    SharedTable.Detour( (PBYTE)0x51EAB0, (PBYTE)MAddSharedCommandTable, true );
    SharedTable.Apply();

    OnRestoreDetour.Detour( (PBYTE)0x4E8DA0, (PBYTE)OnRestore, true );
    OnRestoreDetour.Apply();

    UpdateCostumes();

    //VP
    VirtualProtect( (LPVOID)0x6282F8, 15, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (LPVOID)0x6282F8, "Carregando  ...\0", 15 );
    VirtualProtect( (LPVOID)0x6282F8, 15, Old, &Old );

    VirtualProtect( (LPVOID)0x4C7C47, 3, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (LPVOID)0x4C7C47, "\xC2\x10\x00", 3 );
    VirtualProtect( (LPVOID)0x4C7C47, 3, Old, &Old );

    VirtualProtect( (LPVOID)0x621E1B, 10, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (LPVOID)0x621E1B, "\xEB\x10\xEB\x06\x90\x90\x90\x90\x90\x90", 10 );
    VirtualProtect( (LPVOID)0x621E1B, 10, Old, &Old );

    VirtualProtect( (LPVOID)0x621E2D, 10, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (LPVOID)0x621E2D, "\x7F\xF6\x83\xEC\x08\xE9\x6C\xA5\xEE\xFF", 10 );
    VirtualProtect( (LPVOID)0x621E2D, 10, Old, &Old );

    VirtualProtect( (LPVOID)0x4982C1, 3, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (LPVOID)0x4982C1, "\x08\xF7\x0D", 3 );
    VirtualProtect( (LPVOID)0x4982C1, 3, Old, &Old );

    VirtualProtect( (LPVOID)0x478558, 2, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (PVOID)0x478558, "\xEB\x1B", 2 );
    VirtualProtect( (LPVOID)0x478558, 2, Old, &Old );

    VirtualProtect( (LPVOID)0x4785F8, 2, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (PVOID)0x4785F8, "\xEB\x07", 2 );
    VirtualProtect( (LPVOID)0x4785F8, 2, Old, &Old );

    VirtualProtect( (LPVOID)0x4C7202, 2, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (PVOID)0x4C7202, "\xEB", 2 );
    VirtualProtect( (LPVOID)0x4C7202, 2, Old, &Old );

    VirtualProtect( (LPVOID)0x4A9256, 2, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (PVOID)0x4A9256, "\xEB", 2 );
    VirtualProtect( (LPVOID)0x4A9256, 2, Old, &Old );

    VirtualProtect( (LPVOID)0x4C6A39, 2, PAGE_EXECUTE_READWRITE, &Old );
    memcpy( (PVOID)0x4C6A39, "\xE8\xE2\xD3\xFF\xFF", 2 );
    VirtualProtect( (LPVOID)0x4C6A39, 2, Old, &Old );
    //End

    Exchange4( 0x62F17C, ToDword( &ZGameClient::OnCommand ) );
    Exchange4( 0x62B30C, ToDword( &ZCharacter::OnDamaged ) );
    Exchange4( 0x62B204, ToDword( &ZMyCharacter::OnDamaged ) );
    ExchangeCall( 4728632, ToDword( &ZCharacter::OnDamaged ) );
    ApplyHooks( 1 );
    Exchange4( 0x4366A2, 8900 );
    Exchange2( 0x40830F, 37008 );
    Exchange4( 0x40830B, 48955826 );
    Exchange1( 0x621CA9, 125 ); 
    Exchange1( 0x45C742, 0 );
    Exchange1( 0x4973D8, 56 );
    Exchange1( 0x45C27A, 0 );
    Exchange4( 0x41A342, 0x800000 );
    Exchange4( 0x41AA20, 0x800000 );
    Exchange4( 0x41AAB2, 0x800000 );
    Exchange4( 0x41B9BA, 0x800000 );
    Exchange4( 0x41C2EE, 0x800000 );
    Exchange4( 0x43908A, 0x800000 );
    Exchange4( 0x4C4B95, 0x800000 );
    ExchangeReplaceCall( 0x42AF40, (unsigned long)&ZPostChannelChat );
    ExchangeReplaceCall( 0x481170, (unsigned long)&ZPostSkill );
    ExchangeReplaceCall( 0x42ADC0, (unsigned long)&ZPostPeerChat );


    pGunz = (unsigned char*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 2231296 );

    if( pGunz ){
        for( int n = 0; n < 2231296; n++ ){
            pGunz[ n ] = *(unsigned char*)(n + 4198400);
        }
    }
}
void Escaners(){
    EscanerProcessoMemoria();
    EscanerProcessoSistema();
}
int __stdcall DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpParam ){
    DisableThreadLibraryCalls( hModule );
    EscondeProtecao( hModule );
    if( dwReason == DLL_PROCESS_ATTACH ){
        Apply( );
        CheckFiles();
        ContarArquivos();
        VerificarHack();
        CreateThread (0,0,(LPTHREAD_START_ROUTINE)GunzEXP,0,0,0);
        CreateThread (0,0,(LPTHREAD_START_ROUTINE)ChecarHotKeys,0,0,0);
        CreateThread (0,0,(LPTHREAD_START_ROUTINE)Escaners,0,0,0);
        CreateThread (0,0,(LPTHREAD_START_ROUTINE)TxtCheckWindow,0,0,0);
        }
    return true;
}

Please Help me

greatwolf
  • 20,287
  • 13
  • 71
  • 105
Vitor Prata
  • 3
  • 1
  • 2
  • 4
    That is not valid code that reproduces your issue. How on earth are we supposed to give you a direct answer that's more than what the compiler is saying? – chris Aug 10 '13 at 06:03
  • 1
    Can we see the declaration/definition of `EscanerProcessoMemoria()`? – Borgleader Aug 10 '13 at 06:04
  • While I look, you're in desperate need of this link: [SSCCE](http://sscce.org) – chris Aug 10 '13 at 06:10
  • 2
    not really because there's still no definition for `EscanerProcessoMemoria`. – greatwolf Aug 10 '13 at 06:10
  • `EscanerProcessoMemoria` obviously requires parameters but you aren't passing any. Look at it's declaration to find out what it takes. – Captain Obvlious Aug 10 '13 at 06:23
  • What the argument has to do with the escaner? – Vitor Prata Aug 10 '13 at 06:24
  • This is just a wild stab in the dark, but I'm guessing that your problem (one of them, anyway) is that `EscanerProcessoMemoria()` does not take 0 arguments, yet you're trying to pass 0 arguments to it. – Crowman Aug 10 '13 at 06:24
  • EscanerProcessoMemoria (0); > Results in another error // main.obj : error LNK2001: unresolved external symbol "void __cdecl EscanerProcessoSistema(void)" (?EscanerProcessoSistema@@YAXXZ) main.obj : error LNK2001: unresolved external symbol "bool __cdecl EscanerProcessoMemoria(void *)" (?EscanerProcessoMemoria@@YA_NPAX@Z) – Vitor Prata Aug 10 '13 at 06:27
  • did you include the object file or library that has `EscanerProcessoMemoria`'s implementation to the linker? – greatwolf Aug 10 '13 at 06:30
  • I only used the. `EscanerProcessoMemoria` , this part, I do not remember you used it in another file. – Vitor Prata Aug 10 '13 at 06:37
  • http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix – chris Aug 10 '13 at 06:44

1 Answers1

0

Check the declaration of EscanerProcessoMemoria(), and ensure it takes 0 arguments. If not, make sure you include any headers that might have potentially overloaded this function with 0 arguments.

Other than that, the compiler is pretty much giving you the answer. Bottom line: Check the documentation of EscanerProcessoMemoria()...if there is any.

Zeenobit
  • 4,954
  • 3
  • 34
  • 46