Sign in to follow this  
Followers 0
longxx

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

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

thanks

I think I figured it out by replacing 'char[1]' with 'byte'

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