CreateAsyncBindCtx function (urlmon.h)

Creates an asynchronous bind context for use with asynchronous monikers.

Syntax

HRESULT CreateAsyncBindCtx(
  [in]  DWORD               reserved,
  [in]  IBindStatusCallback *pBSCb,
  [in]  IEnumFORMATETC      *pEFetc,
  [out] IBindCtx            **ppBC
);

Parameters

[in] reserved

This parameter is reserved and must be 0.

[in] pBSCb

A pointer to the IBindStatusCallback interface used for receiving data availability and progress notification.

[in] pEFetc

A pointer to the IEnumFORMATETC interface that can be used to enumerate formats for format negotiation during binding. This parameter can be NULL, in which case the caller is not interested in format negotiation during binding, and the default format of the object will be bound to.

[out] ppBC

Address of an IBindCtx* pointer variable that receives the interface pointer to the new bind context.

Return value

This function can return the following values.

Return code Description
S_OK
The operation completed successfully.
E_OUTOFMEMORY
The method ran out of memory and did not complete.
E_INVALIDARG
One or more parameters are invalid.

Remarks

This function automatically registers the IBindStatusCallback and IEnumFORMATETC interfaces with the bind context. The client can specify flags from BSCO_OPTION to indicate which callback notifications the client is capable of receiving. If the client does not wish to receive certain notification, it can choose to implement those callback methods as empty function stubs (returning E_NOTIMPL), and they should not be called.

The RegisterBindStatusCallback function can also be used to register callback interfaces in the bind context.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header urlmon.h
Library Urlmon.lib
DLL Urlmon.dll

See also

IBindStatusCallback

RegisterBindStatusCallback