Disable Clipboard on a Remote Desktop Connection

When programming or scripting the Remote Desktop Connection, it’s advisable to disable the Clipboard. You can either disable the clipboard on the workstation via the registry, edit the RDP file or or call an undocumented property in the ActiveX component.

Registry (all of the RDP connections)

HKLMSOFTWAREMicrosoftTerminal Server Client

DisableClipboardRedirection – REG_DWORD – 1

RDP file

redirectclipboard:i:0

ActiveX component

RDPObject.AdvancedSettings2.RedirectClipboard = False

Daniel Nikolic

All of the properties, functions and events in the ActiveX component:

//Microsoft Terminal Services Control Type Library
//Version: 1.0
MSTSCLib;
GUID = {8C11EFA1-92C3-11D1-BC1E-00C04FA31489};

Dispatch IMsTscAxEvents;
GUID = {336D5562-EFA8-482E-8CB3-C5C0FC7A7DB6};
  function OnConnecting; stdcall;
  function OnConnected; stdcall;
  function OnLoginComplete; stdcall;
  function OnDisconnected(discReason: I4); stdcall;
  function OnEnterFullScreenMode; stdcall;
  function OnLeaveFullScreenMode; stdcall;
  function OnChannelReceivedData(chanName: BSTR; data: BSTR); stdcall;
  function OnRequestGoFullScreen; stdcall;
  function OnRequestLeaveFullScreen; stdcall;
  function OnFatalError(errorCode: I4); stdcall;
  function OnWarning(warningCode: I4); stdcall;
  function OnRemoteDesktopSizeChange(width: I4; height: I4); stdcall;
  function OnIdleTimeoutNotification; stdcall;
  function OnRequestContainerMinimize; stdcall;
  function OnConfirmClose(out pfAllowClose: ^Bool); stdcall;
  function OnReceivedTSPublicKey(publicKey: BSTR; out pfContinueLogon: ^Bool); stdcall;
  function OnAutoReconnecting(disconnectReason: I4; attemptCount: I4; out pArcContinueStatus: ^AutoReconnectContinueState); stdcall;
  function OnAuthenticationWarningDisplayed; stdcall;
  function OnAuthenticationWarningDismissed; stdcall;
  function OnRemoteProgramResult(bstrRemoteProgram: BSTR; lError: RemoteProgramResult; vbIsExecutable: Bool); stdcall;
  function OnRemoteProgramDisplayed(vbDisplayed: Bool; uDisplayInformation: UI4); stdcall;
  function OnLogonError(lError: I4); stdcall;
  function OnFocusReleased(iDirection: INT); stdcall;
  function OnUserNameAcquired(bstrUserName: BSTR); stdcall;
  function OnMouseInputModeChanged(fMouseModeRelative: Bool); stdcall;
  function OnServiceMessageRecieved(serviceMessage: BSTR); stdcall;

Alias AutoReconnectContinueState;
  __MIDL___MIDL_itf_mstsax_0000_0032_0001

Enum __MIDL___MIDL_itf_mstsax_0000_0032_0001;
  autoReconnectContinueAutomatic = 0;
  autoReconnectContinueStop = 1;
  autoReconnectContinueManual = 2;

Alias RemoteProgramResult;
  __MIDL___MIDL_itf_mstsax_0000_0039_0001

Enum __MIDL___MIDL_itf_mstsax_0000_0039_0001;
  remoteAppResultOk = 0;
  remoteAppResultLocked = 1;
  remoteAppResultProtocolError = 2;
  remoteAppResultNotInWhitelist = 3;
  remoteAppResultNetworkPathDenied = 4;
  remoteAppResultFileNotFound = 5;
  remoteAppResultFailure = 6;
  remoteAppResultHookNotLoaded = 7;

//Microsoft Terminal Services Client Control – version 1
CoClass MsTscAxNotSafeForScripting;
GUID = {A41A4187-5A86-4E26-B40A-856F9035D9CB};

Dispatch IMsRdpClient;
GUID = {92B4A539-7115-4B7C-A5A9-E5D9EFC2780A};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Server(: BSTR); stdcall;
  property-get Server: BSTR; stdcall;
  property-put Domain(: BSTR); stdcall;
  property-get Domain: BSTR; stdcall;
  property-put UserName(: BSTR); stdcall;
  property-get UserName: BSTR; stdcall;
  property-put DisconnectedText(: BSTR); stdcall;
  property-get DisconnectedText: BSTR; stdcall;
  property-put ConnectingText(: BSTR); stdcall;
  property-get ConnectingText: BSTR; stdcall;
  property-get Connected: I2; stdcall;
  property-put DesktopWidth(: I4); stdcall;
  property-get DesktopWidth: I4; stdcall;
  property-put DesktopHeight(: I4); stdcall;
  property-get DesktopHeight: I4; stdcall;
  property-put StartConnected(: I4); stdcall;
  property-get StartConnected: I4; stdcall;
  property-get HorizontalScrollBarVisible: I4; stdcall;
  property-get VerticalScrollBarVisible: I4; stdcall;
  property-put FullScreenTitle(: BSTR); stdcall;
  property-get CipherStrength: I4; stdcall;
  property-get Version: BSTR; stdcall;
  property-get SecuredSettingsEnabled: I4; stdcall;
  property-get SecuredSettings: ^IMsTscSecuredSettings; stdcall;
  property-get AdvancedSettings: ^IMsTscAdvancedSettings; stdcall;
  property-get Debugger: ^IMsTscDebug; stdcall;
  function Connect; stdcall;
  function Disconnect; stdcall;
  function CreateVirtualChannels(newVal: BSTR); stdcall;
  function SendOnVirtualChannel(chanName: BSTR; ChanData: BSTR); stdcall;
  property-put ColorDepth(: I4); stdcall;
  property-get ColorDepth: I4; stdcall;
  property-get AdvancedSettings2: ^IMsRdpClientAdvancedSettings; stdcall;
  property-get SecuredSettings2: ^IMsRdpClientSecuredSettings; stdcall;
  property-get ExtendedDisconnectReason: ExtendedDisconnectReasonCode; stdcall;
  property-put FullScreen(: Bool); stdcall;
  property-get FullScreen: Bool; stdcall;
  function SetVirtualChannelOptions(chanName: BSTR; chanOptions: I4); stdcall;
  function GetVirtualChannelOptions(chanName: BSTR): I4; stdcall;
  function RequestClose: ControlCloseStatus; stdcall;

Dispatch IMsTscAx;
GUID = {8C11EFAE-92C3-11D1-BC1E-00C04FA31489};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Server(: BSTR); stdcall;
  property-get Server: BSTR; stdcall;
  property-put Domain(: BSTR); stdcall;
  property-get Domain: BSTR; stdcall;
  property-put UserName(: BSTR); stdcall;
  property-get UserName: BSTR; stdcall;
  property-put DisconnectedText(: BSTR); stdcall;
  property-get DisconnectedText: BSTR; stdcall;
  property-put ConnectingText(: BSTR); stdcall;
  property-get ConnectingText: BSTR; stdcall;
  property-get Connected: I2; stdcall;
  property-put DesktopWidth(: I4); stdcall;
  property-get DesktopWidth: I4; stdcall;
  property-put DesktopHeight(: I4); stdcall;
  property-get DesktopHeight: I4; stdcall;
  property-put StartConnected(: I4); stdcall;
  property-get StartConnected: I4; stdcall;
  property-get HorizontalScrollBarVisible: I4; stdcall;
  property-get VerticalScrollBarVisible: I4; stdcall;
  property-put FullScreenTitle(: BSTR); stdcall;
  property-get CipherStrength: I4; stdcall;
  property-get Version: BSTR; stdcall;
  property-get SecuredSettingsEnabled: I4; stdcall;
  property-get SecuredSettings: ^IMsTscSecuredSettings; stdcall;
  property-get AdvancedSettings: ^IMsTscAdvancedSettings; stdcall;
  property-get Debugger: ^IMsTscDebug; stdcall;
  function Connect; stdcall;
  function Disconnect; stdcall;
  function CreateVirtualChannels(newVal: BSTR); stdcall;
  function SendOnVirtualChannel(chanName: BSTR; ChanData: BSTR); stdcall;

Dispatch IMsTscAx_Redist;
GUID = {327BB5CD-834E-4400-AEF2-B30E15E5D682};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;

Dispatch IMsTscSecuredSettings;
GUID = {C9D65442-A0F9-45B2-8F73-D61D2DB8CBB6};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put StartProgram(: BSTR); stdcall;
  property-get StartProgram: BSTR; stdcall;
  property-put WorkDir(: BSTR); stdcall;
  property-get WorkDir: BSTR; stdcall;
  property-put FullScreen(: I4); stdcall;
  property-get FullScreen: I4; stdcall;

Dispatch IMsTscAdvancedSettings;
GUID = {809945CC-4B3B-4A92-A6B0-DBF9B5F2EF2D};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Compress(: I4); stdcall;
  property-get Compress: I4; stdcall;
  property-put BitmapPeristence(: I4); stdcall;
  property-get BitmapPeristence: I4; stdcall;
  property-put allowBackgroundInput(: I4); stdcall;
  property-get allowBackgroundInput: I4; stdcall;
  property-put KeyBoardLayoutStr(: BSTR); stdcall;
  property-put PluginDlls(: BSTR); stdcall;
  property-put IconFile(: BSTR); stdcall;
  property-put IconIndex(: I4); stdcall;
  property-put ContainerHandledFullScreen(: I4); stdcall;
  property-get ContainerHandledFullScreen: I4; stdcall;
  property-put DisableRdpdr(: I4); stdcall;
  property-get DisableRdpdr: I4; stdcall;

Dispatch IMsTscDebug;
GUID = {209D0EB9-6254-47B1-9033-A98DAE55BB27};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put HatchBitmapPDU(: I4); stdcall;
  property-get HatchBitmapPDU: I4; stdcall;
  property-put HatchSSBOrder(: I4); stdcall;
  property-get HatchSSBOrder: I4; stdcall;
  property-put HatchMembltOrder(: I4); stdcall;
  property-get HatchMembltOrder: I4; stdcall;
  property-put HatchIndexPDU(: I4); stdcall;
  property-get HatchIndexPDU: I4; stdcall;
  property-put LabelMemblt(: I4); stdcall;
  property-get LabelMemblt: I4; stdcall;
  property-put BitmapCacheMonitor(: I4); stdcall;
  property-get BitmapCacheMonitor: I4; stdcall;
  property-put MallocFailuresPercent(: I4); stdcall;
  property-get MallocFailuresPercent: I4; stdcall;
  property-put MallocHugeFailuresPercent(: I4); stdcall;
  property-get MallocHugeFailuresPercent: I4; stdcall;
  property-put NetThroughput(: I4); stdcall;
  property-get NetThroughput: I4; stdcall;
  property-put CLXCmdLine(: BSTR); stdcall;
  property-get CLXCmdLine: BSTR; stdcall;
  property-put CLXDll(: BSTR); stdcall;
  property-get CLXDll: BSTR; stdcall;
  property-put RemoteProgramsHatchVisibleRegion(: I4); stdcall;
  property-get RemoteProgramsHatchVisibleRegion: I4; stdcall;
  property-put RemoteProgramsHatchVisibleNoDataRegion(: I4); stdcall;
  property-get RemoteProgramsHatchVisibleNoDataRegion: I4; stdcall;
  property-put RemoteProgramsHatchNonVisibleRegion(: I4); stdcall;
  property-get RemoteProgramsHatchNonVisibleRegion: I4; stdcall;
  property-put RemoteProgramsHatchWindow(: I4); stdcall;
  property-get RemoteProgramsHatchWindow: I4; stdcall;
  property-put RemoteProgramsStayConnectOnBadCaps(: I4); stdcall;
  property-get RemoteProgramsStayConnectOnBadCaps: I4; stdcall;
  property-get ControlType: UINT; stdcall;

