Compartilhar via


IBindHost::MonikerBindToStorage method

Binds a moniker to storage.

Syntax

HRESULT MonikerBindToStorage(
  [in]  IMoniker            *pMk,
  [in]  IBindCtx            *pBC,
  [in]  IBindStatusCallback *pBSC,
  [in]  REFIID              riid,
  [out] void                **ppvObj
);

Parameters

  • pMk [in]
    The address of the IMoniker interface.

  • pBC [in]
    The address of the IBindCtx interface.

  • pBSC [in]
    The address of the IBindStatusCallback interface.

  • riid [in]
    An identifier of the storage interface requested.

  • ppvObj [out]
    The address of the storage interface. If ppvObj is not NULL, the application must call the AddRef method on the interface, and then call Release when it is finished using the interface.

Return value

Returns one of the following values.

Return code Description
S_OK

The bind operation completed synchronously and successfully. The result of the bind operation is available in ppvObj.

MK_S_ASYNCHRONOUS

The bind operation completes asynchronously. The behavior matches that of IMoniker::BindToStorage.

E_OUTOFMEMORY

There is insufficient memory to create the moniker.

E_UNEXPECTED

An unknown error occurred.

 

Remarks

This method behaves the same as IMoniker::BindToStorage, except that it provides the control container (implementor of IBindHost) enough authority over the bind operation so that the control container can take charge of setting bind options and priority, while it delegates all results and callbacks for the bind operation back to the control.

A host or control implementing IBindHost should implement IHttpNegotiate. It should also implement IServiceProvider to provide a pointer to its IHttpNegotiate interface when IHttpNegotiate is requested through QueryService.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Product

Internet Explorer 4.0

DLL

Urlmon.dll

See also

IBindHost