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

HGLOBAL OleGetIconOfFile(

LPOLESTR lpszPath,
//Points to string that specifies the file for which info is requested
BOOL fUseFileAsLabel
//Indicates whether to use the filename as the icon label



Points to a file for which the icon and string are requested.


Indicates whether or not to use the filename as the icon label.

Return Value


The hGlobal returned is a handle to a metafile that contains an icon and label for the specified file. If there is no CLSID in the registration database for the file, then the string "Document" is used. If the value of lpszPath is NULL, then NULL is returned.

See Also

OleGetIconOfClass, OleMetafilePictFromIconAndLabel

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database