Dispatch IMsRdpClientAdvancedSettings;
GUID = {3C65B4AB-12B3-465B-ACD4-B8DAD3BFF9E2};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Compress(: I4); stdcall;
  property-get Compress: I4; stdcall;
  property-put BitmapPeristence(: I4); stdcall;
  property-get BitmapPeristence: I4; stdcall;
  property-put allowBackgroundInput(: I4); stdcall;
  property-get allowBackgroundInput: I4; stdcall;
  property-put KeyBoardLayoutStr(: BSTR); stdcall;
  property-put PluginDlls(: BSTR); stdcall;
  property-put IconFile(: BSTR); stdcall;
  property-put IconIndex(: I4); stdcall;
  property-put ContainerHandledFullScreen(: I4); stdcall;
  property-get ContainerHandledFullScreen: I4; stdcall;
  property-put DisableRdpdr(: I4); stdcall;
  property-get DisableRdpdr: I4; stdcall;
  property-put SmoothScroll(: I4); stdcall;
  property-get SmoothScroll: I4; stdcall;
  property-put AcceleratorPassthrough(: I4); stdcall;
  property-get AcceleratorPassthrough: I4; stdcall;
  property-put ShadowBitmap(: I4); stdcall;
  property-get ShadowBitmap: I4; stdcall;
  property-put TransportType(: I4); stdcall;
  property-get TransportType: I4; stdcall;
  property-put SasSequence(: I4); stdcall;
  property-get SasSequence: I4; stdcall;
  property-put EncryptionEnabled(: I4); stdcall;
  property-get EncryptionEnabled: I4; stdcall;
  property-put DedicatedTerminal(: I4); stdcall;
  property-get DedicatedTerminal: I4; stdcall;
  property-put RDPPort(: I4); stdcall;
  property-get RDPPort: I4; stdcall;
  property-put EnableMouse(: I4); stdcall;
  property-get EnableMouse: I4; stdcall;
  property-put DisableCtrlAltDel(: I4); stdcall;
  property-get DisableCtrlAltDel: I4; stdcall;
  property-put EnableWindowsKey(: I4); stdcall;
  property-get EnableWindowsKey: I4; stdcall;
  property-put DoubleClickDetect(: I4); stdcall;
  property-get DoubleClickDetect: I4; stdcall;
  property-put MaximizeShell(: I4); stdcall;
  property-get MaximizeShell: I4; stdcall;
  property-put HotKeyFullScreen(: I4); stdcall;
  property-get HotKeyFullScreen: I4; stdcall;
  property-put HotKeyCtrlEsc(: I4); stdcall;
  property-get HotKeyCtrlEsc: I4; stdcall;
  property-put HotKeyAltEsc(: I4); stdcall;
  property-get HotKeyAltEsc: I4; stdcall;
  property-put HotKeyAltTab(: I4); stdcall;
  property-get HotKeyAltTab: I4; stdcall;
  property-put HotKeyAltShiftTab(: I4); stdcall;
  property-get HotKeyAltShiftTab: I4; stdcall;
  property-put HotKeyAltSpace(: I4); stdcall;
  property-get HotKeyAltSpace: I4; stdcall;
  property-put HotKeyCtrlAltDel(: I4); stdcall;
  property-get HotKeyCtrlAltDel: I4; stdcall;
  property-put orderDrawThreshold(: I4); stdcall;
  property-get orderDrawThreshold: I4; stdcall;
  property-put BitmapCacheSize(: I4); stdcall;
  property-get BitmapCacheSize: I4; stdcall;
  property-put BitmapVirtualCacheSize(: I4); stdcall;
  property-get BitmapVirtualCacheSize: I4; stdcall;
  property-put ScaleBitmapCachesByBPP(: I4); stdcall;
  property-get ScaleBitmapCachesByBPP: I4; stdcall;
  property-put NumBitmapCaches(: I4); stdcall;
  property-get NumBitmapCaches: I4; stdcall;
  property-put CachePersistenceActive(: I4); stdcall;
  property-get CachePersistenceActive: I4; stdcall;
  property-put PersistCacheDirectory(: BSTR); stdcall;
  property-put brushSupportLevel(: I4); stdcall;
  property-get brushSupportLevel: I4; stdcall;
  property-put minInputSendInterval(: I4); stdcall;
  property-get minInputSendInterval: I4; stdcall;
  property-put InputEventsAtOnce(: I4); stdcall;
  property-get InputEventsAtOnce: I4; stdcall;
  property-put maxEventCount(: I4); stdcall;
  property-get maxEventCount: I4; stdcall;
  property-put keepAliveInterval(: I4); stdcall;
  property-get keepAliveInterval: I4; stdcall;
  property-put shutdownTimeout(: I4); stdcall;
  property-get shutdownTimeout: I4; stdcall;
  property-put overallConnectionTimeout(: I4); stdcall;
  property-get overallConnectionTimeout: I4; stdcall;
  property-put singleConnectionTimeout(: I4); stdcall;
  property-get singleConnectionTimeout: I4; stdcall;
  property-put KeyboardType(: I4); stdcall;
  property-get KeyboardType: I4; stdcall;
  property-put KeyboardSubType(: I4); stdcall;
  property-get KeyboardSubType: I4; stdcall;
  property-put KeyboardFunctionKey(: I4); stdcall;
  property-get KeyboardFunctionKey: I4; stdcall;
  property-put WinceFixedPalette(: I4); stdcall;
  property-get WinceFixedPalette: I4; stdcall;
  property-put ConnectToServerConsole(: Bool); stdcall;
  property-get ConnectToServerConsole: Bool; stdcall;
  property-put BitmapPersistence(: I4); stdcall;
  property-get BitmapPersistence: I4; stdcall;
  property-put MinutesToIdleTimeout(: I4); stdcall;
  property-get MinutesToIdleTimeout: I4; stdcall;
  property-put SmartSizing(: Bool); stdcall;
  property-get SmartSizing: Bool; stdcall;
  property-put RdpdrLocalPrintingDocName(: BSTR); stdcall;
  property-get RdpdrLocalPrintingDocName: BSTR; stdcall;
  property-put RdpdrClipCleanTempDirString(: BSTR); stdcall;
  property-get RdpdrClipCleanTempDirString: BSTR; stdcall;
  property-put RdpdrClipPasteInfoString(: BSTR); stdcall;
  property-get RdpdrClipPasteInfoString: BSTR; stdcall;
  property-put ClearTextPassword(: BSTR); stdcall;
  property-put DisplayConnectionBar(: Bool); stdcall;
  property-get DisplayConnectionBar: Bool; stdcall;
  property-put PinConnectionBar(: Bool); stdcall;
  property-get PinConnectionBar: Bool; stdcall;
  property-put GrabFocusOnConnect(: Bool); stdcall;
  property-get GrabFocusOnConnect: Bool; stdcall;
  property-put LoadBalanceInfo(: BSTR); stdcall;
  property-get LoadBalanceInfo: BSTR; stdcall;
  property-put RedirectDrives(: Bool); stdcall;
  property-get RedirectDrives: Bool; stdcall;
  property-put RedirectPrinters(: Bool); stdcall;
  property-get RedirectPrinters: Bool; stdcall;
  property-put RedirectPorts(: Bool); stdcall;
  property-get RedirectPorts: Bool; stdcall;
  property-put RedirectSmartCards(: Bool); stdcall;
  property-get RedirectSmartCards: Bool; stdcall;
  property-put BitmapVirtualCache16BppSize(: I4); stdcall;
  property-get BitmapVirtualCache16BppSize: I4; stdcall;
  property-put BitmapVirtualCache24BppSize(: I4); stdcall;
  property-get BitmapVirtualCache24BppSize: I4; stdcall;
  property-put PerformanceFlags(: I4); stdcall;
  property-get PerformanceFlags: I4; stdcall;
  property-put ConnectWithEndpoint(: ^Variant); stdcall;
  property-put NotifyTSPublicKey(: Bool); stdcall;
  property-get NotifyTSPublicKey: Bool; stdcall;

Dispatch IMsRdpClientSecuredSettings;
GUID = {605BEFCF-39C1-45CC-A811-068FB7BE346D};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put StartProgram(: BSTR); stdcall;
  property-get StartProgram: BSTR; stdcall;
  property-put WorkDir(: BSTR); stdcall;
  property-get WorkDir: BSTR; stdcall;
  property-put FullScreen(: I4); stdcall;
  property-get FullScreen: I4; stdcall;
  property-put KeyboardHookMode(: I4); stdcall;
  property-get KeyboardHookMode: I4; stdcall;
  property-put AudioRedirectionMode(: I4); stdcall;
  property-get AudioRedirectionMode: I4; stdcall;

Alias ExtendedDisconnectReasonCode;
  __MIDL_IMsRdpClient_0001

Enum __MIDL_IMsRdpClient_0001;
  exDiscReasonNoInfo = 0;
  exDiscReasonAPIInitiatedDisconnect = 1;
  exDiscReasonAPIInitiatedLogoff = 2;
  exDiscReasonServerIdleTimeout = 3;
  exDiscReasonServerLogonTimeout = 4;
  exDiscReasonReplacedByOtherConnection = 5;
  exDiscReasonOutOfMemory = 6;
  exDiscReasonServerDeniedConnection = 7;
  exDiscReasonServerDeniedConnectionFips = 8;
  exDiscReasonServerInsufficientPrivileges = 9;
  exDiscReasonServerFreshCredsRequired = 10;
  exDiscReasonLicenseInternal = 256;
  exDiscReasonLicenseNoLicenseServer = 257;
  exDiscReasonLicenseNoLicense = 258;
  exDiscReasonLicenseErrClientMsg = 259;
  exDiscReasonLicenseHwidDoesntMatchLicense = 260;
  exDiscReasonLicenseErrClientLicense = 261;
  exDiscReasonLicenseCantFinishProtocol = 262;
  exDiscReasonLicenseClientEndedProtocol = 263;
  exDiscReasonLicenseErrClientEncryption = 264;
  exDiscReasonLicenseCantUpgradeLicense = 265;
  exDiscReasonLicenseNoRemoteConnections = 266;
  exDiscReasonRdpEncInvalidCredentials = 768;
  exDiscReasonProtocolRangeStart = 4096;
  exDiscReasonProtocolRangeEnd = 32767;

Alias ControlCloseStatus;
  __MIDL_IMsRdpClient_0002

Enum __MIDL_IMsRdpClient_0002;
  controlCloseCanProceed = 0;
  controlCloseWaitForEvents = 1;

Interface IMsTscNonScriptable;
GUID = {C1E6743A-41C1-4A74-832A-0DD06C1C7A0E};
  property-put ClearTextPassword(: BSTR): HResult; stdcall;
  property-put PortablePassword(pPortablePass: BSTR): HResult; stdcall;
  property-get PortablePassword(out pPortablePass: ^BSTR): HResult; stdcall;
  property-put PortableSalt(pPortableSalt: BSTR): HResult; stdcall;
  property-get PortableSalt(out pPortableSalt: ^BSTR): HResult; stdcall;
  property-put BinaryPassword(pBinaryPassword: BSTR): HResult; stdcall;
  property-get BinaryPassword(out pBinaryPassword: ^BSTR): HResult; stdcall;
  property-put BinarySalt(pSalt: BSTR): HResult; stdcall;
  property-get BinarySalt(out pSalt: ^BSTR): HResult; stdcall;
  function ResetPassword: HResult; stdcall;

Interface IMsRdpClientNonScriptable;
GUID = {2F079C4C-87B2-4AFD-97AB-20CDB43038AE};
  function NotifyRedirectDeviceChange(wParam: UINT_PTR; lParam: LONG_PTR): HResult; stdcall;
  function SendKeys(numKeys: I4; pbArrayKeyUp: ^Bool; plKeyData: ^I4): HResult; stdcall;

Alias UINT_PTR;
  UI4

Alias LONG_PTR;
  I4

//Microsoft Terminal Services Client Control (redistributable) – version 1
CoClass MsTscAx;
GUID = {1FB464C8-09BB-4017-A2F5-EB742F04392F};

//Microsoft RDP Client Control – version 2
CoClass MsRdpClientNotSafeForScripting;
GUID = {7CACBD7B-0D99-468F-AC33-22E495C0AFE5};

//Microsoft RDP Client Control (redistributable) – version 2
CoClass MsRdpClient;
GUID = {791FA017-2DE3-492E-ACC5-53C67A2B94D0};

//Microsoft RDP Client Control – version 3
CoClass MsRdpClient2NotSafeForScripting;
GUID = {3523C2FB-4031-44E4-9A3B-F1E94986EE7F};

Dispatch IMsRdpClient2;
GUID = {E7E17DC4-3B71-4BA7-A8E6-281FFADCA28F};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Server(: BSTR); stdcall;
  property-get Server: BSTR; stdcall;
  property-put Domain(: BSTR); stdcall;
  property-get Domain: BSTR; stdcall;
  property-put UserName(: BSTR); stdcall;
  property-get UserName: BSTR; stdcall;
  property-put DisconnectedText(: BSTR); stdcall;
  property-get DisconnectedText: BSTR; stdcall;
  property-put ConnectingText(: BSTR); stdcall;
  property-get ConnectingText: BSTR; stdcall;
  property-get Connected: I2; stdcall;
  property-put DesktopWidth(: I4); stdcall;
  property-get DesktopWidth: I4; stdcall;
  property-put DesktopHeight(: I4); stdcall;
  property-get DesktopHeight: I4; stdcall;
  property-put StartConnected(: I4); stdcall;
  property-get StartConnected: I4; stdcall;
  property-get HorizontalScrollBarVisible: I4; stdcall;
  property-get VerticalScrollBarVisible: I4; stdcall;
  property-put FullScreenTitle(: BSTR); stdcall;
  property-get CipherStrength: I4; stdcall;
  property-get Version: BSTR; stdcall;
  property-get SecuredSettingsEnabled: I4; stdcall;
  property-get SecuredSettings: ^IMsTscSecuredSettings; stdcall;
  property-get AdvancedSettings: ^IMsTscAdvancedSettings; stdcall;
  property-get Debugger: ^IMsTscDebug; stdcall;
  function Connect; stdcall;
  function Disconnect; stdcall;
  function CreateVirtualChannels(newVal: BSTR); stdcall;
  function SendOnVirtualChannel(chanName: BSTR; ChanData: BSTR); stdcall;
  property-put ColorDepth(: I4); stdcall;
  property-get ColorDepth: I4; stdcall;
  property-get AdvancedSettings2: ^IMsRdpClientAdvancedSettings; stdcall;
  property-get SecuredSettings2: ^IMsRdpClientSecuredSettings; stdcall;
  property-get ExtendedDisconnectReason: ExtendedDisconnectReasonCode; stdcall;
  property-put FullScreen(: Bool); stdcall;
  property-get FullScreen: Bool; stdcall;
  function SetVirtualChannelOptions(chanName: BSTR; chanOptions: I4); stdcall;
  function GetVirtualChannelOptions(chanName: BSTR): I4; stdcall;
  function RequestClose: ControlCloseStatus; stdcall;
  property-get AdvancedSettings3: ^IMsRdpClientAdvancedSettings2; stdcall;
  property-put ConnectedStatusText(: BSTR); stdcall;
  property-get ConnectedStatusText: BSTR; stdcall;

