Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 01:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



help on Writeprocessmemory

Discussion on help on Writeprocessmemory within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2008
Posts: 7
Received Thanks: 0
help on Writeprocessmemory

#include <Windows.h>
#include <iostream>

using namespace std;

#define EngineUpgrade_Addr 0x2F7EDDC8
#define EngineUpgrade_Value 1000
const SIZE_T EngineUpgrade_Size = sizeof(EngineUpgrade_Value);
SIZE_T EngineUpgrade_Sent = 0;

bool AIONClient()
{
HWND WindowHandle;
DWORD ProcessId;
HANDLE ProcessHandle;

if(!(WindowHandle = FindWindow(NULL,"AION Client")))
cout<<"AION Client"<<endl;

while(!WindowHandle)
{
Sleep(200);
WindowHandle = FindWindow(NULL,"AION Client");
}
GetWindowThreadProcessId(WindowHandle,&ProcessId);
ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS,0,ProcessId);

cout<<"AION.bin"<<endl;

// זה מנסה לקרוא מהכתובת
LPVOID upgradelevel;
SIZE_T bytesgot;
ReadProcessMemory(ProcessHandle ,(void*)EngineUpgrade_Addr ,&upgradelevel ,4 ,&bytesgot);
printf("Getting upgrade info... \n");
printf("Healthe Point: %i",upgradelevel);
printf("\nBytes got: %i",bytesgot);

// זה כותב לכתובת

while(1)
{
WriteProcessMemory(ProcessHandle ,(void*)EngineUpgrade_Addr ,(LPCVOID)EngineUpgrade_Value ,EngineUpgrade_Size ,&EngineUpgrade_Sent);
Sleep(50);
}
return true;
}


if you can please help me i new on it ,and i try to change the value of 0x2F7EDDC8 to 1000... did i well?? if not what is the outer way???

