IExplorerCommand::GetIcon method (shobjidl_core.h)

Gets an icon resource string of the icon associated with the specified Windows Explorer command item.

Syntax

HRESULT GetIcon(
  [in]  IShellItemArray *psiItemArray,
  [out] LPWSTR          *ppszIcon
);

Parameters

[in] psiItemArray

Type: IShellItemArray*

A pointer to an IShellItemArray.

[out] ppszIcon

Type: LPWSTR*

Pointer to a buffer that, when this method returns successfully, receives the resource string that identifies the icon source.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The retrieved icon resource string is in the standard format, for instance "shell32.dll,-249".

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)