UDF > WinAPIEx > ShellPath >


_WinAPI_PathParseIconLocation

Analyse une cha�ne qui contient un chemin d'acc�s � un fichier et l'index de son ic�ne

#include <WinAPIShPath.au3>
_WinAPI_PathParseIconLocation ( $sFilePath )

Param�tre

$sFilePath Le chemin qui contient une cha�ne de l'emplacement du fichier. Il doit �tre de la forme "path,iconindex".

Valeur de retour

Retourne le tableau contenant les informations suivantes:
    [0] - Le chemin du fichier qui contient l'ic�ne.
    [1] - L'index de l'ic�ne.

Remarque

Cette fonction est utile pour prendre une valeur DefaultIcon dans le registre et pour s�parer l'index de l'ic�ne du chemin.

Voir aussi

Consultez PathParseIconLocation dans la librairie MSDN.

Exemple

#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