Jump to content

coding question---can not transform from Hex to Dec


Recommended Posts

I am able to locate certain offset in the memory by nomadmemory.au3's functions

this is the core codes to do that:

Global $sOriginalName = _getName($hMem)
.......
.......
Func _getName($hMemory)
    Return _MemoryRead($offset,$hMemory, 'char[1]')
EndFunc

$status SUPPOSE to be shown as a number, but I keep getting 0 as result,

---$originalname showns as fine, normal

any idea why?

many thanks

UPDATE:

I found this from DEC's instruction

"Failure: Returns 0 sets @error to 1 an invalid hex string was used or if an overflow occurs "

what does it mean? I only want to transform one single byte of hex to dec, that's why I used 'char[1]'

Edited by longxx
Link to comment
Share on other sites

  • Developers

You are trying to translate the Control handle value NOT the content of the Editbox. For that you need to use GUICtrlRead() .

EDIT: I see you changed the content of your post. my answer was about the originally posted snippet.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...