Share via


IBindHost::MonikerBindToObject

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method binds a moniker to an object.

Syntax

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

Parameters

  • pMk
    [in] Address of the IMoniker interface of the moniker.
  • pBC
    [in] Address of the IBindCtx interface of the bind context.
  • pBSC
    [in] Address of the IBindStatusCallback interface.
  • riid
    [in] Identifier of the interface that the client application uses to communicate with the object.
  • ppvObj
    [out] Address of the interface identified by riid. 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::BindToObject.

E_OUTOFMEMORY

There is insufficient memory to create the moniker.

E_UNEXPECTED

An unknown error occurred.

Remarks

This method behaves the same as IMoniker::BindToObject, 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 delegate 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