IShellFolder::GetUIObjectOfIShellFolder::GetUIObjectOf*
*Contents  *Index  *Topic Contents
*Previous Topic: IShellFolder::GetDisplayNameOf
*Next Topic: IShellFolder::ParseDisplayName

IShellFolder::GetUIObjectOf


HRESULT GetUIObjectOf(
    HWND hwndOwner,
    UINT cidl,
    LPCITEMIDLIST *apidl,
    REFIID riid,
    UINT *prgfInOut,
    LPVOID *ppvOut
   );	

Retrieves an OLE interface that can be used to carry out actions on the specified file objects or folders.

hwndOwner
Handle to the owner window that the client should specify if it displays a dialog box or message box.
cidl
Number of file objects or subfolders specified in the apidl parameter.
apidl
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
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 the comments at the end of this reference.
prgfInOut
Reserved.
ppvOut
Address that receives the interface pointer. If an error occurs, a NULL pointer is returned in this address.

If cidl is greater than one, the 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 are the most common interface identifiers the shell uses when requesting an interface from this method. The list also indicates if cidl can be greater than one for the requested interface.
Interface Identifier Allowed cidl Value
IContextMenu The cidl parameter can be greater than or equal to one.
IContextMenu2 The cidl parameter can be greater than or equal to one.
IDataObject The cidl parameter can be greater than or equal to one.
IDropTarget The cidl parameter can only be one.
IExtractIcon The cidl parameter can only be one.
IQueryInfo The cidl parameter can only be one.

See also IShellFolder


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.