Export (0) Print
Expand All

CBindStatusCallback Class 

This class implements the IBindStatusCallback interface.


template <class T, int nBindFlags = BINDF_ASYNCHRONOUS | 
   BINDF_ASYNCSTORAGE | BINDF_GETNEWESTVERSION | BINDF_NOWRITECACHE>
class ATL_NO_VTABLE CBindStatusCallback : public CComObjectRootEx
   <T::_ThreadModel::ThreadModelNoCS>, public IBindStatusCallbackImpl<T> 

Parameters

T

Your class containing the function that will be called as the data is received.

nBindFlags

Specifies the bind flags that are returned by GetBindInfo. The default implementation sets the binding to be asynchronous, retrieves the newest version of the data/object, and does not store retrieved data in the disk cache.

The CBindStatusCallback class implements the IBindStatusCallback interface. IBindStatusCallback must be implemented by your application so it can receive notifications from an asynchronous data transfer. The asynchronous moniker provided by the system uses IBindStatusCallback methods to send and receive information about the asynchronous data transfer to and from your object.

Typically, the CBindStatusCallback object is associated with a specific bind operation. For example, in the ASYNC sample, when you set the URL property, it creates a CBindStatusCallback object in the call to Download:

STDMETHOD(put_URL)(BSTR strURL)
{
   ...
   m_bstrURL = strURL;
   CBindStatusCallback<CATLAsync>::Download(this, 
             OnData, m_bstrURL, m_spClientSite, FALSE);
   return S_OK;
}

The asynchronous moniker uses the callback function OnData to call your application when it has data. The asynchronous moniker is provided by the system.

Header: atlctl.h

Community Additions

ADD
Show:
© 2014 Microsoft