यह धागा data contained in a .lnk file
sSHGetFileInfoss समारोह आइकन फ़ाइल निकालने में सक्षम होना चाहिए के बारे में दिलचस्प जानकारियां प्रदान करता है।
here प्रलेखित है, और एक lnk फ़ाइल के लिए इस्तेमाल किया:
[DllImport("shell32.dll")]
public static extern IntPtr SHGetFileInfo(
string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi,
uint cbSizeFileInfo, uint uFlags);
:
Path2Link := 'C:\Stuff\TBear S Saver.lnk';
SHGetFileInfo(PChar(Path2Link), 0, ShInfo1, SizeOf(TSHFILEINFO),
SHGFI_ICON);
// this ShInfo1.hIcon will have the Icon Handle for the Link Icon with
// the small ShortCut arrow added}
पहले लिंक से, आप सी #, में इस तरह के एक उपयोगिता है जहाँ आप की तरह इस समारोह घोषणा करेंगे बना सकते हैं
आप autoit script language में एक उपयोगिता भी बना सकते हैं, जहां आप इस फ़ंक्शन का उपयोग इस तरह घोषित करेंगे:
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
शायद उसे संरचना आदि प्रारूप की तरह थोड़ा और जानकारी दें। लेकिन आपको मेरा वोट मिला। –