Dispatch IMsRdpClientAdvancedSettings2;
GUID = {9AC42117-2B76-4320-AA44-0E616AB8437B};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Compress(: I4); stdcall;
  property-get Compress: I4; stdcall;
  property-put BitmapPeristence(: I4); stdcall;
  property-get BitmapPeristence: I4; stdcall;
  property-put allowBackgroundInput(: I4); stdcall;
  property-get allowBackgroundInput: I4; stdcall;
  property-put KeyBoardLayoutStr(: BSTR); stdcall;
  property-put PluginDlls(: BSTR); stdcall;
  property-put IconFile(: BSTR); stdcall;
  property-put IconIndex(: I4); stdcall;
  property-put ContainerHandledFullScreen(: I4); stdcall;
  property-get ContainerHandledFullScreen: I4; stdcall;
  property-put DisableRdpdr(: I4); stdcall;
  property-get DisableRdpdr: I4; stdcall;
  property-put SmoothScroll(: I4); stdcall;
  property-get SmoothScroll: I4; stdcall;
  property-put AcceleratorPassthrough(: I4); stdcall;
  property-get AcceleratorPassthrough: I4; stdcall;
  property-put ShadowBitmap(: I4); stdcall;
  property-get ShadowBitmap: I4; stdcall;
  property-put TransportType(: I4); stdcall;
  property-get TransportType: I4; stdcall;
  property-put SasSequence(: I4); stdcall;
  property-get SasSequence: I4; stdcall;
  property-put EncryptionEnabled(: I4); stdcall;
  property-get EncryptionEnabled: I4; stdcall;
  property-put DedicatedTerminal(: I4); stdcall;
  property-get DedicatedTerminal: I4; stdcall;
  property-put RDPPort(: I4); stdcall;
  property-get RDPPort: I4; stdcall;
  property-put EnableMouse(: I4); stdcall;
  property-get EnableMouse: I4; stdcall;
  property-put DisableCtrlAltDel(: I4); stdcall;
  property-get DisableCtrlAltDel: I4; stdcall;
  property-put EnableWindowsKey(: I4); stdcall;
  property-get EnableWindowsKey: I4; stdcall;
  property-put DoubleClickDetect(: I4); stdcall;
  property-get DoubleClickDetect: I4; stdcall;
  property-put MaximizeShell(: I4); stdcall;
  property-get MaximizeShell: I4; stdcall;
  property-put HotKeyFullScreen(: I4); stdcall;
  property-get HotKeyFullScreen: I4; stdcall;
  property-put HotKeyCtrlEsc(: I4); stdcall;
  property-get HotKeyCtrlEsc: I4; stdcall;
  property-put HotKeyAltEsc(: I4); stdcall;
  property-get HotKeyAltEsc: I4; stdcall;
  property-put HotKeyAltTab(: I4); stdcall;
  property-get HotKeyAltTab: I4; stdcall;
  property-put HotKeyAltShiftTab(: I4); stdcall;
  property-get HotKeyAltShiftTab: I4; stdcall;
  property-put HotKeyAltSpace(: I4); stdcall;
  property-get HotKeyAltSpace: I4; stdcall;
  property-put HotKeyCtrlAltDel(: I4); stdcall;
  property-get HotKeyCtrlAltDel: I4; stdcall;
  property-put orderDrawThreshold(: I4); stdcall;
  property-get orderDrawThreshold: I4; stdcall;
  property-put BitmapCacheSize(: I4); stdcall;
  property-get BitmapCacheSize: I4; stdcall;
  property-put BitmapVirtualCacheSize(: I4); stdcall;
  property-get BitmapVirtualCacheSize: I4; stdcall;
  property-put ScaleBitmapCachesByBPP(: I4); stdcall;
  property-get ScaleBitmapCachesByBPP: I4; stdcall;
  property-put NumBitmapCaches(: I4); stdcall;
  property-get NumBitmapCaches: I4; stdcall;
  property-put CachePersistenceActive(: I4); stdcall;
  property-get CachePersistenceActive: I4; stdcall;
  property-put PersistCacheDirectory(: BSTR); stdcall;
  property-put brushSupportLevel(: I4); stdcall;
  property-get brushSupportLevel: I4; stdcall;
  property-put minInputSendInterval(: I4); stdcall;
  property-get minInputSendInterval: I4; stdcall;
  property-put InputEventsAtOnce(: I4); stdcall;
  property-get InputEventsAtOnce: I4; stdcall;
  property-put maxEventCount(: I4); stdcall;
  property-get maxEventCount: I4; stdcall;
  property-put keepAliveInterval(: I4); stdcall;
  property-get keepAliveInterval: I4; stdcall;
  property-put shutdownTimeout(: I4); stdcall;
  property-get shutdownTimeout: I4; stdcall;
  property-put overallConnectionTimeout(: I4); stdcall;
  property-get overallConnectionTimeout: I4; stdcall;
  property-put singleConnectionTimeout(: I4); stdcall;
  property-get singleConnectionTimeout: I4; stdcall;
  property-put KeyboardType(: I4); stdcall;
  property-get KeyboardType: I4; stdcall;
  property-put KeyboardSubType(: I4); stdcall;
  property-get KeyboardSubType: I4; stdcall;
  property-put KeyboardFunctionKey(: I4); stdcall;
  property-get KeyboardFunctionKey: I4; stdcall;
  property-put WinceFixedPalette(: I4); stdcall;
  property-get WinceFixedPalette: I4; stdcall;
  property-put ConnectToServerConsole(: Bool); stdcall;
  property-get ConnectToServerConsole: Bool; stdcall;
  property-put BitmapPersistence(: I4); stdcall;
  property-get BitmapPersistence: I4; stdcall;
  property-put MinutesToIdleTimeout(: I4); stdcall;
  property-get MinutesToIdleTimeout: I4; stdcall;
  property-put SmartSizing(: Bool); stdcall;
  property-get SmartSizing: Bool; stdcall;
  property-put RdpdrLocalPrintingDocName(: BSTR); stdcall;
  property-get RdpdrLocalPrintingDocName: BSTR; stdcall;
  property-put RdpdrClipCleanTempDirString(: BSTR); stdcall;
  property-get RdpdrClipCleanTempDirString: BSTR; stdcall;
  property-put RdpdrClipPasteInfoString(: BSTR); stdcall;
  property-get RdpdrClipPasteInfoString: BSTR; stdcall;
  property-put ClearTextPassword(: BSTR); stdcall;
  property-put DisplayConnectionBar(: Bool); stdcall;
  property-get DisplayConnectionBar: Bool; stdcall;
  property-put PinConnectionBar(: Bool); stdcall;
  property-get PinConnectionBar: Bool; stdcall;
  property-put GrabFocusOnConnect(: Bool); stdcall;
  property-get GrabFocusOnConnect: Bool; stdcall;
  property-put LoadBalanceInfo(: BSTR); stdcall;
  property-get LoadBalanceInfo: BSTR; stdcall;
  property-put RedirectDrives(: Bool); stdcall;
  property-get RedirectDrives: Bool; stdcall;
  property-put RedirectPrinters(: Bool); stdcall;
  property-get RedirectPrinters: Bool; stdcall;
  property-put RedirectPorts(: Bool); stdcall;
  property-get RedirectPorts: Bool; stdcall;
  property-put RedirectSmartCards(: Bool); stdcall;
  property-get RedirectSmartCards: Bool; stdcall;
  property-put BitmapVirtualCache16BppSize(: I4); stdcall;
  property-get BitmapVirtualCache16BppSize: I4; stdcall;
  property-put BitmapVirtualCache24BppSize(: I4); stdcall;
  property-get BitmapVirtualCache24BppSize: I4; stdcall;
  property-put PerformanceFlags(: I4); stdcall;
  property-get PerformanceFlags: I4; stdcall;
  property-put ConnectWithEndpoint(: ^Variant); stdcall;
  property-put NotifyTSPublicKey(: Bool); stdcall;
  property-get NotifyTSPublicKey: Bool; stdcall;
  property-get CanAutoReconnect: Bool; stdcall;
  property-put EnableAutoReconnect(: Bool); stdcall;
  property-get EnableAutoReconnect: Bool; stdcall;
  property-put MaxReconnectAttempts(: I4); stdcall;
  property-get MaxReconnectAttempts: I4; stdcall;

//Microsoft RDP Client Control (redistributable) – version 3
CoClass MsRdpClient2;
GUID = {9059F30F-4EB1-4BD2-9FDC-36F43A218F4A};

//Microsoft RDP Client Control (redistributable) – version 3a
CoClass MsRdpClient2a;
GUID = {971127BB-259F-48C2-BD75-5F97A3331551};

//Microsoft RDP Client Control – version 4
CoClass MsRdpClient3NotSafeForScripting;
GUID = {ACE575FD-1FCF-4074-9401-EBAB990FA9DE};

Dispatch IMsRdpClient3;
GUID = {91B7CBC5-A72E-4FA0-9300-D647D7E897FF};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Server(: BSTR); stdcall;
  property-get Server: BSTR; stdcall;
  property-put Domain(: BSTR); stdcall;
  property-get Domain: BSTR; stdcall;
  property-put UserName(: BSTR); stdcall;
  property-get UserName: BSTR; stdcall;
  property-put DisconnectedText(: BSTR); stdcall;
  property-get DisconnectedText: BSTR; stdcall;
  property-put ConnectingText(: BSTR); stdcall;
  property-get ConnectingText: BSTR; stdcall;
  property-get Connected: I2; stdcall;
  property-put DesktopWidth(: I4); stdcall;
  property-get DesktopWidth: I4; stdcall;
  property-put DesktopHeight(: I4); stdcall;
  property-get DesktopHeight: I4; stdcall;
  property-put StartConnected(: I4); stdcall;
  property-get StartConnected: I4; stdcall;
  property-get HorizontalScrollBarVisible: I4; stdcall;
  property-get VerticalScrollBarVisible: I4; stdcall;
  property-put FullScreenTitle(: BSTR); stdcall;
  property-get CipherStrength: I4; stdcall;
  property-get Version: BSTR; stdcall;
  property-get SecuredSettingsEnabled: I4; stdcall;
  property-get SecuredSettings: ^IMsTscSecuredSettings; stdcall;
  property-get AdvancedSettings: ^IMsTscAdvancedSettings; stdcall;
  property-get Debugger: ^IMsTscDebug; stdcall;
  function Connect; stdcall;
  function Disconnect; stdcall;
  function CreateVirtualChannels(newVal: BSTR); stdcall;
  function SendOnVirtualChannel(chanName: BSTR; ChanData: BSTR); stdcall;
  property-put ColorDepth(: I4); stdcall;
  property-get ColorDepth: I4; stdcall;
  property-get AdvancedSettings2: ^IMsRdpClientAdvancedSettings; stdcall;
  property-get SecuredSettings2: ^IMsRdpClientSecuredSettings; stdcall;
  property-get ExtendedDisconnectReason: ExtendedDisconnectReasonCode; stdcall;
  property-put FullScreen(: Bool); stdcall;
  property-get FullScreen: Bool; stdcall;
  function SetVirtualChannelOptions(chanName: BSTR; chanOptions: I4); stdcall;
  function GetVirtualChannelOptions(chanName: BSTR): I4; stdcall;
  function RequestClose: ControlCloseStatus; stdcall;
  property-get AdvancedSettings3: ^IMsRdpClientAdvancedSettings2; stdcall;
  property-put ConnectedStatusText(: BSTR); stdcall;
  property-get ConnectedStatusText: BSTR; stdcall;
  property-get AdvancedSettings4: ^IMsRdpClientAdvancedSettings3; stdcall;

Dispatch IMsRdpClientAdvancedSettings3;
GUID = {19CD856B-C542-4C53-ACEE-F127E3BE1A59};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Compress(: I4); stdcall;
  property-get Compress: I4; stdcall;
  property-put BitmapPeristence(: I4); stdcall;
  property-get BitmapPeristence: I4; stdcall;
  property-put allowBackgroundInput(: I4); stdcall;
  property-get allowBackgroundInput: I4; stdcall;
  property-put KeyBoardLayoutStr(: BSTR); stdcall;
  property-put PluginDlls(: BSTR); stdcall;
  property-put IconFile(: BSTR); stdcall;
  property-put IconIndex(: I4); stdcall;
  property-put ContainerHandledFullScreen(: I4); stdcall;
  property-get ContainerHandledFullScreen: I4; stdcall;
  property-put DisableRdpdr(: I4); stdcall;
  property-get DisableRdpdr: I4; stdcall;
  property-put SmoothScroll(: I4); stdcall;
  property-get SmoothScroll: I4; stdcall;
  property-put AcceleratorPassthrough(: I4); stdcall;
  property-get AcceleratorPassthrough: I4; stdcall;
  property-put ShadowBitmap(: I4); stdcall;
  property-get ShadowBitmap: I4; stdcall;
  property-put TransportType(: I4); stdcall;
  property-get TransportType: I4; stdcall;
  property-put SasSequence(: I4); stdcall;
  property-get SasSequence: I4; stdcall;
  property-put EncryptionEnabled(: I4); stdcall;
  property-get EncryptionEnabled: I4; stdcall;
  property-put DedicatedTerminal(: I4); stdcall;
  property-get DedicatedTerminal: I4; stdcall;
  property-put RDPPort(: I4); stdcall;
  property-get RDPPort: I4; stdcall;
  property-put EnableMouse(: I4); stdcall;
  property-get EnableMouse: I4; stdcall;
  property-put DisableCtrlAltDel(: I4); stdcall;
  property-get DisableCtrlAltDel: I4; stdcall;
  property-put EnableWindowsKey(: I4); stdcall;
  property-get EnableWindowsKey: I4; stdcall;
  property-put DoubleClickDetect(: I4); stdcall;
  property-get DoubleClickDetect: I4; stdcall;
  property-put MaximizeShell(: I4); stdcall;
  property-get MaximizeShell: I4; stdcall;
  property-put HotKeyFullScreen(: I4); stdcall;
  property-get HotKeyFullScreen: I4; stdcall;
  property-put HotKeyCtrlEsc(: I4); stdcall;
  property-get HotKeyCtrlEsc: I4; stdcall;
  property-put HotKeyAltEsc(: I4); stdcall;
  property-get HotKeyAltEsc: I4; stdcall;
  property-put HotKeyAltTab(: I4); stdcall;
  property-get HotKeyAltTab: I4; stdcall;
  property-put HotKeyAltShiftTab(: I4); stdcall;
  property-get HotKeyAltShiftTab: I4; stdcall;
  property-put HotKeyAltSpace(: I4); stdcall;
  property-get HotKeyAltSpace: I4; stdcall;
  property-put HotKeyCtrlAltDel(: I4); stdcall;
  property-get HotKeyCtrlAltDel: I4; stdcall;
  property-put orderDrawThreshold(: I4); stdcall;
  property-get orderDrawThreshold: I4; stdcall;
  property-put BitmapCacheSize(: I4); stdcall;
  property-get BitmapCacheSize: I4; stdcall;
  property-put BitmapVirtualCacheSize(: I4); stdcall;
  property-get BitmapVirtualCacheSize: I4; stdcall;
  property-put ScaleBitmapCachesByBPP(: I4); stdcall;
  property-get ScaleBitmapCachesByBPP: I4; stdcall;
  property-put NumBitmapCaches(: I4); stdcall;
  property-get NumBitmapCaches: I4; stdcall;
  property-put CachePersistenceActive(: I4); stdcall;
  property-get CachePersistenceActive: I4; stdcall;
  property-put PersistCacheDirectory(: BSTR); stdcall;
  property-put brushSupportLevel(: I4); stdcall;
  property-get brushSupportLevel: I4; stdcall;
  property-put minInputSendInterval(: I4); stdcall;
  property-get minInputSendInterval: I4; stdcall;
  property-put InputEventsAtOnce(: I4); stdcall;
  property-get InputEventsAtOnce: I4; stdcall;
  property-put maxEventCount(: I4); stdcall;
  property-get maxEventCount: I4; stdcall;
  property-put keepAliveInterval(: I4); stdcall;
  property-get keepAliveInterval: I4; stdcall;
  property-put shutdownTimeout(: I4); stdcall;
  property-get shutdownTimeout: I4; stdcall;
  property-put overallConnectionTimeout(: I4); stdcall;
  property-get overallConnectionTimeout: I4; stdcall;
  property-put singleConnectionTimeout(: I4); stdcall;
  property-get singleConnectionTimeout: I4; stdcall;
  property-put KeyboardType(: I4); stdcall;
  property-get KeyboardType: I4; stdcall;
  property-put KeyboardSubType(: I4); stdcall;
  property-get KeyboardSubType: I4; stdcall;
  property-put KeyboardFunctionKey(: I4); stdcall;
  property-get KeyboardFunctionKey: I4; stdcall;
  property-put WinceFixedPalette(: I4); stdcall;
  property-get WinceFixedPalette: I4; stdcall;
  property-put ConnectToServerConsole(: Bool); stdcall;
  property-get ConnectToServerConsole: Bool; stdcall;
  property-put BitmapPersistence(: I4); stdcall;
  property-get BitmapPersistence: I4; stdcall;
  property-put MinutesToIdleTimeout(: I4); stdcall;
  property-get MinutesToIdleTimeout: I4; stdcall;
  property-put SmartSizing(: Bool); stdcall;
  property-get SmartSizing: Bool; stdcall;
  property-put RdpdrLocalPrintingDocName(: BSTR); stdcall;
  property-get RdpdrLocalPrintingDocName: BSTR; stdcall;
  property-put RdpdrClipCleanTempDirString(: BSTR); stdcall;
  property-get RdpdrClipCleanTempDirString: BSTR; stdcall;
  property-put RdpdrClipPasteInfoString(: BSTR); stdcall;
  property-get RdpdrClipPasteInfoString: BSTR; stdcall;
  property-put ClearTextPassword(: BSTR); stdcall;
  property-put DisplayConnectionBar(: Bool); stdcall;
  property-get DisplayConnectionBar: Bool; stdcall;
  property-put PinConnectionBar(: Bool); stdcall;
  property-get PinConnectionBar: Bool; stdcall;
  property-put GrabFocusOnConnect(: Bool); stdcall;
  property-get GrabFocusOnConnect: Bool; stdcall;
  property-put LoadBalanceInfo(: BSTR); stdcall;
  property-get LoadBalanceInfo: BSTR; stdcall;
  property-put RedirectDrives(: Bool); stdcall;
  property-get RedirectDrives: Bool; stdcall;
  property-put RedirectPrinters(: Bool); stdcall;
  property-get RedirectPrinters: Bool; stdcall;
  property-put RedirectPorts(: Bool); stdcall;
  property-get RedirectPorts: Bool; stdcall;
  property-put RedirectSmartCards(: Bool); stdcall;
  property-get RedirectSmartCards: Bool; stdcall;
  property-put BitmapVirtualCache16BppSize(: I4); stdcall;
  property-get BitmapVirtualCache16BppSize: I4; stdcall;
  property-put BitmapVirtualCache24BppSize(: I4); stdcall;
  property-get BitmapVirtualCache24BppSize: I4; stdcall;
  property-put PerformanceFlags(: I4); stdcall;
  property-get PerformanceFlags: I4; stdcall;
  property-put ConnectWithEndpoint(: ^Variant); stdcall;
  property-put NotifyTSPublicKey(: Bool); stdcall;
  property-get NotifyTSPublicKey: Bool; stdcall;
  property-get CanAutoReconnect: Bool; stdcall;
  property-put EnableAutoReconnect(: Bool); stdcall;
  property-get EnableAutoReconnect: Bool; stdcall;
  property-put MaxReconnectAttempts(: I4); stdcall;
  property-get MaxReconnectAttempts: I4; stdcall;
  property-put ConnectionBarShowMinimizeButton(: Bool); stdcall;
  property-get ConnectionBarShowMinimizeButton: Bool; stdcall;
  property-put ConnectionBarShowRestoreButton(: Bool); stdcall;
  property-get ConnectionBarShowRestoreButton: Bool; stdcall;

