Archon Posted February 23, 2010 Posted February 23, 2010 Is in AutoIt function or possibility to take value from specific memory adress like pointers (ptr*) in C/Cpp? I know that DllStructCreate can do this but is's slow. I dont want make structures, only get value from adress.
BrettF Posted February 23, 2010 Posted February 23, 2010 Forum search is broken. Google search is broken. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Archon Posted February 23, 2010 Author Posted February 23, 2010 Do you think that I didn't search first? I found nothing, mabye bad enquiries, I don't know :/
Negative1 Posted February 23, 2010 Posted February 23, 2010 I seam to remember using a UDF called "nomadmemory.au3" you might have some luck searching for it but I can't remember much about this UDF. Cheers, -1 What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world.
wolf9228 Posted February 23, 2010 Posted February 23, 2010 (edited) Is in AutoIt function or possibility to take value from specific memory adress like pointers (ptr*) in C/Cpp? I know that DllStructCreate can do this but is's slow. I dont want make structures, only get value from adress. There must be a structure to divide the memory data , but it possible to get the value directly from the Ptr . Check out this example $str = "int var1;ushort var2;ushort var3;char var4[128]" $a = DllStructCreate($str) DllStructSetData($a,"var3",10554) MsgBox(0,"DllStructSetData","var3 = " & DllStructGetData($a,"var3")) $Ptr = DllStructGetPtr($a) ;int var1;ushort var2 $IntSize = DllStructGetSize(DllStructCreate("int")) ;int_var1 ==> int Size ==> 4 BYTE $Size = $IntSize ;4 BYTE $ushortSize = DllStructGetSize(DllStructCreate("ushort")) ;ushort_var2 ==> ushort Size ==> 2 BYTE $Size += $ushortSize ;2 BYTE $OutPtr = $Ptr + $Size ;Move Ptr To First Or Start ushort_var3 BYTE ==> 4 + 2 = 6 $b = DllStructCreate("ushort var3",$OutPtr) $var3 = DllStructGetData($b,"var3") MsgBox(0,"Get Data From Ptr","var3 = " & $var3) $str = "int var1;ushort var2;ushort var3;char var4[128]" $a = DllStructCreate($str) DllStructSetData($a,"var3",10554) MsgBox(0,"DllStructSetData","var3 = " & DllStructGetData($a,"var3")) $Ptr = DllStructGetPtr($a) ;int var1;ushort var2 $IntSize = DllStructGetSize(DllStructCreate("int")) ;int_var1 ==> int Size ==> 4 BYTE $Size = $IntSize ;4 BYTE $ushortSize = DllStructGetSize(DllStructCreate("ushort")) ;ushort_var2 ==> ushort Size ==> 2 BYTE $Size += $ushortSize ;2 BYTE $OutPtr = $Ptr + $Size ;Move Ptr To First Or Start ushort_var3 BYTE ==> 4 + 2 = 6 $b = DllStructCreate("ushort var3",$OutPtr) $var3 = DllStructGetData($b,"var3") MsgBox(0,"Get Data From Ptr","var3 = " & $var3) Edited February 24, 2010 by wolf9228 صرح السماء كان هنا
Archon Posted February 24, 2010 Author Posted February 24, 2010 wolf9228, It works of course, but is still solution based on structures. Negative1, I found this UDF and checked it. There were also used structures And some Dll's but useless for me in this case, howewer it look interesting. I am going to start thinking that in AutoIt there is no simple and faster solution to get value from pointer like pass by structure. It's strange because in other way it's possible by Ptr() function Someone have any ideas?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now