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 


Locating the End of a Struct/Class?

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

Joined: 27 Feb 2023
Posts: 64

PostPosted: Fri Jul 07, 2023 3:25 pm    Post subject: Locating the End of a Struct/Class? Reply with quote

Hello everyone,

I have a question regarding the use of the dissect data structure on a struct/class. How can I determine the precise location of the end of the class or struct? It's not reliable to assume that reaching values of 0 indicates the end, as there may be padding within the struct. Is there a way to accurately find the actual end of a struct without resorting to guessing or making assumptions?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4700

PostPosted: Fri Jul 07, 2023 7:33 pm    Post subject: Reply with quote

There's no definitive way of doing that without some debugging information: e.g. mono.

You could look at what accesses an address, and the offset will probably indicate where the beginning of a struct is. This might also give you an upper bound to the size of the structure located immediately before that in memory. However, structures can be composed of other structures (directly: not just by pointers), so this is at best a guess.

If there are several instances laid out in a contiguous array, you can get an almost exact guess from that.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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 Gamehacking 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