IMsTscAxEvents interface

Includes methods that receive information from the server that are related to client control events. Events include connecting and disconnecting, full-screen mode requests, successful logon, and error conditions.

Members

The IMsTscAxEvents interface inherits from the IDispatch interface. IMsTscAxEvents also has these types of members:

Methods

The IMsTscAxEvents interface has these methods.

Method Description
OnAuthenticationWarningDismissed Called after an ActiveX control displays an authentication dialog box (for example, the certificate error dialog box).
OnAuthenticationWarningDisplayed Called before an ActiveX control displays an authentication dialog box (for example, the certificate error dialog box).
OnAutoReconnected Called when the client control has automatically reconnected to a remote session.
OnAutoReconnecting Called when a client is in the process of automatically reconnecting a session with a RD Session Host server.
OnAutoReconnecting2 Called when a client is in the process of automatically reconnecting a session with a RD Session Host server.
OnChannelReceivedData Called when the client receives data on a scriptable virtual channel.
OnConfirmClose Called when the client calls the IMsRdpClient::RequestClose method.
OnConnected Called when the client control is in the process of establishing a connection with a RD Session Host server.
OnConnecting Called when the client control begins connecting to a server in response to a call to IMsTscAx::Connect.
OnConnectionBarPullDown Called when the user has dragged down on the connection bar.
OnDevicesButtonPressed Called when the devices button in the connection bar has been pressed.
OnDisconnected Called when the client control has been disconnected from the RD Session Host server.
OnEnterFullScreenMode Called when the client enters full-screen mode. For example, this event is called when the user presses the full-screen mode shortcut key combination (CTRL+ALT+BREAK).
OnFatalError Called when the client control encounters a fatal error.
OnFocusReleased Called when the release focus key combination is pressed. For example, this event is called when the user presses the CTRL+ALT+LEFT ARROW or the CTRL+ALT+RIGHT ARROW key combination.
OnIdleTimeoutNotification Called when there has been no mouse or keyboard input by the user during the period of time set by the IMsRdpClientAdvancedSettings::put_MinutesToIdleTimeout method.
OnLeaveFullScreenMode Called when the client leaves full-screen mode. For example, this event is called when the user presses the full-screen mode shortcut key combination (CTRL+ALT+BREAK).
OnLoginComplete Called when the client control has successfully logged on to a RD Session Host server, following the display of the Windows Logon dialog box.
OnLogonError Called when a logon error or other logon event occurs.
OnMouseInputModeChanged Called when the mouse input mode has changed.
OnNetworkStatusChanged Called when the network status has changed.
OnReceivedTSPublicKey Called during the connection sequence when the client retrieves the public key from the server. This event is only called if the NotifyTSPublicKey property is VARIANT_TRUE.
OnRemoteDesktopSizeChange Called to indicate that the size of the client control on the remote desktop has changed in response to a client control operation.
OnRemoteProgramDisplayed Called when a RemoteApp program is displayed.
OnRemoteProgramResult Called when a RemoteApp program returns a result to the client control.
OnRemoteWindowDisplayed Called when a RemoteApp window is displayed.
OnRequestContainerMinimize Called when the user presses the Minimize button on the connection bar in full-screen mode. The firing of this event is a request that the container application minimize itself.
OnRequestGoFullScreen Called when the client requests to switch to full-screen mode and the IMsTscAdvancedSettings::put_ContainerHandledFullScreen method is called to set the ContainerHandledFullScreen property to a nonzero value.
OnRequestLeaveFullScreen Called when the client requests to leave full-screen mode and the IMsTscAdvancedSettings::put_ContainerHandledFullScreen property has been set to a nonzero value.
OnServiceMessageReceived Called when the client receives a system message.
OnUserNameAcquired Called when the user name has been acquired by the control.
OnWarning Called when the client control encounters an error condition that is not fatal.

Remarks

For more information about Remote Desktop Web Connection, see Requirements for Remote Desktop Web Connection.

