Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SHCreateFileExtractIcon
Collapse the table of content
Expand the table of content

SHCreateFileExtractIcon function

[SHCreateFileExtractIcon is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Creates a default IExtractIcon handler for a file system object. Namespace extensions that display file system objects typically use this function. The extension and file attributes derive all that is needed for a simple icon extractor.

Syntax


HRESULT SHCreateFileExtractIcon(
  _In_ LPCTSTR pszFile,
  _In_ DWORD   dwFileAttributes,
  _In_ REFIID  riid,
       void    **ppv
);

Parameters

pszFile [in]

Type: LPCTSTR

A pointer to a null-terminated string that specifies the file system object. The buffer must not exceed MAX_PATH characters in length.

dwFileAttributes [in]

Type: DWORD

A combination of one or more file attribute flags (FILE_ATTRIBUTE_* values as defined in Winnt.h) that specify the type of object.

riid [in]

Type: REFIID

Reference to the desired interface ID of the icon extractor interface to create. This must be either IID_IExtractIconA or IID_IExtractIconW.

ppv

Type: void**

When this function returns, contains the interface pointer requested in riid. This is typically IExtractIcon.

Return value

Type: HRESULT

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

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP with SP2

End of server support

Windows Server 2003

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 5.0 or later)

Unicode and ANSI names

SHCreateFileExtractIconW (Unicode)

 

 

Community Additions

ADD
Show:
© 2015 Microsoft