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 


Access Violation Problem with Base Address

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
tabledennis
How do I cheat?
Reputation: 0

Joined: 14 Feb 2019
Posts: 0

PostPosted: Sun Feb 17, 2019 2:49 am    Post subject: Access Violation Problem with Base Address Reply with quote

Hello guys,

I have a problem with using an address i got.
It's the base address of a game and whenever i try to add something to it or print it out i get the Access Violation (0xC0000005) Error.

(Screenshot of the code is in the attachments)

Whats the Issue here ?
I am not dereferencing the address or something. (If i said some shit right now maybe, can you try to explain to me?)
(The return Value of "getModBaseOfProc" is a Byte Pointer.)

If you need Screenshots of the functions too, I can add them, no problem.
Appreciate any help!

Best regards,

tabledennis



Access Violation Problem.PNG
 Description:
Screenshot of the code.
 Filesize:  29.73 KB
 Viewed:  726 Time(s)

Access Violation Problem.PNG


Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 151

Joined: 25 Jan 2006
Posts: 7787
Location: 127.0.0.1

PostPosted: Sun Feb 17, 2019 11:36 pm    Post subject: Reply with quote

Make sure you are running Visual Studio as Administrator.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 371

Joined: 09 May 2003
Posts: 21916
Location: The netherlands

PostPosted: Mon Feb 18, 2019 12:39 am    Post subject: Reply with quote

instead of BYTE* use UINT_PTR and typecast the result of getModForProc to a UINT_PTR

or instead of cout use good old printf where you don't have to worry if things will get dereferenced in a way you don't expect

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
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