zsKengren Posted March 6, 2012 Posted March 6, 2012 (edited) I am trying to convert some code to c# and I am not as experienced in Autoit. I was just wondering if someone could please explain this to me so I can continue converting this code.__CONVERT_GUID_STR('0x94E69953E56C6C4D8fCE1D8870FDCBA0') Func __CONVERT_GUID_STR($sBinaryGUID) Local $stBin=DllStructCreate("ubyte[16]"),$stGUID=DllStructCreate("uint;ushort;ushort;ubyte[2];ubyte[6]",DllStructGetPtr($stBin)) DllStructSetData($stBin,1,$sBinaryGUID) Return '{'&Hex(DllStructGetData($stGUID,1))&'-'& _ Hex(DllStructGetData($stGUID,2),4)&'-'&Hex(DllStructGetData($stGUID,3),4)&'-'&Hex(DllStructGetData($stGUID,4),4)&'-'& _ Hex(DllStructGetData($stGUID,5))&'}' EndFuncWhat confuses me is the DLLstruct.Thank you Ascend4nt Edited March 6, 2012 by zsKengren
water Posted March 6, 2012 Posted March 6, 2012 Hard to read Could you please remove HTML tags and format the code using code tags? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
water Posted March 6, 2012 Posted March 6, 2012 (edited) Wouldn't _WinAPI_StringFromGUID do what you need? Edited March 6, 2012 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
zsKengren Posted March 6, 2012 Author Posted March 6, 2012 I would like to convert this code to c#. With my c# code so far, I can open a .lnk file and read the hex code to be able to pull the hex guid from it. What i am having issues with is converting the hex to the appropriate GUID. Unfortunately there is no documentation on what I am trying to do. So I found this autoit code and I would like to convert the autoit to C#. I know that the code above works so I just would like someone to explain what is going on there so I can convert it.
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