Binds to the object named by the specified moniker.
HRESULT MonikerBindToObject(
IMoniker *pMk |
// Moniker to be bound |
IBindCtx *pBC |
// Optional bind context |
IBindStatusCallback *pBSC |
// The control’s callback interface |
REFIID rii |
// IID of the desired storage interface |
void **ppvObj |
// The result of the bind operation |
); |
Parameters
Return Values
Remarks
IBindHost::MonikerBindToObject should be the first mechanism that controls use to bind to the object addressed by a moniker (if a control container doesn’t support IBindHost, then the control should directly call IMoniker::BindToObject). This function behaves the same as IMoniker::BindToObject, except that it enables the control’s container (the implementer of IBindHost) to set bind options and priority, while delegating all results and callbacks to the control.
A control can use pBC to pass additional bind options, such as a format enumerator (see IEnumFormatETC).
A control receives asynchronous callbacks pertaining to the bind operation by passing its container a pointer to the control’s IBindStatusCallback interface. The control must provide this interface separately, not registered on the pBC parameter.