Freigeben über


Using the Service Callback Interface (Windows CE 5.0)

Send Feedback

If you need to send feedback to the client on a pending asynchronous call, you can implement the ICcServiceCB interface to do the following:

  • Inform a client when there is a state change.
  • Inform a client of progress on a lengthy task, such as downloading a run-time image to a target device.

The Core Connectivity infrastructure provides the service callback interface through IConnectionPointContainer.

The following steps show how to use the callback features:

  1. Implement ICcServiceCB on an object.

  2. Call IUnknown::QueryInterface for IConnectionPointContainer.

  3. Call IConnectionPointContainer::FindConnectionPoint.

    This returns a connection point object for the interface specified in this call.

    Because connectivity services support only the ICcServiceCB connection sink, clients must pass in the IID for that interface in this call.

  4. Call IConnectionPoint::Advise.

    This registers the client for callback notifications.

    Clients must pass in the ICcServiceCB implementation in this call.

  5. Get callback notifications.

  6. Call IConnectionPoint::Unadvise

    Clients must call this API to de-register the connection point sink.

    The cookie parameter used in this call is the same cookie returned by the service in the call to IConnectionPoint::Advise. After this call is made, the client no longer receives callback notifications.

See Also

Kernel Transport Services | Application Transport Services | Kernel Download Services | Application Download Services

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.