IShellFolder::BindToObject

[Now Supported on Windows NT]

Creates an IShellFolder object for a subfolder.

HRESULT BindToObject(

LPCITEMIDLIST pidl, // Pointer to an ITEMIDLIST
LPBC pbcReserved, // Reserved¾specify NULL
REFIID riid, // Interface to return
LPVOID *ppvOut // Address that receives interface pointer
);  

Parameters

pidl

Pointer to an ITEMIDLIST structure that identifies the subfolder relative to its parent folder.

pbcReserved

Reserved. Callers should specify NULL for this parameter; callees should ignore it.

riid

Identifier of the interface to return. This parameter must point to the IID_IShellFolder interface identifier.

ppvOut

Address that receives the interface pointer. If an error occurs, a NULL pointer is returned in this address.

Return Values

Returns NOERROR if successful or an OLE-defined error value otherwise.

Remarks

Use BindToObject to access the COM interface to the sub-folder or sub-object.

See Also

IShellFolder, ITEMIDLIST, SHGetDeskTopFolder