OleGetIconOfClass

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

HGLOBAL OleGetIconOfClass(
  REFCLSID rclsid,     //CLSID for which information is requested
  LPOLESTR lpszLabel,  //Pointer to string to use as label for icon
  BOOL fUseTypeAsLabel //Whether to use CLSID's user type name as 
                       // icon label
);
 

Parameters

rclsid
[in] CLSID for which the icon and string are requested.
lpszLabel
[in] Pointer to a string to use as a label for the icon.
fUseTypeAsLabel
[in] Whether or not to use the user type string in the CLSID as the icon label.

Return Value

HGLOBAL
The hGlobal value returned when the function succeeds is a handle to a metafile that contains an icon and label for the specified CLSID. If the CLSID cannot be found in the registration database, NULL is returned.

QuickInfo

  Windows NT: Use version 3.1 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ole2.h.
  Import Library: Included as a resource in ole32.dll.

See Also

OleGetIconOfFile, OleMetafilePictFromIconAndLabel