Export (0) Print
Expand All

IShellFolder::BindToStorage method

Requests a pointer to an object's storage interface.

Syntax


HRESULT BindToStorage(
  [in]   PCUIDLIST_RELATIVE pidl,
  [in]   IBindCtx *pbc,
  [in]   REFIID riid,
  [out]  void **ppvOut
);

Parameters

pidl [in]

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.

pbc [in]

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.

riid [in]

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.

ppvOut [out]

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll (version 4.0 or later)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft