Danyfirex Posted October 11, 2012 Share Posted October 11, 2012 (edited) Well mate today I got this problem. I know How to use copy memory API using DllCall. the problem it's that I just want to copy a value "text" from a Pointer to my variable. bot I don't know how too. In vb6 I would do it so CopyMemory ByVal StrPtr(FilePath), ByVal CallWindowProc(VarPtr(ASMBYTE(0)), 0, 0, 0, 0), 255 but I don't know sure how to get a ptr. I think maybe createing a structure but not sure how. I hope you understand :S look complicated. Edited October 11, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Andreik Posted October 11, 2012 Share Posted October 11, 2012 How it's this related to AutoIt? If it is then check out DllStructCreate() function, maybe this is what you need. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Danyfirex Posted October 11, 2012 Author Share Posted October 11, 2012 (edited) How it's this related to AutoIt? If it is then check out DllStructCreate() function, maybe this is what you need.I know that I need to use dll call.But I don't know the exactly way to do that I want.I mean make tow structures. struct1 with some value. and struct2 empty.then use copymemory to pass the value of struct1 to struct2 by pointers.and then be able to use dlstructure get data and my struct2 should have the value same struct1.but don't know how to start.sorry for my bad english. Edited October 11, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Danyfirex Posted October 12, 2012 Author Share Posted October 12, 2012 Bump Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 12, 2012 Moderators Share Posted October 12, 2012 Danyfirex,You have been here long enough to know that 24hrs is considered an accceptable time to wait before bumping your own thread. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Danyfirex Posted October 12, 2012 Author Share Posted October 12, 2012 I'm sorry. I thought, I should bump. Please Close Topic. Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 12, 2012 Moderators Share Posted October 12, 2012 Danyfirex, There is no need to close it - just do not bump it again before this time tomorrow. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
KaFu Posted October 12, 2012 Share Posted October 12, 2012 Maybe give this a try: $tStruct = DllStructCreate("WCHAR[260]", $ptr) $sVar = DllStructGetData($tStruct, 1) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Danyfirex Posted October 12, 2012 Author Share Posted October 12, 2012 Maybe give this a try: $tStruct = DllStructCreate("WCHAR[260]", $ptr) $sVar = DllStructGetData($tStruct, 1) I feel stupid. it was easiest that I thought. thank you so much KaFu here result. $tStruct1 = DllStructCreate("WCHAR[260]") DllStructSetData($tStruct1,1,"Hola Mundo") $sVar1 = DllStructGetData($tStruct1, 1) $ptr=DllStructGetPtr($tStruct1,1) msgbox(0,"",$sVar1) $tStruct = DllStructCreate("WCHAR[260]",$ptr) $sVar = DllStructGetData($tStruct, 1) msgbox(0,"",$sVar) thank you so much. Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
JohnOne Posted October 12, 2012 Share Posted October 12, 2012 Are you sure that is the behaviour you want, nothing is being copied is it? $tStruct1 = DllStructCreate("WCHAR[260]") DllStructSetData($tStruct1,1,"Hola Mundo") $sVar1 = DllStructGetData($tStruct1, 1) $ptr=DllStructGetPtr($tStruct1,1) msgbox(0,"",$sVar1) $tStruct = DllStructCreate("WCHAR[260]",$ptr) DllStructSetData($tStruct1,1,"Bye Mundo") $sVar = DllStructGetData($tStruct, 1) msgbox(0,"",$sVar) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Danyfirex Posted October 12, 2012 Author Share Posted October 12, 2012 (edited) Are you sure that is the behaviour you want, nothing is being copied is it? $tStruct1 = DllStructCreate("WCHAR[260]") DllStructSetData($tStruct1,1,"Hola Mundo") $sVar1 = DllStructGetData($tStruct1, 1) $ptr=DllStructGetPtr($tStruct1,1) msgbox(0,"",$sVar1) $tStruct = DllStructCreate("WCHAR[260]",$ptr) DllStructSetData($tStruct1,1,"Bye Mundo") $sVar = DllStructGetData($tStruct, 1) msgbox(0,"",$sVar) yes this that I want, no need to be copy I wanted to get the the string by the ptr. its work. or there is some best way? obvious then I will use copymemory to copy in another block. Edited October 12, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
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