Export (0) Print
Expand All
COM
Expand Minimize

OleGetIconOfFile function

Returns a handle to a metafile containing an icon and string label for the specified file name.

Syntax


HGLOBAL OleGetIconOfFile(
  _In_  LPOLESTR lpszPath,
  _In_  BOOL fUseFileAsLabel
);

Parameters

lpszPath [in]

A pointer to a file for which the icon and string are to be requested.

fUseFileAsLabel [in]

Indicates whether to use the file name as the icon label.

Return value

If the function succeeds, the return value is a handle to a metafile that contains and icon and label for the specified file. If there is no CLSID in the registration database for the file, then the function returns the string "Document". If lpszPath is NULL, the function returns NULL.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ole2.h

Library

Ole32.lib

DLL

Ole32.dll

See also

OleGetIconOfClass
OleMetafilePictFromIconAndLabel

 

 

Community Additions

ADD
Show:
© 2014 Microsoft