dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: This code is freaking me out..Help please! :(

  1. #1
    Join Date
    Dec 2007
    Posts
    2

    Exclamation This code is freaking me out..Help please! :(

    Hi, well..i will not explain the hole thing but, this code its for replacing memory addresses for a game called GunZ (NA version).
    I Could compile it, but when in Inject the DLL in the game, i press ALT + A (As in the code), and it should appear a message "Hi Version", but it doesnt ...

    Take a look at the code :

    mongo001.cpp
    Code:
    // mongo001.cpp: define las rutinas de inicialización del archivo DLL.
    //
    
    #include "mongo001.h"
    #include "stdafx.h"
    #include <windows.h>
    #include <iostream>
    #include <fstream>
    #include <string>
    #include "func.h"
    
    /*	GetTwoKeys	*/
    #define GetTwoKeys(keyone,keytwo) if(GetAsyncKeyState(keyone) &0x8000 && GetAsyncKeyState(keytwo) &0x8000)
    
    /*	Log	*/
    #define Log( name , addr ) fprintf(xLog, name "	:	%.8X\n", addr );
    
    /*	Popad Version	*/
    #define MongoVersion 0.1
    
    float TelePos[3] = {0.000000};
    bool bQuest = false;
    
    void Echo(const char *szMsg, ...){ //AGREGADA
    _asm{
    mov eax,ZChatOutput
    PUSH 0xFFFFFFFF 
    PUSH 0 
    PUSH 2 
    PUSH szMsg 
    call eax
    add esp,16
    }}
    
    void Main()
    {
    	while(true)
    	{
    		/*	Info	*/
    		/*	Working	*/
    		GetTwoKeys(0x12, 'A'){
    				   Echo("Hi version!"); //AGREGADA
    			Sleep(500);
    		}
    	}
    }
    func.h
    Code:
    #define ZChatOutput 0x0042ABC0;
    Please tell me in what i am wrong ...

    Thank you very much

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: This code is freaking me out..Help please! :(

    Quote Originally Posted by vladek
    this code its for replacing memory addresses for a game called GunZ (NA version).
    And why would you want to do that?

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Dec 2007
    Posts
    2

    Exclamation Re: This code is freaking me out..Help please! :(

    just Trying Asm + C++

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,220

    Re: This code is freaking me out..Help please! :(

    Quote Originally Posted by vladek
    just Trying Asm + C++
    Since you are trying to learn this, I would suggest starting with a program that you have coded. That way, you have the source to step through if you encounter any issues.

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,603

    Re: This code is freaking me out..Help please! :(

    I Could compile it, but when in Inject the DLL in the game
    Ok, how do you inject? How do you know the dll really gets injected? What is that void Main()? It hardly can be a dll main entry, so what is the purpose of it? And how does it get called?
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)