This stream contains interesting information about the data contained in the .lnk file.
The sSHGetFileInfoss function must be able to retrieve the icon file.
Documented here and used for the lnk file:
Path2Link := 'C:\Stuff\TBear S Saver.lnk'; SHGetFileInfo(PChar(Path2Link), 0, ShInfo1, SizeOf(TSHFILEINFO), SHGFI_ICON);
From the first link you can create such a utility in C #, where you would declare this function as follows:
[DllImport("shell32.dll")] public static extern IntPtr SHGetFileInfo( string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
You can also create a utility in the autoit script language , where you should use this function, declared as follows:
Func _ShellGetAssocIcon(Const $szFile,Const $IconFlags = 0) Local $tFileInfo = DllStructCreate($tagSHFILEINFO) If @error Then Return SetError(1,@extended,0) EndIf Local $Ret = DllCall("shell32.dll","int","SHGetFileInfo","str",$szFile,"dword",0, _ "ptr",DllStructGetPtr($tFileInfo),"uint",DllStructGetSize($tFileInfo),"uint",BitOr($SHGFI_ICON,$IconFlags)) MsgBox(0,0,@error) Return DllStructGetData($tFileInfo,"hIcon") EndFunc