Partager via


Méthode IDefaultExtractIconInit ::SetShortcutIcon (shobjidl_core.h)

Définit l’icône d’un raccourci vers l’objet .

Syntaxe

HRESULT SetShortcutIcon(
  [in, optional] LPCWSTR pszFile,
                 int     iIcon
);

Paramètres

[in, optional] pszFile

Type : LPCWSTR

Pointeur vers une mémoire tampon qui contient le chemin complet de l’icône, y compris le nom de fichier et l’extension, sous forme de chaîne Unicode. Ce pointeur peut être NULL.

iIcon

Type : int

ID de l’icône shell.

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 Vista [applications de bureau uniquement]
Serveur minimal pris en charge Windows Server 2008 [applications de bureau uniquement]
Plateforme cible Windows
En-tête shobjidl_core.h (incluez Shobjidl.h)