Jump to content
Sign in to follow this  
zsKengren

LNK file information

Recommended Posts

zsKengren

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))&'}'
EndFunc

What confuses me is the DLLstruct.

Thank you

Ascend4nt

Edited by zsKengren

Share this post


Link to post
Share on other sites
water

Hard to read :oops:

Could you please remove HTML tags and format the code using code tags?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
zsKengren

Sorry...

Share this post


Link to post
Share on other sites
water

Wouldn't _WinAPI_StringFromGUID do what you need?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
zsKengren

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.

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  

×