_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 Dispatch to 方法
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