IShellFolder::GetUIObjectOf
Other versions of this page are also available for the following:
8/28/2008
This method retrieves a COM interface that can be used to carry out actions on the specified file objects or folders.
Syntax
HRESULT GetUIObjectOf(
HWND hwndOwner,
UINT cidl,
LPCITEMIDLIST* apidl,
REFIID riid,
UINT* rgfReserved,
VOID** ppv
);
Parameters
- hwndOwner
[in] Handle to the owner window that the client should specify if it displays a dialog box or message box.
- cidl
[in] Number of file objects or subfolders specified in the apidl parameter.
- apidl
[in] Address of an array of pointers to ITEMIDLIST structures, each of which uniquely identifies a file object or subfolder relative to the parent folder. Each item identifier list must contain exactly one SHITEMID structure followed by a terminating zero.
- riid
[in] Identifier of the COM interface object to return. This can be any valid interface identifier that can be created for an item. The most common identifiers used by the shell are listed in Remarks.
- rgfReserved
Reserved.
- ppv
[out] Pointer to the requested interface. If an error occurs, a NULL pointer is returned in this address.
Return Value
Returns NOERROR if successful, E_NOINTERFACE if the interface is not supported, or an error value otherwise.
Remarks
If cidl is greater than one, the IShellFolder::GetUIObjectOf implementation should only succeed if it can create one object for all items specified in apidl. If the implementation cannot create one object for all items, this method should fail.
The following table shows the most common interface identifiers the shell uses when requesting an interface from this method. The table also indicates if cidl can be greater than one for the requested interface.
Interface identifier | Allowed cidl value |
---|---|
IID_IContextMenu |
Can be greater than or equal to one. |
IID_IContextMenu2 |
Can be greater than or equal to one. |
IID_IDataObject |
Can be greater than or equal to one. |
IID_IDropTarget |
Can only be one. |
IID_IExtractIcon |
Can only be one. |
IID_IQueryInfo |
Can only be one. |
Requirements
Header | shobjidl.h, shobjidl.idl |
Library | Developer Implemented |
Windows Embedded CE | Windows CE .NET 4.2 and later |