CAsyncMonikerFile::CreateBindStatusCallback

Creates a COM object that implements IBindStatusCallback.

virtual IUnknown* CreateBindStatusCallback( 
   IUnknown* pUnkControlling  
);

Parameters

  • pUnkControlling
    A pointer to the controlling unknown (the outer IUnknown) or NULL if aggregation is not being used.

Return Value

If pUnkControlling is not NULL, the function returns a pointer to the inner IUnknown on a new COM object supporting IBindStatusCallback. If pUnkControlling is NULL, the function returns a pointer to an IUnknown on a new COM object supporting IBindStatusCallback.

Remarks

CAsyncMonikerFile requires a COM object that implements IBindStatusCallback. MFC implements such an object, and it is aggregatable. You can override CreateBindStatusCallback to return your own COM object. Your COM object can aggregate MFC's implementation by calling CreateBindStatusCallback with the controlling unknown of your COM object. COM objects implemented using the CCmdTarget COM support can retrieve the controlling unknown using CCmdTarget::GetControllingUnknown.

Alternately, your COM object can delegate to MFC's implementation by calling CreateBindStatusCallback( NULL ).

CAsyncMonikerFile::Open calls CreateBindStatusCallback.

For more information about asynchronous monikers and asynchronous binding, see the IBindStatusCallback interface and How Asynchronous Binding and Storage Work. For a discussion of aggregation, see Aggregation. All three topics are in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

CAsyncMonikerFile Class

Hierarchy Chart