Jump to content

LNK file information


Recommended Posts

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
Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.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 (NEW 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

 

Link to comment
Share on other sites

Wouldn't _WinAPI_StringFromGUID do what you need?

Edited 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 - 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 (NEW 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

 

Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...