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.

356 lines
11 KiB

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 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. // afxver_.h - target version/configuration control
  11. /////////////////////////////////////////////////////////////////////////////
  12. // Master version numbers
  13. #define _AFX 1 // Microsoft Application Framework Classes
  14. #ifndef _MFC_VER
  15. #define _MFC_VER 0x0600 // Microsoft Foundation Classes version 6.00
  16. #endif
  17. /////////////////////////////////////////////////////////////////////////////
  18. // Default swap tuning for AFX library
  19. #define _TEXTSEG(name) ".text$" #name
  20. // Most segments are tuned via function order list (DLL version)
  21. #ifndef _AFX_FUNCTION_ORDER
  22. #define AFX_CORE1_SEG _TEXTSEG(AFX_CORE1) // core functionality
  23. #define AFX_CORE2_SEG _TEXTSEG(AFX_CORE2) // more core functionality
  24. #define AFX_CORE3_SEG _TEXTSEG(AFX_CORE3) // more core functionality
  25. #define AFX_CORE4_SEG _TEXTSEG(AFX_CORE4) // more core functionality
  26. #define AFX_AUX_SEG _TEXTSEG(AFX_AUX) // auxilliary functionality
  27. #define AFX_CMNCTL_SEG _TEXTSEG(AFX_CMNCTL)// most common controls
  28. #define AFX_COLL_SEG _TEXTSEG(AFX_COL1) // collections
  29. #define AFX_COLL2_SEG _TEXTSEG(AFX_COL2) // more collections
  30. #define AFX_INET_SEG _TEXTSEG(AFX_INET) // Internet client-side stuff
  31. #define AFX_OLE_SEG _TEXTSEG(AFX_OLE1) // OLE support
  32. #define AFX_OLE2_SEG _TEXTSEG(AFX_OLE2) // more OLE support
  33. #define AFX_OLE3_SEG _TEXTSEG(AFX_OLE3) // and more OLE support
  34. #define AFX_OLE4_SEG _TEXTSEG(AFX_OLE4) // and more OLE support
  35. #define AFX_OLE5_SEG _TEXTSEG(AFX_OLE5) // and even more OLE support
  36. #define AFX_OLERA_SEG _TEXTSEG(AFX_OLERA) // (reserved for future use)
  37. #define AFX_PRINT_SEG _TEXTSEG(AFX_PRNT) // Printing functionality
  38. #define AFX_DBG1_SEG _TEXTSEG(AFX_DBG1) // inlines go here in _DEBUG
  39. #define AFX_DBG2_SEG _TEXTSEG(AFX_DBG2) // inlines go here in _DEBUG
  40. #define AFX_VDEL_SEG _TEXTSEG(AFX_VDEL) // vector deleting destructors
  41. #define AFX_TERM_SEG _TEXTSEG(AFX_TERM) // cleanup routines
  42. #define AFX_MAPI_SEG _TEXTSEG(AFX_MAPI) // simple MAPI support
  43. #define AFX_SOCK_SEG _TEXTSEG(AFX_SOCK) // windows sockets support
  44. #else
  45. #define AFX_CORE1_SEG // core functionality
  46. #define AFX_CORE2_SEG // more core functionality
  47. #define AFX_CORE3_SEG // more core functionality
  48. #define AFX_CORE4_SEG // more core functionality
  49. #define AFX_AUX_SEG // auxilliary functionality
  50. #define AFX_CMNCTL_SEG // most common controls
  51. #define AFX_COLL_SEG // collections
  52. #define AFX_COLL2_SEG // more collections
  53. #define AFX_INET_SEG // Internet client-side stuff
  54. #define AFX_OLE_SEG // OLE support
  55. #define AFX_OLE2_SEG // more OLE support
  56. #define AFX_OLE3_SEG // and more OLE support
  57. #define AFX_OLE4_SEG // and more OLE support
  58. #define AFX_OLE5_SEG // and even more OLE support
  59. #define AFX_OLERA_SEG // (reserved for future use)
  60. #define AFX_PRINT_SEG // Printing functionality
  61. #define AFX_DBG1_SEG // inlines go here in _DEBUG
  62. #define AFX_DBG2_SEG // inlines go here in _DEBUG
  63. #define AFX_VDEL_SEG // vector deleting destructors
  64. #define AFX_TERM_SEG // cleanup routines
  65. #define AFX_MAPI_SEG // simple MAPI support
  66. #define AFX_SOCK_SEG // windows sockets support
  67. #endif
  68. // AFX_INIT_SEG is hand tuned even in DLL version
  69. #define AFX_INIT_SEG _TEXTSEG(AFX_INIT) // initialization
  70. /////////////////////////////////////////////////////////////////////////////
  71. // turn off reference tracking for certain often used symbols
  72. #ifndef _AFX_PORTABLE
  73. #pragma component(browser, off, references, "ASSERT")
  74. #pragma component(browser, off, references, "AfxAssertFailedLine")
  75. #pragma component(browser, off, references, "AfxDebugBreak")
  76. #pragma component(browser, off, references, "BOOL")
  77. #pragma component(browser, off, references, "BYTE")
  78. #pragma component(browser, off, references, "DECLSPEC_IMPORT")
  79. #pragma component(browser, off, references, "DWORD")
  80. #pragma component(browser, off, references, "FALSE")
  81. #pragma component(browser, off, references, "FAR")
  82. #pragma component(browser, off, references, "LPSTR")
  83. #pragma component(browser, off, references, "LPTSTR")
  84. #pragma component(browser, off, references, "LPCSTR")
  85. #pragma component(browser, off, references, "LPCTSTR")
  86. #pragma component(browser, off, references, "NULL")
  87. #pragma component(browser, off, references, "PASCAL")
  88. #pragma component(browser, off, references, "THIS_FILE")
  89. #pragma component(browser, off, references, "TRUE")
  90. #pragma component(browser, off, references, "UINT")
  91. #pragma component(browser, off, references, "WINAPI")
  92. #pragma component(browser, off, references, "WORD")
  93. #endif //!_AFX_PORTABLE
  94. /////////////////////////////////////////////////////////////////////////////
  95. // For target version (one of)
  96. // _CUSTOM : for custom configurations (causes afxv_cfg.h to be included)
  97. //
  98. // Additional build options:
  99. // _DEBUG debug versions (full diagnostics)
  100. // _AFXDLL use shared MFC DLL
  101. // _AFXEXT extension DLL version, implies _AFXDLL
  102. // _USRDLL create regular DLL (_AFXDLL is valid too)
  103. //
  104. #ifndef _DEBUG
  105. #undef _AFX_ENABLE_INLINE
  106. #define _AFX_ENABLE_INLINES
  107. #endif
  108. #define _AFX_NO_NESTED_DERIVATION
  109. /////////////////////////////////////////////////////////////////////////////
  110. // Special configurations
  111. // _AFXEXT implies _AFXDLL
  112. #if defined(_AFXEXT) && !defined(_AFXDLL)
  113. #define _AFXDLL
  114. #endif
  115. #if defined(_AFXDLL) && !defined(_DLL)
  116. #error Please use the /MD switch for _AFXDLL builds
  117. #endif
  118. #if defined(_AFXDLL) && !defined(_MT)
  119. #error Please use the /MD switch (multithreaded DLL C-runtime)
  120. #endif
  121. /////////////////////////////////////////////////////////////////////////////
  122. // special include files
  123. #ifndef AFX_INLINE
  124. #define AFX_INLINE inline /* __forceinline*/
  125. #endif
  126. #include <afxv_w32.h>
  127. // Include any non-Intel platform specific items
  128. #ifndef _X86_
  129. #include <afxv_cpu.h>
  130. #endif
  131. #ifdef _X86_
  132. #define _AFX_MINREBUILD
  133. #endif
  134. #ifdef _CUSTOM
  135. // Put any custom configuration items in afxv_cfg.h
  136. #include <afxv_cfg.h>
  137. #endif
  138. // setup default packing value
  139. #ifndef _AFX_PACKING
  140. #define _AFX_PACKING 4 // default packs structs at 4 bytes
  141. #endif
  142. #ifdef _AFXDLL
  143. #include <afxv_dll.h>
  144. #endif
  145. // Define this virtual key for use by status bar
  146. #ifndef VK_KANA
  147. #define VK_KANA 0x15
  148. #endif
  149. /////////////////////////////////////////////////////////////////////////////
  150. // Special AfxDebugBreak: used to break into debugger at critical times
  151. #ifndef AfxDebugBreak
  152. #ifdef _AFX_NO_DEBUG_CRT
  153. // by default, debug break is asm int 3, or a call to DebugBreak, or nothing
  154. #if defined(_M_IX86) && !defined(_AFX_PORTABLE)
  155. #define AfxDebugBreak() _asm { int 3 }
  156. #else
  157. #define AfxDebugBreak() DebugBreak()
  158. #endif
  159. #else
  160. #define AfxDebugBreak() _CrtDbgBreak()
  161. #endif
  162. #endif
  163. #ifndef _DEBUG
  164. #ifdef AfxDebugBreak
  165. #undef AfxDebugBreak
  166. #endif
  167. #define AfxDebugBreak()
  168. #endif // _DEBUG
  169. /////////////////////////////////////////////////////////////////////////////
  170. // Standard preprocessor symbols if not already defined
  171. /////////////////////////////////////////////////////////////////////////////
  172. // SIZE_T_MAX is used by the collection classes
  173. #ifndef SIZE_T_MAX
  174. #define SIZE_T_MAX UINT_MAX
  175. #endif
  176. // PASCAL is used for static member functions
  177. #ifndef PASCAL
  178. #define PASCAL __stdcall
  179. #endif
  180. // FASTCALL is used for static member functions with little or no params
  181. #ifndef FASTCALL
  182. #define FASTCALL __fastcall
  183. #endif
  184. // CDECL and EXPORT are defined in case WINDOWS.H doesn't
  185. #ifndef CDECL
  186. #define CDECL __cdecl
  187. #endif
  188. #ifndef EXPORT
  189. #define EXPORT
  190. #endif
  191. // UNALIGNED is used for unaligned data access (in CArchive mostly)
  192. #ifndef UNALIGNED
  193. #define UNALIGNED
  194. #endif
  195. // AFXAPI is used on global public functions
  196. #ifndef AFXAPI
  197. #define AFXAPI __stdcall
  198. #endif
  199. // AFXOLEAPI is used for some special OLE functions
  200. #ifndef AFXOLEAPI
  201. #define AFXOLEAPI __stdcall
  202. #endif
  203. // AFX_CDECL is used for rare functions taking variable arguments
  204. #ifndef AFX_CDECL
  205. #define AFX_CDECL __cdecl
  206. #endif
  207. // AFX_EXPORT is used for functions which need to be exported
  208. #ifndef AFX_EXPORT
  209. #define AFX_EXPORT EXPORT
  210. #endif
  211. #ifndef AFX_STATIC
  212. #define AFX_STATIC extern
  213. #define AFX_STATIC_DATA extern __declspec(selectany)
  214. #endif
  215. // The following macros are used to enable export/import
  216. // for data
  217. #ifndef AFX_DATA_EXPORT
  218. #define AFX_DATA_EXPORT __declspec(dllexport)
  219. #endif
  220. #ifndef AFX_DATA_IMPORT
  221. #define AFX_DATA_IMPORT __declspec(dllimport)
  222. #endif
  223. // for classes
  224. #ifndef AFX_CLASS_EXPORT
  225. #define AFX_CLASS_EXPORT __declspec(dllexport)
  226. #endif
  227. #ifndef AFX_CLASS_IMPORT
  228. #define AFX_CLASS_IMPORT __declspec(dllimport)
  229. #endif
  230. // for global APIs
  231. #ifndef AFX_API_EXPORT
  232. #define AFX_API_EXPORT __declspec(dllexport)
  233. #endif
  234. #ifndef AFX_API_IMPORT
  235. #define AFX_API_IMPORT __declspec(dllimport)
  236. #endif
  237. // This macro is used to reduce size requirements of some classes
  238. #ifndef AFX_ALWAYS_VTABLE
  239. #ifndef AFX_NOVTABLE
  240. #if _MSC_VER >= 1100 && !defined(_DEBUG)
  241. #define AFX_NOVTABLE __declspec(novtable)
  242. #else
  243. #define AFX_NOVTABLE
  244. #endif
  245. #endif
  246. #endif
  247. // for global data that should be in COMDATs (packaged data)
  248. #ifndef AFX_COMDAT
  249. #define AFX_COMDAT
  250. #endif
  251. // The following macros are used on data declarations/definitions
  252. // (they are redefined for extension DLLs and the shared MFC DLL)
  253. #define AFX_DATA
  254. #define AFX_DATADEF
  255. #define AFX_API
  256. // used when building the "core" MFC42.DLL
  257. #ifndef AFX_CORE_DATA
  258. #define AFX_CORE_DATA
  259. #define AFX_CORE_DATADEF
  260. #endif
  261. // used when building the MFC/OLE support MFCO42.DLL
  262. #ifndef AFX_OLE_DATA
  263. #define AFX_OLE_DATA
  264. #define AFX_OLE_DATADEF
  265. #endif
  266. // used when building the MFC/DB support MFCD42.DLL
  267. #ifndef AFX_DB_DATA
  268. #define AFX_DB_DATA
  269. #define AFX_DB_DATADEF
  270. #endif
  271. // used when building the MFC/NET support MFCN42.DLL
  272. #ifndef AFX_NET_DATA
  273. #define AFX_NET_DATA
  274. #define AFX_NET_DATADEF
  275. #endif
  276. // used when building extension DLLs
  277. #ifndef AFX_EXT_DATA
  278. #define AFX_EXT_DATA
  279. #define AFX_EXT_DATADEF
  280. #define AFX_EXT_CLASS
  281. #define AFX_EXT_API
  282. #endif
  283. // BASED_XXXX macros are provided for backward compatibility
  284. #ifndef BASED_CODE
  285. #define BASED_CODE
  286. #endif
  287. #ifndef BASED_DEBUG
  288. #define BASED_DEBUG
  289. #endif
  290. #ifndef BASED_STACK
  291. #define BASED_STACK
  292. #endif
  293. // setup default code segment
  294. #ifdef AFX_DEF_SEG
  295. #pragma code_seg(AFX_DEF_SEG)
  296. #endif
  297. /////////////////////////////////////////////////////////////////////////////