Sign in to follow this  
Followers 0
_Kurt

_MemoryRead, mem functions, and addresses

8 posts in this topic

#1 ·  Posted (edited)

Hey guys,

Been a while since I posted on the General Help and Support subforum, but I've run into a problem that I cannot solve. Please, keep in mind I am no expert when dealing with Memory.

Okay, I've been playing around with Malu's function (originally w0uter's) and Cheat Engine, and I can't get this working..

I know that the address I want to read is 6FBACE09 (taken from cheat engine), but in the function it says that I need to have the address in hex format, so here's what I got:

Const $AddressMaxLife = "6FBACE09"
;Const $AddressMaxLife = Hex("6FBACE09")
;Const $AddressMaxLife = 0x6FBACE09

$MemOpen = OpenProcess()
If $MemOpen = 0 Then MsgBox(0,"","Error opening memory")
$MaxLife = _MemoryRead($AddressMaxLife, $MemOpen, "short")
;$MaxLife = _MemoryRead($AddressMaxLife, $MemOpen, "ushort")
MsgBox(0,"",$MaxLife)


Func OpenProcess()
    Global $ProcessID = WinGetProcess("Diablo II")
    $MemOpen = _MemoryOpen($ProcessID)
    Return $MemOpen
EndFunc

I'm almost certain I'm doing something wrong with the address, can someone help me out or give me a push in the right direction?

Thanks,

Kurt

EDIT: Also want to add in that the value type of the address is 2bytes

Edited by _Kurt

Awaiting Diablo III..

Share this post


Link to post
Share on other sites

Good idea, but doesn't work.

I know I'm doing something wrong here.. ARG

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

Arg, I'm stumped, I'm give malu a PM, he seems to know what he's doing. Thanks anyway!

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

Where can i find documentation about these commands? When i search in help file i can't find anything about memory reading.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0