home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / mfc / include / afxver_.h < prev    next >
C/C++ Source or Header  |  1998-06-16  |  12KB  |  354 lines

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