//Microsoft RDP Client Control (redistributable) – version 4
CoClass MsRdpClient3;
GUID = {7584C670-2274-4EFB-B00B-D6AABA6D3850};

//Microsoft RDP Client Control (redistributable) – version 4a
CoClass MsRdpClient3a;
GUID = {6A6F4B83-45C5-4CA9-BDD9-0D81C12295E4};

//Microsoft RDP Client Control – version 5
CoClass MsRdpClient4NotSafeForScripting;
GUID = {6AE29350-321B-42BE-BBE5-12FB5270C0DE};

Dispatch IMsRdpClient4;
GUID = {095E0738-D97D-488B-B9F6-DD0E8D66C0DE};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Server(: BSTR); stdcall;
  property-get Server: BSTR; stdcall;
  property-put Domain(: BSTR); stdcall;
  property-get Domain: BSTR; stdcall;
  property-put UserName(: BSTR); stdcall;
  property-get UserName: BSTR; stdcall;
  property-put DisconnectedText(: BSTR); stdcall;
  property-get DisconnectedText: BSTR; stdcall;
  property-put ConnectingText(: BSTR); stdcall;
  property-get ConnectingText: BSTR; stdcall;
  property-get Connected: I2; stdcall;
  property-put DesktopWidth(: I4); stdcall;
  property-get DesktopWidth: I4; stdcall;
  property-put DesktopHeight(: I4); stdcall;
  property-get DesktopHeight: I4; stdcall;
  property-put StartConnected(: I4); stdcall;
  property-get StartConnected: I4; stdcall;
  property-get HorizontalScrollBarVisible: I4; stdcall;
  property-get VerticalScrollBarVisible: I4; stdcall;
  property-put FullScreenTitle(: BSTR); stdcall;
  property-get CipherStrength: I4; stdcall;
  property-get Version: BSTR; stdcall;
  property-get SecuredSettingsEnabled: I4; stdcall;
  property-get SecuredSettings: ^IMsTscSecuredSettings; stdcall;
  property-get AdvancedSettings: ^IMsTscAdvancedSettings; stdcall;
  property-get Debugger: ^IMsTscDebug; stdcall;
  function Connect; stdcall;
  function Disconnect; stdcall;
  function CreateVirtualChannels(newVal: BSTR); stdcall;
  function SendOnVirtualChannel(chanName: BSTR; ChanData: BSTR); stdcall;
  property-put ColorDepth(: I4); stdcall;
  property-get ColorDepth: I4; stdcall;
  property-get AdvancedSettings2: ^IMsRdpClientAdvancedSettings; stdcall;
  property-get SecuredSettings2: ^IMsRdpClientSecuredSettings; stdcall;
  property-get ExtendedDisconnectReason: ExtendedDisconnectReasonCode; stdcall;
  property-put FullScreen(: Bool); stdcall;
  property-get FullScreen: Bool; stdcall;
  function SetVirtualChannelOptions(chanName: BSTR; chanOptions: I4); stdcall;
  function GetVirtualChannelOptions(chanName: BSTR): I4; stdcall;
  function RequestClose: ControlCloseStatus; stdcall;
  property-get AdvancedSettings3: ^IMsRdpClientAdvancedSettings2; stdcall;
  property-put ConnectedStatusText(: BSTR); stdcall;
  property-get ConnectedStatusText: BSTR; stdcall;
  property-get AdvancedSettings4: ^IMsRdpClientAdvancedSettings3; stdcall;
  property-get AdvancedSettings5: ^IMsRdpClientAdvancedSettings4; stdcall;

Dispatch IMsRdpClientAdvancedSettings4;
GUID = {FBA7F64E-7345-4405-AE50-FA4A763DC0DE};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Compress(: I4); stdcall;
  property-get Compress: I4; stdcall;
  property-put BitmapPeristence(: I4); stdcall;
  property-get BitmapPeristence: I4; stdcall;
  property-put allowBackgroundInput(: I4); stdcall;
  property-get allowBackgroundInput: I4; stdcall;
  property-put KeyBoardLayoutStr(: BSTR); stdcall;
  property-put PluginDlls(: BSTR); stdcall;
  property-put IconFile(: BSTR); stdcall;
  property-put IconIndex(: I4); stdcall;
  property-put ContainerHandledFullScreen(: I4); stdcall;
  property-get ContainerHandledFullScreen: I4; stdcall;
  property-put DisableRdpdr(: I4); stdcall;
  property-get DisableRdpdr: I4; stdcall;
  property-put SmoothScroll(: I4); stdcall;
  property-get SmoothScroll: I4; stdcall;
  property-put AcceleratorPassthrough(: I4); stdcall;
  property-get AcceleratorPassthrough: I4; stdcall;
  property-put ShadowBitmap(: I4); stdcall;
  property-get ShadowBitmap: I4; stdcall;
  property-put TransportType(: I4); stdcall;
  property-get TransportType: I4; stdcall;
  property-put SasSequence(: I4); stdcall;
  property-get SasSequence: I4; stdcall;
  property-put EncryptionEnabled(: I4); stdcall;
  property-get EncryptionEnabled: I4; stdcall;
  property-put DedicatedTerminal(: I4); stdcall;
  property-get DedicatedTerminal: I4; stdcall;
  property-put RDPPort(: I4); stdcall;
  property-get RDPPort: I4; stdcall;
  property-put EnableMouse(: I4); stdcall;
  property-get EnableMouse: I4; stdcall;
  property-put DisableCtrlAltDel(: I4); stdcall;
  property-get DisableCtrlAltDel: I4; stdcall;
  property-put EnableWindowsKey(: I4); stdcall;
  property-get EnableWindowsKey: I4; stdcall;
  property-put DoubleClickDetect(: I4); stdcall;
  property-get DoubleClickDetect: I4; stdcall;
  property-put MaximizeShell(: I4); stdcall;
  property-get MaximizeShell: I4; stdcall;
  property-put HotKeyFullScreen(: I4); stdcall;
  property-get HotKeyFullScreen: I4; stdcall;
  property-put HotKeyCtrlEsc(: I4); stdcall;
  property-get HotKeyCtrlEsc: I4; stdcall;
  property-put HotKeyAltEsc(: I4); stdcall;
  property-get HotKeyAltEsc: I4; stdcall;
  property-put HotKeyAltTab(: I4); stdcall;
  property-get HotKeyAltTab: I4; stdcall;
  property-put HotKeyAltShiftTab(: I4); stdcall;
  property-get HotKeyAltShiftTab: I4; stdcall;
  property-put HotKeyAltSpace(: I4); stdcall;
  property-get HotKeyAltSpace: I4; stdcall;
  property-put HotKeyCtrlAltDel(: I4); stdcall;
  property-get HotKeyCtrlAltDel: I4; stdcall;
  property-put orderDrawThreshold(: I4); stdcall;
  property-get orderDrawThreshold: I4; stdcall;
  property-put BitmapCacheSize(: I4); stdcall;
  property-get BitmapCacheSize: I4; stdcall;
  property-put BitmapVirtualCacheSize(: I4); stdcall;
  property-get BitmapVirtualCacheSize: I4; stdcall;
  property-put ScaleBitmapCachesByBPP(: I4); stdcall;
  property-get ScaleBitmapCachesByBPP: I4; stdcall;
  property-put NumBitmapCaches(: I4); stdcall;
  property-get NumBitmapCaches: I4; stdcall;
  property-put CachePersistenceActive(: I4); stdcall;
  property-get CachePersistenceActive: I4; stdcall;
  property-put PersistCacheDirectory(: BSTR); stdcall;
  property-put brushSupportLevel(: I4); stdcall;
  property-get brushSupportLevel: I4; stdcall;
  property-put minInputSendInterval(: I4); stdcall;
  property-get minInputSendInterval: I4; stdcall;
  property-put InputEventsAtOnce(: I4); stdcall;
  property-get InputEventsAtOnce: I4; stdcall;
  property-put maxEventCount(: I4); stdcall;
  property-get maxEventCount: I4; stdcall;
  property-put keepAliveInterval(: I4); stdcall;
  property-get keepAliveInterval: I4; stdcall;
  property-put shutdownTimeout(: I4); stdcall;
  property-get shutdownTimeout: I4; stdcall;
  property-put overallConnectionTimeout(: I4); stdcall;
  property-get overallConnectionTimeout: I4; stdcall;
  property-put singleConnectionTimeout(: I4); stdcall;
  property-get singleConnectionTimeout: I4; stdcall;
  property-put KeyboardType(: I4); stdcall;
  property-get KeyboardType: I4; stdcall;
  property-put KeyboardSubType(: I4); stdcall;
  property-get KeyboardSubType: I4; stdcall;
  property-put KeyboardFunctionKey(: I4); stdcall;
  property-get KeyboardFunctionKey: I4; stdcall;
  property-put WinceFixedPalette(: I4); stdcall;
  property-get WinceFixedPalette: I4; stdcall;
  property-put ConnectToServerConsole(: Bool); stdcall;
  property-get ConnectToServerConsole: Bool; stdcall;
  property-put BitmapPersistence(: I4); stdcall;
  property-get BitmapPersistence: I4; stdcall;
  property-put MinutesToIdleTimeout(: I4); stdcall;
  property-get MinutesToIdleTimeout: I4; stdcall;
  property-put SmartSizing(: Bool); stdcall;
  property-get SmartSizing: Bool; stdcall;
  property-put RdpdrLocalPrintingDocName(: BSTR); stdcall;
  property-get RdpdrLocalPrintingDocName: BSTR; stdcall;
  property-put RdpdrClipCleanTempDirString(: BSTR); stdcall;
  property-get RdpdrClipCleanTempDirString: BSTR; stdcall;
  property-put RdpdrClipPasteInfoString(: BSTR); stdcall;
  property-get RdpdrClipPasteInfoString: BSTR; stdcall;
  property-put ClearTextPassword(: BSTR); stdcall;
  property-put DisplayConnectionBar(: Bool); stdcall;
  property-get DisplayConnectionBar: Bool; stdcall;
  property-put PinConnectionBar(: Bool); stdcall;
  property-get PinConnectionBar: Bool; stdcall;
  property-put GrabFocusOnConnect(: Bool); stdcall;
  property-get GrabFocusOnConnect: Bool; stdcall;
  property-put LoadBalanceInfo(: BSTR); stdcall;
  property-get LoadBalanceInfo: BSTR; stdcall;
  property-put RedirectDrives(: Bool); stdcall;
  property-get RedirectDrives: Bool; stdcall;
  property-put RedirectPrinters(: Bool); stdcall;
  property-get RedirectPrinters: Bool; stdcall;
  property-put RedirectPorts(: Bool); stdcall;
  property-get RedirectPorts: Bool; stdcall;
  property-put RedirectSmartCards(: Bool); stdcall;
  property-get RedirectSmartCards: Bool; stdcall;
  property-put BitmapVirtualCache16BppSize(: I4); stdcall;
  property-get BitmapVirtualCache16BppSize: I4; stdcall;
  property-put BitmapVirtualCache24BppSize(: I4); stdcall;
  property-get BitmapVirtualCache24BppSize: I4; stdcall;
  property-put PerformanceFlags(: I4); stdcall;
  property-get PerformanceFlags: I4; stdcall;
  property-put ConnectWithEndpoint(: ^Variant); stdcall;
  property-put NotifyTSPublicKey(: Bool); stdcall;
  property-get NotifyTSPublicKey: Bool; stdcall;
  property-get CanAutoReconnect: Bool; stdcall;
  property-put EnableAutoReconnect(: Bool); stdcall;
  property-get EnableAutoReconnect: Bool; stdcall;
  property-put MaxReconnectAttempts(: I4); stdcall;
  property-get MaxReconnectAttempts: I4; stdcall;
  property-put ConnectionBarShowMinimizeButton(: Bool); stdcall;
  property-get ConnectionBarShowMinimizeButton: Bool; stdcall;
  property-put ConnectionBarShowRestoreButton(: Bool); stdcall;
  property-get ConnectionBarShowRestoreButton: Bool; stdcall;
  property-put AuthenticationLevel(: UINT); stdcall;
  property-get AuthenticationLevel: UINT; stdcall;

Interface IMsRdpClientNonScriptable2;
GUID = {17A5E535-4072-4FA4-AF32-C8D0D47345E9};
  property-put UIParentWindowHandle(phwndUIParentWindowHandle: wireHWND): HResult; stdcall;
  property-get UIParentWindowHandle(out phwndUIParentWindowHandle: ^wireHWND): HResult; stdcall;

Alias wireHWND;
  ^_RemotableHandle

Record _RemotableHandle;
  fContext: I4;
  u: __MIDL_IWinTypes_0009;

Union __MIDL_IWinTypes_0009;
  hInproc: I4;
  hRemote: I4;

//Microsoft RDP Client Control (redistributable) – version 5
CoClass MsRdpClient4;
GUID = {4EDCB26C-D24C-4E72-AF07-B576699AC0DE};

