IShellItem::BindToHandler method

Binds to a handler for an item as specified by the handler ID value (BHID).

Syntax

HRESULT BindToHandler(
  IBindCtx *pbc,
  REFGUID  bhid,
  REFIID   riid,
  void     **ppv
);

Parameters

pbc

Type: IBindCtx*

A pointer to an IBindCtx interface on a bind context object. Used to pass optional parameters to the handler. The contents of the bind context are handler-specific. For example, when binding to BHID_Stream, the STGM flags in the bind context indicate the mode of access desired (read or read/write).

bhid

riid

Type: REFIID

IID of the object type to retrieve.

ppv

Return Value

Type: HRESULT

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

Requirements

   
Windows version Windows XP with SP1 [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll (version 5.00 or later)

See Also

IShellFolder

IShellItem