Jump to content

MEMORY read Float


Recommended Posts

Hi, Im looking to read a Memory value in float using NomadMemory.au3, if its possible that would be great, here is an example of the code im working on below.

#include <NomadMemory.au3>

$ID = _MemoryOpen(ProcessExists ( "Application.exe" ))
$AddressX=0xXXXXXXXX
$Px=_MemoryRead($AddressX,$ID)
MsgBox (0,"The Value is",$Px)

I need it to be able to read from the float, if any one can help it would be a huge help!

Hello, World!... LAME lol

Link to comment
Share on other sites

make a struct containing a float, copy the bytes from memory into this struct and read it

;check something in the memory...
$Something_in_Memory_struct=dllstructcreate("byte[20]")  ;some bytes in the memory
dllstructsetdata($Something_in_Memory_struct,1,"0x4F4D472C207468697320697320706921DB0F4940")  ;fill the memory with some data

;it seems to be, that there is a string and a float in the memory....lets have a look!
$stringstruct=dllstructcreate("char [16]",dllstructgetptr($Something_in_Memory_struct))  ;prepare to catch the string
$string=dllstructgetdata($stringstruct,1)  ;got it!

$floatstruct=dllstructcreate("float",dllstructgetptr($Something_in_Memory_struct)+16)  ;prepare to catch the float
$float=dllstructgetdata($floatstruct,1)  ;got it!

msgbox(0,$String,$float)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...