SHCreateFileExtractIconA function (shlobj_core.h)
[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
SHSTDAPI SHCreateFileExtractIconA(
[in] LPCSTR pszFile,
[in] DWORD dwFileAttributes,
[in] REFIID riid,
void **ppv
);
Parameters
[in] pszFile
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.
[in] dwFileAttributes
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.
[in] riid
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
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | shlobj_core.h (include Shlobj.h) |
Library | Shell32.lib |
DLL | Shell32.dll (version 5.0 or later) |