ImageList_CoCreateInstance function
Creates a single instance of an imagelist and returns an interface pointer to it.
Syntax
HRESULT ImageList_CoCreateInstance( _In_ REFCLSID rclsid, _In_opt_ const IUnknown *punkOuter, _In_ REFIID riid, _Out_ void **ppv );
Parameters
- rclsid [in]
-
Type: REFCLSID
A reference to the CLSID—a GUID that identifies the COM object to be created. This should be CLSID_ImageList.
- punkOuter [in, optional]
-
Type: const IUnknown*
A pointer to the outer IUnknown interface that aggregates the object created by this function, or NULL if no aggregation is desired.
- riid [in]
-
Type: REFIID
Reference to the desired interface ID.
- ppv [out]
-
Type: void**
When this method returns, contains the interface pointer requested in riid. This is normally IImageList2, which provides the Initialize method.
Return value
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Before calling this function, COM must be initialized by calling CoInitialize or CoInitializeEx.
Call ImageList_CoCreateInstance for a customized image list; otherwise, call SHGetImageList to load the system image list. Call SHGetFileInfo with the uflag parameter set to SHGFI_SYSICONINDEX to retrieve a handle to the system image list.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|