//Microsoft RDP Client Control (redistributable) – version 5a
CoClass MsRdpClient4a;
GUID = {54CE37E0-9834-41AE-9896-4DAB69DC022B};

//Microsoft RDP Client Control – version 6
CoClass MsRdpClient5NotSafeForScripting;
GUID = {4EB2F086-C818-447E-B32C-C51CE2B30D31};

Dispatch IMsRdpClient5;
GUID = {4EB5335B-6429-477D-B922-E06A28ECD8BF};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Server(: BSTR); stdcall;
  property-get Server: BSTR; stdcall;
  property-put Domain(: BSTR); stdcall;
  property-get Domain: BSTR; stdcall;
  property-put UserName(: BSTR); stdcall;
  property-get UserName: BSTR; stdcall;
  property-put DisconnectedText(: BSTR); stdcall;
  property-get DisconnectedText: BSTR; stdcall;
  property-put ConnectingText(: BSTR); stdcall;
  property-get ConnectingText: BSTR; stdcall;
  property-get Connected: I2; stdcall;
  property-put DesktopWidth(: I4); stdcall;
  property-get DesktopWidth: I4; stdcall;
  property-put DesktopHeight(: I4); stdcall;
  property-get DesktopHeight: I4; stdcall;
  property-put StartConnected(: I4); stdcall;
  property-get StartConnected: I4; stdcall;
  property-get HorizontalScrollBarVisible: I4; stdcall;
  property-get VerticalScrollBarVisible: I4; stdcall;
  property-put FullScreenTitle(: BSTR); stdcall;
  property-get CipherStrength: I4; stdcall;
  property-get Version: BSTR; stdcall;
  property-get SecuredSettingsEnabled: I4; stdcall;
  property-get SecuredSettings: ^IMsTscSecuredSettings; stdcall;
  property-get AdvancedSettings: ^IMsTscAdvancedSettings; stdcall;
  property-get Debugger: ^IMsTscDebug; stdcall;
  function Connect; stdcall;
  function Disconnect; stdcall;
  function CreateVirtualChannels(newVal: BSTR); stdcall;
  function SendOnVirtualChannel(chanName: BSTR; ChanData: BSTR); stdcall;
  property-put ColorDepth(: I4); stdcall;
  property-get ColorDepth: I4; stdcall;
  property-get AdvancedSettings2: ^IMsRdpClientAdvancedSettings; stdcall;
  property-get SecuredSettings2: ^IMsRdpClientSecuredSettings; stdcall;
  property-get ExtendedDisconnectReason: ExtendedDisconnectReasonCode; stdcall;
  property-put FullScreen(: Bool); stdcall;
  property-get FullScreen: Bool; stdcall;
  function SetVirtualChannelOptions(chanName: BSTR; chanOptions: I4); stdcall;
  function GetVirtualChannelOptions(chanName: BSTR): I4; stdcall;
  function RequestClose: ControlCloseStatus; stdcall;
  property-get AdvancedSettings3: ^IMsRdpClientAdvancedSettings2; stdcall;
  property-put ConnectedStatusText(: BSTR); stdcall;
  property-get ConnectedStatusText: BSTR; stdcall;
  property-get AdvancedSettings4: ^IMsRdpClientAdvancedSettings3; stdcall;
  property-get AdvancedSettings5: ^IMsRdpClientAdvancedSettings4; stdcall;
  property-get TransportSettings: ^IMsRdpClientTransportSettings; stdcall;
  property-get AdvancedSettings6: ^IMsRdpClientAdvancedSettings5; stdcall;
  function GetErrorDescription(disconnectReason: UINT; ExtendedDisconnectReason: UINT): BSTR; stdcall;
  property-get RemoteProgram: ^ITSRemoteProgram; stdcall;
  property-get MsRdpClientShell: ^IMsRdpClientShell; stdcall;

Dispatch IMsRdpClientTransportSettings;
GUID = {720298C0-A099-46F5-9F82-96921BAE4701};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put GatewayHostname(: BSTR); stdcall;
  property-get GatewayHostname: BSTR; stdcall;
  property-put GatewayUsageMethod(: UI4); stdcall;
  property-get GatewayUsageMethod: UI4; stdcall;
  property-put GatewayProfileUsageMethod(: UI4); stdcall;
  property-get GatewayProfileUsageMethod: UI4; stdcall;
  property-put GatewayCredsSource(: UI4); stdcall;
  property-get GatewayCredsSource: UI4; stdcall;
  property-put GatewayUserSelectedCredsSource(: UI4); stdcall;
  property-get GatewayUserSelectedCredsSource: UI4; stdcall;
  property-get GatewayIsSupported: I4; stdcall;
  property-get GatewayDefaultUsageMethod: UI4; stdcall;

Dispatch IMsRdpClientAdvancedSettings5;
GUID = {FBA7F64E-6783-4405-DA45-FA4A763DABD0};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Compress(: I4); stdcall;
  property-get Compress: I4; stdcall;
  property-put BitmapPeristence(: I4); stdcall;
  property-get BitmapPeristence: I4; stdcall;
  property-put allowBackgroundInput(: I4); stdcall;
  property-get allowBackgroundInput: I4; stdcall;
  property-put KeyBoardLayoutStr(: BSTR); stdcall;
  property-put PluginDlls(: BSTR); stdcall;
  property-put IconFile(: BSTR); stdcall;
  property-put IconIndex(: I4); stdcall;
  property-put ContainerHandledFullScreen(: I4); stdcall;
  property-get ContainerHandledFullScreen: I4; stdcall;
  property-put DisableRdpdr(: I4); stdcall;
  property-get DisableRdpdr: I4; stdcall;
  property-put SmoothScroll(: I4); stdcall;
  property-get SmoothScroll: I4; stdcall;
  property-put AcceleratorPassthrough(: I4); stdcall;
  property-get AcceleratorPassthrough: I4; stdcall;
  property-put ShadowBitmap(: I4); stdcall;
  property-get ShadowBitmap: I4; stdcall;
  property-put TransportType(: I4); stdcall;
  property-get TransportType: I4; stdcall;
  property-put SasSequence(: I4); stdcall;
  property-get SasSequence: I4; stdcall;
  property-put EncryptionEnabled(: I4); stdcall;
  property-get EncryptionEnabled: I4; stdcall;
  property-put DedicatedTerminal(: I4); stdcall;
  property-get DedicatedTerminal: I4; stdcall;
  property-put RDPPort(: I4); stdcall;
  property-get RDPPort: I4; stdcall;
  property-put EnableMouse(: I4); stdcall;
  property-get EnableMouse: I4; stdcall;
  property-put DisableCtrlAltDel(: I4); stdcall;
  property-get DisableCtrlAltDel: I4; stdcall;
  property-put EnableWindowsKey(: I4); stdcall;
  property-get EnableWindowsKey: I4; stdcall;
  property-put DoubleClickDetect(: I4); stdcall;
  property-get DoubleClickDetect: I4; stdcall;
  property-put MaximizeShell(: I4); stdcall;
  property-get MaximizeShell: I4; stdcall;
  property-put HotKeyFullScreen(: I4); stdcall;
  property-get HotKeyFullScreen: I4; stdcall;
  property-put HotKeyCtrlEsc(: I4); stdcall;
  property-get HotKeyCtrlEsc: I4; stdcall;
  property-put HotKeyAltEsc(: I4); stdcall;
  property-get HotKeyAltEsc: I4; stdcall;
  property-put HotKeyAltTab(: I4); stdcall;
  property-get HotKeyAltTab: I4; stdcall;
  property-put HotKeyAltShiftTab(: I4); stdcall;
  property-get HotKeyAltShiftTab: I4; stdcall;
  property-put HotKeyAltSpace(: I4); stdcall;
  property-get HotKeyAltSpace: I4; stdcall;
  property-put HotKeyCtrlAltDel(: I4); stdcall;
  property-get HotKeyCtrlAltDel: I4; stdcall;
  property-put orderDrawThreshold(: I4); stdcall;
  property-get orderDrawThreshold: I4; stdcall;
  property-put BitmapCacheSize(: I4); stdcall;
  property-get BitmapCacheSize: I4; stdcall;
  property-put BitmapVirtualCacheSize(: I4); stdcall;
  property-get BitmapVirtualCacheSize: I4; stdcall;
  property-put ScaleBitmapCachesByBPP(: I4); stdcall;
  property-get ScaleBitmapCachesByBPP: I4; stdcall;
  property-put NumBitmapCaches(: I4); stdcall;
  property-get NumBitmapCaches: I4; stdcall;
  property-put CachePersistenceActive(: I4); stdcall;
  property-get CachePersistenceActive: I4; stdcall;
  property-put PersistCacheDirectory(: BSTR); stdcall;
  property-put brushSupportLevel(: I4); stdcall;
  property-get brushSupportLevel: I4; stdcall;
  property-put minInputSendInterval(: I4); stdcall;
  property-get minInputSendInterval: I4; stdcall;
  property-put InputEventsAtOnce(: I4); stdcall;
  property-get InputEventsAtOnce: I4; stdcall;
  property-put maxEventCount(: I4); stdcall;
  property-get maxEventCount: I4; stdcall;
  property-put keepAliveInterval(: I4); stdcall;
  property-get keepAliveInterval: I4; stdcall;
  property-put shutdownTimeout(: I4); stdcall;
  property-get shutdownTimeout: I4; stdcall;
  property-put overallConnectionTimeout(: I4); stdcall;
  property-get overallConnectionTimeout: I4; stdcall;
  property-put singleConnectionTimeout(: I4); stdcall;
  property-get singleConnectionTimeout: I4; stdcall;
  property-put KeyboardType(: I4); stdcall;
  property-get KeyboardType: I4; stdcall;
  property-put KeyboardSubType(: I4); stdcall;
  property-get KeyboardSubType: I4; stdcall;
  property-put KeyboardFunctionKey(: I4); stdcall;
  property-get KeyboardFunctionKey: I4; stdcall;
  property-put WinceFixedPalette(: I4); stdcall;
  property-get WinceFixedPalette: I4; stdcall;
  property-put ConnectToServerConsole(: Bool); stdcall;
  property-get ConnectToServerConsole: Bool; stdcall;
  property-put BitmapPersistence(: I4); stdcall;
  property-get BitmapPersistence: I4; stdcall;
  property-put MinutesToIdleTimeout(: I4); stdcall;
  property-get MinutesToIdleTimeout: I4; stdcall;
  property-put SmartSizing(: Bool); stdcall;
  property-get SmartSizing: Bool; stdcall;
  property-put RdpdrLocalPrintingDocName(: BSTR); stdcall;
  property-get RdpdrLocalPrintingDocName: BSTR; stdcall;
  property-put RdpdrClipCleanTempDirString(: BSTR); stdcall;
  property-get RdpdrClipCleanTempDirString: BSTR; stdcall;
  property-put RdpdrClipPasteInfoString(: BSTR); stdcall;
  property-get RdpdrClipPasteInfoString: BSTR; stdcall;
  property-put ClearTextPassword(: BSTR); stdcall;
  property-put DisplayConnectionBar(: Bool); stdcall;
  property-get DisplayConnectionBar: Bool; stdcall;
  property-put PinConnectionBar(: Bool); stdcall;
  property-get PinConnectionBar: Bool; stdcall;
  property-put GrabFocusOnConnect(: Bool); stdcall;
  property-get GrabFocusOnConnect: Bool; stdcall;
  property-put LoadBalanceInfo(: BSTR); stdcall;
  property-get LoadBalanceInfo: BSTR; stdcall;
  property-put RedirectDrives(: Bool); stdcall;
  property-get RedirectDrives: Bool; stdcall;
  property-put RedirectPrinters(: Bool); stdcall;
  property-get RedirectPrinters: Bool; stdcall;
  property-put RedirectPorts(: Bool); stdcall;
  property-get RedirectPorts: Bool; stdcall;
  property-put RedirectSmartCards(: Bool); stdcall;
  property-get RedirectSmartCards: Bool; stdcall;
  property-put BitmapVirtualCache16BppSize(: I4); stdcall;
  property-get BitmapVirtualCache16BppSize: I4; stdcall;
  property-put BitmapVirtualCache24BppSize(: I4); stdcall;
  property-get BitmapVirtualCache24BppSize: I4; stdcall;
  property-put PerformanceFlags(: I4); stdcall;
  property-get PerformanceFlags: I4; stdcall;
  property-put ConnectWithEndpoint(: ^Variant); stdcall;
  property-put NotifyTSPublicKey(: Bool); stdcall;
  property-get NotifyTSPublicKey: Bool; stdcall;
  property-get CanAutoReconnect: Bool; stdcall;
  property-put EnableAutoReconnect(: Bool); stdcall;
  property-get EnableAutoReconnect: Bool; stdcall;
  property-put MaxReconnectAttempts(: I4); stdcall;
  property-get MaxReconnectAttempts: I4; stdcall;
  property-put ConnectionBarShowMinimizeButton(: Bool); stdcall;
  property-get ConnectionBarShowMinimizeButton: Bool; stdcall;
  property-put ConnectionBarShowRestoreButton(: Bool); stdcall;
  property-get ConnectionBarShowRestoreButton: Bool; stdcall;
  property-put AuthenticationLevel(: UINT); stdcall;
  property-get AuthenticationLevel: UINT; stdcall;
  property-put RedirectClipboard(: Bool); stdcall;
  property-get RedirectClipboard: Bool; stdcall;
  property-put AudioRedirectionMode(: UINT); stdcall;
  property-get AudioRedirectionMode: UINT; stdcall;
  property-put ConnectionBarShowPinButton(: Bool); stdcall;
  property-get ConnectionBarShowPinButton: Bool; stdcall;
  property-put PublicMode(: Bool); stdcall;
  property-get PublicMode: Bool; stdcall;
  property-put RedirectDevices(: Bool); stdcall;
  property-get RedirectDevices: Bool; stdcall;
  property-put RedirectPOSDevices(: Bool); stdcall;
  property-get RedirectPOSDevices: Bool; stdcall;
  property-put BitmapVirtualCache32BppSize(: I4); stdcall;
  property-get BitmapVirtualCache32BppSize: I4; stdcall;

Dispatch ITSRemoteProgram;
GUID = {FDD029F9-467A-4C49-8529-64B521DBD1B4};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put RemoteProgramMode(: Bool); stdcall;
  property-get RemoteProgramMode: Bool; stdcall;
  function ServerStartProgram(bstrExecutablePath: BSTR; bstrFilePath: BSTR; bstrWorkingDirectory: BSTR; vbExpandEnvVarInWorkingDirectoryOnServer: Bool; bstrArguments: BSTR; vbExpandEnvVarInArgumentsOnServer: Bool); stdcall;

Dispatch IMsRdpClientShell;
GUID = {D012AE6D-C19A-4BFE-B367-201F8911F134};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  function Launch; stdcall;
  property-put RdpFileContents(: BSTR); stdcall;
  property-get RdpFileContents: BSTR; stdcall;
  function SetRdpProperty(szProperty: BSTR; Value: Variant); stdcall;
  function GetRdpProperty(szProperty: BSTR): Variant; stdcall;
  property-get IsRemoteProgramClientInstalled: Bool; stdcall;
  property-put PublicMode(: Bool); stdcall;
  property-get PublicMode: Bool; stdcall;
  function ShowTrustedSitesManagementDialog; stdcall;