the error that i get: [Linker error] undefined reference to `WinMain@16'
bogiman789 is offline  
Old 09/27/2009, 11:11   #2
 
elite*gold: 0
Join Date: Mar 2008
Posts: 747
Received Thanks: 245
Do you only Copy & Paste this?
You have no main function and you use the C++ output function cout and the C output function printf in the same project.

PHP Code:
#include <Windows.h>
#include <stdio.h>
#define EngineUpgrade_Addr 0x2F7EDDC8
#define EngineUpgrade_Value 1000
const SIZE_T EngineUpgrade_Size sizeof(EngineUpgrade_Value);
SIZE_T EngineUpgrade_Sent 0;

int main()
{
HWND WindowHandle;
DWORD ProcessId;
HANDLE ProcessHandle;

if(!(
WindowHandle FindWindow(NULL,"AION Client")))
printf("AION Client");

while(!
WindowHandle)
{
Sleep(200);
WindowHandle FindWindow(NULL,"AION Client");
}
GetWindowThreadProcessId(WindowHandle,&ProcessId);
ProcessHandle OpenProcess(PROCESS_ALL_ACCESS,0,ProcessId);

printf("AION.bin");

// זה מנסה לקרוא מהכתובת
LPVOID upgradelevel;
SIZE_T bytesgot;
ReadProcessMemory(ProcessHandle ,(void*)EngineUpgrade_Addr ,&upgradelevel ,,&bytesgot);
printf("Getting upgrade info... \n");
printf("Healthe Point: %i",upgradelevel);
printf("\nBytes got: %i",bytesgot);

// זה כותב לכתובת

while(1)
{
WriteProcessMemory(ProcessHandle ,(void*)EngineUpgrade_Addr ,(LPCVOID)EngineUpgrade_Value ,EngineUpgrade_Size ,&EngineUpgrade_Sent);
Sleep(50);
}
return 
0;

Akorn is offline  
Thanks
1 User
Old 09/27/2009, 11:28   #3
 
elite*gold: 0
Join Date: Apr 2008
Posts: 7
Received Thanks: 0
i fix it now its....
///////////////////////
#include <Windows.h>
#include <iostream>

using namespace std;
int main;
#define EngineUpgrade_Addr 0x2F7EDDC8
#define EngineUpgrade_Value 1000
const SIZE_T EngineUpgrade_Size = sizeof(EngineUpgrade_Value);
SIZE_T EngineUpgrade_Sent = 0;

bool AIONClient()
{
HWND WindowHandle;
DWORD ProcessId;
HANDLE ProcessHandle;

if(!(WindowHandle = FindWindow(NULL,"AION Client")))
cout<<"AION Client"<<endl;

while(!WindowHandle)
{
Sleep(200);
WindowHandle = FindWindow(NULL,"AION Client");
}
GetWindowThreadProcessId(WindowHandle,&ProcessId);
ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS,0,ProcessId);

cout<<"AION Client"<<endl;

// æä îðñä ì÷øåà îäëúåáú
LPVOID upgradelevel;
SIZE_T bytesgot;
ReadProcessMemory(ProcessHandle ,(void*)EngineUpgrade_Addr ,&upgradelevel ,4 ,&bytesgot);
printf("Getting upgrade info... \n");
printf("Healthe Point: %i",upgradelevel);
printf("\nBytes got: %i",bytesgot);

// åæä ëåúá ìëúåáú
while(1)
{
WriteProcessMemory(ProcessHandle ,(void*)EngineUpgrade_Addr ,(LPVOID)EngineUpgrade_Value ,EngineUpgrade_Size ,&EngineUpgrade_Sent);
Sleep(50);
}
return true;
}
///////////////////////////////////////
its compile but when the cmd(black screen) pop up its have a error on it that say i have to close it or check for problems=\ help plzz
bogiman789 is offline  
Old 09/27/2009, 11:35   #4
 
elite*gold: 0
Join Date: Apr 2008
Posts: 7
Received Thanks: 0
ohh didnt see you post yourself source hmmm ty you very much ... you realy helped me and if u can help more a little so its be fun ... plz contact me
bogiman789 is offline  
Old 09/27/2009, 11:49   #5


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by bogiman789 View Post
i fix it now its....
///////////////////////
#include <Windows.h>
#include <iostream>

using namespace std;
int main;
#define EngineUpgrade_Addr 0x2F7EDDC8
#define EngineUpgrade_Value 1000
const SIZE_T EngineUpgrade_Size = sizeof(EngineUpgrade_Value);
SIZE_T EngineUpgrade_Sent = 0;

bool AIONClient()
{
HWND WindowHandle;
DWORD ProcessId;
HANDLE ProcessHandle;

if(!(WindowHandle = FindWindow(NULL,"AION Client")))
cout<<"AION Client"<<endl;

while(!WindowHandle)
{
Sleep(200);
WindowHandle = FindWindow(NULL,"AION Client");
}
GetWindowThreadProcessId(WindowHandle,&ProcessId);
ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS,0,ProcessId);

cout<<"AION Client"<<endl;

// æä îðñä ì÷øåà îäëúåáú
LPVOID upgradelevel;
SIZE_T bytesgot;
ReadProcessMemory(ProcessHandle ,(void*)EngineUpgrade_Addr ,&upgradelevel ,4 ,&bytesgot);
printf("Getting upgrade info... \n");
printf("Healthe Point: %i",upgradelevel);
printf("\nBytes got: %i",bytesgot);

// åæä ëåúá ìëúåáú
while(1)
{
WriteProcessMemory(ProcessHandle ,(void*)EngineUpgrade_Addr ,(LPVOID)EngineUpgrade_Value ,EngineUpgrade_Size ,&EngineUpgrade_Sent);
Sleep(50);
}
return true;
}
///////////////////////////////////////
its compile but when the cmd(black screen) pop up its have a error on it that say i have to close it or check for problems=\ help plzz
that cant work
you wrote int main;
main isnt a variable xD its a fuction
so int main(){
}
MrSm!th is offline  
Old 09/27/2009, 12:03   #6
 
elite*gold: 0
Join Date: Apr 2008
Posts: 7
Received Thanks: 0
yes i know i fix it ty you very much hmmm can you help me with the readprocessmemory plz?///
i dont get how to do this can you give me a example?
bogiman789 is offline  
Old 09/27/2009, 14:46   #7
 
elite*gold: 0
Join Date: May 2008
Posts: 489
Received Thanks: 210
Quote:
Originally Posted by bogiman789 View Post
yes i know i fix it ty you very much hmmm can you help me with the readprocessmemory plz?///
i dont get how to do this can you give me a example?
Stop copying and pasting and learn the language if you wanna work with it.
schlurmann is offline  
Old 10/07/2009, 01:37   #8

 
elite*gold: 150
Join Date: Apr 2007
Posts: 2,394
Received Thanks: 6,644
Quote:
Originally Posted by bogiman789 View Post
yes i know i fix it ty you very much hmmm can you help me with the readprocessmemory plz?///
i dont get how to do this can you give me a example?
first of all learn the languade. The forum isnt named "Help with Copy / Paste | stealing code".
wurstbrot123 is offline  
Old 10/07/2009, 09:35   #9
 
Bl@ze!'s Avatar
 
elite*gold: 240
Join Date: Dec 2006
Posts: 1,579
Received Thanks: 1,609
After your code compiles you WILL get an Error with 0x2F7EDDC8 This address changes after every Client restart U need to : Game.dll + Hitpoints Adress
Bl@ze! is offline  
Reply


Similar Threads Similar Threads
Probleme Visual Basic unter Vista64Bit mit ReadProcessMemory und WriteProcessMemory
04/24/2012 - .NET Languages - 2 Replies
Hallo Ihrs Ich hoffe ihr könnt mir vllt vieleicht weiterhelfen, ich befasse mich schon seit einigen Tagen mit ReadProcessMemory und WriteProcessMemory aber irgendwie will das ganze nicht unter Vista 64 Bit nicht funktionieren. Nachfolgender Code tut zb den Puktestand in Solitaire auslesen und in einer Textbox anzeigen. (Ist ja nur ein Beispiel) unter XP funktioniert das ganze ohne Probleme, aber unter Vista bekomme ich immer den Wert 0 zurück. Mir ist klar das die Speicheradresse unter Vista...
Wie erlange ich die PID eines Prozesses für z.B. WriteProcessMemory
11/06/2008 - Coding Tutorials - 4 Replies
An die, die noch nicht wissen, wie sie ein Handle eines Prozesses erlangen, folgt hier ein kleiner Beispielquelltext . Beispielprogramm: .386 .model flat, stdcall option casemap :none include windows.inc include kernel32.inc include user32.inc
Locking WriteProcessMemory with a TickBox
06/11/2007 - General Coding - 5 Replies
This is the code for one of the buttons in my app: Private Sub Command8_Click&#40;&#41; If Hooked = True Then WriteProcessMemory ProcessHandle, &580316, 386, 2, 0& End If End Sub The problem is the memory address that I write to resets itself after a while and I have to click the button again, is there anyway to lock the memory address that I write to? Or just have the code refresh itself at a set interval? I would like to achieve this with a tick box if possible



All times are GMT +1. The time now is 01:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.