Registering a Connectivity Callback Service (Windows Embedded CE 6.0)
1/5/2010
When a client wants to subscribe to a connectivity callback service, the client must implement the interface of interest, and register the callback service.
To register a connectivity callback service
Implement the callback interface on a class object.
Get an ICcService interface from the target service.
Find an IConnectionPointContainer using IUnknown::QueryInterface on the interface returned in step 2.
Call IConnectionPointContainer::FindConnectionPoint with refiid == guid of the callback interface.
Call IConnectionPoint::Advise to pass in the pointer to the IUnknown interface of the class object from step 1.
After receiving all the status notifications, call IConnectionPoint::Unadvise with the cookie value from step 5.