The RDP client control objects (MsRdpClient, MsRdpClientNonScriptable and their derivatives) are a connectable objects. To receive events from the Remote Desktop ActiveX control about the remote session, an application can implement IMstscAxEvents and perform the following steps.

  1. Call IUnknown::QueryInterface on the RDP client control object to obtain a pointer to the IConnectionPointContainer interface.
  2. Call IConnectionPointContainer::FindConnectionPoint, specifying __uuidof(IMsTscAxEvents) as the riid parameter, to obtain a pointer to the IConnectionPoint interface of the client control events.
  3. Call IConnectionPoint::Advise to specify the calling application's own implementation of IMsTscAxEvents where the events are to be dispatched.

Application can use the following DISPIDs when implementing IDispatch::Invoke.

dispIdMember Dispatch to method
DISPID_CONNECTING = 1 OnConnecting
DISPID_CONNECTED = 2 OnConnected
DISPID_LOGINCOMPLETE = 3 OnLoginComplete
DISPID_DISCONNECTED = 4 OnDisconnected
DISPID_ENTERFULLSCREENMODE = 5 OnEnterFullScreenMode
DISPID_LEAVEFULLSCREENMODE = 6 OnLeaveFullScreenMode
DISPID_CHANNELRECEIVEDDATA = 7 OnChannelReceivedData
DISPID_REQUESTGOFULLSCREEN = 8 OnRequestGoFullScreen
DISPID_REQUESTLEAVEFULLSCREEN = 9 OnRequestLeaveFullScreen
DISPID_FATALERROR = 10 OnFatalError
DISPID_WARNING = 11 OnWarning
DISPID_REMOTEDESKTOPSIZECHANGE = 12 OnRemoteDesktopSizeChange
DISPID_IDLETIMEOUTNOTIFICATION = 13 OnIdleTimeoutNotification
DISPID_REQUESTCONTAINERMINIMIZE = 14 OnRequestContainerMinimize
DISPID_CONFIRMCLOSE = 15 OnConfirmClose
DISPID_RECEIVEDTSPUBLICKEY = 16 OnReceivedTSPublicKey
DISPID_AUTORECONNECTING = 17 OnAutoReconnecting
DISPID_INTERNALDIALOGDISPLAYED = 18 OnAuthenticationWarningDisplayed
DISPID_INTERNALDIALOGDISMISSED = 19 OnAuthenticationWarningDismissed
DISPID_ONREMOTEPROGRAMRESULT = 20 OnRemoteProgramResult
DISPID_ONREMOTEPROGRAMDISPLAYED = 21 OnRemoteProgramDisplayed
DISPID_LOGONERROR = 22 OnLogonError
DISPID_FOCUSRELEASED = 23 OnFocusReleased
DISPID_USERNAMEACQUIRED = 24 OnUserNameAcquired
DISPID_MOUSEINPUTMODECHANGED = 26 OnMouseInputModeChanged
DISPID_ONSTATUSINFO = 27 None. Provides a VT_UI4 status code to the application. The application can pass the status code contained in `pDispParams->rgvarg[0].ulVal`` to IMsRdpClient7::GetStatusText to get the associated status text.
DISPID_SERVICEMESSAGERECEIVED = 28 OnServiceMessageReceived
DISPID_ONREMOTEWINDOWDISPLAYED = 29 OnRemoteWindowDisplayed
DISPID_CONNECTIONBARPULLDOWN = 30 OnConnectionBarPullDown
DISPID_ONNETWORKSTATUSCHANGED = 32 OnNetworkStatusChanged
DISPID_AUTORECONNECTED = 33 OnAutoReconnected
DISPID_AUTORECONNECTING2 = 34 OnAutoReconnecting2
DISPID_CONNECTIONBARDEVICES = 35 OnDevicesButtonPressed
DISPID_HVSINOTIFICATION = 36 None. Provides a VT_UI4 event code. This event is emitted in Microsoft Defender Application Guard scenarios. It should not be emitted during normal operations.
DISPID_ONWOKEUPANDRECONNECTING = 37 None. This event is no longer emitted by the Remote Desktop ActiveX control.
DISPID_ONLOCATIONREDIRECTIONENABLEDRECEIVED = 39 None. This event notifies the application that it can start using IMsRdpClientNonScriptable6::SendLocation2D or IMsRdpClientNonScriptable6::SendLocation3D its location to the server so the client's geographic location can be reflected in the remote session.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Type library
MsTscAx.dll
DLL
MsTscAx.dll
CLSID
CLSID_MsRdpClient is defined as 791fa017-2de3-492e-acc5-53c67a2b94d0
CLSID_MsRdpClient10 is defined as C0EFA91A-EEB7-41C7-97FA-F0ED645EFB24
CLSID_MsRdpClient10NotSafeForScripting is defined as A0C63C30-F08D-4AB4-907C-34905D770C7D
CLSID_MsRdpClient2 is defined as 9059F30F-4EB1-4BD2-9FDC-36F43A218F4A
CLSID_MsRdpClient2a is defined as 971127BB-259F-48C2-BD75-5F97A3331551
CLSID_MsRdpClient2NotSafeForScripting is defined as 3523C2FB-4031-44E4-9A3B-F1E94986EE7F
CLSID_MsRdpClient3 is defined as 7584C670-2274-4EFB-B00B-D6AABA6D3850
CLSID_MsRdpClient3a is defined as 6A6F4B83-45C5-4CA9-BDD9-0D81C12295E4
CLSID_MsRdpClient3NotSafeForScripting is defined as ACE575FD-1FCF-4074-9401-EBAB990FA9DE
CLSID_MsRdpClient4 is defined as 4EDCB26C-D24C-4E72-AF07-B576699AC0DE
CLSID_MsRdpClient4a is defined as 54CE37E0-9834-41AE-9896-4DAB69DC022B
CLSID_MsRdpClient4NotSafeForScripting is defined as 6AE29350-321B-42BE-BBE5-12FB5270C0DE
CLSID_MsRdpClient5 is defined as 4EB89FF4-7F78-4A0F-8B8D-2BF02E94E4B2
CLSID_MsRdpClient5NotSafeForScripting is defined as 4EB2F086-C818-447E-B32C-C51CE2B30D31
CLSID_MsRdpClient6 is defined as 7390F3D8-0439-4C05-91E3-CF5CB290C3D0
CLSID_MsRdpClient6NotSafeForScripting is defined as D2EA46A7-C2BF-426B-AF24-E19C44456399
CLSID_MsRdpClient7 is defined as A9D7038D-B5ED-472E-9C47-94BEA90A5910
CLSID_MsRdpClient7NotSafeForScripting is defined as 54D38BF7-B1EF-4479-9674-1BD6EA465258
CLSID_MsRdpClient8 is defined as 5F681803-2900-4C43-A1CC-CF405404A676
CLSID_MsRdpClient8NotSafeForScripting is defined as A3BC03A0-041D-42E3-AD22-882B7865C9C5
CLSID_MsRdpClient9 is defined as 301B94BA-5D25-4A12-BFFE-3B6E7A616585
CLSID_MsRdpClient9NotSafeForScripting is defined as 8B918B82-7985-4C24-89DF-C33AD2BBFBCD
CLSID_MsRdpClientNotSafeForScripting is defined as 7CACBD7B-0D99-468F-AC33-22E495C0AFE5
CLSID_MsTscAx is defined as 1FB464C8-09BB-4017-A2F5-EB742F04392F
CLSID_MsTscAxNotSafeForScripting is defined as A41A4187-5A86-4E26-B40A-856F9035D9CB
IID
IID_IMsTscAxEvents is defined as 336d5562-efa8-482e-8cb3-c5c0fc7a7db6

See also

IDispatch

Remote Desktop Web Connection Reference