Interface IMsRdpClientNonScriptable3;
GUID = {B3378D90-0728-45C7-8ED7-B6159FB92219};
  property-put ShowRedirectionWarningDialog(pfShowRdrDlg: Bool): HResult; stdcall;
  property-get ShowRedirectionWarningDialog(out pfShowRdrDlg: ^Bool): HResult; stdcall;
  property-put PromptForCredentials(pfPrompt: Bool): HResult; stdcall;
  property-get PromptForCredentials(out pfPrompt: ^Bool): HResult; stdcall;
  property-put NegotiateSecurityLayer(pfNegotiate: Bool): HResult; stdcall;
  property-get NegotiateSecurityLayer(out pfNegotiate: ^Bool): HResult; stdcall;
  property-put EnableCredSspSupport(pfEnableSupport: Bool): HResult; stdcall;
  property-get EnableCredSspSupport(out pfEnableSupport: ^Bool): HResult; stdcall;
  property-put RedirectDynamicDrives(pfRedirectDynamicDrives: Bool): HResult; stdcall;
  property-get RedirectDynamicDrives(out pfRedirectDynamicDrives: ^Bool): HResult; stdcall;
  property-put RedirectDynamicDevices(pfRedirectDynamicDevices: Bool): HResult; stdcall;
  property-get RedirectDynamicDevices(out pfRedirectDynamicDevices: ^Bool): HResult; stdcall;
  property-get DeviceCollection(out ppDeviceCollection: ^^IMsRdpDeviceCollection): HResult; stdcall;
  property-get DriveCollection(out ppDeviceCollection: ^^IMsRdpDriveCollection): HResult; stdcall;
  property-put WarnAboutSendingCredentials(pfWarn: Bool): HResult; stdcall;
  property-get WarnAboutSendingCredentials(out pfWarn: ^Bool): HResult; stdcall;
  property-put WarnAboutClipboardRedirection(pfWarn: Bool): HResult; stdcall;
  property-get WarnAboutClipboardRedirection(out pfWarn: ^Bool): HResult; stdcall;
  property-put ConnectionBarText(pConnectionBarText: BSTR): HResult; stdcall;
  property-get ConnectionBarText(out pConnectionBarText: ^BSTR): HResult; stdcall;

Interface IMsRdpDeviceCollection;
GUID = {56540617-D281-488C-8738-6A8FDF64A118};
  function RescanDevices(out vboolDynRedir: Bool): HResult; stdcall;
  property-get DeviceByIndex(index: UI4; out ppDevice: ^^IMsRdpDevice): HResult; stdcall;
  property-get DeviceById(devInstanceId: BSTR; out ppDevice: ^^IMsRdpDevice): HResult; stdcall;
  property-get DeviceCount(out pDeviceCount: ^UI4): HResult; stdcall;

Interface IMsRdpDevice;
GUID = {60C3B9C8-9E92-4F5E-A3E7-604A912093EA};
  property-get DeviceInstanceId(out pDevInstanceId: ^BSTR): HResult; stdcall;
  property-get FriendlyName(out pFriendlyName: ^BSTR): HResult; stdcall;
  property-get DeviceDescription(out pDeviceDescription: ^BSTR): HResult; stdcall;
  property-put RedirectionState(pvboolRedirState: Bool): HResult; stdcall;
  property-get RedirectionState(out pvboolRedirState: ^Bool): HResult; stdcall;

Interface IMsRdpDriveCollection;
GUID = {7FF17599-DA2C-4677-AD35-F60C04FE1585};
  function RescanDrives(out vboolDynRedir: Bool): HResult; stdcall;
  property-get DriveByIndex(index: UI4; out ppDevice: ^^IMsRdpDrive): HResult; stdcall;
  property-get DriveCount(out pDriveCount: ^UI4): HResult; stdcall;

Interface IMsRdpDrive;
GUID = {D28B5458-F694-47A8-8E61-40356A767E46};
  property-get Name(out pName: ^BSTR): HResult; stdcall;
  property-put RedirectionState(pvboolRedirState: Bool): HResult; stdcall;
  property-get RedirectionState(out pvboolRedirState: ^Bool): HResult; stdcall;

//Microsoft RDP Client Control (redistributable) – version 6
CoClass MsRdpClient5;
GUID = {4EB89FF4-7F78-4A0F-8B8D-2BF02E94E4B2};

//Microsoft RDP Client Control – version 7
CoClass MsRdpClient6NotSafeForScripting;
GUID = {D2EA46A7-C2BF-426B-AF24-E19C44456399};

Dispatch IMsRdpClient6;
GUID = {D43B7D80-8517-4B6D-9EAC-96AD6800D7F2};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Server(: BSTR); stdcall;
  property-get Server: BSTR; stdcall;
  property-put Domain(: BSTR); stdcall;
  property-get Domain: BSTR; stdcall;
  property-put UserName(: BSTR); stdcall;
  property-get UserName: BSTR; stdcall;
  property-put DisconnectedText(: BSTR); stdcall;
  property-get DisconnectedText: BSTR; stdcall;
  property-put ConnectingText(: BSTR); stdcall;
  property-get ConnectingText: BSTR; stdcall;
  property-get Connected: I2; stdcall;
  property-put DesktopWidth(: I4); stdcall;
  property-get DesktopWidth: I4; stdcall;
  property-put DesktopHeight(: I4); stdcall;
  property-get DesktopHeight: I4; stdcall;
  property-put StartConnected(: I4); stdcall;
  property-get StartConnected: I4; stdcall;
  property-get HorizontalScrollBarVisible: I4; stdcall;
  property-get VerticalScrollBarVisible: I4; stdcall;
  property-put FullScreenTitle(: BSTR); stdcall;
  property-get CipherStrength: I4; stdcall;
  property-get Version: BSTR; stdcall;
  property-get SecuredSettingsEnabled: I4; stdcall;
  property-get SecuredSettings: ^IMsTscSecuredSettings; stdcall;
  property-get AdvancedSettings: ^IMsTscAdvancedSettings; stdcall;
  property-get Debugger: ^IMsTscDebug; stdcall;
  function Connect; stdcall;
  function Disconnect; stdcall;
  function CreateVirtualChannels(newVal: BSTR); stdcall;
  function SendOnVirtualChannel(chanName: BSTR; ChanData: BSTR); stdcall;
  property-put ColorDepth(: I4); stdcall;
  property-get ColorDepth: I4; stdcall;
  property-get AdvancedSettings2: ^IMsRdpClientAdvancedSettings; stdcall;
  property-get SecuredSettings2: ^IMsRdpClientSecuredSettings; stdcall;
  property-get ExtendedDisconnectReason: ExtendedDisconnectReasonCode; stdcall;
  property-put FullScreen(: Bool); stdcall;
  property-get FullScreen: Bool; stdcall;
  function SetVirtualChannelOptions(chanName: BSTR; chanOptions: I4); stdcall;
  function GetVirtualChannelOptions(chanName: BSTR): I4; stdcall;
  function RequestClose: ControlCloseStatus; stdcall;
  property-get AdvancedSettings3: ^IMsRdpClientAdvancedSettings2; stdcall;
  property-put ConnectedStatusText(: BSTR); stdcall;
  property-get ConnectedStatusText: BSTR; stdcall;
  property-get AdvancedSettings4: ^IMsRdpClientAdvancedSettings3; stdcall;
  property-get AdvancedSettings5: ^IMsRdpClientAdvancedSettings4; stdcall;
  property-get TransportSettings: ^IMsRdpClientTransportSettings; stdcall;
  property-get AdvancedSettings6: ^IMsRdpClientAdvancedSettings5; stdcall;
  function GetErrorDescription(disconnectReason: UINT; ExtendedDisconnectReason: UINT): BSTR; stdcall;
  property-get RemoteProgram: ^ITSRemoteProgram; stdcall;
  property-get MsRdpClientShell: ^IMsRdpClientShell; stdcall;
  property-get AdvancedSettings7: ^IMsRdpClientAdvancedSettings6; stdcall;
  property-get TransportSettings2: ^IMsRdpClientTransportSettings2; stdcall;

Dispatch IMsRdpClientAdvancedSettings6;
GUID = {222C4B5D-45D9-4DF0-A7C6-60CF9089D285};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Compress(: I4); stdcall;
  property-get Compress: I4; stdcall;
  property-put BitmapPeristence(: I4); stdcall;
  property-get BitmapPeristence: I4; stdcall;
  property-put allowBackgroundInput(: I4); stdcall;
  property-get allowBackgroundInput: I4; stdcall;
  property-put KeyBoardLayoutStr(: BSTR); stdcall;
  property-put PluginDlls(: BSTR); stdcall;
  property-put IconFile(: BSTR); stdcall;
  property-put IconIndex(: I4); stdcall;
  property-put ContainerHandledFullScreen(: I4); stdcall;
  property-get ContainerHandledFullScreen: I4; stdcall;
  property-put DisableRdpdr(: I4); stdcall;
  property-get DisableRdpdr: I4; stdcall;
  property-put SmoothScroll(: I4); stdcall;
  property-get SmoothScroll: I4; stdcall;
  property-put AcceleratorPassthrough(: I4); stdcall;
  property-get AcceleratorPassthrough: I4; stdcall;
  property-put ShadowBitmap(: I4); stdcall;
  property-get ShadowBitmap: I4; stdcall;
  property-put TransportType(: I4); stdcall;
  property-get TransportType: I4; stdcall;
  property-put SasSequence(: I4); stdcall;
  property-get SasSequence: I4; stdcall;
  property-put EncryptionEnabled(: I4); stdcall;
  property-get EncryptionEnabled: I4; stdcall;
  property-put DedicatedTerminal(: I4); stdcall;
  property-get DedicatedTerminal: I4; stdcall;
  property-put RDPPort(: I4); stdcall;
  property-get RDPPort: I4; stdcall;
  property-put EnableMouse(: I4); stdcall;
  property-get EnableMouse: I4; stdcall;
  property-put DisableCtrlAltDel(: I4); stdcall;
  property-get DisableCtrlAltDel: I4; stdcall;
  property-put EnableWindowsKey(: I4); stdcall;
  property-get EnableWindowsKey: I4; stdcall;
  property-put DoubleClickDetect(: I4); stdcall;
  property-get DoubleClickDetect: I4; stdcall;
  property-put MaximizeShell(: I4); stdcall;
  property-get MaximizeShell: I4; stdcall;
  property-put HotKeyFullScreen(: I4); stdcall;
  property-get HotKeyFullScreen: I4; stdcall;
  property-put HotKeyCtrlEsc(: I4); stdcall;
  property-get HotKeyCtrlEsc: I4; stdcall;
  property-put HotKeyAltEsc(: I4); stdcall;
  property-get HotKeyAltEsc: I4; stdcall;
  property-put HotKeyAltTab(: I4); stdcall;
  property-get HotKeyAltTab: I4; stdcall;
  property-put HotKeyAltShiftTab(: I4); stdcall;
  property-get HotKeyAltShiftTab: I4; stdcall;
  property-put HotKeyAltSpace(: I4); stdcall;
  property-get HotKeyAltSpace: I4; stdcall;
  property-put HotKeyCtrlAltDel(: I4); stdcall;
  property-get HotKeyCtrlAltDel: I4; stdcall;
  property-put orderDrawThreshold(: I4); stdcall;
  property-get orderDrawThreshold: I4; stdcall;
  property-put BitmapCacheSize(: I4); stdcall;
  property-get BitmapCacheSize: I4; stdcall;
  property-put BitmapVirtualCacheSize(: I4); stdcall;
  property-get BitmapVirtualCacheSize: I4; stdcall;
  property-put ScaleBitmapCachesByBPP(: I4); stdcall;
  property-get ScaleBitmapCachesByBPP: I4; stdcall;
  property-put NumBitmapCaches(: I4); stdcall;
  property-get NumBitmapCaches: I4; stdcall;
  property-put CachePersistenceActive(: I4); stdcall;
  property-get CachePersistenceActive: I4; stdcall;
  property-put PersistCacheDirectory(: BSTR); stdcall;
  property-put brushSupportLevel(: I4); stdcall;
  property-get brushSupportLevel: I4; stdcall;
  property-put minInputSendInterval(: I4); stdcall;
  property-get minInputSendInterval: I4; stdcall;
  property-put InputEventsAtOnce(: I4); stdcall;
  property-get InputEventsAtOnce: I4; stdcall;
  property-put maxEventCount(: I4); stdcall;
  property-get maxEventCount: I4; stdcall;
  property-put keepAliveInterval(: I4); stdcall;
  property-get keepAliveInterval: I4; stdcall;
  property-put shutdownTimeout(: I4); stdcall;
  property-get shutdownTimeout: I4; stdcall;
  property-put overallConnectionTimeout(: I4); stdcall;
  property-get overallConnectionTimeout: I4; stdcall;
  property-put singleConnectionTimeout(: I4); stdcall;
  property-get singleConnectionTimeout: I4; stdcall;
  property-put KeyboardType(: I4); stdcall;
  property-get KeyboardType: I4; stdcall;
  property-put KeyboardSubType(: I4); stdcall;
  property-get KeyboardSubType: I4; stdcall;
  property-put KeyboardFunctionKey(: I4); stdcall;
  property-get KeyboardFunctionKey: I4; stdcall;
  property-put WinceFixedPalette(: I4); stdcall;
  property-get WinceFixedPalette: I4; stdcall;
  property-put ConnectToServerConsole(: Bool); stdcall;
  property-get ConnectToServerConsole: Bool; stdcall;
  property-put BitmapPersistence(: I4); stdcall;
  property-get BitmapPersistence: I4; stdcall;
  property-put MinutesToIdleTimeout(: I4); stdcall;
  property-get MinutesToIdleTimeout: I4; stdcall;
  property-put SmartSizing(: Bool); stdcall;
  property-get SmartSizing: Bool; stdcall;
  property-put RdpdrLocalPrintingDocName(: BSTR); stdcall;
  property-get RdpdrLocalPrintingDocName: BSTR; stdcall;
  property-put RdpdrClipCleanTempDirString(: BSTR); stdcall;
  property-get RdpdrClipCleanTempDirString: BSTR; stdcall;
  property-put RdpdrClipPasteInfoString(: BSTR); stdcall;
  property-get RdpdrClipPasteInfoString: BSTR; stdcall;
  property-put ClearTextPassword(: BSTR); stdcall;
  property-put DisplayConnectionBar(: Bool); stdcall;
  property-get DisplayConnectionBar: Bool; stdcall;
  property-put PinConnectionBar(: Bool); stdcall;
  property-get PinConnectionBar: Bool; stdcall;
  property-put GrabFocusOnConnect(: Bool); stdcall;
  property-get GrabFocusOnConnect: Bool; stdcall;
  property-put LoadBalanceInfo(: BSTR); stdcall;
  property-get LoadBalanceInfo: BSTR; stdcall;
  property-put RedirectDrives(: Bool); stdcall;
  property-get RedirectDrives: Bool; stdcall;
  property-put RedirectPrinters(: Bool); stdcall;
  property-get RedirectPrinters: Bool; stdcall;
  property-put RedirectPorts(: Bool); stdcall;
  property-get RedirectPorts: Bool; stdcall;
  property-put RedirectSmartCards(: Bool); stdcall;
  property-get RedirectSmartCards: Bool; stdcall;
  property-put BitmapVirtualCache16BppSize(: I4); stdcall;
  property-get BitmapVirtualCache16BppSize: I4; stdcall;
  property-put BitmapVirtualCache24BppSize(: I4); stdcall;
  property-get BitmapVirtualCache24BppSize: I4; stdcall;
  property-put PerformanceFlags(: I4); stdcall;
  property-get PerformanceFlags: I4; stdcall;
  property-put ConnectWithEndpoint(: ^Variant); stdcall;
  property-put NotifyTSPublicKey(: Bool); stdcall;
  property-get NotifyTSPublicKey: Bool; stdcall;
  property-get CanAutoReconnect: Bool; stdcall;
  property-put EnableAutoReconnect(: Bool); stdcall;
  property-get EnableAutoReconnect: Bool; stdcall;
  property-put MaxReconnectAttempts(: I4); stdcall;
  property-get MaxReconnectAttempts: I4; stdcall;
  property-put ConnectionBarShowMinimizeButton(: Bool); stdcall;
  property-get ConnectionBarShowMinimizeButton: Bool; stdcall;
  property-put ConnectionBarShowRestoreButton(: Bool); stdcall;
  property-get ConnectionBarShowRestoreButton: Bool; stdcall;
  property-put AuthenticationLevel(: UINT); stdcall;
  property-get AuthenticationLevel: UINT; stdcall;
  property-put RedirectClipboard(: Bool); stdcall;
  property-get RedirectClipboard: Bool; stdcall;
  property-put AudioRedirectionMode(: UINT); stdcall;
  property-get AudioRedirectionMode: UINT; stdcall;
  property-put ConnectionBarShowPinButton(: Bool); stdcall;
  property-get ConnectionBarShowPinButton: Bool; stdcall;
  property-put PublicMode(: Bool); stdcall;
  property-get PublicMode: Bool; stdcall;
  property-put RedirectDevices(: Bool); stdcall;
  property-get RedirectDevices: Bool; stdcall;
  property-put RedirectPOSDevices(: Bool); stdcall;
  property-get RedirectPOSDevices: Bool; stdcall;
  property-put BitmapVirtualCache32BppSize(: I4); stdcall;
  property-get BitmapVirtualCache32BppSize: I4; stdcall;
  property-put RelativeMouseMode(: Bool); stdcall;
  property-get RelativeMouseMode: Bool; stdcall;
  property-get AuthenticationServiceClass: BSTR; stdcall;
  property-put AuthenticationServiceClass(: BSTR); stdcall;
  property-get PCB: BSTR; stdcall;
  property-put PCB(: BSTR); stdcall;
  property-put HotKeyFocusReleaseLeft(: I4); stdcall;
  property-get HotKeyFocusReleaseLeft: I4; stdcall;
  property-put HotKeyFocusReleaseRight(: I4); stdcall;
  property-get HotKeyFocusReleaseRight: I4; stdcall;
  property-put EnableCredSspSupport(: Bool); stdcall;
  property-get EnableCredSspSupport: Bool; stdcall;
  property-get AuthenticationType: UINT; stdcall;
  property-put ConnectToAdministerServer(: Bool); stdcall;
  property-get ConnectToAdministerServer: Bool; stdcall;

