IShellItem::BindToHandler method
Binds to a handler for an item as specified by the handler ID value (BHID).
Syntax
HRESULT BindToHandler(
IBindCtx *pbc,
REFGUID rbhid,
REFIID riid,
void **ppvOut
);
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).
- rbhid
-
Type: REFGUID
Reference to a GUID that specifies which handler will be created. One of the following values defined in Shlguid.h:
-
Restricts usage to BindToObject.
-
Restricts usage to GetUIObjectOf.
-
Restricts usage to CreateViewObject.
-
Attempts to retrieve the storage RIID, but defaults to Shell implementation on failure.
-
Restricts usage to IStream.
-
CLSID_ShellItem is initialized with the target of this item (can only be SFGAO_LINK). See GetAttributesOf for a description of SFGAO_LINK.
-
If the item is a folder, gets an IEnumShellItems object with which to enumerate the storage contents.
-
Introduced in Windows Vista: If the item is a folder, gets an ITransferSource or ITransferDestination object.
-
Introduced in Windows Vista: Restricts usage to IPropertyStore or IPropertyStoreFactory.
-
Introduced in Windows Vista: Restricts usage to IExtractImage or IThumbnailProvider.
-
Introduced in Windows Vista: If the item is a folder, gets an IEnumShellItems object that enumerates all items in the folder. This includes folders, nonfolders, and hidden items.
-
Introduced in Windows Vista: Gets an IDataObject object for use with an item or an array of items.
-
Introduced in Windows Vista: Gets an IQueryAssociations object for use with an item or an array of items.
-
Introduced in Windows Vista: Restricts usage to IFilter.
-
Introduced in Windows 7: Gets an IEnumAssocHandlers object used to enumerate the recommended association handlers for the given item.
-
Introduced in Windows 8: Gets an IRandomAccessStream object for the item.
-
Introduced in Windows 8.1: Gets an object used to provide placeholder file functionality.
- riid
-
Type: REFIID
IID of the object type to retrieve.
- ppvOut
-
Type: void**
When this method returns, contains a pointer of type 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
|
Minimum supported client |
Windows XP with SP1 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
DLL |
|
See also