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.

243 lines
5.8 KiB

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1995 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. // STDAFX.H is the header that includes the standard includes that are used
  11. // for most of the project. These are compiled into a pre-compiled header
  12. // turn off warnings for /W4 (just for MFC implementation)
  13. #ifndef ALL_WARNINGS
  14. #pragma warning(disable: 4073) // disable warning about using init_seg
  15. #ifdef _MAC
  16. #pragma warning(disable: 4121) // disable (incorrect?) warning about packing of MachineLocation in OSUtils.h
  17. #endif
  18. #endif
  19. // MFC inline constructors (including compiler generated) can get deep
  20. #pragma inline_depth(16)
  21. // override default values for data import/export when building MFC DLLs
  22. #ifdef _AFX_CORE_IMPL
  23. #define AFX_CORE_DATA AFX_DATA_EXPORT
  24. #define AFX_CORE_DATADEF
  25. #endif
  26. #ifdef _AFX_OLE_IMPL
  27. #define AFX_OLE_DATA AFX_DATA_EXPORT
  28. #define AFX_OLE_DATADEF
  29. #endif
  30. #ifdef _AFX_DB_IMPL
  31. #define AFX_DB_DATA AFX_DATA_EXPORT
  32. #define AFX_DB_DATADEF
  33. #endif
  34. #ifdef _AFX_NET_IMPL
  35. #define AFX_NET_DATA AFX_DATA_EXPORT
  36. #define AFX_NET_DATADEF
  37. #endif
  38. #ifndef _AFX_NOFORCE_LIBS
  39. #define _AFX_NOFORCE_LIBS
  40. #endif
  41. #define _AFX_FULLTYPEINFO
  42. #define VC_EXTRALEAN
  43. #define NO_ANSIUNI_ONLY
  44. // include these first so that protected structures in winwlm.h are declared
  45. #ifdef _MAC
  46. #define SystemSevenOrLater 1
  47. #include <macname1.h>
  48. #include <Types.h>
  49. #include <QuickDraw.h>
  50. #include <AppleEvents.h>
  51. #include <macname2.h>
  52. #endif
  53. // core headers
  54. #include "afx.h"
  55. #include "afxplex_.h"
  56. #include "afxcoll.h"
  57. // public headers
  58. #include "afxwin.h"
  59. //
  60. // MFC 4.2 hardcodes _RICHEDIT_VER to 0x0100 in afxwin.h. This prevents
  61. // richedit.h from enabling any richedit 2.0 features.
  62. //
  63. #ifdef _RICHEDIT_VER
  64. #if _RICHEDIT_VER < 0x0200
  65. #undef _RICHEDIT_VER
  66. #define _RICHEDIT_VER 0x0200
  67. #endif
  68. #endif
  69. #ifndef _AFX_ENABLE_INLINES
  70. #define _AFX_ENABLE_INLINES
  71. #endif
  72. #define _AFXCMN2_INLINE inline
  73. #define _AFXDLGS2_INLINE inline
  74. #define _AFXRICH2_INLINE inline
  75. #include "afxdlgs.h"
  76. #include "afxdlgs2.h"
  77. #include "afxext.h"
  78. #ifndef _AFX_NO_OLE_SUPPORT
  79. #ifndef _OLE2_H_
  80. #include <ole2.h>
  81. #endif
  82. #include <winspool.h>
  83. #ifdef _MAC
  84. // include OLE dialog/helper APIs
  85. #include <ole2ui.h>
  86. #else
  87. // include OLE dialog/helper APIs
  88. #ifndef _OLEDLG_H_
  89. #include <oledlg.h>
  90. #endif
  91. #endif
  92. #include <winreg.h>
  93. #include "afxcom_.h"
  94. // #include "oleimpl.h"
  95. #include "afxole.h"
  96. #ifndef _MAC
  97. #include "afxdocob.h"
  98. #endif
  99. #ifndef _AFX_NO_DAO_SUPPORT
  100. #include "afxdao.h"
  101. #endif
  102. #include "afxodlgs.h"
  103. #endif
  104. #ifndef _AFX_NO_OCX_SUPPORT
  105. #include "afxctl.h"
  106. #endif
  107. #ifndef _AFX_NO_DB_SUPPORT
  108. #include "afxdb.h"
  109. #endif
  110. #ifndef _AFX_NO_SYNC_SUPPORT
  111. #include "afxmt.h"
  112. #endif
  113. #ifndef _AFX_NO_INET_SUPPORT
  114. #include "afxinet.h"
  115. #endif
  116. // private headers as well
  117. #include "afxpriv.h"
  118. #include "afximpl2.h"
  119. //#include "winhand_.h"
  120. #ifndef _AFX_NO_OLE_SUPPORT
  121. #include "oleimpl3.h"
  122. #endif
  123. #ifndef _AFX_NO_OCX_SUPPORT
  124. // #include "ctlimpl.h"
  125. #endif
  126. #ifndef _AFX_NO_DB_SUPPORT
  127. // #include "dbimpl.h"
  128. #endif
  129. #ifndef _AFX_NO_DAO_SUPPORT
  130. // #include "daoimpl.h"
  131. #endif
  132. #ifndef _AFX_NO_SOCKET_SUPPORT
  133. #ifndef _WINSOCKAPI_
  134. // #include <winsock.h>
  135. #endif
  136. // #include "sockimpl.h"
  137. // #include "afxsock.h"
  138. #endif
  139. #ifndef _AFX_NO_AFXCMN_SUPPORT
  140. // #include "commimpl.h"
  141. #include "afxcmn.h"
  142. #include "afxcview.h"
  143. #endif
  144. #include "afxrich2.h"
  145. #include <winreg.h>
  146. #include <winnls.h>
  147. #include <stddef.h>
  148. #include <limits.h>
  149. #include <malloc.h>
  150. #include <new.h>
  151. #ifndef _AFX_OLD_EXCEPTIONS
  152. #include <eh.h> // for set_terminate
  153. #endif
  154. #undef AfxWndProc
  155. // implementation uses _AFX_PACKING as well
  156. #ifdef _AFX_PACKING
  157. #ifndef ALL_WARNINGS
  158. #pragma warning(disable: 4103)
  159. #endif
  160. #pragma pack(_AFX_PACKING)
  161. #endif
  162. // special exception handling just for MFC library implementation
  163. #ifndef _AFX_OLD_EXCEPTIONS
  164. // MFC does not rely on auto-delete semantics of the TRY..CATCH macros,
  165. // therefore those macros are mapped to something closer to the native
  166. // C++ exception handling mechanism when building MFC itself.
  167. #undef TRY
  168. #define TRY { try {
  169. #undef CATCH
  170. #define CATCH(class, e) } catch (class* e) \
  171. { ASSERT(e->IsKindOf(RUNTIME_CLASS(class))); UNUSED(e);
  172. #undef AND_CATCH
  173. #define AND_CATCH(class, e) } catch (class* e) \
  174. { ASSERT(e->IsKindOf(RUNTIME_CLASS(class))); UNUSED(e);
  175. #undef CATCH_ALL
  176. #define CATCH_ALL(e) } catch (CException* e) \
  177. { { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); UNUSED(e);
  178. #undef AND_CATCH_ALL
  179. #define AND_CATCH_ALL(e) } catch (CException* e) \
  180. { { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); UNUSED(e);
  181. #undef END_TRY
  182. #define END_TRY } catch (CException* e) \
  183. { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); e->Delete(); } }
  184. #undef THROW_LAST
  185. #define THROW_LAST() throw
  186. // Because of the above definitions of TRY...CATCH it is necessary to
  187. // explicitly delete exception objects at the catch site.
  188. #define DELETE_EXCEPTION(e) do { e->Delete(); } while (0)
  189. #define NO_CPP_EXCEPTION(expr)
  190. #else //!_AFX_OLD_EXCEPTIONS
  191. // In this case, the TRY..CATCH macros provide auto-delete semantics, so
  192. // it is not necessary to explicitly delete exception objects at the catch site.
  193. #define DELETE_EXCEPTION(e)
  194. #define NO_CPP_EXCEPTION(expr) expr
  195. #endif //_AFX_OLD_EXCEPTIONS
  196. #include <afxcmn2.h>
  197. #include <afxrich2.h>
  198. /////////////////////////////////////////////////////////////////////////////