共用方式為


_IRDPSessionEvents介面 (rdpencomapi.h)

實作這個介面,以在事件發生時接收通知。

繼承

_IRDPSessionEvents介面繼承自 IDispatch 介面。

備註

RDPViewer COM 對像是可連線的物件。 若要從物件接收有關聯機共用會話的事件,應用程式可以實作 _IRdpSessionEvents 並執行下列步驟。

  1. 在 RDPViewer 上呼叫 IUnknown::QueryInterface ,以取得 IConnectionPointContainer 介面的指標。
  2. 呼叫 IConnectionPointContainer::FindConnectionPoint,並將 __uuidof(_IRdpSessionEvents) 指定為 riid 參數,以取得用戶端控件事件的 IConnectionPoint 介面指標。
  3. 呼叫 IConnectionPoint::建議 來指定要分派事件的呼叫應用程式本身實作 _IRdpSessionEvents

實作 IDispatch::Invoke 時,應用程式可以使用下列 DISPID。

dispIdMember 分派至方法
DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_CONNECTED = 301 OnAttendeeConnected
DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_DISCONNECTED = 302 OnAttendeeDisconnected
DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_UPDATE = 303 OnAttendeeUpdate
DISPID_RDPSRAPI_EVENT_ON_ERROR = 304 OnError
DISPID_RDPSRAPI_EVENT_ON_APPLICATION_OPEN = 316 OnApplicationOpen
DISPID_RDPSRAPI_EVENT_ON_APPLICATION_CLOSE = 317 OnApplicationClose
DISPID_RDPSRAPI_EVENT_ON_APPLICATION_UPDATE = 318 OnApplicationUpdate
DISPID_RDPSRAPI_EVENT_ON_WINDOW_OPEN = 319 OnWindowOpen
DISPID_RDPSRAPI_EVENT_ON_WINDOW_CLOSE = 320 OnWindowClose
DISPID_RDPSRAPI_EVENT_ON_WINDOW_UPDATE = 321 OnWindowUpdate
DISPID_RDPSRAPI_EVENT_ON_CTRLLEVEL_CHANGE_REQUEST = 309 OnControlLevelChangeRequest
DISPID_RDPSRAPI_EVENT_ON_VIEWER_CONNECTED = 305 OnConnectionEstablished
DISPID_RDPSRAPI_EVENT_ON_VIEWER_CONNECTFAILED = 308 OnConnectionFailed
DISPID_RDPSRAPI_EVENT_ON_VIEWER_AUTHENTICATED = 307 OnConnectionAuthenticated
DISPID_RDPSRAPI_EVENT_ON_VIEWER_DISCONNECTED = 306 OnConnectionTerminated
DISPID_RDPSRAPI_EVENT_ON_APPFILTER_UPDATE = 322 無。 IRDPSRAPISharingSession::get_ApplicationFilter 傳回的應用程式篩選已變更的通知。
DISPID_RDPSRAPI_EVENT_ON_GRAPHICS_STREAM_PAUSED = 310 OnGraphicsStreamPaused
DISPID_RDPSRAPI_EVENT_ON_GRAPHICS_STREAM_RESUMED = 311 OnGraphicsStreamResumed
DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_DATARECEIVED = 314 OnChannelDataReceived
DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_SENDCOMPLETED = 315 OnChannelDataSent
DISPID_RDPSRAPI_EVENT_ON_SHARED_RECT_CHANGED = 323 OnSharedRectChanged
DISPID_RDPSRAPI_EVENT_ON_FOCUSRELEASED = 324 OnFocusReleased
DISPID_RDPSRAPI_EVENT_ON_SHARED_DESKTOP_SETTINGS_CHANGED = 325 OnSharedDesktopSettingsChanged
DISPID_RDPAPI_EVENT_ON_BOUNDING_RECT_CHANGED = 340 OnViewingSizeChanged

規格需求

需求
最低支援的用戶端 Windows Vista [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 rdpencomapi.h

另請參閱

IDispatch