1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // LogExts API Logging Manifest describing the interfaces of the Remote Desktop
6 // ActiveX control. All definitions were extracted from the type library
7 // embedded into mstscax.dll.
8 //
9 // To use this file copy it to winext\manifest directory of the WinDbg
10 // installation and add #include "rdp.h" to winext\manifest\main.h. Then load
11 // !logexts extension as usual and enable the "rdp" category.
12 
13 module MSTSCAX.DLL:
14 category rdp:
15 
16 //
17 // GUIDs
18 //
19 
20 struct __declspec(uuid("336d5562-efa8-482e-8cb3-c5c0fc7a7db6")) IMsTscAxEvents;
21 struct __declspec(uuid("92b4a539-7115-4b7c-a5a9-e5d9efc2780a")) IMsRdpClient;
22 struct __declspec(uuid("8c11efae-92c3-11d1-bc1e-00c04fa31489")) IMsTscAx;
23 struct __declspec(uuid("327bb5cd-834e-4400-aef2-b30e15e5d682")) IMsTscAx_Redist;
24 struct __declspec(uuid("c9d65442-a0f9-45b2-8f73-d61d2db8cbb6")) IMsTscSecuredSettings;
25 struct __declspec(uuid("809945cc-4b3b-4a92-a6b0-dbf9b5f2ef2d")) IMsTscAdvancedSettings;
26 struct __declspec(uuid("209d0eb9-6254-47b1-9033-a98dae55bb27")) IMsTscDebug;
27 struct __declspec(uuid("3c65b4ab-12b3-465b-acd4-b8dad3bff9e2")) IMsRdpClientAdvancedSettings;
28 struct __declspec(uuid("605befcf-39c1-45cc-a811-068fb7be346d")) IMsRdpClientSecuredSettings;
29 struct __declspec(uuid("c1e6743a-41c1-4a74-832a-0dd06c1c7a0e")) IMsTscNonScriptable;
30 struct __declspec(uuid("2f079c4c-87b2-4afd-97ab-20cdb43038ae")) IMsRdpClientNonScriptable;
31 struct __declspec(uuid("e7e17dc4-3b71-4ba7-a8e6-281ffadca28f")) IMsRdpClient2;
32 struct __declspec(uuid("9ac42117-2b76-4320-aa44-0e616ab8437b")) IMsRdpClientAdvancedSettings2;
33 struct __declspec(uuid("91b7cbc5-a72e-4fa0-9300-d647d7e897ff")) IMsRdpClient3;
34 struct __declspec(uuid("19cd856b-c542-4c53-acee-f127e3be1a59")) IMsRdpClientAdvancedSettings3;
35 struct __declspec(uuid("095e0738-d97d-488b-b9f6-dd0e8d66c0de")) IMsRdpClient4;
36 struct __declspec(uuid("fba7f64e-7345-4405-ae50-fa4a763dc0de")) IMsRdpClientAdvancedSettings4;
37 struct __declspec(uuid("17a5e535-4072-4fa4-af32-c8d0d47345e9")) IMsRdpClientNonScriptable2;
38 struct __declspec(uuid("4eb5335b-6429-477d-b922-e06a28ecd8bf")) IMsRdpClient5;
39 struct __declspec(uuid("720298c0-a099-46f5-9f82-96921bae4701")) IMsRdpClientTransportSettings;
40 struct __declspec(uuid("fba7f64e-6783-4405-da45-fa4a763dabd0")) IMsRdpClientAdvancedSettings5;
41 struct __declspec(uuid("fdd029f9-467a-4c49-8529-64b521dbd1b4")) ITSRemoteProgram;
42 struct __declspec(uuid("d012ae6d-c19a-4bfe-b367-201f8911f134")) IMsRdpClientShell;
43 struct __declspec(uuid("b3378d90-0728-45c7-8ed7-b6159fb92219")) IMsRdpClientNonScriptable3;
44 struct __declspec(uuid("56540617-d281-488c-8738-6a8fdf64a118")) IMsRdpDeviceCollection;
45 struct __declspec(uuid("60c3b9c8-9e92-4f5e-a3e7-604a912093ea")) IMsRdpDevice;
46 struct __declspec(uuid("7ff17599-da2c-4677-ad35-f60c04fe1585")) IMsRdpDriveCollection;
47 struct __declspec(uuid("d28b5458-f694-47a8-8e61-40356a767e46")) IMsRdpDrive;
48 struct __declspec(uuid("d43b7d80-8517-4b6d-9eac-96ad6800d7f2")) IMsRdpClient6;
49 struct __declspec(uuid("222c4b5d-45d9-4df0-a7c6-60cf9089d285")) IMsRdpClientAdvancedSettings6;
50 struct __declspec(uuid("67341688-d606-4c73-a5d2-2e0489009319")) IMsRdpClientTransportSettings2;
51 struct __declspec(uuid("f50fa8aa-1c7d-4f59-b15c-a90cacae1fcb")) IMsRdpClientNonScriptable4;
52 struct __declspec(uuid("b2a5b5ce-3461-444a-91d4-add26d070638")) IMsRdpClient7;
53 struct __declspec(uuid("26036036-4010-4578-8091-0db9a1edf9c3")) IMsRdpClientAdvancedSettings7;
54 struct __declspec(uuid("3d5b21ac-748d-41de-8f30-e15169586bd4")) IMsRdpClientTransportSettings3;
55 struct __declspec(uuid("25f2ce20-8b1d-4971-a7cd-549dae201fc0")) IMsRdpClientSecuredSettings2;
56 struct __declspec(uuid("92c38a7d-241a-418c-9936-099872c9af20")) ITSRemoteProgram2;
57 struct __declspec(uuid("4f6996d5-d7b1-412c-b0ff-063718566907")) IMsRdpClientNonScriptable5;
58 struct __declspec(uuid("fdd029f9-9574-4def-8529-64b521cccaa4")) IMsRdpPreferredRedirectionInfo;
59 struct __declspec(uuid("302d8188-0052-4807-806a-362b628f9ac5")) IMsRdpExtendedSettings;
60 struct __declspec(uuid("4247e044-9271-43a9-bc49-e2ad9e855d62")) IMsRdpClient8;
61 struct __declspec(uuid("89acb528-2557-4d16-8625-226a30e97e9a")) IMsRdpClientAdvancedSettings8;
62 struct __declspec(uuid("079863b7-6d47-4105-8bfe-0cdcb360e67d")) IRemoteDesktopClientEvents;
63 struct __declspec(uuid("57d25668-625a-4905-be4e-304caa13f89c")) IRemoteDesktopClient;
64 struct __declspec(uuid("48a0f2a7-2713-431f-bbac-6f4558e7d64d")) IRemoteDesktopClientSettings;
65 struct __declspec(uuid("7d54bc4e-1028-45d4-8b0a-b9b6bffba176")) IRemoteDesktopClientActions;
66 struct __declspec(uuid("260ec22d-8cbc-44b5-9e88-2a37f6c93ae9")) IRemoteDesktopClientTouchPointer;
67 struct __declspec(uuid("A0B2DD9A-7F53-4E65-8547-851952EC8C96")) IMsRdpSessionManager;
68 
69 //
70 // Typedefs
71 //
72 
73 typedef LPVOID LONG_PTR;
74 
75 typedef struct tagSAFEARRAYBOUND {
76   ULONG cElements;
77   LONG lLbound;
78 } SAFEARRAYBOUND;
79 
80 typedef struct tagSAFEARRAY {
81   USHORT         cDims;
82   USHORT         fFeatures;
83   ULONG          cbElements;
84   ULONG          cLocks;
85   PVOID          pvData;
86   SAFEARRAYBOUND rgsabound[1];
87 } SAFEARRAY;
88 
89 //
90 // Values
91 //
92 
93 value short  VARIANT_BOOL {
94 #define VARIANT_TRUE 0xffff
95 #define VARIANT_FALSE 0
96 };
97 
98 value long AutoReconnectContinueState {
99 #define autoReconnectContinueAutomatic 0
100 #define autoReconnectContinueStop 1
101 #define autoReconnectContinueManual 2
102 };
103 
104 value long RemoteWindowDisplayedAttribute {
105 #define remoteAppWindowNone 0
106 #define remoteAppWindowDisplayed 1
107 #define remoteAppShellIconDisplayed 2
108 };
109 
110 value long RemoteProgramResult {
111 #define remoteAppResultOk 0
112 #define remoteAppResultLocked 1
113 #define remoteAppResultProtocolError 2
114 #define remoteAppResultNotInWhitelist 3
115 #define remoteAppResultNetworkPathDenied 4
116 #define remoteAppResultFileNotFound 5
117 #define remoteAppResultFailure 6
118 #define remoteAppResultHookNotLoaded 7
119 };
120 
121 value long ExtendedDisconnectReasonCode {
122 #define exDiscReasonNoInfo 0
123 #define exDiscReasonAPIInitiatedDisconnect 1
124 #define exDiscReasonAPIInitiatedLogoff 2
125 #define exDiscReasonServerIdleTimeout 3
126 #define exDiscReasonServerLogonTimeout 4
127 #define exDiscReasonReplacedByOtherConnection 5
128 #define exDiscReasonOutOfMemory 6
129 #define exDiscReasonServerDeniedConnection 7
130 #define exDiscReasonServerDeniedConnectionFips 8
131 #define exDiscReasonServerInsufficientPrivileges 9
132 #define exDiscReasonServerFreshCredsRequired 10
133 #define exDiscReasonLicenseInternal 256
134 #define exDiscReasonLicenseNoLicenseServer 257
135 #define exDiscReasonLicenseNoLicense 258
136 #define exDiscReasonLicenseErrClientMsg 259
137 #define exDiscReasonLicenseHwidDoesntMatchLicense 260
138 #define exDiscReasonLicenseErrClientLicense 261
139 #define exDiscReasonLicenseCantFinishProtocol 262
140 #define exDiscReasonLicenseClientEndedProtocol 263
141 #define exDiscReasonLicenseErrClientEncryption 264
142 #define exDiscReasonLicenseCantUpgradeLicense 265
143 #define exDiscReasonLicenseNoRemoteConnections 266
144 #define exDiscReasonLicenseCreatingLicStoreAccDenied 267
145 #define exDiscReasonRdpEncInvalidCredentials 768
146 #define exDiscReasonProtocolRangeStart 4096
147 #define exDiscReasonProtocolRangeEnd 32767
148 };
149 
150 value long ControlCloseStatus {
151 #define controlCloseCanProceed 0
152 #define controlCloseWaitForEvents 1
153 };
154 
155 value long RedirectionWarningType {
156 #define RedirectionWarningTypeDefault 0
157 #define RedirectionWarningTypeUnsigned 1
158 #define RedirectionWarningTypeUnknown 2
159 #define RedirectionWarningTypeUser 3
160 #define RedirectionWarningTypeThirdPartySigned 4
161 #define RedirectionWarningTypeTrusted 5
162 };
163 
164 value long RemoteSessionActionType {
165 #define RemoteSessionActionCharms 0
166 #define RemoteSessionActionAppbar 1
167 #define RemoteSessionActionSnap 2
168 #define RemoteSessionActionStartScreen 3
169 #define RemoteSessionActionAppSwitch 4
170 };
171 
172 value long ClientSpec {
173 #define FullMode 0
174 #define ThinClientMode 1
175 #define SmallCacheMode 2
176 };
177 
178 value long ControlReconnectStatus {
179 #define controlReconnectStarted 0
180 #define controlReconnectBlocked 1
181 };
182 
183 value long RemoteActionType {
184 #define RemoteActionCharms 0
185 #define RemoteActionAppbar 1
186 #define RemoteActionSnap 2
187 #define RemoteActionStartScreen 3
188 #define RemoteActionAppSwitch 4
189 };
190 
191 value long SnapshotEncodingType {
192 #define SnapshotEncodingDataUri 0
193 };
194 
195 value long SnapshotFormatType {
196 #define SnapshotFormatPng 0
197 #define SnapshotFormatJpeg 1
198 #define SnapshotFormatBmp 2
199 };
200 
201 //
202 // Interfaces
203 //
204 
205 interface IMsTscAxEvents : IDispatch {
206   HRESULT OnConnecting();
207   HRESULT OnConnected();
208   HRESULT OnLoginComplete();
209   HRESULT OnDisconnected(long discReason);
210   HRESULT OnEnterFullScreenMode();
211   HRESULT OnLeaveFullScreenMode();
212   HRESULT OnChannelReceivedData(BSTR chanName, BSTR data);
213   HRESULT OnRequestGoFullScreen();
214   HRESULT OnRequestLeaveFullScreen();
215   HRESULT OnFatalError(long errorCode);
216   HRESULT OnWarning(long warningCode);
217   HRESULT OnRemoteDesktopSizeChange(long width, long height);
218   HRESULT OnIdleTimeoutNotification();
219   HRESULT OnRequestContainerMinimize();
220   HRESULT OnConfirmClose([out] VARIANT_BOOL* pfAllowClose);
221   HRESULT OnReceivedTSPublicKey(BSTR publicKey, [out] VARIANT_BOOL* pfContinueLogon);
222   HRESULT OnAutoReconnecting(long disconnectReason, long attemptCount, [out] AutoReconnectContinueState* pArcContinueStatus);
223   HRESULT OnAuthenticationWarningDisplayed();
224   HRESULT OnAuthenticationWarningDismissed();
225   HRESULT OnRemoteProgramResult(BSTR bstrRemoteProgram, RemoteProgramResult lError, VARIANT_BOOL vbIsExecutable);
226   HRESULT OnRemoteProgramDisplayed(VARIANT_BOOL vbDisplayed, ULONG uDisplayInformation);
227   HRESULT OnRemoteWindowDisplayed(VARIANT_BOOL vbDisplayed, LPVOID hwnd, RemoteWindowDisplayedAttribute windowAttribute);
228   HRESULT OnLogonError(long lError);
229   HRESULT OnFocusReleased(int iDirection);
230   HRESULT OnUserNameAcquired(BSTR bstrUserName);
231   HRESULT OnMouseInputModeChanged(VARIANT_BOOL fMouseModeRelative);
232   HRESULT OnServiceMessageReceived(BSTR serviceMessage);
233   HRESULT OnConnectionBarPullDown();
234   HRESULT OnNetworkStatusChanged(ULONG qualityLevel, long bandwidth, long rtt);
235   HRESULT OnDevicesButtonPressed();
236   HRESULT OnAutoReconnected();
237   HRESULT OnAutoReconnecting2(long disconnectReason, VARIANT_BOOL networkAvailable, long attemptCount, long maxAttemptCount);
238 };
239 
240 interface IMsTscSecuredSettings : IDispatch {
241     HRESULT put_StartProgram(BSTR pStartProgram);
242     HRESULT get_StartProgram([out] BSTR* pStartProgram);
243     HRESULT put_WorkDir(BSTR pWorkDir);
244     HRESULT get_WorkDir([out] BSTR* pWorkDir);
245     HRESULT put_FullScreen(long pfFullScreen);
246     HRESULT get_FullScreen([out] long* pfFullScreen);
247 };
248 
249 interface IMsTscAdvancedSettings : IDispatch {
250   HRESULT put_Compress(long pcompress);
251   HRESULT get_Compress([out] long* pcompress);
252   HRESULT put_BitmapPeristence(long pbitmapPeristence);
253   HRESULT get_BitmapPeristence([out] long* pbitmapPeristence);
254   HRESULT put_allowBackgroundInput(long pallowBackgroundInput);
255   HRESULT get_allowBackgroundInput([out] long* pallowBackgroundInput);
256   HRESULT put_KeyBoardLayoutStr(BSTR _arg1);
257   HRESULT put_PluginDlls(BSTR _arg1);
258   HRESULT put_IconFile(BSTR _arg1);
259   HRESULT put_IconIndex(long _arg1);
260   HRESULT put_ContainerHandledFullScreen(long pContainerHandledFullScreen);
261   HRESULT get_ContainerHandledFullScreen([out] long* pContainerHandledFullScreen);
262   HRESULT put_DisableRdpdr(long pDisableRdpdr);
263   HRESULT get_DisableRdpdr([out] long* pDisableRdpdr);
264 };
265 
266 interface IMsTscDebug : IDispatch {
267   HRESULT put_HatchBitmapPDU(long phatchBitmapPDU);
268   HRESULT get_HatchBitmapPDU([out] long* phatchBitmapPDU);
269   HRESULT put_HatchSSBOrder(long phatchSSBOrder);
270   HRESULT get_HatchSSBOrder([out] long* phatchSSBOrder);
271   HRESULT put_HatchMembltOrder(long phatchMembltOrder);
272   HRESULT get_HatchMembltOrder([out] long* phatchMembltOrder);
273   HRESULT put_HatchIndexPDU(long phatchIndexPDU);
274   HRESULT get_HatchIndexPDU([out] long* phatchIndexPDU);
275   HRESULT put_LabelMemblt(long plabelMemblt);
276   HRESULT get_LabelMemblt([out] long* plabelMemblt);
277   HRESULT put_BitmapCacheMonitor(long pbitmapCacheMonitor);
278   HRESULT get_BitmapCacheMonitor([out] long* pbitmapCacheMonitor);
279   HRESULT put_MallocFailuresPercent(long pmallocFailuresPercent);
280   HRESULT get_MallocFailuresPercent([out] long* pmallocFailuresPercent);
281   HRESULT put_MallocHugeFailuresPercent(long pmallocHugeFailuresPercent);
282   HRESULT get_MallocHugeFailuresPercent([out] long* pmallocHugeFailuresPercent);
283   HRESULT put_NetThroughput(long NetThroughput);
284   HRESULT get_NetThroughput([out] long* NetThroughput);
285   HRESULT put_CLXCmdLine(BSTR pCLXCmdLine);
286   HRESULT get_CLXCmdLine([out] BSTR* pCLXCmdLine);
287   HRESULT put_CLXDll(BSTR pCLXDll);
288   HRESULT get_CLXDll([out] BSTR* pCLXDll);
289   HRESULT put_RemoteProgramsHatchVisibleRegion(long pcbHatch);
290   HRESULT get_RemoteProgramsHatchVisibleRegion([out] long* pcbHatch);
291   HRESULT put_RemoteProgramsHatchVisibleNoDataRegion(long pcbHatch);
292   HRESULT get_RemoteProgramsHatchVisibleNoDataRegion([out] long* pcbHatch);
293   HRESULT put_RemoteProgramsHatchNonVisibleRegion(long pcbHatch);
294   HRESULT get_RemoteProgramsHatchNonVisibleRegion([out] long* pcbHatch);
295   HRESULT put_RemoteProgramsHatchWindow(long pcbHatch);
296   HRESULT get_RemoteProgramsHatchWindow([out] long* pcbHatch);
297   HRESULT put_RemoteProgramsStayConnectOnBadCaps(long pcbStayConnected);
298   HRESULT get_RemoteProgramsStayConnectOnBadCaps([out] long* pcbStayConnected);
299   HRESULT get_ControlType([out] UINT* pControlType);
300   HRESULT put_DecodeGfx(VARIANT_BOOL _arg1);
301 };
302 
303 interface IMsTscAx : IDispatch
304 {
305   HRESULT put_Server(BSTR pServer);
306   HRESULT get_Server([out] BSTR* pServer);
307   HRESULT put_Domain(BSTR pDomain);
308   HRESULT get_Domain([out] BSTR* pDomain);
309   HRESULT put_UserName(BSTR pUserName);
310   HRESULT get_UserName([out] BSTR* pUserName);
311   HRESULT put_DisconnectedText(BSTR pDisconnectedText);
312   HRESULT get_DisconnectedText([out] BSTR* pDisconnectedText);
313   HRESULT put_ConnectingText(BSTR pConnectingText);
314   HRESULT get_ConnectingText([out] BSTR* pConnectingText);
315   HRESULT get_Connected([out] short* pIsConnected);
316   HRESULT put_DesktopWidth(long pVal);
317   HRESULT get_DesktopWidth([out] long* pVal);
318   HRESULT put_DesktopHeight(long pVal);
319   HRESULT get_DesktopHeight([out] long* pVal);
320   HRESULT put_StartConnected(long pfStartConnected);
321   HRESULT get_StartConnected([out] long* pfStartConnected);
322   HRESULT get_HorizontalScrollBarVisible([out] long* pfHScrollVisible);
323   HRESULT get_VerticalScrollBarVisible([out] long* pfVScrollVisible);
324   HRESULT put_FullScreenTitle(BSTR _arg1);
325   HRESULT get_CipherStrength([out] long* pCipherStrength);
326   HRESULT get_Version([out] BSTR* pVersion);
327   HRESULT get_SecuredSettingsEnabled([out] long* pSecuredSettingsEnabled);
328   HRESULT get_SecuredSettings([out] IMsTscSecuredSettings** ppSecuredSettings);
329   HRESULT get_AdvancedSettings([out] IMsTscAdvancedSettings** ppAdvSettings);
330   HRESULT get_Debugger([out] IMsTscDebug** ppDebugger);
331   HRESULT Connect();
332   HRESULT Disconnect();
333   HRESULT CreateVirtualChannels(BSTR newVal);
334   HRESULT SendOnVirtualChannel(BSTR chanName, BSTR ChanData);
335 };
336 
337 interface IMsRdpClientAdvancedSettings : IMsTscAdvancedSettings {
338   HRESULT put_SmoothScroll(long psmoothScroll);
339   HRESULT get_SmoothScroll([out] long* psmoothScroll);
340   HRESULT put_AcceleratorPassthrough(long pacceleratorPassthrough);
341   HRESULT get_AcceleratorPassthrough([out] long* pacceleratorPassthrough);
342   HRESULT put_ShadowBitmap(long pshadowBitmap);
343   HRESULT get_ShadowBitmap([out] long* pshadowBitmap);
344   HRESULT put_TransportType(long ptransportType);
345   HRESULT get_TransportType([out] long* ptransportType);
346   HRESULT put_SasSequence(long psasSequence);
347   HRESULT get_SasSequence([out] long* psasSequence);
348   HRESULT put_EncryptionEnabled(long pencryptionEnabled);
349   HRESULT get_EncryptionEnabled([out] long* pencryptionEnabled);
350   HRESULT put_DedicatedTerminal(long pdedicatedTerminal);
351   HRESULT get_DedicatedTerminal([out] long* pdedicatedTerminal);
352   HRESULT put_RDPPort(long prdpPort);
353   HRESULT get_RDPPort([out] long* prdpPort);
354   HRESULT put_EnableMouse(long penableMouse);
355   HRESULT get_EnableMouse([out] long* penableMouse);
356   HRESULT put_DisableCtrlAltDel(long pdisableCtrlAltDel);
357   HRESULT get_DisableCtrlAltDel([out] long* pdisableCtrlAltDel);
358   HRESULT put_EnableWindowsKey(long penableWindowsKey);
359   HRESULT get_EnableWindowsKey([out] long* penableWindowsKey);
360   HRESULT put_DoubleClickDetect(long pdoubleClickDetect);
361   HRESULT get_DoubleClickDetect([out] long* pdoubleClickDetect);
362   HRESULT put_MaximizeShell(long pmaximizeShell);
363   HRESULT get_MaximizeShell([out] long* pmaximizeShell);
364   HRESULT put_HotKeyFullScreen(long photKeyFullScreen);
365   HRESULT get_HotKeyFullScreen([out] long* photKeyFullScreen);
366   HRESULT put_HotKeyCtrlEsc(long photKeyCtrlEsc);
367   HRESULT get_HotKeyCtrlEsc([out] long* photKeyCtrlEsc);
368   HRESULT put_HotKeyAltEsc(long photKeyAltEsc);
369   HRESULT get_HotKeyAltEsc([out] long* photKeyAltEsc);
370   HRESULT put_HotKeyAltTab(long photKeyAltTab);
371   HRESULT get_HotKeyAltTab([out] long* photKeyAltTab);
372   HRESULT put_HotKeyAltShiftTab(long photKeyAltShiftTab);
373   HRESULT get_HotKeyAltShiftTab([out] long* photKeyAltShiftTab);
374   HRESULT put_HotKeyAltSpace(long photKeyAltSpace);
375   HRESULT get_HotKeyAltSpace([out] long* photKeyAltSpace);
376   HRESULT put_HotKeyCtrlAltDel(long photKeyCtrlAltDel);
377   HRESULT get_HotKeyCtrlAltDel([out] long* photKeyCtrlAltDel);
378   HRESULT put_orderDrawThreshold(long porderDrawThreshold);
379   HRESULT get_orderDrawThreshold([out] long* porderDrawThreshold);
380   HRESULT put_BitmapCacheSize(long pbitmapCacheSize);
381   HRESULT get_BitmapCacheSize([out] long* pbitmapCacheSize);
382   HRESULT put_BitmapVirtualCacheSize(long pbitmapVirtualCacheSize);
383   HRESULT get_BitmapVirtualCacheSize([out] long* pbitmapVirtualCacheSize);
384   HRESULT put_ScaleBitmapCachesByBPP(long pbScale);
385   HRESULT get_ScaleBitmapCachesByBPP([out] long* pbScale);
386   HRESULT put_NumBitmapCaches(long pnumBitmapCaches);
387   HRESULT get_NumBitmapCaches([out] long* pnumBitmapCaches);
388   HRESULT put_CachePersistenceActive(long pcachePersistenceActive);
389   HRESULT get_CachePersistenceActive([out] long* pcachePersistenceActive);
390   HRESULT put_PersistCacheDirectory(BSTR _arg1);
391   HRESULT put_brushSupportLevel(long pbrushSupportLevel);
392   HRESULT get_brushSupportLevel([out] long* pbrushSupportLevel);
393   HRESULT put_minInputSendInterval(long pminInputSendInterval);
394   HRESULT get_minInputSendInterval([out] long* pminInputSendInterval);
395   HRESULT put_InputEventsAtOnce(long pinputEventsAtOnce);
396   HRESULT get_InputEventsAtOnce([out] long* pinputEventsAtOnce);
397   HRESULT put_maxEventCount(long pmaxEventCount);
398   HRESULT get_maxEventCount([out] long* pmaxEventCount);
399   HRESULT put_keepAliveInterval(long pkeepAliveInterval);
400   HRESULT get_keepAliveInterval([out] long* pkeepAliveInterval);
401   HRESULT put_shutdownTimeout(long pshutdownTimeout);
402   HRESULT get_shutdownTimeout([out] long* pshutdownTimeout);
403   HRESULT put_overallConnectionTimeout(long poverallConnectionTimeout);
404   HRESULT get_overallConnectionTimeout([out] long* poverallConnectionTimeout);
405   HRESULT put_singleConnectionTimeout(long psingleConnectionTimeout);
406   HRESULT get_singleConnectionTimeout([out] long* psingleConnectionTimeout);
407   HRESULT put_KeyboardType(long pkeyboardType);
408   HRESULT get_KeyboardType([out] long* pkeyboardType);
409   HRESULT put_KeyboardSubType(long pkeyboardSubType);
410   HRESULT get_KeyboardSubType([out] long* pkeyboardSubType);
411   HRESULT put_KeyboardFunctionKey(long pkeyboardFunctionKey);
412   HRESULT get_KeyboardFunctionKey([out] long* pkeyboardFunctionKey);
413   HRESULT put_WinceFixedPalette(long pwinceFixedPalette);
414   HRESULT get_WinceFixedPalette([out] long* pwinceFixedPalette);
415   HRESULT put_ConnectToServerConsole(VARIANT_BOOL pConnectToConsole);
416   HRESULT get_ConnectToServerConsole([out] VARIANT_BOOL* pConnectToConsole);
417   HRESULT put_BitmapPersistence(long pbitmapPersistence);
418   HRESULT get_BitmapPersistence([out] long* pbitmapPersistence);
419   HRESULT put_MinutesToIdleTimeout(long pminutesToIdleTimeout);
420   HRESULT get_MinutesToIdleTimeout([out] long* pminutesToIdleTimeout);
421   HRESULT put_SmartSizing(VARIANT_BOOL pfSmartSizing);
422   HRESULT get_SmartSizing([out] VARIANT_BOOL* pfSmartSizing);
423   HRESULT put_RdpdrLocalPrintingDocName(BSTR pLocalPrintingDocName);
424   HRESULT get_RdpdrLocalPrintingDocName([out] BSTR* pLocalPrintingDocName);
425   HRESULT put_RdpdrClipCleanTempDirString(BSTR clipCleanTempDirString);
426   HRESULT get_RdpdrClipCleanTempDirString([out] BSTR* clipCleanTempDirString);
427   HRESULT put_RdpdrClipPasteInfoString(BSTR clipPasteInfoString);
428   HRESULT get_RdpdrClipPasteInfoString([out] BSTR* clipPasteInfoString);
429   HRESULT put_ClearTextPassword(BSTR _arg1);
430   HRESULT put_DisplayConnectionBar(VARIANT_BOOL pDisplayConnectionBar);
431   HRESULT get_DisplayConnectionBar([out] VARIANT_BOOL* pDisplayConnectionBar);
432   HRESULT put_PinConnectionBar(VARIANT_BOOL pPinConnectionBar);
433   HRESULT get_PinConnectionBar([out] VARIANT_BOOL* pPinConnectionBar);
434   HRESULT put_GrabFocusOnConnect(VARIANT_BOOL pfGrabFocusOnConnect);
435   HRESULT get_GrabFocusOnConnect([out] VARIANT_BOOL* pfGrabFocusOnConnect);
436   HRESULT put_LoadBalanceInfo(BSTR pLBInfo);
437   HRESULT get_LoadBalanceInfo([out] BSTR* pLBInfo);
438   HRESULT put_RedirectDrives(VARIANT_BOOL pRedirectDrives);
439   HRESULT get_RedirectDrives([out] VARIANT_BOOL* pRedirectDrives);
440   HRESULT put_RedirectPrinters(VARIANT_BOOL pRedirectPrinters);
441   HRESULT get_RedirectPrinters([out] VARIANT_BOOL* pRedirectPrinters);
442   HRESULT put_RedirectPorts(VARIANT_BOOL pRedirectPorts);
443   HRESULT get_RedirectPorts([out] VARIANT_BOOL* pRedirectPorts);
444   HRESULT put_RedirectSmartCards(VARIANT_BOOL pRedirectSmartCards);
445   HRESULT get_RedirectSmartCards([out] VARIANT_BOOL* pRedirectSmartCards);
446   HRESULT put_BitmapVirtualCache16BppSize(long pBitmapVirtualCache16BppSize);
447   HRESULT get_BitmapVirtualCache16BppSize([out] long* pBitmapVirtualCache16BppSize);
448   HRESULT put_BitmapVirtualCache24BppSize(long pBitmapVirtualCache24BppSize);
449   HRESULT get_BitmapVirtualCache24BppSize([out] long* pBitmapVirtualCache24BppSize);
450   HRESULT put_PerformanceFlags(long pDisableList);
451   HRESULT get_PerformanceFlags([out] long* pDisableList);
452   HRESULT put_ConnectWithEndpoint(VARIANT* _arg1);
453   HRESULT put_NotifyTSPublicKey(VARIANT_BOOL pfNotify);
454   HRESULT get_NotifyTSPublicKey([out] VARIANT_BOOL* pfNotify);
455 };
456 
457 interface IMsRdpClientSecuredSettings : IMsTscSecuredSettings {
458   HRESULT put_KeyboardHookMode(long pkeyboardHookMode);
459   HRESULT get_KeyboardHookMode([out] long* pkeyboardHookMode);
460   HRESULT put_AudioRedirectionMode(long pAudioRedirectionMode);
461   HRESULT get_AudioRedirectionMode([out] long* pAudioRedirectionMode);
462 };
463 
464 interface IMsRdpClient : IMsTscAx {
465   HRESULT put_ColorDepth(long pcolorDepth);
466   HRESULT get_ColorDepth([out] long* pcolorDepth);
467   HRESULT get_AdvancedSettings2([out] IMsRdpClientAdvancedSettings** ppAdvSettings);
468   HRESULT get_SecuredSettings2([out] IMsRdpClientSecuredSettings** ppSecuredSettings);
469   HRESULT get_ExtendedDisconnectReason([out] ExtendedDisconnectReasonCode* pExtendedDisconnectReason);
470   HRESULT put_FullScreen(VARIANT_BOOL pfFullScreen);
471   HRESULT get_FullScreen([out] VARIANT_BOOL* pfFullScreen);
472   HRESULT SetVirtualChannelOptions(BSTR chanName, long chanOptions);
473   HRESULT GetVirtualChannelOptions(BSTR chanName, [out] long* pChanOptions);
474   HRESULT RequestClose([out] ControlCloseStatus* pCloseStatus);
475 };
476 
477 interface IMsTscNonScriptable : IUnknown {
478   HRESULT put_ClearTextPassword(BSTR _arg1);
479   HRESULT put_PortablePassword(BSTR pPortablePass);
480   HRESULT get_PortablePassword([out] BSTR* pPortablePass);
481   HRESULT put_PortableSalt(BSTR pPortableSalt);
482   HRESULT get_PortableSalt([out] BSTR* pPortableSalt);
483   HRESULT put_BinaryPassword(BSTR pBinaryPassword);
484   HRESULT get_BinaryPassword([out] BSTR* pBinaryPassword);
485   HRESULT put_BinarySalt(BSTR pSalt);
486   HRESULT get_BinarySalt([out] BSTR* pSalt);
487   HRESULT ResetPassword();
488 };
489 
490 interface IMsRdpClientNonScriptable : IMsTscNonScriptable {
491   HRESULT NotifyRedirectDeviceChange(UINT_PTR wParam, LONG_PTR lParam);
492   HRESULT SendKeys(long numKeys, VARIANT_BOOL* pbArrayKeyUp, long* plKeyData);
493 };
494 
495 interface IMsRdpClientAdvancedSettings2 : IMsRdpClientAdvancedSettings {
496   HRESULT get_CanAutoReconnect([out] VARIANT_BOOL* pfCanAutoReconnect);
497   HRESULT put_EnableAutoReconnect(VARIANT_BOOL pfEnableAutoReconnect);
498   HRESULT get_EnableAutoReconnect([out] VARIANT_BOOL* pfEnableAutoReconnect);
499   HRESULT put_MaxReconnectAttempts(long pMaxReconnectAttempts);
500   HRESULT get_MaxReconnectAttempts([out] long* pMaxReconnectAttempts);
501 };
502 
503 interface IMsRdpClient2 : IMsRdpClient {
504   HRESULT get_AdvancedSettings3([out] IMsRdpClientAdvancedSettings2** ppAdvSettings);
505   HRESULT put_ConnectedStatusText(BSTR pConnectedStatusText);
506   HRESULT get_ConnectedStatusText([out] BSTR* pConnectedStatusText);
507 };
508 
509 interface IMsRdpClientAdvancedSettings3 : IMsRdpClientAdvancedSettings2 {
510   HRESULT put_ConnectionBarShowMinimizeButton(VARIANT_BOOL pfShowMinimize);
511   HRESULT get_ConnectionBarShowMinimizeButton([out] VARIANT_BOOL* pfShowMinimize);
512   HRESULT put_ConnectionBarShowRestoreButton(VARIANT_BOOL pfShowRestore);
513   HRESULT get_ConnectionBarShowRestoreButton([out] VARIANT_BOOL* pfShowRestore);
514 };
515 
516 interface IMsRdpClient3 : IMsRdpClient2 {
517   HRESULT get_AdvancedSettings4([out] IMsRdpClientAdvancedSettings3** ppAdvSettings);
518 };
519 
520 interface IMsRdpClientAdvancedSettings4 : IMsRdpClientAdvancedSettings3 {
521   HRESULT put_AuthenticationLevel(UINT puiAuthLevel);
522   HRESULT get_AuthenticationLevel([out] UINT* puiAuthLevel);
523 };
524 
525 interface IMsRdpClient4 : IMsRdpClient3 {
526   HRESULT get_AdvancedSettings5([out] IMsRdpClientAdvancedSettings4** ppAdvSettings);
527 };
528 
529 interface IMsRdpClientNonScriptable2 : IMsRdpClientNonScriptable {
530   HRESULT put_UIParentWindowHandle(LPVOID phwndUIParentWindowHandle);
531   HRESULT get_UIParentWindowHandle([out] LPVOID* phwndUIParentWindowHandle);
532 };
533 
534 interface IMsRdpClientTransportSettings : IDispatch {
535   HRESULT put_GatewayHostname(BSTR pProxyHostname);
536   HRESULT get_GatewayHostname([out] BSTR* pProxyHostname);
537   HRESULT put_GatewayUsageMethod(ULONG pulProxyUsageMethod);
538   HRESULT get_GatewayUsageMethod([out] ULONG* pulProxyUsageMethod);
539   HRESULT put_GatewayProfileUsageMethod(ULONG pulProxyProfileUsageMethod);
540   HRESULT get_GatewayProfileUsageMethod([out] ULONG* pulProxyProfileUsageMethod);
541   HRESULT put_GatewayCredsSource(ULONG pulProxyCredsSource);
542   HRESULT get_GatewayCredsSource([out] ULONG* pulProxyCredsSource);
543   HRESULT put_GatewayUserSelectedCredsSource(ULONG pulProxyCredsSource);
544   HRESULT get_GatewayUserSelectedCredsSource([out] ULONG* pulProxyCredsSource);
545   HRESULT get_GatewayIsSupported([out] long* pfProxyIsSupported);
546   HRESULT get_GatewayDefaultUsageMethod([out] ULONG* pulProxyDefaultUsageMethod);
547 };
548 
549 interface IMsRdpClientAdvancedSettings5 : IMsRdpClientAdvancedSettings4 {
550   HRESULT put_RedirectClipboard(VARIANT_BOOL pfRedirectClipboard);
551   HRESULT get_RedirectClipboard([out] VARIANT_BOOL* pfRedirectClipboard);
552   HRESULT put_AudioRedirectionMode(UINT puiAudioRedirectionMode);
553   HRESULT get_AudioRedirectionMode([out] UINT* puiAudioRedirectionMode);
554   HRESULT put_ConnectionBarShowPinButton(VARIANT_BOOL pfShowPin);
555   HRESULT get_ConnectionBarShowPinButton([out] VARIANT_BOOL* pfShowPin);
556   HRESULT put_PublicMode(VARIANT_BOOL pfPublicMode);
557   HRESULT get_PublicMode([out] VARIANT_BOOL* pfPublicMode);
558   HRESULT put_RedirectDevices(VARIANT_BOOL pfRedirectPnPDevices);
559   HRESULT get_RedirectDevices([out] VARIANT_BOOL* pfRedirectPnPDevices);
560   HRESULT put_RedirectPOSDevices(VARIANT_BOOL pfRedirectPOSDevices);
561   HRESULT get_RedirectPOSDevices([out] VARIANT_BOOL* pfRedirectPOSDevices);
562   HRESULT put_BitmapVirtualCache32BppSize(long pBitmapVirtualCache32BppSize);
563   HRESULT get_BitmapVirtualCache32BppSize([out] long* pBitmapVirtualCache32BppSize);
564 };
565 
566 interface ITSRemoteProgram : IDispatch {
567   HRESULT put_RemoteProgramMode(VARIANT_BOOL pvboolRemoteProgramMode);
568   HRESULT get_RemoteProgramMode([out] VARIANT_BOOL* pvboolRemoteProgramMode);
569   HRESULT ServerStartProgram(BSTR bstrExecutablePath, BSTR bstrFilePath, BSTR bstrWorkingDirectory, VARIANT_BOOL vbExpandEnvVarInWorkingDirectoryOnServer, BSTR bstrArguments, VARIANT_BOOL vbExpandEnvVarInArgumentsOnServer);
570 };
571 
572 interface IMsRdpClientShell : IDispatch {
573   HRESULT Launch();
574   HRESULT put_RdpFileContents(BSTR pszRdpFile);
575   HRESULT get_RdpFileContents([out] BSTR* pszRdpFile);
576   HRESULT SetRdpProperty(BSTR szProperty, VARIANT Value);
577   HRESULT GetRdpProperty(BSTR szProperty, [out] VARIANT* pValue);
578   HRESULT get_IsRemoteProgramClientInstalled([out] VARIANT_BOOL* pbClientInstalled);
579   HRESULT put_PublicMode(VARIANT_BOOL pfPublicMode);
580   HRESULT get_PublicMode([out] VARIANT_BOOL* pfPublicMode);
581   HRESULT ShowTrustedSitesManagementDialog();
582 };
583 
584 interface IMsRdpClient5 : IMsRdpClient4 {
585   HRESULT get_TransportSettings([out] IMsRdpClientTransportSettings** ppXportSet);
586   HRESULT get_AdvancedSettings6([out] IMsRdpClientAdvancedSettings5** ppAdvSettings);
587   HRESULT GetErrorDescription(UINT disconnectReason, UINT ExtendedDisconnectReason, [out] BSTR* pBstrErrorMsg);
588   HRESULT get_RemoteProgram([out] ITSRemoteProgram** ppRemoteProgram);
589   HRESULT get_MsRdpClientShell([out] IMsRdpClientShell** ppLauncher);
590 };
591 
592 interface IMsRdpDevice : IUnknown {
593   HRESULT get_DeviceInstanceId([out] BSTR* pDevInstanceId);
594   HRESULT get_FriendlyName([out] BSTR* pFriendlyName);
595   HRESULT get_DeviceDescription([out] BSTR* pDeviceDescription);
596   HRESULT put_RedirectionState(VARIANT_BOOL pvboolRedirState);
597   HRESULT get_RedirectionState([out] VARIANT_BOOL* pvboolRedirState);
598 };
599 
600 interface IMsRdpDeviceCollection : IUnknown {
601   HRESULT RescanDevices(VARIANT_BOOL vboolDynRedir);
602   HRESULT get_DeviceByIndex(ULONG index, [out] IMsRdpDevice** ppDevice);
603   HRESULT get_DeviceById(BSTR devInstanceId, [out] IMsRdpDevice** ppDevice);
604   HRESULT get_DeviceCount([out] ULONG* pDeviceCount);
605 };
606 
607 interface IMsRdpDrive : IUnknown {
608   HRESULT get_Name([out] BSTR* pName);
609   HRESULT put_RedirectionState(VARIANT_BOOL pvboolRedirState);
610   HRESULT get_RedirectionState([out] VARIANT_BOOL* pvboolRedirState);
611 };
612 
613 interface IMsRdpDriveCollection : IUnknown {
614   HRESULT RescanDrives(VARIANT_BOOL vboolDynRedir);
615   HRESULT get_DriveByIndex(ULONG index, [out] IMsRdpDrive** ppDevice);
616   HRESULT get_DriveCount([out] ULONG* pDriveCount);
617 };
618 
619 interface IMsRdpClientNonScriptable3 : IMsRdpClientNonScriptable2 {
620   HRESULT put_ShowRedirectionWarningDialog(VARIANT_BOOL pfShowRdrDlg);
621   HRESULT get_ShowRedirectionWarningDialog([out] VARIANT_BOOL* pfShowRdrDlg);
622   HRESULT put_PromptForCredentials(VARIANT_BOOL pfPrompt);
623   HRESULT get_PromptForCredentials([out] VARIANT_BOOL* pfPrompt);
624   HRESULT put_NegotiateSecurityLayer(VARIANT_BOOL pfNegotiate);
625   HRESULT get_NegotiateSecurityLayer([out] VARIANT_BOOL* pfNegotiate);
626   HRESULT put_EnableCredSspSupport(VARIANT_BOOL pfEnableSupport);
627   HRESULT get_EnableCredSspSupport([out] VARIANT_BOOL* pfEnableSupport);
628   HRESULT put_RedirectDynamicDrives(VARIANT_BOOL pfRedirectDynamicDrives);
629   HRESULT get_RedirectDynamicDrives([out] VARIANT_BOOL* pfRedirectDynamicDrives);
630   HRESULT put_RedirectDynamicDevices(VARIANT_BOOL pfRedirectDynamicDevices);
631   HRESULT get_RedirectDynamicDevices([out] VARIANT_BOOL* pfRedirectDynamicDevices);
632   HRESULT get_DeviceCollection([out] IMsRdpDeviceCollection** ppDeviceCollection);
633   HRESULT get_DriveCollection([out] IMsRdpDriveCollection** ppDeviceCollection);
634   HRESULT put_WarnAboutSendingCredentials(VARIANT_BOOL pfWarn);
635   HRESULT get_WarnAboutSendingCredentials([out] VARIANT_BOOL* pfWarn);
636   HRESULT put_WarnAboutClipboardRedirection(VARIANT_BOOL pfWarn);
637   HRESULT get_WarnAboutClipboardRedirection([out] VARIANT_BOOL* pfWarn);
638   HRESULT put_ConnectionBarText(BSTR pConnectionBarText);
639   HRESULT get_ConnectionBarText([out] BSTR* pConnectionBarText);
640 };
641 
642 interface IMsRdpClientAdvancedSettings6 : IMsRdpClientAdvancedSettings5 {
643   HRESULT put_RelativeMouseMode(VARIANT_BOOL pfRelativeMouseMode);
644   HRESULT get_RelativeMouseMode([out] VARIANT_BOOL* pfRelativeMouseMode);
645   HRESULT get_AuthenticationServiceClass([out] BSTR* pbstrAuthServiceClass);
646   HRESULT put_AuthenticationServiceClass(BSTR pbstrAuthServiceClass);
647   HRESULT get_PCB([out] BSTR* bstrPCB);
648   HRESULT put_PCB(BSTR bstrPCB);
649   HRESULT put_HotKeyFocusReleaseLeft(long HotKeyFocusReleaseLeft);
650   HRESULT get_HotKeyFocusReleaseLeft([out] long* HotKeyFocusReleaseLeft);
651   HRESULT put_HotKeyFocusReleaseRight(long HotKeyFocusReleaseRight);
652   HRESULT get_HotKeyFocusReleaseRight([out] long* HotKeyFocusReleaseRight);
653   HRESULT put_EnableCredSspSupport(VARIANT_BOOL pfEnableSupport);
654   HRESULT get_EnableCredSspSupport([out] VARIANT_BOOL* pfEnableSupport);
655   HRESULT get_AuthenticationType([out] UINT* puiAuthType);
656   HRESULT put_ConnectToAdministerServer(VARIANT_BOOL pConnectToAdministerServer);
657   HRESULT get_ConnectToAdministerServer([out] VARIANT_BOOL* pConnectToAdministerServer);
658 };
659 
660 interface IMsRdpClientTransportSettings2 : IMsRdpClientTransportSettings {
661   HRESULT put_GatewayCredSharing(ULONG pulProxyCredSharing);
662   HRESULT get_GatewayCredSharing([out] ULONG* pulProxyCredSharing);
663   HRESULT put_GatewayPreAuthRequirement(ULONG pulProxyPreAuthRequirement);
664   HRESULT get_GatewayPreAuthRequirement([out] ULONG* pulProxyPreAuthRequirement);
665   HRESULT put_GatewayPreAuthServerAddr(BSTR pbstrProxyPreAuthServerAddr);
666   HRESULT get_GatewayPreAuthServerAddr([out] BSTR* pbstrProxyPreAuthServerAddr);
667   HRESULT put_GatewaySupportUrl(BSTR pbstrProxySupportUrl);
668   HRESULT get_GatewaySupportUrl([out] BSTR* pbstrProxySupportUrl);
669   HRESULT put_GatewayEncryptedOtpCookie(BSTR pbstrEncryptedOtpCookie);
670   HRESULT get_GatewayEncryptedOtpCookie([out] BSTR* pbstrEncryptedOtpCookie);
671   HRESULT put_GatewayEncryptedOtpCookieSize(ULONG pulEncryptedOtpCookieSize);
672   HRESULT get_GatewayEncryptedOtpCookieSize([out] ULONG* pulEncryptedOtpCookieSize);
673   HRESULT put_GatewayUsername(BSTR pProxyUsername);
674   HRESULT get_GatewayUsername([out] BSTR* pProxyUsername);
675   HRESULT put_GatewayDomain(BSTR pProxyDomain);
676   HRESULT get_GatewayDomain([out] BSTR* pProxyDomain);
677   HRESULT put_GatewayPassword(BSTR _arg1);
678 };
679 
680 interface IMsRdpClient6 : IMsRdpClient5 {
681   HRESULT get_AdvancedSettings7([out] IMsRdpClientAdvancedSettings6** ppAdvSettings);
682   HRESULT get_TransportSettings2([out] IMsRdpClientTransportSettings2** ppXportSet2);
683 };
684 
685 interface IMsRdpClientNonScriptable4 : IMsRdpClientNonScriptable3 {
686   HRESULT put_RedirectionWarningType(RedirectionWarningType pWrnType);
687   HRESULT get_RedirectionWarningType([out] RedirectionWarningType* pWrnType);
688   HRESULT put_MarkRdpSettingsSecure(VARIANT_BOOL pfRdpSecure);
689   HRESULT get_MarkRdpSettingsSecure([out] VARIANT_BOOL* pfRdpSecure);
690   HRESULT put_PublisherCertificateChain(VARIANT* pVarCert);
691   HRESULT get_PublisherCertificateChain([out] VARIANT* pVarCert);
692   HRESULT put_WarnAboutPrinterRedirection(VARIANT_BOOL pfWarn);
693   HRESULT get_WarnAboutPrinterRedirection([out] VARIANT_BOOL* pfWarn);
694   HRESULT put_AllowCredentialSaving(VARIANT_BOOL pfAllowSave);
695   HRESULT get_AllowCredentialSaving([out] VARIANT_BOOL* pfAllowSave);
696   HRESULT put_PromptForCredsOnClient(VARIANT_BOOL pfPromptForCredsOnClient);
697   HRESULT get_PromptForCredsOnClient([out] VARIANT_BOOL* pfPromptForCredsOnClient);
698   HRESULT put_LaunchedViaClientShellInterface(VARIANT_BOOL pfLaunchedViaClientShellInterface);
699   HRESULT get_LaunchedViaClientShellInterface([out] VARIANT_BOOL* pfLaunchedViaClientShellInterface);
700   HRESULT put_TrustedZoneSite(VARIANT_BOOL pfIsTrustedZone);
701   HRESULT get_TrustedZoneSite([out] VARIANT_BOOL* pfIsTrustedZone);
702 };
703 
704 interface IMsRdpClientAdvancedSettings7 : IMsRdpClientAdvancedSettings6 {
705   HRESULT put_AudioCaptureRedirectionMode(VARIANT_BOOL pfRedir);
706   HRESULT get_AudioCaptureRedirectionMode([out] VARIANT_BOOL* pfRedir);
707   HRESULT put_VideoPlaybackMode(UINT pVideoPlaybackMode);
708   HRESULT get_VideoPlaybackMode([out] UINT* pVideoPlaybackMode);
709   HRESULT put_EnableSuperPan(VARIANT_BOOL pfEnableSuperPan);
710   HRESULT get_EnableSuperPan([out] VARIANT_BOOL* pfEnableSuperPan);
711   HRESULT put_SuperPanAccelerationFactor(ULONG puAccelFactor);
712   HRESULT get_SuperPanAccelerationFactor([out] ULONG* puAccelFactor);
713   HRESULT put_NegotiateSecurityLayer(VARIANT_BOOL pfNegotiate);
714   HRESULT get_NegotiateSecurityLayer([out] VARIANT_BOOL* pfNegotiate);
715   HRESULT put_AudioQualityMode(UINT pAudioQualityMode);
716   HRESULT get_AudioQualityMode([out] UINT* pAudioQualityMode);
717   HRESULT put_RedirectDirectX(VARIANT_BOOL pfRedirectDirectX);
718   HRESULT get_RedirectDirectX([out] VARIANT_BOOL* pfRedirectDirectX);
719   HRESULT put_NetworkConnectionType(UINT pConnectionType);
720   HRESULT get_NetworkConnectionType([out] UINT* pConnectionType);
721 };
722 
723 interface IMsRdpClientTransportSettings3 : IMsRdpClientTransportSettings2 {
724   HRESULT put_GatewayCredSourceCookie(ULONG pulProxyCredSourceCookie);
725   HRESULT get_GatewayCredSourceCookie([out] ULONG* pulProxyCredSourceCookie);
726   HRESULT put_GatewayAuthCookieServerAddr(BSTR pbstrProxyAuthCookieServerAddr);
727   HRESULT get_GatewayAuthCookieServerAddr([out] BSTR* pbstrProxyAuthCookieServerAddr);
728   HRESULT put_GatewayEncryptedAuthCookie(BSTR pbstrEncryptedAuthCookie);
729   HRESULT get_GatewayEncryptedAuthCookie([out] BSTR* pbstrEncryptedAuthCookie);
730   HRESULT put_GatewayEncryptedAuthCookieSize(ULONG pulEncryptedAuthCookieSize);
731   HRESULT get_GatewayEncryptedAuthCookieSize([out] ULONG* pulEncryptedAuthCookieSize);
732   HRESULT put_GatewayAuthLoginPage(BSTR pbstrProxyAuthLoginPage);
733   HRESULT get_GatewayAuthLoginPage([out] BSTR* pbstrProxyAuthLoginPage);
734 };
735 
736 interface IMsRdpClientSecuredSettings2 : IMsRdpClientSecuredSettings {
737   HRESULT get_PCB([out] BSTR* bstrPCB);
738   HRESULT put_PCB(BSTR bstrPCB);
739 };
740 
741 interface ITSRemoteProgram2 : ITSRemoteProgram {
742   HRESULT put_RemoteApplicationName(BSTR _arg1);
743   HRESULT put_RemoteApplicationProgram(BSTR _arg1);
744   HRESULT put_RemoteApplicationArgs(BSTR _arg1);
745 };
746 
747 interface IMsRdpClient7 : IMsRdpClient6 {
748   HRESULT get_AdvancedSettings8([out] IMsRdpClientAdvancedSettings7** ppAdvSettings);
749   HRESULT get_TransportSettings3([out] IMsRdpClientTransportSettings3** ppXportSet3);
750   HRESULT GetStatusText(UINT statusCode, [out] BSTR* pBstrStatusText);
751   HRESULT get_SecuredSettings3([out] IMsRdpClientSecuredSettings2** ppSecuredSettings);
752   HRESULT get_RemoteProgram2([out] ITSRemoteProgram2** ppRemoteProgram);
753 };
754 
755 interface IMsRdpClientNonScriptable5 : IMsRdpClientNonScriptable4 {
756   HRESULT put_UseMultimon(VARIANT_BOOL pfUseMultimon);
757   HRESULT get_UseMultimon([out] VARIANT_BOOL* pfUseMultimon);
758   HRESULT get_RemoteMonitorCount([out] ULONG* pcRemoteMonitors);
759   HRESULT GetRemoteMonitorsBoundingBox(/*[out]*/ long* pLeft, /*[out]*/ long* pTop, /*[out]*/ long* pRight, /*[out]*/ long* pBottom);
760   HRESULT get_RemoteMonitorLayoutMatchesLocal([out] VARIANT_BOOL* pfRemoteMatchesLocal);
761   HRESULT put_DisableConnectionBar(VARIANT_BOOL _arg1);
762   HRESULT put_DisableRemoteAppCapsCheck(VARIANT_BOOL pfDisableRemoteAppCapsCheck);
763   HRESULT get_DisableRemoteAppCapsCheck([out] VARIANT_BOOL* pfDisableRemoteAppCapsCheck);
764   HRESULT put_WarnAboutDirectXRedirection(VARIANT_BOOL pfWarn);
765   HRESULT get_WarnAboutDirectXRedirection([out] VARIANT_BOOL* pfWarn);
766   HRESULT put_AllowPromptingForCredentials(VARIANT_BOOL pfAllow);
767   HRESULT get_AllowPromptingForCredentials([out] VARIANT_BOOL* pfAllow);
768 };
769 
770 interface IMsRdpPreferredRedirectionInfo : IUnknown {
771   HRESULT put_UseRedirectionServerName(VARIANT_BOOL pVal);
772   HRESULT get_UseRedirectionServerName([out] VARIANT_BOOL* pVal);
773 };
774 
775 interface IMsRdpExtendedSettings : IUnknown {
776   HRESULT put_Property(BSTR bstrPropertyName, VARIANT* pValue);
777   HRESULT get_Property(BSTR bstrPropertyName, [out] VARIANT* pValue);
778 };
779 
780 interface IMsRdpClientAdvancedSettings8 : IMsRdpClientAdvancedSettings7 {
781   HRESULT put_BandwidthDetection(VARIANT_BOOL pfAutodetect);
782   HRESULT get_BandwidthDetection([out] VARIANT_BOOL* pfAutodetect);
783   HRESULT put_ClientProtocolSpec(ClientSpec pClientMode);
784   HRESULT get_ClientProtocolSpec([out] ClientSpec* pClientMode);
785 };
786 
787 interface IMsRdpClient8 : IMsRdpClient7 {
788   HRESULT SendRemoteAction(RemoteSessionActionType actionType);
789   HRESULT get_AdvancedSettings9([out] IMsRdpClientAdvancedSettings8** ppAdvSettings);
790   HRESULT Reconnect(ULONG ulWidth, ULONG ulHeight, [out] ControlReconnectStatus* pReconnectStatus);
791 };
792 
793 interface IRemoteDesktopClientEvents : IDispatch {
794   HRESULT OnConnecting();
795   HRESULT OnConnected();
796   HRESULT OnLoginCompleted();
797   HRESULT OnDisconnected(long disconnectReason, long ExtendedDisconnectReason, BSTR disconnectErrorMessage);
798   HRESULT OnStatusChanged(long statusCode, BSTR statusMessage);
799   HRESULT OnAutoReconnecting(long disconnectReason, long ExtendedDisconnectReason, BSTR disconnectErrorMessage, VARIANT_BOOL networkAvailable, long attemptCount, long maxAttemptCount);
800   HRESULT OnAutoReconnected();
801   HRESULT OnDialogDisplaying();
802   HRESULT OnDialogDismissed();
803   HRESULT OnNetworkStatusChanged(ULONG qualityLevel, long bandwidth, long rtt);
804   HRESULT OnAdminMessageReceived(BSTR adminMessage);
805   HRESULT OnKeyCombinationPressed(long keyCombination);
806   HRESULT OnRemoteDesktopSizeChanged(long width, long height);
807   HRESULT OnTouchPointerCursorMoved(long x, long y);
808 };
809 
810 interface IRemoteDesktopClientSettings : IDispatch {
811   HRESULT ApplySettings(BSTR RdpFileContents);
812   HRESULT RetrieveSettings([out] BSTR* RdpFileContents);
813   HRESULT GetRdpProperty(BSTR propertyName, [out] VARIANT* Value);
814   HRESULT SetRdpProperty(BSTR propertyName, VARIANT Value);
815 };
816 
817 interface IRemoteDesktopClientActions : IDispatch {
818   HRESULT SuspendScreenUpdates();
819   HRESULT ResumeScreenUpdates();
820   HRESULT ExecuteRemoteAction(RemoteActionType remoteAction);
821   HRESULT GetSnapshot(SnapshotEncodingType snapshotEncoding, SnapshotFormatType snapshotFormat, ULONG snapshotWidth, ULONG snapshotHeight, [out] BSTR* snapshotData);
822 };
823 
824 interface IRemoteDesktopClientTouchPointer : IDispatch {
825   HRESULT put_Enabled(VARIANT_BOOL Enabled);
826   HRESULT get_Enabled([out] VARIANT_BOOL* Enabled);
827   HRESULT put_EventsEnabled(VARIANT_BOOL EventsEnabled);
828   HRESULT get_EventsEnabled([out] VARIANT_BOOL* EventsEnabled);
829   HRESULT put_PointerSpeed(ULONG PointerSpeed);
830   HRESULT get_PointerSpeed([out] ULONG* PointerSpeed);
831 };
832 
833 interface IRemoteDesktopClient : IDispatch {
834   HRESULT Connect();
835   HRESULT Disconnect();
836   HRESULT Reconnect(ULONG width, ULONG height);
837   HRESULT get_Settings([out] IRemoteDesktopClientSettings** Settings);
838   HRESULT get_Actions([out] IRemoteDesktopClientActions** Actions);
839   HRESULT get_TouchPointer([out] IRemoteDesktopClientTouchPointer** TouchPointer);
840   HRESULT DeleteSavedCredentials(BSTR serverName);
841 };
842 
843 interface IMsRdpSessionManager : IUnknown {
844   HRESULT StartRemoteApplication(SAFEARRAY* psaCreds, SAFEARRAY* psaParams, long lFlags);
845   HRESULT GetProcessId([out] ULONG* pulProcessId);
846 };
847 
848 HRESULT DllGetClassObject(REFCLSID rclsid, [iid] REFIID riid, [out] COM_INTERFACE_PTR* ppv);
849