IShellFolder::BindToStorage method (shobjidl_core.h)
Requests a pointer to an object's storage interface.
Syntax
HRESULT BindToStorage(
[in] PCUIDLIST_RELATIVE pidl,
[in] IBindCtx *pbc,
[in] REFIID riid,
[out] void **ppv
);
Parameters
[in] pidl
Type: PCUIDLIST_RELATIVE
The address of an ITEMIDLIST structure that identifies the subfolder relative to its parent folder. The structure must contain exactly one SHITEMID structure followed by a terminating zero.
[in] pbc
Type: IBindCtx*
The optional address of an IBindCtx interface on a bind context object to be used during this operation. If this parameter is not used, set it to NULL. Because support for pbc is optional for folder object implementations, some folders may not support the use of bind contexts.
[in] riid
Type: REFIID
The IID of the requested storage interface. To retrieve an IStream, IStorage, or IPropertySetStorage interface pointer, set riid to IID_IStream, IID_IStorage, or IID_IPropertySetStorage, respectively.
[out] ppv
Type: void**
The address that receives the interface pointer specified by riid. If an error occurs, a NULL pointer is returned in this address.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Namespace extensions have the option of allowing applications to bind to an object that represents an item's storage. If this option is supported, IShellFolder::BindToStorage returns a specified interface pointer that can then be used to access the contents of object. See the IMoniker::BindToStorage reference for further discussion.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |
DLL | Shell32.dll (version 4.0 or later) |