zsKengren Posted March 6, 2012 Share 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 Link to comment Share on other sites More sharing options...
water Posted March 6, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
zsKengren Posted March 6, 2012 Author Share Posted March 6, 2012 Sorry... Link to comment Share on other sites More sharing options...
water Posted March 6, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
zsKengren Posted March 6, 2012 Author Share 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. 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