IShellItemArray::BindToHandler method (shobjidl_core.h)

Binds to an object by means of the specified handler.

Syntax

HRESULT BindToHandler(
  [in]  IBindCtx *pbc,
  [in]  REFGUID  bhid,
  [in]  REFIID   riid,
  [out] void     **ppvOut
);

Parameters

[in] pbc

Type: IBindCtx*

A pointer to an IBindCtx interface on a bind context object.

[in] bhid

Type: REFGUID

One of the following values, defined in Shlguid.h, that determine the handler.

BHID_SFUIObject

Restricts usage to GetUIObjectOf. Use this handler type only for a flat item array, where all items are in the same folder.

BHID_DataObject

Introduced in Windows Vista: Gets an IDataObject object for use with an item or an array of items. Use this handler type only for flat data objects or item arrays created by SHCreateShellItemArrayFromDataObject.

BHID_AssociationArray

Introduced in Windows Vista: Gets an IQueryAssociations object for use with an item or an array of items. This only retrieves the association array object for the first item in the IShellItemArray

[in] riid

Type: REFIID

The IID of the object type to retrieve.

[out] ppvOut

Type: void**

When this methods returns, contains the object specified in riid that is returned by the handler specified by rbhid.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)