IRAPIDesktop::Advise
A version of this page is also available for
4/8/2010
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.
Syntax
HRESULT Advise(
IRAPISink* pISink,
DWORD* pdwContext
);
Parameters
- pISink
[in] Pointer to an IRAPISink object that receives connection notifications.
- pdwContext
[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.
Return Value
If the operation was successful, the return value is NOERROR.
Remarks
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.
Requirements
Header | rapi2.h |
Library | ole32.lib, rapiuuid.lib |
Windows Embedded CE | Windows Embedded CE 6.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |