Share via


IBindHost::MonikerBindToStorage

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method binds a moniker to storage.

Syntax

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

Parameters

  • pMk
    [in] Address of the IMoniker interface.
  • pBC
    [in] Address of the IBindCtx interface.
  • pBSC
    [in] Address of the IBindStatusCallback interface.
  • riid
    [in] Identifier of the storage interface requested.
  • ppvObj
    [out] Address of the storage interface. If ppvObj is not NULL, the application must call the AddRef method on the interface and call Release when it is finished using the interface.

Return Value

This method returns one of the values that are shown in the following table.

Value 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 will complete 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 (implementer of IBindHost) enough authority over the bind operation so that the control container can take charge of setting bind options and priority, and 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 IServiceProvider::QueryService.

Requirements

Header urlmon.h, urlmon.idl
Library urlmon.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

URL Moniker Services Interfaces