COM
Expand Minimize
This topic has not yet been rated - Rate this topic

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

 

 

Send comments about this topic to Microsoft

Build date: 10/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.