Dispatch IMsRdpClientTransportSettings2;
GUID = {67341688-D606-4C73-A5D2-2E0489009319};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put GatewayHostname(: BSTR); stdcall;
  property-get GatewayHostname: BSTR; stdcall;
  property-put GatewayUsageMethod(: UI4); stdcall;
  property-get GatewayUsageMethod: UI4; stdcall;
  property-put GatewayProfileUsageMethod(: UI4); stdcall;
  property-get GatewayProfileUsageMethod: UI4; stdcall;
  property-put GatewayCredsSource(: UI4); stdcall;
  property-get GatewayCredsSource: UI4; stdcall;
  property-put GatewayUserSelectedCredsSource(: UI4); stdcall;
  property-get GatewayUserSelectedCredsSource: UI4; stdcall;
  property-get GatewayIsSupported: I4; stdcall;
  property-get GatewayDefaultUsageMethod: UI4; stdcall;
  property-put GatewayCredSharing(: UI4); stdcall;
  property-get GatewayCredSharing: UI4; stdcall;
  property-put GatewayPreAuthRequirement(: UI4); stdcall;
  property-get GatewayPreAuthRequirement: UI4; stdcall;
  property-put GatewayPreAuthServerAddr(: BSTR); stdcall;
  property-get GatewayPreAuthServerAddr: BSTR; stdcall;
  property-put GatewaySupportUrl(: BSTR); stdcall;
  property-get GatewaySupportUrl: BSTR; stdcall;
  property-put GatewayEncryptedOtpCookie(: BSTR); stdcall;
  property-get GatewayEncryptedOtpCookie: BSTR; stdcall;
  property-put GatewayEncryptedOtpCookieSize(: UI4); stdcall;
  property-get GatewayEncryptedOtpCookieSize: UI4; stdcall;
  property-put GatewayUsername(: BSTR); stdcall;
  property-get GatewayUsername: BSTR; stdcall;
  property-put GatewayDomain(: BSTR); stdcall;
  property-get GatewayDomain: BSTR; stdcall;
  property-put GatewayPassword(: BSTR); stdcall;

Interface IMsRdpClientNonScriptable4;
GUID = {F50FA8AA-1C7D-4F59-B15C-A90CACAE1FCB};
  property-put RedirectionWarningType(pWrnType: RedirectionWarningType): HResult; stdcall;
  property-get RedirectionWarningType(out pWrnType: ^RedirectionWarningType): HResult; stdcall;
  property-put MarkRdpSettingsSecure(pfRdpSecure: Bool): HResult; stdcall;
  property-get MarkRdpSettingsSecure(out pfRdpSecure: ^Bool): HResult; stdcall;
  property-put PublisherCertificateChain(pVarCert: ^Variant): HResult; stdcall;
  property-get PublisherCertificateChain(out pVarCert: ^Variant): HResult; stdcall;
  property-put WarnAboutPrinterRedirection(pfWarn: Bool): HResult; stdcall;
  property-get WarnAboutPrinterRedirection(out pfWarn: ^Bool): HResult; stdcall;
  property-put AllowCredentialSaving(pfAllowSave: Bool): HResult; stdcall;
  property-get AllowCredentialSaving(out pfAllowSave: ^Bool): HResult; stdcall;
  property-put PromptForCredsOnClient(pfPromptForCredsOnClient: Bool): HResult; stdcall;
  property-get PromptForCredsOnClient(out pfPromptForCredsOnClient: ^Bool): HResult; stdcall;
  property-put LaunchedViaClientShellInterface(pfLaunchedViaClientShellInterface: Bool): HResult; stdcall;
  property-get LaunchedViaClientShellInterface(out pfLaunchedViaClientShellInterface: ^Bool): HResult; stdcall;
  property-put TrustedZoneSite(pfIsTrustedZone: Bool): HResult; stdcall;
  property-get TrustedZoneSite(out pfIsTrustedZone: ^Bool): HResult; stdcall;

Alias RedirectionWarningType;
  __MIDL_IMsRdpClientNonScriptable4_0001

Enum __MIDL_IMsRdpClientNonScriptable4_0001;
  RedirectionWarningTypeDefault = 0;
  RedirectionWarningTypeUnsigned = 1;
  RedirectionWarningTypeUnknown = 2;
  RedirectionWarningTypeUser = 3;
  RedirectionWarningTypeThirdPartySigned = 4;
  RedirectionWarningTypeTrusted = 5;
  RedirectionWarningTypeMax = 5;

//Microsoft RDP Client Control (redistributable) – version 7
CoClass MsRdpClient6;
GUID = {7390F3D8-0439-4C05-91E3-CF5CB290C3D0};

//Microsoft RDP Client Control – version 8
CoClass MsRdpClient7NotSafeForScripting;
GUID = {54D38BF7-B1EF-4479-9674-1BD6EA465258};

Dispatch IMsRdpClient7;
GUID = {B2A5B5CE-3461-444A-91D4-ADD26D070638};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Server(: BSTR); stdcall;
  property-get Server: BSTR; stdcall;
  property-put Domain(: BSTR); stdcall;
  property-get Domain: BSTR; stdcall;
  property-put UserName(: BSTR); stdcall;
  property-get UserName: BSTR; stdcall;
  property-put DisconnectedText(: BSTR); stdcall;
  property-get DisconnectedText: BSTR; stdcall;
  property-put ConnectingText(: BSTR); stdcall;
  property-get ConnectingText: BSTR; stdcall;
  property-get Connected: I2; stdcall;
  property-put DesktopWidth(: I4); stdcall;
  property-get DesktopWidth: I4; stdcall;
  property-put DesktopHeight(: I4); stdcall;
  property-get DesktopHeight: I4; stdcall;
  property-put StartConnected(: I4); stdcall;
  property-get StartConnected: I4; stdcall;
  property-get HorizontalScrollBarVisible: I4; stdcall;
  property-get VerticalScrollBarVisible: I4; stdcall;
  property-put FullScreenTitle(: BSTR); stdcall;
  property-get CipherStrength: I4; stdcall;
  property-get Version: BSTR; stdcall;
  property-get SecuredSettingsEnabled: I4; stdcall;
  property-get SecuredSettings: ^IMsTscSecuredSettings; stdcall;
  property-get AdvancedSettings: ^IMsTscAdvancedSettings; stdcall;
  property-get Debugger: ^IMsTscDebug; stdcall;
  function Connect; stdcall;
  function Disconnect; stdcall;
  function CreateVirtualChannels(newVal: BSTR); stdcall;
  function SendOnVirtualChannel(chanName: BSTR; ChanData: BSTR); stdcall;
  property-put ColorDepth(: I4); stdcall;
  property-get ColorDepth: I4; stdcall;
  property-get AdvancedSettings2: ^IMsRdpClientAdvancedSettings; stdcall;
  property-get SecuredSettings2: ^IMsRdpClientSecuredSettings; stdcall;
  property-get ExtendedDisconnectReason: ExtendedDisconnectReasonCode; stdcall;
  property-put FullScreen(: Bool); stdcall;
  property-get FullScreen: Bool; stdcall;
  function SetVirtualChannelOptions(chanName: BSTR; chanOptions: I4); stdcall;
  function GetVirtualChannelOptions(chanName: BSTR): I4; stdcall;
  function RequestClose: ControlCloseStatus; stdcall;
  property-get AdvancedSettings3: ^IMsRdpClientAdvancedSettings2; stdcall;
  property-put ConnectedStatusText(: BSTR); stdcall;
  property-get ConnectedStatusText: BSTR; stdcall;
  property-get AdvancedSettings4: ^IMsRdpClientAdvancedSettings3; stdcall;
  property-get AdvancedSettings5: ^IMsRdpClientAdvancedSettings4; stdcall;
  property-get TransportSettings: ^IMsRdpClientTransportSettings; stdcall;
  property-get AdvancedSettings6: ^IMsRdpClientAdvancedSettings5; stdcall;
  function GetErrorDescription(disconnectReason: UINT; ExtendedDisconnectReason: UINT): BSTR; stdcall;
  property-get RemoteProgram: ^ITSRemoteProgram; stdcall;
  property-get MsRdpClientShell: ^IMsRdpClientShell; stdcall;
  property-get AdvancedSettings7: ^IMsRdpClientAdvancedSettings6; stdcall;
  property-get TransportSettings2: ^IMsRdpClientTransportSettings2; stdcall;
  property-get AdvancedSettings8: ^IMsRdpClientAdvancedSettings7; stdcall;
  property-get TransportSettings3: ^IMsRdpClientTransportSettings3; stdcall;
  function GetStatusText(statusCode: UINT): BSTR; stdcall;
  property-get SecuredSettings3: ^IMsRdpClientSecuredSettings2; stdcall;
  property-get RemoteProgram2: ^ITSRemoteProgram2; stdcall;

