Parses a file location string that contains a file location and icon index
#include <WinAPIShPath.au3>
_WinAPI_PathParseIconLocation ( $sFilePath )
$sFilePath | The path that contains a file location string. It should be in the form "path,iconindex". |
This function is useful for taking a DefaultIcon value from the registry and separating the icon index from the path.
Search PathParseIconLocation in MSDN Library.
#include <APIRegConstants.au3>
#include <WinAPIReg.au3>
#include <WinAPIShPath.au3>
Local $sData = _WinAPI_AssocQueryString('.txt', $ASSOCSTR_DEFAULTICON)
Local $aIcon = _WinAPI_PathParseIconLocation($sData)
If IsArray($aIcon) Then
ConsoleWrite('DefaultIcon: ' & $sData & @CRLF)
ConsoleWrite('Icon: ' & $aIcon[0] & @CRLF)
ConsoleWrite('Index: ' & $aIcon[1] & @CRLF)
EndIf