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.

160 lines
3.8 KiB

  1. // stdafx.h : include file for standard system include files,
  2. // or project specific include files that are used frequently, but
  3. // are changed infrequently
  4. //
  5. #ifndef _stdafx_h_
  6. #define _stdafx_h_
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10. #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
  11. // Windows Header Files:
  12. #include <windows.h>
  13. // C RunTime Header Files
  14. #include <stdlib.h>
  15. #include <stdio.h>
  16. #include <malloc.h>
  17. #include <memory.h>
  18. #include <tchar.h>
  19. #include "wincrypt.h"
  20. #ifndef _WIN32_WINNT
  21. #define _WIN32_WINNT 0x0400
  22. #endif
  23. #define _ATL_APARTMENT_THREADED
  24. //
  25. // FIX WIN64 ATL problem
  26. //
  27. #if defined (_M_IA64)
  28. #pragma comment(lib, "atl21asm.lib")
  29. #endif
  30. #if defined (_M_AMD64)
  31. #pragma comment(lib, "atlamd64.lib")
  32. #endif
  33. #ifndef OS_WINCE
  34. #include <atlbase.h>
  35. extern CComModule _Module;
  36. #include <atlcom.h>
  37. #include <atlhost.h>
  38. #include <atlctl.h>
  39. #else //OS_WINCE
  40. #define _ATL_NO_DEBUG_CRT
  41. #define ATLASSERT ASSERT
  42. #include <atlconv.h>
  43. #endif //OS_WINCE
  44. #define STRSAFE_NO_DEPRECATE 1
  45. #include <strsafe.h>
  46. //File generated by MIDL compiler
  47. #include "mstsax.h"
  48. /****************************************************************************/
  49. /* Help file name. */
  50. /****************************************************************************/
  51. #ifdef OS_WIN32
  52. #define UI_HELP_FILE_NAME _T("MSTSC.HLP")
  53. #else
  54. #define UI_HELP_FILE_NAME _T("MSTSC16.HLP")
  55. #endif
  56. /****************************************************************************/
  57. /* Help file contexts. */
  58. /****************************************************************************/
  59. #define UI_HELP_DISCONNECTING_CONTEXT 100
  60. #define UI_HELP_DISCONNECTED_CONTEXT 101
  61. #define UI_HELP_SHUTDOWN_CONTEXT 102
  62. #define UI_HELP_SERVERNAME_CONTEXT 103
  63. #define CHECK_RET_HR(f) \
  64. hr = f; \
  65. TRC_ASSERT(SUCCEEDED(hr), (TB, _T("ts control method failed: ") _T(#f) )); \
  66. if(FAILED(hr)) return FALSE;
  67. #define CHECK_DCQUIT_HR(f) \
  68. hr = f; \
  69. TRC_ASSERT(SUCCEEDED(hr), (TB, _T("ts control method failed: ") _T(#f) )); \
  70. if(FAILED(hr)) goto DC_EXIT_POINT;
  71. #ifdef DEBUG
  72. #define TRACE_HR(f) \
  73. hr = f; \
  74. if(FAILED(hr)) TRC_ERR((TB, _T("ts control method failed: ") _T(#f) _T(" hr: 0x%x"),hr));
  75. #else
  76. #define TRACE_HR(f) \
  77. hr = f;
  78. #endif
  79. #include <adcgbase.h>
  80. //Necessary to disable warnings in ATL headers
  81. #pragma warning(disable:4127) //conditional expression is constant
  82. #pragma warning(disable:4100) //unreferenced formal parameter
  83. #include "tscerrs.h" //error codes
  84. #define TS_CONTROL_CLSID _T("{8c11efaf-92c3-11d1-bc1e-00c04fa31489}"
  85. #define WM_SAVEPROPSHEET WM_USER+30
  86. #define WM_UPDATEFROMSETTINGS WM_USER+31
  87. #define WM_TSC_CONNECTED WM_USER+32
  88. #define WM_TSC_DISCONNECTED WM_USER+33
  89. #define WM_TSC_ENABLECONTROLS WM_USER+34
  90. #define WM_TSC_RETURNTOCONUI WM_USER+35
  91. #define SIZECHAR(x) sizeof(x)/sizeof(TCHAR)
  92. #define RDP_FILE_EXTENSION TEXT(".rdp")
  93. #define RDP_FILE_EXTENSION_NODOT TEXT("RDP")
  94. #define BOOL_TO_VB(x) (x ? VARIANT_TRUE : VARIANT_FALSE)
  95. #include "tscsetting.h"
  96. #include "constr.h"
  97. #include "commdlg.h"
  98. #include "shellapi.h" //for ExtractIcon
  99. #ifndef OS_WINCE
  100. #include "htmlhelp.h"
  101. #define MSTSC_HELP_FILE _T("mstsc.chm")
  102. #define MSTSC_HELP_FILE_ANSI "mstsc.chm"
  103. #else
  104. #define MSTSC_HELP_FILE L"file:TermServClient.htm#Main_Contents"
  105. #endif
  106. #ifdef OS_WINCE
  107. #undef SMART_SIZING
  108. #endif
  109. #ifndef OS_WINCE
  110. #include "uxtheme.h"
  111. #endif
  112. //
  113. // uwrap has to come after the headers for ANY wrapped
  114. // functions
  115. //
  116. #ifdef UNIWRAP
  117. #include "uwrap.h"
  118. #endif
  119. #endif // _stdafx_h_