afxver_.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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, VC++ 6.0
  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. #define _AFX_ENABLE_INLINES
  106. #endif
  107. #define _AFX_NO_NESTED_DERIVATION
  108. /////////////////////////////////////////////////////////////////////////////
  109. // Special configurations
  110. // _AFXEXT implies _AFXDLL
  111. #if defined(_AFXEXT) && !defined(_AFXDLL)
  112. #define _AFXDLL
  113. #endif
  114. #ifdef __BORLANDC__
  115. # if defined(_AFXDLL) && !defined(_RTLDLL)
  116. # error The dynamic MFC library requires the dynamic RTL.
  117. # endif
  118. #else
  119. # if defined(_AFXDLL) && !defined(_DLL)
  120. # error Please use the /MD switch for _AFXDLL builds
  121. # endif
  122. #endif
  123. #if defined(_AFXDLL) && !defined(_MT)
  124. #error Please use the /MD switch (multithreaded DLL C-runtime)
  125. #endif
  126. /////////////////////////////////////////////////////////////////////////////
  127. // special include files
  128. #ifndef AFX_INLINE
  129. #define AFX_INLINE inline /*__forceinline*/
  130. #endif
  131. #include <afxv_w32.h>
  132. // Include any non-Intel platform specific items
  133. #ifndef _X86_
  134. #include <afxv_cpu.h>
  135. #endif
  136. #ifdef _X86_
  137. #define _AFX_MINREBUILD
  138. #endif
  139. #if defined (_CUSTOM) || defined (__BORLANDC__)
  140. // Put any custom configuration items in afxv_cfg.h
  141. #include <afxv_cfg.h>
  142. #endif
  143. // setup default packing value
  144. #ifndef _AFX_PACKING
  145. #define _AFX_PACKING 4 // default packs structs at 4 bytes
  146. #endif
  147. #ifdef _AFXDLL
  148. #include <afxv_dll.h>
  149. #endif
  150. // Define this virtual key for use by status bar
  151. #ifndef VK_KANA
  152. #define VK_KANA 0x15
  153. #endif
  154. /////////////////////////////////////////////////////////////////////////////
  155. // Special AfxDebugBreak: used to break into debugger at critical times
  156. #ifndef AfxDebugBreak
  157. #ifdef _AFX_NO_DEBUG_CRT
  158. // by default, debug break is asm int 3, or a call to DebugBreak, or nothing
  159. #if defined(_M_IX86) && !defined(_AFX_PORTABLE)
  160. #define AfxDebugBreak() _asm { int 3 }
  161. #else
  162. #define AfxDebugBreak() DebugBreak()
  163. #endif
  164. #else
  165. #define AfxDebugBreak() _CrtDbgBreak()
  166. #endif
  167. #endif
  168. #ifndef _DEBUG
  169. #ifdef AfxDebugBreak
  170. #undef AfxDebugBreak
  171. #endif
  172. #define AfxDebugBreak()
  173. #endif // _DEBUG
  174. /////////////////////////////////////////////////////////////////////////////
  175. // Standard preprocessor symbols if not already defined
  176. /////////////////////////////////////////////////////////////////////////////
  177. // SIZE_T_MAX is used by the collection classes
  178. #ifndef SIZE_T_MAX
  179. #define SIZE_T_MAX UINT_MAX
  180. #endif
  181. // PASCAL is used for static member functions
  182. #ifndef PASCAL
  183. #define PASCAL __stdcall
  184. #endif
  185. // FASTCALL is used for static member functions with little or no params
  186. #ifndef FASTCALL
  187. #define FASTCALL __fastcall
  188. #endif
  189. // CDECL and EXPORT are defined in case WINDOWS.H doesn't
  190. #ifndef CDECL
  191. #define CDECL __cdecl
  192. #endif
  193. #ifndef EXPORT
  194. #define EXPORT
  195. #endif
  196. // UNALIGNED is used for unaligned data access (in CArchive mostly)
  197. #ifndef UNALIGNED
  198. #define UNALIGNED
  199. #endif
  200. // AFXAPI is used on global public functions
  201. #ifndef AFXAPI
  202. #define AFXAPI __stdcall
  203. #endif
  204. // AFXOLEAPI is used for some special OLE functions
  205. #ifndef AFXOLEAPI
  206. #define AFXOLEAPI __stdcall
  207. #endif
  208. // AFX_CDECL is used for rare functions taking variable arguments
  209. #ifndef AFX_CDECL
  210. #define AFX_CDECL __cdecl
  211. #endif
  212. // AFX_EXPORT is used for functions which need to be exported
  213. #ifndef AFX_EXPORT
  214. #define AFX_EXPORT EXPORT
  215. #endif
  216. #ifndef AFX_STATIC
  217. #define AFX_STATIC extern
  218. #define AFX_STATIC_DATA extern __declspec(selectany)
  219. #endif
  220. // The following macros are used to enable export/import
  221. // for data
  222. #ifndef AFX_DATA_EXPORT
  223. #define AFX_DATA_EXPORT __declspec(dllexport)
  224. #endif
  225. #ifndef AFX_DATA_IMPORT
  226. #define AFX_DATA_IMPORT __declspec(dllimport)
  227. #endif
  228. // for classes
  229. #ifndef AFX_CLASS_EXPORT
  230. #define AFX_CLASS_EXPORT __declspec(dllexport)
  231. #endif
  232. #ifndef AFX_CLASS_IMPORT
  233. #define AFX_CLASS_IMPORT __declspec(dllimport)
  234. #endif
  235. // for global APIs
  236. #ifndef AFX_API_EXPORT
  237. #define AFX_API_EXPORT __declspec(dllexport)
  238. #endif
  239. #ifndef AFX_API_IMPORT
  240. #define AFX_API_IMPORT __declspec(dllimport)
  241. #endif
  242. // This macro is used to reduce size requirements of some classes
  243. #ifndef AFX_ALWAYS_VTABLE
  244. #ifndef AFX_NOVTABLE
  245. #if _MSC_VER >= 1100 && !defined(_DEBUG)
  246. #define AFX_NOVTABLE __declspec(novtable)
  247. #else
  248. #define AFX_NOVTABLE
  249. #endif
  250. #endif
  251. #endif
  252. // for global data that should be in COMDATs (packaged data)
  253. #ifndef AFX_COMDAT
  254. #define AFX_COMDAT
  255. #endif
  256. // The following macros are used on data declarations/definitions
  257. // (they are redefined for extension DLLs and the shared MFC DLL)
  258. #define AFX_DATA
  259. #define AFX_DATADEF
  260. #define AFX_API
  261. // used when building the "core" MFC42.DLL
  262. #ifndef AFX_CORE_DATA
  263. #define AFX_CORE_DATA
  264. #define AFX_CORE_DATADEF
  265. #endif
  266. // used when building the MFC/OLE support MFCO42.DLL
  267. #ifndef AFX_OLE_DATA
  268. #define AFX_OLE_DATA
  269. #define AFX_OLE_DATADEF
  270. #endif
  271. // used when building the MFC/DB support MFCD42.DLL
  272. #ifndef AFX_DB_DATA
  273. #define AFX_DB_DATA
  274. #define AFX_DB_DATADEF
  275. #endif
  276. // used when building the MFC/NET support MFCN42.DLL
  277. #ifndef AFX_NET_DATA
  278. #define AFX_NET_DATA
  279. #define AFX_NET_DATADEF
  280. #endif
  281. // used when building extension DLLs
  282. #ifndef AFX_EXT_DATA
  283. #define AFX_EXT_DATA
  284. #define AFX_EXT_DATADEF
  285. #define AFX_EXT_CLASS
  286. #define AFX_EXT_API
  287. #endif
  288. // BASED_XXXX macros are provided for backward compatibility
  289. #ifndef BASED_CODE
  290. #define BASED_CODE
  291. #endif
  292. #ifndef BASED_DEBUG
  293. #define BASED_DEBUG
  294. #endif
  295. #ifndef BASED_STACK
  296. #define BASED_STACK
  297. #endif
  298. // setup default code segment
  299. #ifdef AFX_DEF_SEG
  300. #pragma code_seg(AFX_DEF_SEG)
  301. #endif
  302. /////////////////////////////////////////////////////////////////////////////