offsets base

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

crapola
decaying skeleton
decaying skeleton
Posts: 2
Joined: Wed Aug 06, 2003 7:49 am

offsets base

Post by crapola » Wed Aug 06, 2003 7:55 am

Hi.
Im trying to make use of the MQ source code for a little idea i had recently, unfortunately im not a C programmer so im having to try & read and understand your code so i can write my own (i hope you dont mind).

I've found most of the information i need, however im having trouble locating the code that determines the base address to which the offsets are applied. Could you perchance point me in the right direction with a filename & possibly a linenumber?

Thanks in advance :D

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Wed Aug 06, 2003 4:49 pm

The base for the offsets is 0x0. You'll have to be more specific.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Wed Aug 06, 2003 6:29 pm

yeah I dont know what you mean either but maybe the "Tutorial: HOWTO fix and find and correct structures" will help :
http://macroquest2.com/phpBB2/viewtopic.php?t=2205
and if thats to advanced, try starting with the "Finding Offset Guide" :
http://macroquest2.com/phpBB2/viewtopic.php?t=1841

isnt it amazing what 'Search' can do theese days? *sigh*
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

crapola
decaying skeleton
decaying skeleton
Posts: 2
Joined: Wed Aug 06, 2003 7:49 am

Post by crapola » Thu Aug 07, 2003 4:26 am

sorry, my programming skills are a little out of date, i assumed that everquest would not always load into the same region of memory every time you run it, therefor you would need to locate the start of that memory region and add the offsets to it in order to find the memory locations of the various structures.

At least thats the way windows used to work, has this changed?

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Thu Aug 07, 2003 5:34 am

most of the offsets in eqgame.ini will just contain a pointer to the memory where the structure starts... you can see that if you check the structure tutorial and use my readprocessmemory code to read from one of the offsets...
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

iluvseq
Clueless Mudslinger
Posts: 269
Joined: Mon Apr 14, 2003 10:05 am

Post by iluvseq » Thu Aug 07, 2003 11:25 am

crapola wrote:sorry, my programming skills are a little out of date, i assumed that everquest would not always load into the same region of memory every time you run it, therefor you would need to locate the start of that memory region and add the offsets to it in order to find the memory locations of the various structures.

At least thats the way windows used to work, has this changed?
Most of us use ReadProcessMemory() which requires a process handle and an memory offset. This memory offset is zero based from the start of the process, and as such, does not change each time you run the program.

ReadProcessMemory() handles finding out where in memory the start of the process is, so all you have to concern yourself with is where inside the process' memory space you want to read.

Hope that clears things up for you a bit?

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Thu Aug 07, 2003 12:07 pm

To expand on that, MQ attaches a DLL to EQ, that runs inside EQ's memory space... so any references to memory inside that memory space already default to offsets from the start of that memory space...

simply put, MQ is inside EQ, and accesses EQ's memory the same way EQ does... by offsets from the start-of-process memory.