Share via


IShellLinkA ::SetIconLocation, méthode (shobjidl_core.h)

Définit l’emplacement (chemin et index) de l’icône d’un objet de liaison Shell.

Syntaxe

HRESULT SetIconLocation(
  LPCSTR pszIconPath,
  int    iIcon
);

Paramètres

pszIconPath

Type : LPCTSTR

Adresse d’une mémoire tampon devant contenir le chemin du fichier contenant l’icône.

iIcon

Type : int

Index de l’icône.

Valeur retournée

Type : HRESULT

Si cette méthode réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT.

Spécifications

Condition requise Valeur
Client minimal pris en charge Windows XP [applications de bureau uniquement]
Serveur minimal pris en charge Windows 2000 Server [applications de bureau uniquement]
Plateforme cible Windows
En-tête shobjidl_core.h
DLL Shell32.dll (version 4.0 ou ultérieure)