IShellFolder::GetUIObjectOf  18B80KY

[Now Supported on Windows NT]

Creates a COM object that can be used to carry out actions on the specified file objects or folders, typically, to create context menus or carry out drag-and-drop operations.

HRESULT GetUIObjectOf(

    HWND hwndOwner,

// Handle to owner window

    UINT cidl,

// Number of objects specified in apidl

    LPCITEMIDLIST *apidl,

// Pointer to an array of pointers to an ITEMIDLIST structure

    REFIID riid,

// Interface to return

    UINT *prgfInOut,

// Reserved

    LPVOID *ppvOut

// Address to receive interface pointer

   );

 

 

Parameters

hwndOwner

Handle of 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 by apidl.

apidl

Pointer to an array of pointers to ITEMIDLIST16GUB2N structures, each of which uniquely identifies a file object or subfolder relative to the parent folder. Each item identifier list must contain exactly one SHITEMIDK1L.AQ structure followed by a terminating zero.

riid

Specifies the type and the interface of the COM object to return. This parameter can be a pointer to the IID_IExtractIcon, IID_IContextMenu, IID_IDataObject, or IID_IDropTarget interface identifier.

prgfInOut

Reserved.

ppvOut

Address that receives the interface pointer. If an error occurs, a NULL pointer is returned in this address.

 

Return Values

Returns NOERROR if successful or an OLE-defined error value otherwise.

Remarks

GetUIObjectOf creates a UI object to be used for specified objects. Either IID_IDataObject (transfer operations) or IID_IContextMenu (context menu operations) is passed in the riid parameter.

See Also

IShellFolder, ITEMIDLIST, SHITEMID