Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


how to write to pointer in [C++]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
HyberCode
Cheater
Reputation: 0

Joined: 17 Feb 2016
Posts: 40

PostPosted: Thu Oct 13, 2016 3:49 am    Post subject: how to write to pointer in [C++] Reply with quote

Code:
WriteProcessMemory(handel
(LPVOID)0x00E46861,&newvalue,sizeof(newvalue),0);



Capture.PNG
 Description:
 Filesize:  9.75 KB
 Viewed:  11745 Time(s)

Capture.PNG


Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Thu Oct 13, 2016 6:36 am    Post subject: Reply with quote

Get the base address of game.exe - http://stackoverflow.com/questions/11564148/how-to-get-the-starting-base-address-of-a-process-in-c

Add the offset aacef?? to it (gbaseaddr = gbaseaddr+0xaacef??Wink

writeprocessmemory it ( WriteProcessMemory(hProcess,(LPVOID)gbaseaddr,&bytes,22,0); )

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
HyberCode
Cheater
Reputation: 0

Joined: 17 Feb 2016
Posts: 40

PostPosted: Thu Oct 13, 2016 6:57 am    Post subject: Reply with quote

thanks for replying
what did i do wrong ? Question
Code:
const char* processName = "popcapgame1.exe" ;
DWORD offest = 0xB16861;
 const char* Address = processName + offest;
float newvalue = -5.702071897E-29f;
WriteProcessMemory(handel,(LPVOID)Address,&newvalue,sizeof(float),0);


btw do i have to add this shit to my project ? http://stackoverflow.com/questions/11564148/how-to-get-the-starting-base-address-of-a-process-in-c
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Fri Oct 14, 2016 6:45 am    Post subject: Reply with quote

LOL Laughing

Why are you trying to do this half-arsed? why not properly learn c++/win32 api then come back and you wouldn't be as clueless. This is how i started

http://win32assembly.programminghorizon.com/tutorials.html - do the full tutorials series, its so well written and actually fun to read...not for c++ but still the same thing.

But if you want to know what you do wrong

const char* processName = "popcapgame1.exe" ;
DWORD offest = 0xB16861;
const char* Address = processName + offest;

You are adding 0xB16861 to popcapgame1.exe...what do you think will be the result? You're supposed to get the base address of popcapgame1.exe NOT add it to an offset.

The code in that stackoverflw thread gets the base address of any process.

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
HyberCode
Cheater
Reputation: 0

Joined: 17 Feb 2016
Posts: 40

PostPosted: Sat Oct 15, 2016 12:13 am    Post subject: Reply with quote

STN wrote:
LOL Laughing

Why are you trying to do this half-arsed? why not properly learn c++/win32 api then come back and you wouldn't be as clueless. This is how i started

http://win32assembly.programminghorizon.com/tutorials.html - do the full tutorials series, its so well written and actually fun to read...not for c++ but still the same thing.

But if you want to know what you do wrong

const char* processName = "popcapgame1.exe" ;
DWORD offest = 0xB16861;
const char* Address = processName + offest;

You are adding 0xB16861 to popcapgame1.exe...what do you think will be the result? You're supposed to get the base address of popcapgame1.exe NOT add it to an offset.

The code in that stackoverflw thread gets the base address of any process.

i book marked it , hopefully one day i use it Laughing
i totally understand and i am trying to learn it but i am not taking it serious at all
i just want to make simple program that help me cheating ... i am not planing on learning the whole language , it takes a lot of time and Practice & i am pretty sure u know what i mean
btw i tried to get the base address of the process but the program doesn't return anything ... or i am doing it wrong Laughing
thank you anyway
Back to top
View user's profile Send private message
Eurochron89
Newbie cheater
Reputation: 1

Joined: 12 Aug 2015
Posts: 17

PostPosted: Sun Oct 16, 2016 10:50 am    Post subject: Reply with quote

cheatislove cheatislife wrote:
i just want to make simple program that help me cheating ...

In that case you should look at Cheat Engine's integrated Trainer Generator:

1) Open Cheat Engine and load your Cheat Table (in which you saved the working pointer)
- and start the game you want to cheat in

2) click on "File" -> "Generate generic trainer lua script from table"

3) in the new Window (named "Trainer generator"):
- look for Processname and select the exe of the game you want to cheat in

4) on the left side of the trainer generator click on "Add Hotkey"
- select your pointer from the list
- add hotkeys and select what you want to do (freeze / set value to / increase / decrease)

5) when you are done with editing the hotkeys:
- click on "Generate Trainer" and choose a filename and folder to save it

---

Now every time you want to cheat in the game, you start the trainer and
press the hotkey (trainer will start Cheat Engine in the background).
Back to top
View user's profile Send private message
HyberCode
Cheater
Reputation: 0

Joined: 17 Feb 2016
Posts: 40

PostPosted: Tue Oct 18, 2016 7:25 am    Post subject: Reply with quote

Eurochron89 wrote:
cheatislove cheatislife wrote:
i just want to make simple program that help me cheating ...

In that case you should look at Cheat Engine's integrated Trainer Generator:

1) Open Cheat Engine and load your Cheat Table (in which you saved the working pointer)
- and start the game you want to cheat in

2) click on "File" -> "Generate generic trainer lua script from table"

3) in the new Window (named "Trainer generator"):
- look for Processname and select the exe of the game you want to cheat in

4) on the left side of the trainer generator click on "Add Hotkey"
- select your pointer from the list
- add hotkeys and select what you want to do (freeze / set value to / increase / decrease)

5) when you are done with editing the hotkeys:
- click on "Generate Trainer" and choose a filename and folder to save it

---

Now every time you want to cheat in the game, you start the trainer and
press the hotkey (trainer will start Cheat Engine in the background).


thank you but i already created advance lua trainer , lua engine in cheat engine is esey language or whatever it call , i just don't want to stick with it since anti cheats getting stronger ....

i did understand what he meant of "base address of the process" Smile

if he gave me correct place to understand it i would be much better
but sometimes people think everyone understand things like they do )
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites