Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1959 lines
81 KiB

  1. /****************************************************************************/
  2. /* wui.h */
  3. /* */
  4. /* UI class */
  5. /* Serves as the root class of the core. Provides UI functionality. */
  6. /* (windows and scroll bars) */
  7. /* */
  8. /* Copyright(C) Microsoft Corporation 1997-1998 */
  9. /****************************************************************************/
  10. #ifndef _H_WUI
  11. #define _H_WUI
  12. #include <adcgdata.h>
  13. #include <winsock.h>
  14. #if ! defined (OS_WINCE)
  15. #include <ctfutb.h>
  16. #endif
  17. #include "autil.h"
  18. #include "aco.h"
  19. #include "cd.h"
  20. #include "cchan.h"
  21. #include "drapi.h"
  22. #ifdef USE_BBAR
  23. #include "bbar.h"
  24. #endif
  25. #include "arcdlg.h"
  26. class CCLX;
  27. class CTD;
  28. class CCD;
  29. class CUH;
  30. #include "auierr.h"
  31. #include "uidata.h"
  32. #include <wuiids.h>
  33. //
  34. // Disabled feature list (for performance)
  35. //
  36. #include "tsperf.h"
  37. /****************************************************************************/
  38. /* Structure: UI_DATA */
  39. /* */
  40. /* Description: Component data in the User Interface */
  41. /****************************************************************************/
  42. #define UI_FILENAME_MAX_LENGTH 15
  43. typedef enum {
  44. DC_LANG_UNKNOWN,
  45. DC_LANG_JAPANESE,
  46. DC_LANG_KOREAN,
  47. DC_LANG_CHINESE_TRADITIONAL,
  48. DC_LANG_CHINESE_SIMPLIFIED
  49. } DCLANGID;
  50. //
  51. // From auiapi.h
  52. //
  53. #define UI_SHUTDOWN_SUCCESS 1
  54. #define UI_SHUTDOWN_FAILURE 0
  55. #define UI_MAIN_CLASS _T("UIMainClass")
  56. #define UI_CONTAINER_CLASS _T("UIContainerClass")
  57. /****************************************************************************/
  58. /* Constants used to set the 16-bit message queue size. Windows sets a */
  59. /* limit of 120 and has a default of 8. */
  60. /* We try to set to UI_MAX_MESSAGE_Q_SIZE. If this fails we reduce the */
  61. /* requested size by UI_DEFAULT_MESSAGE_Q_SIZE. This continues until the */
  62. /* queue size is set or the requested size drops below */
  63. /* UI_MIN_MESSAGE_Q_SIZE. */
  64. /****************************************************************************/
  65. #define UI_MAX_MESSAGE_Q_SIZE 120
  66. #define UI_MIN_MESSAGE_Q_SIZE 40
  67. #define UI_DEFAULT_MESSAGE_Q_SIZE 8
  68. #define UI_MESSAGE_Q_SIZE_DECREMENT 10
  69. /****************************************************************************/
  70. /* Max size of Window Pos string to be read in */
  71. /****************************************************************************/
  72. #define UI_WINDOW_POSITION_STR_LEN 256
  73. #define UI_FRAME_TITLE_RESOURCE_MAX_LENGTH 256
  74. #define UI_DISCONNECT_RESOURCE_MAX_LENGTH 256
  75. #define UI_BUILDNUMBER_STRING_MAX_LENGTH 256
  76. #define UI_VERSION_STRING_MAX_LENGTH 256
  77. #define UI_DISPLAY_STRING_MAX_LENGTH 256
  78. #define UI_INTEGER_STRING_MAX_LENGTH 10
  79. /****************************************************************************/
  80. /* */
  81. /****************************************************************************/
  82. #define UI_FONT_SIZE 40
  83. #define UI_FONT_WEIGHT FW_BOLD
  84. #define UI_FONT_FACENAME _T("Comic Sans MS")
  85. #define UI_RGB_BLACK RGB(0x00, 0x00, 0x00)
  86. #define UI_RGB_RED RGB(0xFF, 0x00, 0x00)
  87. #define UI_RGB_GREEN RGB(0x00, 0xFF, 0x00)
  88. #define UI_RGB_BLUE RGB(0x00, 0x00, 0xFF)
  89. #define UI_RGB_WHITE RGB(0xFF, 0xFF, 0xFF)
  90. #ifdef DC_DEBUG
  91. #define UI_NUMBER_STRING_MAX_LENGTH ( 18 * sizeof (DCTCHAR) )
  92. #endif /* DC_DEBUG */
  93. /****************************************************************************/
  94. /* UI status constants */
  95. /****************************************************************************/
  96. #define UI_STATUS_INITIALIZING 1
  97. #define UI_STATUS_DISCONNECTED 2
  98. #define UI_STATUS_CONNECT_PENDING_DNS 3
  99. #define UI_STATUS_CONNECT_PENDING 4
  100. #define UI_STATUS_CONNECTED 5
  101. #define UI_STATUS_PENDING_CONNECTENDPOINT 6
  102. /****************************************************************************/
  103. /* Accelerator passthrough constants */
  104. /****************************************************************************/
  105. #define UI_ACCELERATOR_PASSTHROUGH_ENABLED 1
  106. #define UI_ACCELERATOR_PASSTHROUGH_DISABLED 2
  107. /****************************************************************************/
  108. /* Screen mode constants */
  109. /****************************************************************************/
  110. #define UI_WINDOWED 1
  111. #define UI_FULLSCREEN 2
  112. /****************************************************************************/
  113. /* Disconnect dialog return codes */
  114. /****************************************************************************/
  115. #define UI_DISCONNECT_RC_NO 0
  116. #define UI_DISCONNECT_RC_YES 1
  117. /****************************************************************************/
  118. /* Scrollbar constants */
  119. /****************************************************************************/
  120. #define UI_NO_SCROLLBARS 0
  121. #define UI_BOTTOM_SCROLLBAR 1
  122. #define UI_RIGHT_SCROLLBAR 2
  123. #define UI_BOTH_SCROLLBARS 3
  124. /****************************************************************************/
  125. /* Scroll distances. */
  126. /****************************************************************************/
  127. #define UI_SCROLL_HORZ_PAGE_DISTANCE (_UI.mainWindowClientSize.width / 2);
  128. #define UI_SCROLL_VERT_PAGE_DISTANCE (_UI.mainWindowClientSize.height / 2);
  129. #define UI_SCROLL_LINE_DISTANCE 10
  130. #define UI_SMOOTH_SCROLL_STEP 4
  131. /****************************************************************************/
  132. /* Registry default settings */
  133. /****************************************************************************/
  134. #define UI_NUMBER_FIELDS_TO_READ 6
  135. #define UI_WINDOW_POSITION_INI_FORMAT _T("%u,%u,%d,%d,%d,%d")
  136. #define UI_ALT_DOWN_MASK 0x8000
  137. /****************************************************************************/
  138. /* Connection timer ID */
  139. /****************************************************************************/
  140. #define UI_TIMER_OVERALL_CONN 200
  141. #define UI_TIMER_SINGLE_CONN 201
  142. #define UI_TIMER_SHUTDOWN 202
  143. #define UI_TIMER_LICENSING 203
  144. #define UI_TIMER_IDLEINPUTTIMEOUT 204
  145. #define UI_TIMER_BBAR_UNHIDE_TIMERID 205
  146. #define UI_TIMER_DISCONNECT_TIMERID 206
  147. #define UI_WSA_GETHOSTBYNAME (DUC_UI_MESSAGE_BASE + 1)
  148. #define MIN_MINS_TOIDLETIMEOUT 0 // 0 means no timer
  149. #define MAX_MINS_TOIDLETIMEOUT (4*60) // 4 hours maximum
  150. //
  151. // Defines time interval allowed between DeactivateAllPDU and a disconnection
  152. // or reconnection (in milliseconds)
  153. //
  154. // Prevents a minor problem if the server sends a deactivate all but then
  155. // doesn't actually disconnect us (e.g can happen if server is powered down).
  156. // The problem is made serious because while we are deactivated there is no
  157. // way to send network traffic so nothing will cause a network disconnect.
  158. //
  159. // See whistler bug 173679
  160. //
  161. // NOTE: the timeout must be bigger than the shadow timeout as during
  162. // shadow negotiation it is valid for the client to remain in the
  163. // deactivated state for 60 seconds.
  164. //
  165. #define UI_TOTAL_DISCONNECTION_TIMEOUT 75*1000
  166. //
  167. // Placement is important
  168. //
  169. #include "objs.h"
  170. class CUI
  171. {
  172. public:
  173. CUI();
  174. ~CUI();
  175. /****************************************************************************/
  176. /* UI DATA */
  177. /* */
  178. /* Description: Component data in the User Interface */
  179. /****************************************************************************/
  180. UI_DATA _UI;
  181. private:
  182. /****************************************************************************/
  183. /* UI Internal functions */
  184. /* */
  185. /* Description: Component data in the User Interface */
  186. /****************************************************************************/
  187. DCSIZE DCINTERNAL UIGetMaximizedWindowSize(DCVOID);
  188. void DCINTERNAL UIUpdateSessionInfo(TCHAR *, TCHAR *);
  189. static VOID near FastRect(HDC, int, int, int, int);
  190. static DWORD near RGB2BGR(DWORD);
  191. void DCINTERNAL UIRecalcMaxMainWindowSize();
  192. void DCINTERNAL UIConnectWithCurrentParams(CONNECTIONMODE);
  193. void DCINTERNAL UIRecalculateScrollbars();
  194. void DCINTERNAL UIMoveContainerWindow();
  195. unsigned DCINTERNAL UICalculateVisibleScrollBars(unsigned, unsigned);
  196. void DCINTERNAL UIUpdateScreenMode(BOOL fGrabFocus);
  197. void DCINTERNAL UIShadowBitmapSettingChanged();
  198. void DCINTERNAL UISmoothScrollingSettingChanged();
  199. void DCINTERNAL UISetMinMaxPlacement();
  200. void DCINTERNAL UIInitiateDisconnection();
  201. UINT32 DCINTERNAL UIGetKeyboardLayout();
  202. BOOL DCINTERNAL UIValidateCurrentParams(CONNECTIONMODE connMode);
  203. unsigned DCINTERNAL UISetScrollInfo(int, LPSCROLLINFO, BOOL);
  204. void DCINTERNAL UISetConnectionStatus(unsigned);
  205. void DCINTERNAL UIInitializeDefaultSettings();
  206. void DCINTERNAL UIRedirectConnection();
  207. VOID DCINTERNAL UIStartConnectWithConnectedEndpoint();
  208. void DCINTERNAL UIStartDNSLookup();
  209. void DCINTERNAL UITryNextConnection();
  210. void DCINTERNAL UIGoDisconnected(unsigned disconnectCode, BOOL fFireEvent);
  211. BOOL DCINTERNAL UIValidateServerName(TCHAR *);
  212. void DCINTERNAL UIFinishDisconnection();
  213. BOOL IsConnectingToOwnAddress(u_long connectAddr);
  214. BOOL IsRunningOnPTS();
  215. BOOL InitInputIdleTimer(LONG minsToTimeout);
  216. VOID UISetBBarUnhideTimer(LONG x, LONG y);
  217. BOOL UIIsTSOnWin2KOrGreater( VOID );
  218. BOOL UIFreeAsyncDNSBuffer();
  219. public:
  220. //
  221. // UI API functions
  222. //
  223. // Description: Component data in the User Interface
  224. //
  225. LRESULT CALLBACK UIMainWndProc (HWND hwnd, UINT message,
  226. WPARAM wParam, LPARAM lParam);
  227. static LRESULT CALLBACK UIStaticMainWndProc (HWND hwnd, UINT message,
  228. WPARAM wParam, LPARAM lParam);
  229. LRESULT CALLBACK UIContainerWndProc (HWND hwndContainer, UINT message,
  230. WPARAM wParam, LPARAM lParam);
  231. static LRESULT CALLBACK UIStaticContainerWndProc (HWND hwnd, UINT message,
  232. WPARAM wParam, LPARAM lParam);
  233. HRESULT DCAPI UI_Init(HINSTANCE hInstance,
  234. HINSTANCE hPrevInstance,
  235. HINSTANCE hResInstance,
  236. HANDLE hEvtNotifyCoreInit);
  237. HRESULT DCAPI UI_Term(DCVOID);
  238. DCVOID DCAPI UI_ToggleFullScreenMode(DCVOID);
  239. DCVOID DCAPI UI_GoFullScreen(DCVOID);
  240. DCVOID DCAPI UI_LeaveFullScreen(DCVOID);
  241. DCBOOL DCAPI UI_IsFullScreen();
  242. DCVOID DCAPI UI_ResetState();
  243. HRESULT DCAPI UI_Connect(CONNECTIONMODE);
  244. BOOL UI_UserInitiatedDisconnect(UINT discReason);
  245. BOOL UI_NotifyAxLayerCoreInit();
  246. BOOL UI_UserRequestedClose();
  247. //
  248. // Decoupled notification callbacks
  249. //
  250. DCVOID DCAPI UI_OnCoreInitialized(ULONG_PTR unused);
  251. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnCoreInitialized);
  252. DCVOID DCAPI UI_OnInputFocusGained(ULONG_PTR unused);
  253. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnInputFocusGained);
  254. DCVOID DCAPI UI_OnInputFocusLost(ULONG_PTR unused);
  255. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnInputFocusLost);
  256. DCVOID DCAPI UI_OnConnected(ULONG_PTR unused);
  257. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnConnected);
  258. DCVOID DCAPI UI_OnDisconnected(ULONG_PTR disconnectID);
  259. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnDisconnected);
  260. DCVOID DCAPI UI_OnShutDown(ULONG_PTR failID);
  261. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnShutDown);
  262. DCVOID DCAPI UI_OnDeactivateAllPDU(ULONG_PTR reason);
  263. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnDeactivateAllPDU);
  264. DCVOID DCAPI UI_OnDemandActivePDU(ULONG_PTR reason);
  265. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnDemandActivePDU);
  266. void DCAPI UI_DisplayBitmapCacheWarning(ULONG_PTR unusedParm);
  267. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_DisplayBitmapCacheWarning);
  268. void DCAPI UI_OnSecurityExchangeComplete(ULONG_PTR unused);
  269. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnSecurityExchangeComplete);
  270. void DCAPI UI_OnLicensingComplete(ULONG_PTR unused);
  271. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_OnLicensingComplete);
  272. void DCAPI UI_SetDisconnectReason(ULONG_PTR reason);
  273. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_SetDisconnectReason);
  274. DCVOID DCAPI UI_FatalError(DCINT error);
  275. #ifdef OS_WINCE
  276. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_FatalError);
  277. #endif
  278. #ifdef USE_BBAR
  279. void DCAPI UI_OnBBarHotzoneTimerFired(ULONG_PTR unused);
  280. #endif
  281. void DCAPI UI_OnDesktopSizeChange(PDCSIZE pDesktopSize);
  282. DCVOID DCAPI UI_UpdateSessionInfo(PDCWCHAR pDomain, DCUINT cbDomain,
  283. PDCWCHAR pUserName, DCUINT cbUsername,
  284. DCUINT32 SessionId);
  285. #ifdef DC_DEBUG
  286. DCVOID DCAPI UI_CoreDebugSettingChanged(DCVOID);
  287. DCVOID DCAPI UI_SetRandomFailureItem(DCUINT itemID, DCINT percent);
  288. DCINT DCAPI UI_GetRandomFailureItem(DCUINT itemID);
  289. DCVOID DCAPI UI_SetNetworkThroughput(DCUINT bytesPerSec);
  290. DCUINT DCAPI UI_GetNetworkThroughput();
  291. #endif /* DC_DEBUG */
  292. void UI_OnLoginComplete();
  293. //
  294. // Autoreconnection notification
  295. //
  296. void
  297. UI_OnAutoReconnecting(
  298. LONG discReason,
  299. LONG attemptCount,
  300. LONG maxAttemptCount,
  301. BOOL* pfContinueArc);
  302. #ifdef USE_BBAR
  303. BOOL UI_RequestMinimize();
  304. #endif
  305. #ifndef OS_WINCE
  306. void UI_HideLangBar();
  307. void UI_RestoreLangBar();
  308. #endif
  309. /********************************************************************/
  310. /* Get default langID */
  311. /********************************************************************/
  312. DCLANGID UIGetDefaultLangID();
  313. DCUINT UIGetDefaultIMEFileName(PDCTCHAR imeFileName, DCUINT Size);
  314. DCUINT UIGetIMEMappingTableName(PDCTCHAR ImeMappingTableName, DCUINT Size);
  315. VOID UIGetIMEFileName(PDCTCHAR imeFileName, DCUINT Size);
  316. VOID UIGetIMEFileName16(PDCTCHAR imeFileName, DCUINT Size);
  317. VOID DisableIME(HWND hwnd);
  318. int UI_BppToColorDepthID(int bpp);
  319. int UI_GetScreenBpp();
  320. #ifdef SMART_SIZING
  321. HRESULT DCAPI UI_SetSmartSizing(BOOL fSmartSizing);
  322. #endif // SMART_SIZING
  323. //
  324. // Virtual channel plugins to load
  325. //
  326. BOOL DCAPI UI_SetVChanAddinList(TCHAR *);
  327. PDCTCHAR DCAPI UI_GetVChanAddinList()
  328. {
  329. return _UI.pszVChanAddinDlls;
  330. }
  331. void UI_InitRdpDrSettings();
  332. void UI_CleanupLBState();
  333. //
  334. // Inline property accessors
  335. //
  336. void DCAPI UI_SetCompress(BOOL);
  337. BOOL DCAPI UI_GetCompress();
  338. /****************************************************************************/
  339. /* Name: UI_SetInstanceHandle */
  340. /* */
  341. /* Purpose: Return application hInstance */
  342. /* */
  343. /* Returns: hInstance */
  344. /****************************************************************************/
  345. void DCAPI UI_SetInstanceHandle(HINSTANCE hInstance)
  346. {
  347. DC_BEGIN_FN("UI_SetInstanceHandle");
  348. TRC_ASSERT((_UI.hInstance == 0), (TB, _T("Set instance handle twice!")));
  349. TRC_ASSERT((hInstance != 0), (TB, _T("invalid (zero) instance handle")));
  350. _UI.hInstance = hInstance;
  351. DC_END_FN();
  352. } /* UI_SetInstanceHandle */
  353. /****************************************************************************/
  354. /* Name: UI_GetInstanceHandle */
  355. /* */
  356. /* Purpose: Return application hInstance */
  357. /****************************************************************************/
  358. HINSTANCE DCAPI UI_GetInstanceHandle()
  359. {
  360. HINSTANCE rc;
  361. DC_BEGIN_FN("UI_GetInstanceHandle");
  362. TRC_ASSERT((_UI.hInstance != 0), (TB, _T("Instance handle not set")));
  363. rc = _UI.hInstance;
  364. TRC_DBG((TB, _T("Return %p"), rc));
  365. DC_END_FN();
  366. return(rc);
  367. } /* UI_GetInstanceHandle */
  368. /****************************************************************************/
  369. /* Name: UI_SetUIContainerWnd */
  370. /* */
  371. /* Purpose: Informs UT of the UI Container Window Handle. */
  372. /****************************************************************************/
  373. void DCAPI UI_SetUIContainerWindow(HWND hwndUIContainer)
  374. {
  375. DC_BEGIN_FN("UI_SetUIContainerWindow");
  376. TRC_ASSERT((hwndUIContainer != NULL),
  377. (TB, _T("Invalid (NULL) Container Window")));
  378. TRC_ASSERT((_UI.hwndUIContainer == NULL),
  379. (TB, _T("Set container window twice!")));
  380. _UI.hwndUIContainer = hwndUIContainer;
  381. DC_END_FN();
  382. } /* UI_SetUIContainerWnd */
  383. /****************************************************************************/
  384. /* Name: UI_GetUIContainerWindow */
  385. /* */
  386. /* Purpose: Returns the UI Container Window Handle. */
  387. /* */
  388. /* Returns: UI Container Window Handle. */
  389. /****************************************************************************/
  390. HWND DCAPI UI_GetUIContainerWindow()
  391. {
  392. HWND rc;
  393. DC_BEGIN_FN("UI_GetUIContainerWindow");
  394. TRC_ASSERT((_UI.hwndUIContainer != NULL),
  395. (TB, _T("Container Window not set")));
  396. rc = _UI.hwndUIContainer;
  397. TRC_DBG((TB, _T("Return %p"), rc));
  398. DC_END_FN();
  399. return rc;
  400. } /* UI_GetUIContainerWnd */
  401. /****************************************************************************/
  402. /* Name: UI_SetUIMainWindow */
  403. /* */
  404. /* Purpose: Informs UT of the UI Main Window Handle. */
  405. /****************************************************************************/
  406. void DCAPI UI_SetUIMainWindow(HWND hwndUIMain)
  407. {
  408. DC_BEGIN_FN("UI_SetUIMainWindow");
  409. TRC_ASSERT((hwndUIMain != NULL),
  410. (TB, _T("invalid (zero) Main Window handle")));
  411. TRC_ASSERT((_UI.hwndUIMain == NULL), (TB, _T("Set Main Window twice!")));
  412. _UI.hwndUIMain = hwndUIMain;
  413. DC_END_FN();
  414. } /* UI_SetUIMainWindow */
  415. /****************************************************************************/
  416. /* Name: UI_GetUIMainWindow */
  417. /* */
  418. /* Purpose: Returns the UI Main Window Handle. */
  419. /****************************************************************************/
  420. HWND DCAPI UI_GetUIMainWindow()
  421. {
  422. HWND rc;
  423. DC_BEGIN_FN("UI_GetUIMainWindow");
  424. TRC_ASSERT((_UI.hwndUIMain != NULL), (TB, _T("Main Window not set")));
  425. rc = _UI.hwndUIMain;
  426. TRC_DBG((TB, _T("return %p"), rc));
  427. DC_END_FN();
  428. return rc;
  429. } /* UI_GetUIMainWindow */
  430. /****************************************************************************/
  431. /* Name: UI_SetClientMCSID */
  432. /* */
  433. /* Purpose: Set our MCS User ID */
  434. /****************************************************************************/
  435. DCVOID DCAPI UI_SetClientMCSID(DCUINT16 mcsID)
  436. {
  437. DC_BEGIN_FN("UI_SetClientMCSID");
  438. TRC_ASSERT((( mcsID == 0) || (_UI.clientMCSID == 0)),
  439. (TB,_T("Attempting to set Client MCSID twice")));
  440. _UI.clientMCSID = mcsID;
  441. TRC_NRM((TB, _T("Client MCSID set to %#hx"), _UI.clientMCSID));
  442. DC_END_FN();
  443. } /* UI_SetClientMCSID */
  444. /****************************************************************************/
  445. /* Name: UI_GetClientMCSID */
  446. /* */
  447. /* Purpose: Return our MCS User ID */
  448. /****************************************************************************/
  449. UINT16 DCAPI UI_GetClientMCSID()
  450. {
  451. DC_BEGIN_FN("UI_GetClientMCSID");
  452. TRC_ASSERT((_UI.clientMCSID != 0), (TB, _T("Client MCSID not set")));
  453. TRC_DBG((TB, _T("Return client MCSID %#hx"), _UI.clientMCSID));
  454. DC_END_FN();
  455. return _UI.clientMCSID;
  456. } /* UI_GetClientMCSID */
  457. /****************************************************************************/
  458. /* Name: UI_SetServerMCSID */
  459. /* */
  460. /* Purpose: Notify UT of the sever's MCS user ID */
  461. /****************************************************************************/
  462. void DCAPI UI_SetServerMCSID(UINT16 mcsID)
  463. {
  464. DC_BEGIN_FN("UI_SetServerMCSID");
  465. TRC_ASSERT(( ( mcsID == 0)
  466. || ( _UI.serverMCSID == 0)
  467. || ( _UI.serverMCSID == mcsID )),
  468. (TB, _T("Attempting to set Server MCSID twice %#hx->%#hx"),
  469. _UI.serverMCSID,
  470. mcsID));
  471. _UI.serverMCSID = mcsID;
  472. TRC_NRM((TB, _T("Server MCSID set to %#hx"), _UI.serverMCSID));
  473. DC_END_FN();
  474. } /* UI_SetServerMCSID */
  475. /****************************************************************************/
  476. /* Name: UI_GetServerMCSID */
  477. /* */
  478. /* Purpose: Return the server's MCS user ID */
  479. /****************************************************************************/
  480. UINT16 DCAPI UI_GetServerMCSID()
  481. {
  482. DC_BEGIN_FN("UI_GetServerMCSID");
  483. TRC_ASSERT((_UI.serverMCSID != 0), (TB, _T("Server MCSID not set")));
  484. TRC_DBG((TB, _T("Return server MCSID %#hx"), _UI.serverMCSID));
  485. DC_END_FN();
  486. return _UI.serverMCSID;
  487. } /* UI_GetServerMCSID */
  488. /****************************************************************************/
  489. /* Name: UI_SetDesktopSize */
  490. /* */
  491. /* Purpose: Set the current desktop size */
  492. /****************************************************************************/
  493. void DCAPI UI_SetDesktopSize(PDCSIZE pDesktopSize)
  494. {
  495. DC_BEGIN_FN("UI_SetDesktopSize");
  496. TRC_ASSERT((pDesktopSize->width != 0) && (pDesktopSize->height != 0),
  497. (TB,_T("Invalid size; width(%u) height(%u)"),
  498. pDesktopSize->width, pDesktopSize->height));
  499. TRC_NRM((TB, _T("New desktop size (%u x %u)"),
  500. pDesktopSize->width, pDesktopSize->height));
  501. _UI.desktopSize = *pDesktopSize;
  502. DC_END_FN();
  503. } /* UI_SetDesktopSize */
  504. /****************************************************************************/
  505. /* Name: UI_GetDesktopSize */
  506. /* */
  507. /* Purpose: Return the current desktop size */
  508. /****************************************************************************/
  509. void DCAPI UI_GetDesktopSize(PDCSIZE pDesktopSize)
  510. {
  511. DC_BEGIN_FN("UI_GetDesktopSize");
  512. *pDesktopSize = _UI.desktopSize;
  513. DC_END_FN();
  514. } /* UI_GetDesktopSize */
  515. #ifdef SMART_SIZING
  516. void UI_NotifyOfDesktopSizeChange(LPARAM size);
  517. #endif
  518. /****************************************************************************/
  519. /* Name: UI_SetColorDepth */
  520. /* */
  521. /* Purpose: Set the current color depth */
  522. /* */
  523. /* Params: colorDepth - new color depth */
  524. /****************************************************************************/
  525. BOOL DCAPI UI_SetColorDepth(int colorDepth)
  526. {
  527. DC_BEGIN_FN("UI_SetColorDepth");
  528. #ifdef DC_HICOLOR
  529. TRC_ASSERT(((colorDepth == 4) ||
  530. (colorDepth == 8) ||
  531. (colorDepth == 15) ||
  532. (colorDepth == 16) ||
  533. (colorDepth == 24)),
  534. (TB,_T("Invalid color depth %d"), colorDepth));
  535. if(!((colorDepth == 4) ||
  536. (colorDepth == 8) ||
  537. (colorDepth == 15) ||
  538. (colorDepth == 16) ||
  539. (colorDepth == 24)))
  540. {
  541. return FALSE;
  542. }
  543. #else
  544. TRC_ASSERT(((colorDepth == 4) || (colorDepth == 8)),
  545. (TB,_T("Invalid color depth %d"), colorDepth));
  546. #endif
  547. TRC_NRM((TB, _T("New color depth %d"), colorDepth));
  548. _UI.connectedColorDepth = colorDepth;
  549. DC_END_FN();
  550. return TRUE;
  551. } /* UI_SetColorDepth */
  552. /****************************************************************************/
  553. /* Name: UI_GetColorDepth */
  554. /* */
  555. /* Purpose: Return the current color depth */
  556. /****************************************************************************/
  557. int DCAPI UI_GetColorDepth()
  558. {
  559. DC_BEGIN_FN("UI_GetColorDepth");
  560. DC_END_FN();
  561. return _UI.connectedColorDepth;
  562. } /* UI_GetColorDepth */
  563. /****************************************************************************/
  564. /* Name: UI_SetCoreInitialized */
  565. /* */
  566. /* Purpose: Sets _UI.coreInitialized to TRUE */
  567. /****************************************************************************/
  568. void DCAPI UI_SetCoreInitialized()
  569. {
  570. DC_BEGIN_FN("UI_SetCoreInitialized");
  571. TRC_NRM((TB, _T("Setting _UI.coreInitialized to TRUE")));
  572. _UI.coreInitialized = TRUE;
  573. DC_END_FN();
  574. } /* UI_SetCoreInitialized */
  575. /****************************************************************************/
  576. /* Name: UI_IsCoreInitialized */
  577. /* */
  578. /* Purpose: Informs CO whether the core is initialized */
  579. /****************************************************************************/
  580. BOOL DCAPI UI_IsCoreInitialized()
  581. {
  582. DC_BEGIN_FN("UI_IsCoreInitialized");
  583. DC_END_FN();
  584. return _UI.coreInitialized;
  585. } /* UI_IsCoreInitialized */
  586. /****************************************************************************/
  587. /* Name: UI_SetShareID */
  588. /* */
  589. /* Purpose: Save the share ID */
  590. /****************************************************************************/
  591. void DCAPI UI_SetShareID(UINT32 shareID)
  592. {
  593. DC_BEGIN_FN("UI_SetShareID");
  594. TRC_NRM((TB, _T("Setting _UI.shareID to 0x%x"), shareID));
  595. _UI.shareID = shareID;
  596. DC_END_FN();
  597. } /* UI_SetShareID */
  598. /****************************************************************************/
  599. /* Name: UI_GetShareID */
  600. /****************************************************************************/
  601. UINT32 DCAPI UI_GetShareID()
  602. {
  603. DC_BEGIN_FN("UI_GetShareID");
  604. DC_END_FN();
  605. return _UI.shareID;
  606. } /* UI_GetShareID */
  607. /****************************************************************************/
  608. /* Name: UI_SetChannelID */
  609. /* */
  610. /* Purpose: Save the channel */
  611. /****************************************************************************/
  612. void DCAPI UI_SetChannelID(unsigned channelID)
  613. {
  614. DC_BEGIN_FN("UI_SetChannelID");
  615. /************************************************************************/
  616. /* We should only be setting the shareID if currently it has not */
  617. /* been set ( = 0 ) and the new value is valid ( != 0 ) OR */
  618. /* the current value is valid ( != 0) and the new value is not valid */
  619. /* ( =0 ) */
  620. /************************************************************************/
  621. TRC_ASSERT((channelID == 0) || (_UI.channelID == 0),
  622. (TB, _T("Already set Channel ID (%#x)"), _UI.channelID));
  623. TRC_NRM((TB, _T("Setting _UI.channelId to %d"), channelID));
  624. _UI.channelID = channelID;
  625. DC_END_FN();
  626. } /* UI_SetChannelID */
  627. /****************************************************************************/
  628. /* Name: UI_GetChannelID */
  629. /* */
  630. /* Purpose: Get the share channel ID */
  631. /****************************************************************************/
  632. unsigned DCAPI UI_GetChannelID()
  633. {
  634. DC_BEGIN_FN("UI_GetChannelID");
  635. TRC_ASSERT((_UI.channelID != 0), (TB, _T("Channel ID not set yet")));
  636. DC_END_FN();
  637. return _UI.channelID;
  638. } /* UI_GetChannelID */
  639. /****************************************************************************/
  640. /* Name: UI_GetOsMinorType */
  641. /* */
  642. /* Purpose: Get the OS type */
  643. /* */
  644. /* Returns: OS type (one of the TS_OSMINORTYPE constants) */
  645. /****************************************************************************/
  646. unsigned DCAPI UI_GetOsMinorType()
  647. {
  648. unsigned rc;
  649. DC_BEGIN_FN("UI_GetOsMinorType");
  650. rc = _UI.osMinorType;
  651. DC_END_FN();
  652. return rc;
  653. } /* UI_GetOsMinorType */
  654. /****************************************************************************/
  655. /* Name: UI_SetDisableCtrlAltDel */
  656. /* */
  657. /* Purpose: Save the fDisableCtrlAltDel flag */
  658. /* */
  659. /* Params: IN fDisableCtrlAltDel */
  660. /****************************************************************************/
  661. void DCAPI UI_SetDisableCtrlAltDel(BOOL fDisableCtrlAltDel)
  662. {
  663. DC_BEGIN_FN("UI_SetDisableCtrlAltDel");
  664. TRC_NRM((TB, _T("Setting _UI.fDisableCtrlAltDel to %d"), fDisableCtrlAltDel));
  665. _UI.fDisableCtrlAltDel = fDisableCtrlAltDel;
  666. DC_END_FN();
  667. } /* UI_SetDisableCtrlAltDel */
  668. /****************************************************************************/
  669. /* Name: UI_GetDisableCtrlAltDel */
  670. /* */
  671. /* Purpose: Get the fDisableCtrlAltDel flag */
  672. /****************************************************************************/
  673. BOOL DCAPI UI_GetDisableCtrlAltDel()
  674. {
  675. DC_BEGIN_FN("UI_GetDisableCtrlAltDel");
  676. DC_END_FN();
  677. return _UI.fDisableCtrlAltDel;
  678. } /* UI_GetDisableCtrlAltDel */
  679. #ifdef SMART_SIZING
  680. /****************************************************************************/
  681. /* Name: UI_GetSmartSizing
  682. /*
  683. /* Purpose: Get the fSmartSizing flag
  684. /****************************************************************************/
  685. BOOL DCAPI UI_GetSmartSizing()
  686. {
  687. DC_BEGIN_FN("UI_GetSmartSizing");
  688. DC_END_FN();
  689. return _UI.fSmartSizing;
  690. } /* UI_GetSmartSizing */
  691. #endif // SMART_SIZING
  692. /****************************************************************************/
  693. /* Name: UI_SetEnableWindowsKey */
  694. /* */
  695. /* Purpose: Save the fEnableWindowsKey flag */
  696. /****************************************************************************/
  697. void DCAPI UI_SetEnableWindowsKey(BOOL fEnableWindowsKey)
  698. {
  699. DC_BEGIN_FN("UI_SetEnableWindowsKey");
  700. TRC_NRM((TB, _T("Setting _UI.fEnableWindowsKey to %d"), fEnableWindowsKey));
  701. _UI.fEnableWindowsKey = fEnableWindowsKey;
  702. DC_END_FN();
  703. } /* UI_SetEnableWindowsKey */
  704. /****************************************************************************/
  705. /* Name: UI_GetEnableWindowsKey */
  706. /* */
  707. /* Purpose: Get the fEnableWindowsKey flag */
  708. /* */
  709. /* Returns: Flag state t/f */
  710. /****************************************************************************/
  711. BOOL DCAPI UI_GetEnableWindowsKey()
  712. {
  713. DC_BEGIN_FN("UI_GetEnableWindowsKey");
  714. DC_END_FN();
  715. return _UI.fEnableWindowsKey;
  716. } /* UI_GetEnableWindowsKey */
  717. /****************************************************************************/
  718. /* Name: UI_SetMouse */
  719. /* */
  720. /* Purpose: Save the fMouse flag */
  721. /****************************************************************************/
  722. void DCAPI UI_SetMouse(BOOL fMouse)
  723. {
  724. DC_BEGIN_FN("UI_SetMouse");
  725. TRC_NRM((TB, _T("Setting _UI.fMouse to %d"), fMouse));
  726. _UI.fMouse = fMouse;
  727. DC_END_FN();
  728. } /* UI_SetMouse */
  729. /****************************************************************************/
  730. /* Name: UI_GetMouse */
  731. /* */
  732. /* Purpose: Get the fMouse flag */
  733. /****************************************************************************/
  734. BOOL DCAPI UI_GetMouse()
  735. {
  736. DC_BEGIN_FN("UI_GetMouse");
  737. DC_END_FN();
  738. return _UI.fMouse;
  739. } /* UI_GetMouse */
  740. /****************************************************************************/
  741. /* Name: UI_SetDoubleClickDetect */
  742. /* */
  743. /* Purpose: Save the fDoubleClickDetect flag */
  744. /* */
  745. /* Params: IN fDoubleClickDetect */
  746. /****************************************************************************/
  747. DCVOID DCAPI UI_SetDoubleClickDetect(DCBOOL fDoubleClickDetect)
  748. {
  749. DC_BEGIN_FN("UI_SetDoubleClickDetect");
  750. TRC_NRM((TB, _T("Setting _UI.fDoubleClickDetect to %d"), fDoubleClickDetect));
  751. _UI.fDoubleClickDetect = fDoubleClickDetect;
  752. DC_END_FN();
  753. } /* UI_SetDoubleClickDetect */
  754. /****************************************************************************/
  755. /* Name: UI_GetDoubleClickDetect */
  756. /* */
  757. /* Purpose: Get the fDoubleClickDetect flag */
  758. /****************************************************************************/
  759. DCBOOL DCAPI UI_GetDoubleClickDetect(DCVOID)
  760. {
  761. DCBOOL fDoubleClickDetect;
  762. DC_BEGIN_FN("UI_GetDoubleClickDetect");
  763. fDoubleClickDetect = _UI.fDoubleClickDetect;
  764. DC_END_FN();
  765. return(fDoubleClickDetect);
  766. } /* UI_GetDoubleClickDetect */
  767. /****************************************************************************/
  768. /* Name: UI_SetSessionId */
  769. /* */
  770. /* Purpose: Save the SessionId */
  771. /* */
  772. /* Params: IN SessionId */
  773. /****************************************************************************/
  774. DCVOID DCAPI UI_SetSessionId(DCUINT32 SessionId)
  775. {
  776. DC_BEGIN_FN("UI_SetSessionId");
  777. _UI.SessionId = SessionId;
  778. DC_END_FN();
  779. } /* UI_SetSessionId */
  780. /****************************************************************************/
  781. /* Name: UI_GetSessionId */
  782. /* */
  783. /* Purpose: Get the SessionId */
  784. /* */
  785. /* Returns: SessionId */
  786. /****************************************************************************/
  787. DCUINT32 DCAPI UI_GetSessionId(DCVOID)
  788. {
  789. DC_BEGIN_FN("UI_GetSessionId");
  790. DC_END_FN();
  791. return _UI.SessionId;
  792. } /* UI_GetSessionId */
  793. /****************************************************************************/
  794. /* Name: UI_SetDomain */
  795. /* */
  796. /* Purpose: Save the Domain */
  797. /* */
  798. /* Params: IN Domain */
  799. /****************************************************************************/
  800. HRESULT DCAPI UI_SetDomain(PDCWCHAR Domain)
  801. {
  802. HRESULT hr;
  803. DC_BEGIN_FN("UI_SetDomain");
  804. hr = StringCchCopyW(_UI.Domain,
  805. SIZE_TCHARS(_UI.Domain),
  806. Domain);
  807. if (FAILED(hr)) {
  808. TRC_ERR((TB,_T("Error copying domain string: 0x%x"),hr));
  809. }
  810. DC_END_FN();
  811. return hr;
  812. } /* UI_SetDomain */
  813. /****************************************************************************/
  814. /* Name: UI_GetDomain */
  815. /* */
  816. /* Purpose: Get the Domain */
  817. /* */
  818. /* Returns: Domain */
  819. /* */
  820. /* Params: OUT buffer to return Domain into */
  821. /* IN size of return buffer */
  822. /****************************************************************************/
  823. DCVOID DCAPI UI_GetDomain(PDCUINT8 Domain, DCUINT size)
  824. {
  825. DC_BEGIN_FN("UI_GetDomain");
  826. if (sizeof(_UI.Domain) < size)
  827. size = sizeof(_UI.Domain);
  828. DC_MEMCPY(Domain, _UI.Domain, size-1);
  829. DC_END_FN();
  830. } /* UI_GetDomain */
  831. /****************************************************************************/
  832. /* Name: UI_SetUseRedirectionUserName */
  833. /* */
  834. /* Purpose: Sets the UseRedirectionUserName flag */
  835. /* */
  836. /* Params: IN UserName */
  837. /****************************************************************************/
  838. _inline DCVOID DCAPI UI_SetUseRedirectionUserName(BOOL bVal)
  839. {
  840. _UI.UseRedirectionUserName = bVal;
  841. }
  842. /****************************************************************************/
  843. /* Name: UI_GetUseRedirectionUserName */
  844. /* */
  845. /* Purpose: Returns the UseRedirectionUserName flag */
  846. /* */
  847. /****************************************************************************/
  848. _inline BOOL DCAPI UI_GetUseRedirectionUserName()
  849. {
  850. return _UI.UseRedirectionUserName;
  851. }
  852. /****************************************************************************/
  853. /* Name: UI_SetUseSmartcardLogon */
  854. /* */
  855. /* Purpose: Sets the UseSmartcardLogon flag */
  856. /* */
  857. /* Params: IN UseSmartcardLogon */
  858. /****************************************************************************/
  859. _inline DCVOID DCAPI UI_SetUseSmartcardLogon(BOOL bVal)
  860. {
  861. _UI.fUseSmartcardLogon = bVal;
  862. }
  863. /****************************************************************************/
  864. /* Name: UI_GetUseSmartcardLogon */
  865. /* */
  866. /* Purpose: Returns the UseSmartcardLogon flag */
  867. /* */
  868. /****************************************************************************/
  869. _inline BOOL DCAPI UI_GetUseSmartcardLogon()
  870. {
  871. return _UI.fUseSmartcardLogon;
  872. }
  873. /****************************************************************************/
  874. /* Name: UI_SetUserName */
  875. /* */
  876. /* Purpose: Save the UserName */
  877. /* */
  878. /* Params: IN UserName */
  879. /****************************************************************************/
  880. DCVOID DCAPI UI_SetUserName(PDCWCHAR UserName)
  881. {
  882. HRESULT hr;
  883. DC_BEGIN_FN("UI_SetUserName");
  884. UI_SetUseRedirectionUserName(FALSE);
  885. hr = StringCchCopyW(_UI.UserName,
  886. SIZE_TCHARS(_UI.UserName),
  887. UserName);
  888. if (FAILED(hr)) {
  889. TRC_ERR((TB,_T("Error copying username string: 0x%x"),hr));
  890. }
  891. DC_END_FN();
  892. } /* UI_SetUserName */
  893. /****************************************************************************/
  894. /* Name: UI_GetUserName */
  895. /* */
  896. /* Purpose: Get the UserName */
  897. /* */
  898. /* Returns: UserName */
  899. /* */
  900. /* Params: OUT buffer to return UserName into */
  901. /* IN size of return buffer */
  902. /****************************************************************************/
  903. DCVOID DCAPI UI_GetUserName(PDCUINT8 UserName, DCUINT size)
  904. {
  905. DC_BEGIN_FN("UI_GetUserName");
  906. if (sizeof(_UI.UserName) < size)
  907. size = sizeof(_UI.UserName);
  908. DC_MEMCPY(UserName, _UI.UserName, size-1);
  909. DC_END_FN();
  910. } /* UI_GetUserName */
  911. /****************************************************************************/
  912. /* Name: UI_SetRedirectionUserName */
  913. /* */
  914. /* Purpose: Save the RedirectionUserName */
  915. /* */
  916. /* Params: IN RedirectionUserName */
  917. /****************************************************************************/
  918. DCVOID DCAPI UI_SetRedirectionUserName(PDCWCHAR RedirectionUserName)
  919. {
  920. HRESULT hr;
  921. DC_BEGIN_FN("UI_SetRedirectionUserName");
  922. UI_SetUseRedirectionUserName(TRUE);
  923. hr = StringCchCopyW(_UI.RedirectionUserName,
  924. SIZE_TCHARS(_UI.RedirectionUserName),
  925. RedirectionUserName);
  926. if (FAILED(hr)) {
  927. TRC_ERR((TB,_T("Error copying username string: 0x%x"),hr));
  928. }
  929. DC_END_FN();
  930. } /* UI_SetRedirectionUserName */
  931. /****************************************************************************/
  932. /* Name: UI_GetRedirectionUserName */
  933. /* */
  934. /* Purpose: Get the RedirectionUserName */
  935. /* */
  936. /* Returns: RedirectionUserName */
  937. /* */
  938. /* Params: OUT buffer to return RedirectionUserName into */
  939. /* IN size of return buffer */
  940. /****************************************************************************/
  941. DCVOID DCAPI UI_GetRedirectionUserName(PDCUINT8 RedirectionUserName, DCUINT size)
  942. {
  943. DC_BEGIN_FN("UI_GetRedirectionUserName");
  944. if (sizeof(_UI.RedirectionUserName) < size)
  945. size = sizeof(_UI.RedirectionUserName);
  946. DC_MEMCPY(RedirectionUserName, _UI.RedirectionUserName, size-1);
  947. DC_END_FN();
  948. } /* UI_GetRedirectionUserName */
  949. /****************************************************************************/
  950. /* Set and get load balance info, check if redirected */
  951. /****************************************************************************/
  952. BOOL DCAPI UI_SetLBInfo(PBYTE, unsigned);
  953. BSTR DCAPI UI_GetLBInfo()
  954. {
  955. return _UI.bstrScriptedLBInfo;
  956. }
  957. BOOL DCAPI UI_IsClientRedirected()
  958. {
  959. return _UI.ClientIsRedirected;
  960. }
  961. BSTR DCAPI UI_GetRedirectedLBInfo()
  962. {
  963. return _UI.bstrRedirectionLBInfo;
  964. }
  965. /****************************************************************************/
  966. /* Set and get to inform activeX control about TS public key */
  967. /****************************************************************************/
  968. DCBOOL DCAPI UI_GetNotifyTSPublicKey()
  969. {
  970. #ifdef REDIST_CONTROL
  971. return FALSE;
  972. #else
  973. return _UI.fNotifyTSPublicKey;
  974. #endif
  975. }
  976. VOID DCAPI UI_SetNotifyTSPublicKey(BOOL fNotify)
  977. {
  978. #ifndef REDIST_CONTROL
  979. _UI.fNotifyTSPublicKey = fNotify;
  980. #endif
  981. return;
  982. }
  983. /****************************************************************************/
  984. /* Name: UI_GetUserName */
  985. /* */
  986. /* Purpose: Instruct UI to connect with already connected socket */
  987. /* go thru normal connect sequence */
  988. /* */
  989. /* Returns: TRUE/FALSE */
  990. /* */
  991. /* Params: tdSocket : Valid connected socket or INVALID_SOCKET */
  992. /* */
  993. /* NOTE : Salem specific call */
  994. /****************************************************************************/
  995. DCBOOL DCAPI SetConnectWithEndpoint( SOCKET tdSocket )
  996. {
  997. #if REDIST_CONTROL
  998. return FALSE;
  999. #else
  1000. DCBOOL fStatus = TRUE;
  1001. DC_BEGIN_FN("SetConnectWithEndpoint");
  1002. //
  1003. // Salem pass connected socket before actually invoke
  1004. // connect(), at that point connectionStatus is
  1005. // UI_STATUS_INITIALIZING
  1006. //
  1007. if( _UI.connectionStatus == UI_STATUS_INITIALIZING ||
  1008. _UI.connectionStatus == UI_STATUS_DISCONNECTED )
  1009. {
  1010. if( INVALID_SOCKET == tdSocket )
  1011. {
  1012. // reset back to default.
  1013. UI_SetConnectionMode( CONNECTIONMODE_INITIATE );
  1014. }
  1015. else
  1016. {
  1017. UI_SetConnectionMode( CONNECTIONMODE_CONNECTEDENDPOINT );
  1018. _UI.TDSocket = tdSocket;
  1019. }
  1020. }
  1021. else
  1022. {
  1023. fStatus = FALSE;
  1024. }
  1025. DC_END_FN();
  1026. return fStatus;
  1027. #endif
  1028. }
  1029. /****************************************************************************/
  1030. /* Name: UI_GetConnectionMode */
  1031. /* */
  1032. /* Purpose: Set current connecting mode */
  1033. /****************************************************************************/
  1034. _inline CONNECTIONMODE DCAPI UI_GetConnectionMode()
  1035. {
  1036. CONNECTIONMODE connMode;
  1037. DC_BEGIN_FN("UI_GetConnectMode");
  1038. connMode = _UI.ConnectMode;
  1039. DC_END_FN();
  1040. return connMode;
  1041. } /* UI_SetConnectMode */
  1042. /****************************************************************************/
  1043. /* Name: UI_SetConnectMode */
  1044. /* */
  1045. /* Purpose: Set current connecting mode */
  1046. /****************************************************************************/
  1047. _inline DCVOID DCAPI UI_SetConnectionMode(CONNECTIONMODE connMode)
  1048. {
  1049. DC_BEGIN_FN("UI_SetConnectionMode");
  1050. _UI.ConnectMode = connMode;
  1051. DC_END_FN();
  1052. } /* UI_SetConnectMode */
  1053. /****************************************************************************/
  1054. /* Name: UI_SetPassword */
  1055. /* */
  1056. /* Purpose: Save the Password */
  1057. /* */
  1058. /* Params: IN Password */
  1059. /****************************************************************************/
  1060. DCVOID DCAPI UI_SetPassword(PDCUINT8 Password)
  1061. {
  1062. DC_BEGIN_FN("UI_SetPassword");
  1063. DC_MEMCPY(_UI.Password, Password, sizeof(_UI.Password));
  1064. DC_END_FN();
  1065. } /* UI_SetPassword */
  1066. /****************************************************************************/
  1067. /* Name: UI_GetPassword */
  1068. /* */
  1069. /* Purpose: Get the Password */
  1070. /* */
  1071. /* Returns: Password */
  1072. /* */
  1073. /* Params: OUT buffer to return Password into */
  1074. /* IN size of return buffer */
  1075. /****************************************************************************/
  1076. DCVOID DCAPI UI_GetPassword(PDCUINT8 Password, DCUINT size)
  1077. {
  1078. DC_BEGIN_FN("UI_GetPassword");
  1079. if (sizeof(_UI.Password) < size)
  1080. size = sizeof(_UI.Password);
  1081. DC_MEMCPY(Password, _UI.Password, size);
  1082. DC_END_FN();
  1083. } /* UI_GetPassword */
  1084. /****************************************************************************/
  1085. /* Name: UI_SetSalt */
  1086. /* */
  1087. /* Purpose: Save the Salt */
  1088. /* */
  1089. /* Params: IN Salt */
  1090. /****************************************************************************/
  1091. DCVOID DCAPI UI_SetSalt(PDCUINT8 Salt)
  1092. {
  1093. DC_BEGIN_FN("UI_SetSalt");
  1094. DC_MEMCPY(_UI.Salt, Salt, sizeof(_UI.Salt));
  1095. DC_END_FN();
  1096. } /* UI_SetSalt */
  1097. /****************************************************************************/
  1098. /* Name: UI_GetSalt */
  1099. /* */
  1100. /* Purpose: Get the Salt */
  1101. /* */
  1102. /* Returns: Salt */
  1103. /* */
  1104. /* Params: OUT buffer to return Salt into */
  1105. /* IN size of return buffer */
  1106. /* */
  1107. /****************************************************************************/
  1108. DCVOID DCAPI UI_GetSalt(PDCUINT8 Salt, DCUINT size)
  1109. {
  1110. DC_BEGIN_FN("UI_GetSalt");
  1111. if (sizeof(_UI.Salt) < size)
  1112. size = sizeof(_UI.Salt);
  1113. DC_MEMCPY(Salt, _UI.Salt, size);
  1114. DC_END_FN();
  1115. } /* UI_GetSalt */
  1116. /****************************************************************************/
  1117. /* Name: UI_SetAlternateShell */
  1118. /* */
  1119. /* Purpose: Save the AlternateShell */
  1120. /* */
  1121. /* Params: IN AlternateShell */
  1122. /****************************************************************************/
  1123. HRESULT DCAPI UI_SetAlternateShell(PDCWCHAR AlternateShell)
  1124. {
  1125. HRESULT hr;
  1126. DC_BEGIN_FN("UI_SetAlternateShell");
  1127. hr = StringCchCopyW(_UI.AlternateShell,
  1128. SIZE_TCHARS(_UI.AlternateShell),
  1129. AlternateShell);
  1130. if (FAILED(hr)) {
  1131. TRC_ERR((TB,_T("Error copying alternate shell string: 0x%x"),hr));
  1132. }
  1133. DC_END_FN();
  1134. return hr;
  1135. } /* UI_SetAlternateShell */
  1136. /****************************************************************************/
  1137. /* Name: UI_GetAlternateShell */
  1138. /* */
  1139. /* Purpose: Get the AlternateShell */
  1140. /* */
  1141. /* Returns: AlternateShell */
  1142. /* */
  1143. /* Params: OUT buffer to return AlternateShell into */
  1144. /* IN size of return buffer */
  1145. /****************************************************************************/
  1146. DCVOID DCAPI UI_GetAlternateShell(PDCUINT8 AlternateShell, DCUINT size)
  1147. {
  1148. DC_BEGIN_FN("UI_GetAlternateShell");
  1149. if (sizeof(_UI.AlternateShell) < size)
  1150. size = sizeof(_UI.AlternateShell);
  1151. DC_MEMCPY(AlternateShell, _UI.AlternateShell, size-1);
  1152. DC_END_FN();
  1153. } /* UI_GetAlternateShell */
  1154. /****************************************************************************/
  1155. /* Name: UI_SetWorkingDir */
  1156. /* */
  1157. /* Purpose: Save the WorkingDir */
  1158. /****************************************************************************/
  1159. HRESULT DCAPI UI_SetWorkingDir(PDCWCHAR WorkingDir)
  1160. {
  1161. HRESULT hr;
  1162. DC_BEGIN_FN("UI_SetWorkingDir");
  1163. hr = StringCchCopyW(_UI.WorkingDir,
  1164. SIZE_TCHARS(_UI.WorkingDir),
  1165. WorkingDir);
  1166. if (FAILED(hr)) {
  1167. TRC_ERR((TB,_T("Error copying WorkingDir string: 0x%x"),hr));
  1168. }
  1169. DC_END_FN();
  1170. return hr;
  1171. } /* UI_SetWorkingDir */
  1172. /****************************************************************************/
  1173. /* Name: UI_GetWorkingDir */
  1174. /* */
  1175. /* Purpose: Get the WorkingDir */
  1176. /* */
  1177. /* Returns: WorkingDir */
  1178. /* */
  1179. /* Params: OUT buffer to return WorkingDir into */
  1180. /* IN size of return buffer */
  1181. /****************************************************************************/
  1182. DCVOID DCAPI UI_GetWorkingDir(PDCUINT8 WorkingDir, DCUINT size)
  1183. {
  1184. DC_BEGIN_FN("UI_GetWorkingDir");
  1185. if (sizeof(_UI.WorkingDir) < size)
  1186. size = sizeof(_UI.WorkingDir);
  1187. DC_MEMCPY(WorkingDir, _UI.WorkingDir, size-1);
  1188. DC_END_FN();
  1189. } /* UI_GetWorkingDir */
  1190. /****************************************************************************/
  1191. /* Name: UI_SetAutoLogon */
  1192. /* */
  1193. /* Purpose: Save whether we automatically logon */
  1194. /****************************************************************************/
  1195. DCVOID DCAPI UI_SetAutoLogon(DCUINT AutoLogon)
  1196. {
  1197. DC_BEGIN_FN("UI_SetAutoLogon");
  1198. TRC_NRM((TB, _T("Setting _UI.AutoLogon to %d"), AutoLogon));
  1199. _UI.fAutoLogon = AutoLogon;
  1200. DC_END_FN();
  1201. } /* UI_SetAutoLogon */
  1202. /****************************************************************************/
  1203. /* Name: UI_GetAutoLogon */
  1204. /* */
  1205. /* Purpose: Get whether we automatically logon */
  1206. /* */
  1207. /* Returns: autlogon flag */
  1208. /****************************************************************************/
  1209. DCUINT DCAPI UI_GetAutoLogon(DCVOID)
  1210. {
  1211. DCUINT rc;
  1212. DC_BEGIN_FN("UI_GetAutoLogon");
  1213. rc = _UI.fAutoLogon;
  1214. DC_END_FN();
  1215. return(rc);
  1216. } /* UI_GetAutoLogon */
  1217. /****************************************************************************/
  1218. /* Name: UI_SetMaximizeShell */
  1219. /* */
  1220. /* Purpose: Save whether we Maximize the shell application */
  1221. /* */
  1222. /* Params: IN MaximizeShell */
  1223. /****************************************************************************/
  1224. DCVOID DCAPI UI_SetMaximizeShell(DCUINT MaximizeShell)
  1225. {
  1226. DC_BEGIN_FN("UI_SetMaximizeShell");
  1227. TRC_NRM((TB, _T("Setting _UI.fMaximizeShell to %d"), MaximizeShell));
  1228. _UI.fMaximizeShell = MaximizeShell;
  1229. DC_END_FN();
  1230. } /* UI_SetMaximizeShell */
  1231. /****************************************************************************/
  1232. /* Name: UI_GetMaximizeShell */
  1233. /* */
  1234. /* Purpose: Get whether we Maximize the shell application */
  1235. /* */
  1236. /* Returns: MaximizeShell flag */
  1237. /****************************************************************************/
  1238. DCUINT DCAPI UI_GetMaximizeShell(DCVOID)
  1239. {
  1240. DCUINT rc;
  1241. DC_BEGIN_FN("UI_GetMaximizeShell");
  1242. rc = _UI.fMaximizeShell;
  1243. DC_END_FN();
  1244. return(rc);
  1245. } /* UI_GetMaximizeShell */
  1246. /****************************************************************************/
  1247. /* Name: UI_SetBitmapPersistence */
  1248. /* */
  1249. /* Purpose: Save the fBitmapPersistence flag */
  1250. /* */
  1251. /* Params: IN fBitmapPersistence */
  1252. /****************************************************************************/
  1253. DCVOID DCAPI UI_SetBitmapPersistence(DCBOOL fBitmapPersistence)
  1254. {
  1255. DC_BEGIN_FN("UI_SetBitmapPersistence");
  1256. TRC_NRM((TB, _T("Setting _UI.fBitmapPersistence to %d"), fBitmapPersistence));
  1257. _UI.fBitmapPersistence = fBitmapPersistence;
  1258. DC_END_FN();
  1259. } /* UI_SetBitmapPersistence */
  1260. /****************************************************************************/
  1261. /* Name: UI_GetBitmapPersistence */
  1262. /* */
  1263. /* Purpose: Get the fBitmapPersistence */
  1264. /****************************************************************************/
  1265. DCBOOL DCAPI UI_GetBitmapPersistence(DCVOID)
  1266. {
  1267. DC_BEGIN_FN("UI_GetBitmapPersistence");
  1268. DC_END_FN();
  1269. return _UI.fBitmapPersistence;
  1270. } /* UI_GetBitmapPersistence */
  1271. /****************************************************************************/
  1272. /* Name: UI_SetMCSPort */
  1273. /* */
  1274. /* Purpose: Set the MCSPort */
  1275. /* */
  1276. /* Params: IN MCSPort */
  1277. /****************************************************************************/
  1278. DCVOID DCAPI UI_SetMCSPort(DCUINT16 MCSPort)
  1279. {
  1280. DC_BEGIN_FN("UI_SetMCSPort");
  1281. TRC_NRM((TB, _T("Setting _UI.MCSPort to %d"), MCSPort));
  1282. _UI.MCSPort = MCSPort;
  1283. DC_END_FN();
  1284. } /* UI_SetMCSPort */
  1285. /****************************************************************************/
  1286. /* Name: UI_GetMCSPort */
  1287. /* */
  1288. /* Purpose: Get the MCSPort */
  1289. /****************************************************************************/
  1290. UINT16 DCAPI UI_GetMCSPort(void)
  1291. {
  1292. UINT16 MCSPort;
  1293. DC_BEGIN_FN("UI_GetMCSPort");
  1294. MCSPort = _UI.MCSPort;
  1295. DC_END_FN();
  1296. return(MCSPort);
  1297. } /* UI_GetMCSPort */
  1298. /****************************************************************************/
  1299. /* Name: UI_SetServerName */
  1300. /* */
  1301. /* Purpose: Save name of currently connected Server */
  1302. /****************************************************************************/
  1303. HRESULT DCAPI UI_SetServerName(LPTSTR pName)
  1304. {
  1305. HRESULT hr;
  1306. DC_BEGIN_FN("UI_SetServerName");
  1307. hr = StringCchCopy(_UI.strAddress, SIZE_TCHARS(_UI.strAddress),
  1308. pName);
  1309. if (FAILED(hr)) {
  1310. TRC_ERR((TB,_T("Error copying straddress string: 0x%x"),hr));
  1311. }
  1312. DC_END_FN();
  1313. return hr;
  1314. } /* UI_SetServerName */
  1315. /****************************************************************************/
  1316. /* Name: UI_GetServerName */
  1317. /* */
  1318. /* Purpose: Return name of currently connected Server */
  1319. /* */
  1320. /* Params: pName (returned) - name of Server */
  1321. /****************************************************************************/
  1322. HRESULT UI_GetServerName(LPTSTR pszName, UINT cchName)
  1323. {
  1324. HRESULT hr;
  1325. DC_BEGIN_FN("UI_GetServerName");
  1326. hr = StringCchCopy(pszName, cchName, pszName);
  1327. DC_END_FN();
  1328. return hr;
  1329. } /* UI_GetServerName */
  1330. /****************************************************************************/
  1331. /* Name: UI_SetTDSocket */
  1332. /* */
  1333. /* Purpose: Save the connection socket for this session */
  1334. /****************************************************************************/
  1335. _inline DCVOID DCAPI UI_SetTDSocket(SOCKET TDSock)
  1336. {
  1337. DC_BEGIN_FN("UI_SetSocket");
  1338. TRC_NRM((TB, _T("Save TD socket handle %p"), TDSock));
  1339. _UI.TDSocket = TDSock;
  1340. DC_END_FN();
  1341. }
  1342. /****************************************************************************/
  1343. /* Name: UI_GetTDSocket */
  1344. /* */
  1345. /* Purpose: Return the connection socket for this session */
  1346. /****************************************************************************/
  1347. _inline SOCKET DCAPI UI_GetTDSocket(void)
  1348. {
  1349. DC_BEGIN_FN("UI_GetTDSocket");
  1350. DC_END_FN();
  1351. return _UI.TDSocket;
  1352. }
  1353. void UI_SetContainerHandledFullScreen(BOOL fContHandlesFScr)
  1354. {
  1355. _UI.fContainerHandlesFullScreenToggle = fContHandlesFScr;
  1356. }
  1357. BOOL UI_GetContainerHandledFullScreen()
  1358. {
  1359. return _UI.fContainerHandlesFullScreenToggle;
  1360. }
  1361. /****************************************************************************/
  1362. // SetServerRedirectionInfo
  1363. //
  1364. // Used on receipt of a TS_SERVER_REDIRECT_PDU to store the info needed to
  1365. // redirect the client to a new server. Sets the DoRedirection flag as well
  1366. // to indicate these data members are set and ready for use. Also sets the
  1367. // ClientIsRedirected flag, which is longer-lived than the DoRedirection
  1368. // flag and is used to send the correct cookie when redirected.
  1369. /****************************************************************************/
  1370. HRESULT UI_SetServerRedirectionInfo(
  1371. UINT32 SessionID,
  1372. LPTSTR pszServerAddress,
  1373. PBYTE LBInfo,
  1374. unsigned LBInfoSize,
  1375. BOOL fNeedRedirect
  1376. );
  1377. /****************************************************************************/
  1378. // UI_GetDoRedirection
  1379. /****************************************************************************/
  1380. BOOL UI_GetDoRedirection()
  1381. {
  1382. DC_BEGIN_FN("UI_GetDoRedirection");
  1383. DC_END_FN();
  1384. return _UI.DoRedirection;
  1385. }
  1386. /****************************************************************************/
  1387. // UI_ClearDoRedirection
  1388. /****************************************************************************/
  1389. void UI_ClearDoRedirection()
  1390. {
  1391. DC_BEGIN_FN("UI_GetDoRedirection");
  1392. _UI.DoRedirection = FALSE;
  1393. DC_END_FN();
  1394. }
  1395. /****************************************************************************/
  1396. // UI_GetRedirectionSessionID
  1397. /****************************************************************************/
  1398. UINT32 UI_GetRedirectionSessionID()
  1399. {
  1400. DC_BEGIN_FN("UI_GetRedirectionSessionID");
  1401. DC_END_FN();
  1402. return _UI.RedirectionSessionID;
  1403. }
  1404. DCUINT UI_GetAudioRedirectionMode();
  1405. VOID UI_SetAudioRedirectionMode(DCUINT audioMode);
  1406. BOOL UI_GetDriveRedirectionEnabled();
  1407. VOID UI_SetDriveRedirectionEnabled(BOOL fEnable);
  1408. BOOL UI_GetPrinterRedirectionEnabled();
  1409. VOID UI_SetPrinterRedirectionEnabled(BOOL fEnable);
  1410. BOOL UI_GetPortRedirectionEnabled();
  1411. VOID UI_SetPortRedirectionEnabled(BOOL fEnable);
  1412. BOOL UI_GetSCardRedirectionEnabled();
  1413. VOID UI_SetSCardRedirectionEnabled(BOOL fEnable);
  1414. VOID UI_OnDeviceChange(WPARAM wParam, LPARAM lParam);
  1415. PRDPDR_DATA UI_GetRdpDrInitData() {return &_drInitData;}
  1416. VOID UI_SetConnectToServerConsole(BOOL fConnectToServerConsole)
  1417. {
  1418. _UI.fConnectToServerConsole = fConnectToServerConsole;
  1419. }
  1420. BOOL UI_GetConnectToServerConsole()
  1421. {
  1422. return _UI.fConnectToServerConsole;
  1423. }
  1424. VOID UI_SetfUseFIPS(BOOL fUseFIPS)
  1425. {
  1426. _UI.fUseFIPS = fUseFIPS;
  1427. }
  1428. HWND UI_GetInputWndHandle();
  1429. BOOL UI_InjectVKeys(/*[in]*/ LONG numKeys,
  1430. /*[in]*/ short* pfArrayKeyUp,
  1431. /*[in]*/ LONG* plKeyData);
  1432. BOOL UI_SetMinsToIdleTimeout(LONG minsToTimeout);
  1433. LONG UI_GetMinsToIdleTimeout();
  1434. DCVOID DCAPI UI_SetServerErrorInfo(ULONG_PTR errInfo);
  1435. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_SetServerErrorInfo);
  1436. UINT32 UI_GetServerErrorInfo();
  1437. VOID UI_SetEnableBBar(BOOL b) {_UI.fBBarEnabled = b;}
  1438. BOOL UI_GetEnableBBar() {return _UI.fBBarEnabled;}
  1439. VOID UI_SetBBarPinned(BOOL b);
  1440. BOOL UI_GetBBarPinned();
  1441. VOID UI_SetBBarShowMinimize(BOOL b) {_UI.fBBarShowMinimizeButton = b;}
  1442. BOOL UI_GetBBarShowMinimize() {return _UI.fBBarShowMinimizeButton;}
  1443. VOID UI_SetBBarShowRestore(BOOL b) {_UI.fBBarShowRestoreButton = b;}
  1444. BOOL UI_GetBBarShowRestore() {return _UI.fBBarShowRestoreButton;}
  1445. VOID UI_SetGrabFocusOnConnect(BOOL b) {_UI.fGrabFocusOnConnect = b;}
  1446. BOOL UI_GetGrabFocusOnConnect() {return _UI.fGrabFocusOnConnect;}
  1447. BOOL UI_GetLocalSessionId(PDCUINT32 pSessionId);
  1448. HWND UI_GetBmpCacheMonitorHandle();
  1449. #ifdef DISABLE_SHADOW_IN_FULLSCREEN
  1450. #ifdef USE_BBAR
  1451. DCVOID DCAPI UI_GetBBarState(ULONG_PTR pData)
  1452. {
  1453. int *pstate = (int *)pData;
  1454. if (_pBBar) {
  1455. *pstate = _pBBar->GetState();
  1456. }
  1457. else {
  1458. *pstate = CBBar::bbarNotInit;
  1459. }
  1460. }
  1461. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_GetBBarState);
  1462. DCVOID DCAPI UI_GetBBarLowerAspect(ULONG_PTR pData)
  1463. {
  1464. RECT *prect = (RECT *)pData;
  1465. if (_pBBar) {
  1466. _pBBar->GetBBarLoweredAspect(prect);
  1467. }
  1468. else {
  1469. prect->left = 0;
  1470. prect->top = 0;
  1471. prect->right = 0;
  1472. prect->bottom = 0;
  1473. }
  1474. }
  1475. EXPOSE_CD_SIMPLE_NOTIFICATION_FN(CUI, UI_GetBBarLowerAspect);
  1476. DCVOID UI_OnNotifyBBarRectChange(RECT *prect);
  1477. DCVOID UI_OnNotifyBBarVisibleChange(int BBarVisible);
  1478. #endif
  1479. #endif // DISABLE_SHADOW_IN_FULLSCREEN
  1480. BOOL UI_GetStartFullScreen() {return _UI.fStartFullScreen;}
  1481. VOID UI_SetStartFullScreen(BOOL f) {_UI.fStartFullScreen = f;}
  1482. //
  1483. // Performance flags are currently a disabled feature list
  1484. // that is sent up to the server to selectively enable/disable
  1485. // certain features to optimize bandwidth
  1486. //
  1487. DWORD UI_GetPerformanceFlags() {return _UI.dwPerformanceFlags;}
  1488. VOID UI_SetPerformanceFlags(DWORD dw) {_UI.dwPerformanceFlags = dw;}
  1489. VOID UI_SetControlInstance(IUnknown* pUnkControl);
  1490. IUnknown* UI_GetControlInstance();
  1491. BOOL UI_GetEnableAutoReconnect() {return _UI.fEnableAutoReconnect;}
  1492. VOID UI_SetEnableAutoReconnect(BOOL b) {_UI.fEnableAutoReconnect = b;}
  1493. ULONG UI_GetAutoReconnectCookieLen() {return _UI.cbAutoReconnectCookieLen;}
  1494. PBYTE UI_GetAutoReconnectCookie() {return _UI.pAutoReconnectCookie;}
  1495. BOOL UI_SetAutoReconnectCookie(PBYTE pCookie, ULONG cbLen);
  1496. BOOL UI_CanAutoReconnect();
  1497. LONG UI_GetMaxArcAttempts()
  1498. {return _UI.MaxAutoReconnectionAttempts;}
  1499. VOID UI_SetMaxArcAttempts(LONG l)
  1500. {_UI.MaxAutoReconnectionAttempts = l;}
  1501. //
  1502. // Built-in ARC UI functions
  1503. //
  1504. BOOL UI_StartAutoReconnectDlg();
  1505. BOOL UI_StopAutoReconnectDlg();
  1506. BOOL UI_IsAutoReconnecting() {return _pArcUI ? TRUE : FALSE;}
  1507. //
  1508. // Received autoreconenct status from the server
  1509. //
  1510. VOID UI_OnReceivedArcStatus(LONG arcStatus);
  1511. VOID UI_OnAutoReconnectStopped();
  1512. private:
  1513. //
  1514. // Class pointers to callee's
  1515. //
  1516. CCO* _pCo;
  1517. CCLX* _clx;
  1518. CUT* _pUt;
  1519. CTD* _pTd;
  1520. CIH* _pIh;
  1521. CCD* _pCd;
  1522. COP* _pOp;
  1523. CChan* _pCChan;
  1524. CUH* _pUh;
  1525. #ifdef USE_BBAR
  1526. CBBar* _pBBar;
  1527. #endif
  1528. //
  1529. // Struct handed off to winsock
  1530. // for hostname lookup
  1531. //
  1532. PBYTE _pHostData;
  1533. #ifdef USE_BBAR
  1534. //
  1535. // Last mouse pos used for bbar hotzone tracking
  1536. //
  1537. BOOL _fBBarUnhideTimerActive;
  1538. POINT _ptBBarLastMousePos;
  1539. #endif
  1540. // Handling recursive WM_SIZE for scrollbars
  1541. BOOL _fRecursiveScrollBarMsg;
  1542. //RDPDR internal plugin initialization data
  1543. RDPDR_DATA _drInitData;
  1544. BOOL _fRecursiveSizeMsg;
  1545. BOOL _fIhHasFocus;
  1546. #ifndef OS_WINCE
  1547. ITfLangBarMgr *_pITLBM;
  1548. BOOL _fLangBarWasHidden;
  1549. DWORD _dwLangBarFlags;
  1550. BOOL _fLangBarStateSaved;
  1551. //
  1552. // We use the shell taskbar API to ensure the taskbar
  1553. // hides itself when we go fullscreen in control-handled
  1554. // fullscreen
  1555. //
  1556. //Cached interface pointer to shell task bar
  1557. ITaskbarList2* _pTaskBarList2;
  1558. //Flag indicaticating we already tried to get the TaskBarList2
  1559. //so we shouldn't bother trying again
  1560. BOOL _fQueriedForTaskBarList2;
  1561. #endif
  1562. BOOL _fTerminating;
  1563. //
  1564. // Autoreconnect dialog
  1565. //
  1566. CAutoReconnectUI* _pArcUI;
  1567. public:
  1568. //
  1569. // Bucket to all the objects for this client instance
  1570. //
  1571. CObjs _Objects;
  1572. };
  1573. #endif // _H_WUI