Dispatch IMsRdpClientAdvancedSettings7;
GUID = {26036036-4010-4578-8091-0DB9A1EDF9C3};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put Compress(: I4); stdcall;
  property-get Compress: I4; stdcall;
  property-put BitmapPeristence(: I4); stdcall;
  property-get BitmapPeristence: I4; stdcall;
  property-put allowBackgroundInput(: I4); stdcall;
  property-get allowBackgroundInput: I4; stdcall;
  property-put KeyBoardLayoutStr(: BSTR); stdcall;
  property-put PluginDlls(: BSTR); stdcall;
  property-put IconFile(: BSTR); stdcall;
  property-put IconIndex(: I4); stdcall;
  property-put ContainerHandledFullScreen(: I4); stdcall;
  property-get ContainerHandledFullScreen: I4; stdcall;
  property-put DisableRdpdr(: I4); stdcall;
  property-get DisableRdpdr: I4; stdcall;
  property-put SmoothScroll(: I4); stdcall;
  property-get SmoothScroll: I4; stdcall;
  property-put AcceleratorPassthrough(: I4); stdcall;
  property-get AcceleratorPassthrough: I4; stdcall;
  property-put ShadowBitmap(: I4); stdcall;
  property-get ShadowBitmap: I4; stdcall;
  property-put TransportType(: I4); stdcall;
  property-get TransportType: I4; stdcall;
  property-put SasSequence(: I4); stdcall;
  property-get SasSequence: I4; stdcall;
  property-put EncryptionEnabled(: I4); stdcall;
  property-get EncryptionEnabled: I4; stdcall;
  property-put DedicatedTerminal(: I4); stdcall;
  property-get DedicatedTerminal: I4; stdcall;
  property-put RDPPort(: I4); stdcall;
  property-get RDPPort: I4; stdcall;
  property-put EnableMouse(: I4); stdcall;
  property-get EnableMouse: I4; stdcall;
  property-put DisableCtrlAltDel(: I4); stdcall;
  property-get DisableCtrlAltDel: I4; stdcall;
  property-put EnableWindowsKey(: I4); stdcall;
  property-get EnableWindowsKey: I4; stdcall;
  property-put DoubleClickDetect(: I4); stdcall;
  property-get DoubleClickDetect: I4; stdcall;
  property-put MaximizeShell(: I4); stdcall;
  property-get MaximizeShell: I4; stdcall;
  property-put HotKeyFullScreen(: I4); stdcall;
  property-get HotKeyFullScreen: I4; stdcall;
  property-put HotKeyCtrlEsc(: I4); stdcall;
  property-get HotKeyCtrlEsc: I4; stdcall;
  property-put HotKeyAltEsc(: I4); stdcall;
  property-get HotKeyAltEsc: I4; stdcall;
  property-put HotKeyAltTab(: I4); stdcall;
  property-get HotKeyAltTab: I4; stdcall;
  property-put HotKeyAltShiftTab(: I4); stdcall;
  property-get HotKeyAltShiftTab: I4; stdcall;
  property-put HotKeyAltSpace(: I4); stdcall;
  property-get HotKeyAltSpace: I4; stdcall;
  property-put HotKeyCtrlAltDel(: I4); stdcall;
  property-get HotKeyCtrlAltDel: I4; stdcall;
  property-put orderDrawThreshold(: I4); stdcall;
  property-get orderDrawThreshold: I4; stdcall;
  property-put BitmapCacheSize(: I4); stdcall;
  property-get BitmapCacheSize: I4; stdcall;
  property-put BitmapVirtualCacheSize(: I4); stdcall;
  property-get BitmapVirtualCacheSize: I4; stdcall;
  property-put ScaleBitmapCachesByBPP(: I4); stdcall;
  property-get ScaleBitmapCachesByBPP: I4; stdcall;
  property-put NumBitmapCaches(: I4); stdcall;
  property-get NumBitmapCaches: I4; stdcall;
  property-put CachePersistenceActive(: I4); stdcall;
  property-get CachePersistenceActive: I4; stdcall;
  property-put PersistCacheDirectory(: BSTR); stdcall;
  property-put brushSupportLevel(: I4); stdcall;
  property-get brushSupportLevel: I4; stdcall;
  property-put minInputSendInterval(: I4); stdcall;
  property-get minInputSendInterval: I4; stdcall;
  property-put InputEventsAtOnce(: I4); stdcall;
  property-get InputEventsAtOnce: I4; stdcall;
  property-put maxEventCount(: I4); stdcall;
  property-get maxEventCount: I4; stdcall;
  property-put keepAliveInterval(: I4); stdcall;
  property-get keepAliveInterval: I4; stdcall;
  property-put shutdownTimeout(: I4); stdcall;
  property-get shutdownTimeout: I4; stdcall;
  property-put overallConnectionTimeout(: I4); stdcall;
  property-get overallConnectionTimeout: I4; stdcall;
  property-put singleConnectionTimeout(: I4); stdcall;
  property-get singleConnectionTimeout: I4; stdcall;
  property-put KeyboardType(: I4); stdcall;
  property-get KeyboardType: I4; stdcall;
  property-put KeyboardSubType(: I4); stdcall;
  property-get KeyboardSubType: I4; stdcall;
  property-put KeyboardFunctionKey(: I4); stdcall;
  property-get KeyboardFunctionKey: I4; stdcall;
  property-put WinceFixedPalette(: I4); stdcall;
  property-get WinceFixedPalette: I4; stdcall;
  property-put ConnectToServerConsole(: Bool); stdcall;
  property-get ConnectToServerConsole: Bool; stdcall;
  property-put BitmapPersistence(: I4); stdcall;
  property-get BitmapPersistence: I4; stdcall;
  property-put MinutesToIdleTimeout(: I4); stdcall;
  property-get MinutesToIdleTimeout: I4; stdcall;
  property-put SmartSizing(: Bool); stdcall;
  property-get SmartSizing: Bool; stdcall;
  property-put RdpdrLocalPrintingDocName(: BSTR); stdcall;
  property-get RdpdrLocalPrintingDocName: BSTR; stdcall;
  property-put RdpdrClipCleanTempDirString(: BSTR); stdcall;
  property-get RdpdrClipCleanTempDirString: BSTR; stdcall;
  property-put RdpdrClipPasteInfoString(: BSTR); stdcall;
  property-get RdpdrClipPasteInfoString: BSTR; stdcall;
  property-put ClearTextPassword(: BSTR); stdcall;
  property-put DisplayConnectionBar(: Bool); stdcall;
  property-get DisplayConnectionBar: Bool; stdcall;
  property-put PinConnectionBar(: Bool); stdcall;
  property-get PinConnectionBar: Bool; stdcall;
  property-put GrabFocusOnConnect(: Bool); stdcall;
  property-get GrabFocusOnConnect: Bool; stdcall;
  property-put LoadBalanceInfo(: BSTR); stdcall;
  property-get LoadBalanceInfo: BSTR; stdcall;
  property-put RedirectDrives(: Bool); stdcall;
  property-get RedirectDrives: Bool; stdcall;
  property-put RedirectPrinters(: Bool); stdcall;
  property-get RedirectPrinters: Bool; stdcall;
  property-put RedirectPorts(: Bool); stdcall;
  property-get RedirectPorts: Bool; stdcall;
  property-put RedirectSmartCards(: Bool); stdcall;
  property-get RedirectSmartCards: Bool; stdcall;
  property-put BitmapVirtualCache16BppSize(: I4); stdcall;
  property-get BitmapVirtualCache16BppSize: I4; stdcall;
  property-put BitmapVirtualCache24BppSize(: I4); stdcall;
  property-get BitmapVirtualCache24BppSize: I4; stdcall;
  property-put PerformanceFlags(: I4); stdcall;
  property-get PerformanceFlags: I4; stdcall;
  property-put ConnectWithEndpoint(: ^Variant); stdcall;
  property-put NotifyTSPublicKey(: Bool); stdcall;
  property-get NotifyTSPublicKey: Bool; stdcall;
  property-get CanAutoReconnect: Bool; stdcall;
  property-put EnableAutoReconnect(: Bool); stdcall;
  property-get EnableAutoReconnect: Bool; stdcall;
  property-put MaxReconnectAttempts(: I4); stdcall;
  property-get MaxReconnectAttempts: I4; stdcall;
  property-put ConnectionBarShowMinimizeButton(: Bool); stdcall;
  property-get ConnectionBarShowMinimizeButton: Bool; stdcall;
  property-put ConnectionBarShowRestoreButton(: Bool); stdcall;
  property-get ConnectionBarShowRestoreButton: Bool; stdcall;
  property-put AuthenticationLevel(: UINT); stdcall;
  property-get AuthenticationLevel: UINT; stdcall;
  property-put RedirectClipboard(: Bool); stdcall;
  property-get RedirectClipboard: Bool; stdcall;
  property-put AudioRedirectionMode(: UINT); stdcall;
  property-get AudioRedirectionMode: UINT; stdcall;
  property-put ConnectionBarShowPinButton(: Bool); stdcall;
  property-get ConnectionBarShowPinButton: Bool; stdcall;
  property-put PublicMode(: Bool); stdcall;
  property-get PublicMode: Bool; stdcall;
  property-put RedirectDevices(: Bool); stdcall;
  property-get RedirectDevices: Bool; stdcall;
  property-put RedirectPOSDevices(: Bool); stdcall;
  property-get RedirectPOSDevices: Bool; stdcall;
  property-put BitmapVirtualCache32BppSize(: I4); stdcall;
  property-get BitmapVirtualCache32BppSize: I4; stdcall;
  property-put RelativeMouseMode(: Bool); stdcall;
  property-get RelativeMouseMode: Bool; stdcall;
  property-get AuthenticationServiceClass: BSTR; stdcall;
  property-put AuthenticationServiceClass(: BSTR); stdcall;
  property-get PCB: BSTR; stdcall;
  property-put PCB(: BSTR); stdcall;
  property-put HotKeyFocusReleaseLeft(: I4); stdcall;
  property-get HotKeyFocusReleaseLeft: I4; stdcall;
  property-put HotKeyFocusReleaseRight(: I4); stdcall;
  property-get HotKeyFocusReleaseRight: I4; stdcall;
  property-put EnableCredSspSupport(: Bool); stdcall;
  property-get EnableCredSspSupport: Bool; stdcall;
  property-get AuthenticationType: UINT; stdcall;
  property-put ConnectToAdministerServer(: Bool); stdcall;
  property-get ConnectToAdministerServer: Bool; stdcall;
  property-put AudioCaptureRedirectionMode(: Bool); stdcall;
  property-get AudioCaptureRedirectionMode: Bool; stdcall;
  property-put VideoPlaybackMode(: UINT); stdcall;
  property-get VideoPlaybackMode: UINT; stdcall;
  property-put EnableSuperPan(: Bool); stdcall;
  property-get EnableSuperPan: Bool; stdcall;
  property-put SuperPanAccelerationFactor(: UI4); stdcall;
  property-get SuperPanAccelerationFactor: UI4; stdcall;
  property-put NegotiateSecurityLayer(: Bool); stdcall;
  property-get NegotiateSecurityLayer: Bool; stdcall;
  property-put AudioQualityMode(: UINT); stdcall;
  property-get AudioQualityMode: UINT; stdcall;
  property-put RedirectDirectX(: Bool); stdcall;
  property-get RedirectDirectX: Bool; stdcall;
  property-put NetworkConnectionType(: UINT); stdcall;
  property-get NetworkConnectionType: UINT; stdcall;

Dispatch IMsRdpClientTransportSettings3;
GUID = {3D5B21AC-748D-41DE-8F30-E15169586BD4};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put GatewayHostname(: BSTR); stdcall;
  property-get GatewayHostname: BSTR; stdcall;
  property-put GatewayUsageMethod(: UI4); stdcall;
  property-get GatewayUsageMethod: UI4; stdcall;
  property-put GatewayProfileUsageMethod(: UI4); stdcall;
  property-get GatewayProfileUsageMethod: UI4; stdcall;
  property-put GatewayCredsSource(: UI4); stdcall;
  property-get GatewayCredsSource: UI4; stdcall;
  property-put GatewayUserSelectedCredsSource(: UI4); stdcall;
  property-get GatewayUserSelectedCredsSource: UI4; stdcall;
  property-get GatewayIsSupported: I4; stdcall;
  property-get GatewayDefaultUsageMethod: UI4; stdcall;
  property-put GatewayCredSharing(: UI4); stdcall;
  property-get GatewayCredSharing: UI4; stdcall;
  property-put GatewayPreAuthRequirement(: UI4); stdcall;
  property-get GatewayPreAuthRequirement: UI4; stdcall;
  property-put GatewayPreAuthServerAddr(: BSTR); stdcall;
  property-get GatewayPreAuthServerAddr: BSTR; stdcall;
  property-put GatewaySupportUrl(: BSTR); stdcall;
  property-get GatewaySupportUrl: BSTR; stdcall;
  property-put GatewayEncryptedOtpCookie(: BSTR); stdcall;
  property-get GatewayEncryptedOtpCookie: BSTR; stdcall;
  property-put GatewayEncryptedOtpCookieSize(: UI4); stdcall;
  property-get GatewayEncryptedOtpCookieSize: UI4; stdcall;
  property-put GatewayUsername(: BSTR); stdcall;
  property-get GatewayUsername: BSTR; stdcall;
  property-put GatewayDomain(: BSTR); stdcall;
  property-get GatewayDomain: BSTR; stdcall;
  property-put GatewayPassword(: BSTR); stdcall;
  property-put GatewayCredSourceCookie(: UI4); stdcall;
  property-get GatewayCredSourceCookie: UI4; stdcall;
  property-put GatewayAuthCookieServerAddr(: BSTR); stdcall;
  property-get GatewayAuthCookieServerAddr: BSTR; stdcall;
  property-put GatewayEncryptedAuthCookie(: BSTR); stdcall;
  property-get GatewayEncryptedAuthCookie: BSTR; stdcall;
  property-put GatewayEncryptedAuthCookieSize(: UI4); stdcall;
  property-get GatewayEncryptedAuthCookieSize: UI4; stdcall;
  property-put GatewayAuthLoginPage(: BSTR); stdcall;
  property-get GatewayAuthLoginPage: BSTR; stdcall;

Dispatch IMsRdpClientSecuredSettings2;
GUID = {25F2CE20-8B1D-4971-A7CD-549DAE201FC0};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put StartProgram(: BSTR); stdcall;
  property-get StartProgram: BSTR; stdcall;
  property-put WorkDir(: BSTR); stdcall;
  property-get WorkDir: BSTR; stdcall;
  property-put FullScreen(: I4); stdcall;
  property-get FullScreen: I4; stdcall;
  property-put KeyboardHookMode(: I4); stdcall;
  property-get KeyboardHookMode: I4; stdcall;
  property-put AudioRedirectionMode(: I4); stdcall;
  property-get AudioRedirectionMode: I4; stdcall;
  property-get PCB: BSTR; stdcall;
  property-put PCB(: BSTR); stdcall;

Dispatch ITSRemoteProgram2;
GUID = {92C38A7D-241A-418C-9936-099872C9AF20};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-put RemoteProgramMode(: Bool); stdcall;
  property-get RemoteProgramMode: Bool; stdcall;
  function ServerStartProgram(bstrExecutablePath: BSTR; bstrFilePath: BSTR; bstrWorkingDirectory: BSTR; vbExpandEnvVarInWorkingDirectoryOnServer: Bool; bstrArguments: BSTR; vbExpandEnvVarInArgumentsOnServer: Bool); stdcall;
  property-put RemoteApplicationName(: BSTR); stdcall;
  property-put RemoteApplicationProgram(: BSTR); stdcall;
  property-put RemoteApplicationArgs(: BSTR); stdcall;

Interface IMsRdpClientNonScriptable5;
GUID = {4F6996D5-D7B1-412C-B0FF-063718566907};
  property-put UseMultimon(pfUseMultimon: Bool): HResult; stdcall;
  property-get UseMultimon(out pfUseMultimon: ^Bool): HResult; stdcall;
  property-get RemoteMonitorCount(out pcRemoteMonitors: ^UI4): HResult; stdcall;
  function GetRemoteMonitorsBoundingBox(out pLeft: ^I4; out pTop: ^I4; out pRight: ^I4; out pBottom: ^I4): HResult; stdcall;
  property-get RemoteMonitorLayoutMatchesLocal(out pfRemoteMatchesLocal: ^Bool): HResult; stdcall;
  property-put DisableConnectionBar(: Bool): HResult; stdcall;
  property-put DisableRemoteAppCapsCheck(pfDisableRemoteAppCapsCheck: Bool): HResult; stdcall;
  property-get DisableRemoteAppCapsCheck(out pfDisableRemoteAppCapsCheck: ^Bool): HResult; stdcall;
  property-put WarnAboutDirectXRedirection(pfWarn: Bool): HResult; stdcall;
  property-get WarnAboutDirectXRedirection(out pfWarn: ^Bool): HResult; stdcall;
  property-put AllowPromptingForCredentials(pfAllow: Bool): HResult; stdcall;
  property-get AllowPromptingForCredentials(out pfAllow: ^Bool): HResult; stdcall;

Interface IMsRdpPreferredRedirectionInfo;
GUID = {FDD029F9-9574-4DEF-8529-64B521CCCAA4};
  property-put UseRedirectionServerName(pVal: Bool): HResult; stdcall;
  property-get UseRedirectionServerName(out pVal: ^Bool): HResult; stdcall;

//Microsoft RDP Client Control (redistributable) – version 8
CoClass MsRdpClient7;
GUID = {A9D7038D-B5ED-472E-9C47-94BEA90A5910};