A version of this page is also available for
This method registers an IRAPISink object so that it can receive notifications from the Connection Manager when mobile devices connect to and disconnect from the desktop.
HRESULT Advise( IRAPISink* pISink, DWORD* pdwContext );
[in] Pointer to an IRAPISink object that receives connection notifications.
[out] Pointer to a DWORD that receives a context value that identifies the IRAPISink object that was passed in. This value can be passed to the IRAPIDesktop::UnAdvise method to stop the delivery of connection notifications to the associated IRAPISink object.
If the operation was successful, the return value is NOERROR.
The IRAPIDesktop::Advise method returns immediately. When a connection is made, the IRAPISink::OnDeviceConnected method of the implementation is called. To unregister an IRAPISink implementation, use IRAPIDesktop::UnAdvise.
|Windows Embedded CE||Windows Embedded CE 6.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|