IRAPIDesktop::Advise

Send Feedback

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
);

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 Values

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

OS Versions: Windows CE 5.01 and later.
Header: Rapi2.h.
Link Library: Ole32.lib, Rapiuuid.lib.

See Also

IRAPIDesktop::IUnknown | IRAPIDesktop::UnAdvise | IRAPISink::IUnknown

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.