Export (0) Print
Expand All

IShellLibrary::SetIcon method

Sets the default icon for the library.

Syntax


HRESULT SetIcon(
  [in]  LPCWSTR pszIcon
);

Parameters

pszIcon [in]

Type: LPCWSTR

A null-terminated Unicode string that describes the location of the default icon. The string must be formatted as ModuleFileName,ResourceIndex or ModuleFileName,-ResourceID.

ValueDescription
ModuleFileNameThe file name of the module file that contains the icon resource.
ResourceIndexA positive decimal number that specifies the index of the icon resource in the module file.
-ResourceIDA negative decimal number whose absolute value is the resource ID of the icon resource in the module file.

 

Return value

Type: HRESULT

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

Remarks

For more information on the format of the pszIcon parameter, see PathParseIconLocation.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

Windows Libraries
IShellLibrary
PathParseIconLocation

 

 

Community Additions

ADD
Show:
© 2014 Microsoft