home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / msj / v10n08 / oleq0895.exe / STDAFX.H < prev   
C/C++ Source or Header  |  1995-08-01  |  4KB  |  148 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992 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 Microsoft
  7. // QuickHelp and/or WinHelp documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. // STDAFX.H is the header that includes the standard includes that are used
  12. //  for most of the project.  These are compiled into a pre-compiled header
  13.  
  14. // turn off warnings for /W4 (just for MFC implementation)
  15. #ifndef ALL_WARNINGS
  16. #pragma warning(disable: 4073)  // disable warning about using init_seg
  17. #endif
  18.  
  19. // MFC inline constructors (including compiler generated) can get deep
  20. #pragma inline_depth(16)
  21.  
  22. // override default values for data import/export when building MFC DLLs
  23. #ifdef _AFX_CORE_IMPL
  24.     #define AFX_CORE_DATA   AFX_DATA_EXPORT
  25.     #define AFX_CORE_DATADEF
  26. #endif
  27.  
  28. #ifdef _AFX_OLE_IMPL
  29.     #define AFX_OLE_DATA    AFX_DATA_EXPORT
  30.     #define AFX_OLE_DATADEF
  31. #endif
  32.  
  33. #ifdef _AFX_DB_IMPL
  34.     #define AFX_DB_DATA     AFX_DATA_EXPORT
  35.     #define AFX_DB_DATADEF
  36. #endif
  37.  
  38. #ifdef _AFX_NET_IMPL
  39.     #define AFX_NET_DATA    AFX_DATA_EXPORT
  40.     #define AFX_NET_DATADEF
  41. #endif
  42.  
  43. #define _AFX_NOFORCE_LIBS
  44.  
  45. // core headers
  46. #include "afx.h"
  47. #include "afxplex_.h"
  48. #include "afxcoll.h"
  49.  
  50. // public headers
  51. #include "afxwin.h"
  52. #include "afxdlgs.h"
  53. #include "afxext.h"
  54. #ifndef _AFX_NO_OLE_SUPPORT
  55.     #include "afxole.h"
  56. #ifndef _AFXCTL
  57.     #include "afxodlgs.h"
  58. #else
  59.     #define _OLE_QUIET
  60.     #include <ole2ui.h>
  61. #endif
  62. #endif
  63. #ifndef _AFX_NO_DB_SUPPORT
  64.     #include "afxdb.h"
  65. #endif
  66.  
  67. // private headers as well
  68. #include "afxpriv.h"
  69. #include "afximpl.h"
  70. #ifndef _AFX_NO_OLE_SUPPORT
  71.     #include "oleimpl.h"
  72. #endif
  73. #ifndef _AFX_NO_DB_SUPPORT
  74.     #include "dbimpl.h"
  75. #endif
  76. #ifndef _AFX_NO_SOCKET_SUPPORT
  77.     #include "afxsock.h"
  78. #endif
  79.  
  80. #include <stddef.h>
  81. #include <limits.h>
  82. #include <malloc.h>
  83. #include <new.h>
  84. #ifndef _AFX_OLD_EXCEPTIONS
  85. #include <eh.h>     // for set_terminate
  86. #endif
  87.  
  88. #undef AfxWndProc
  89.  
  90. // implementation uses _AFX_PACKING as well
  91. #ifdef _AFX_PACKING
  92. #ifndef ALL_WARNINGS
  93. #pragma warning(disable: 4103)
  94. #endif
  95. #pragma pack(_AFX_PACKING)
  96. #endif
  97.  
  98. // special exception handling just for MFC library implementation
  99. #ifndef _AFX_OLD_EXCEPTIONS
  100.  
  101. // MFC does not rely on auto-delete semantics of the TRY..CATCH macros,
  102. //  therefore those macros are mapped to something closer to the native
  103. //  C++ exception handling mechanism when building MFC itself.
  104.  
  105. #undef TRY
  106. #define TRY { try {
  107.  
  108. #undef CATCH
  109. #define CATCH(class, e) } catch (class* e) \
  110.     { ASSERT(e->IsKindOf(RUNTIME_CLASS(class))); e;
  111.  
  112. #undef AND_CATCH
  113. #define AND_CATCH(class, e) } catch (class* e) \
  114.     { ASSERT(e->IsKindOf(RUNTIME_CLASS(class))); e;
  115.  
  116. #undef CATCH_ALL
  117. #define CATCH_ALL(e) } catch (CException* e) \
  118.     { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); e;
  119.  
  120. #undef AND_CATCH_ALL
  121. #define AND_CATCH_ALL(e) } catch (CException* e) \
  122.     { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); e;
  123.  
  124. #undef END_TRY
  125. #define END_TRY } catch (CException* e) \
  126.     { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); e->Delete(); } }
  127.  
  128. #undef THROW_LAST
  129. #define THROW_LAST() throw
  130.  
  131. // Because of the above definitions of TRY...CATCH it is necessary to
  132. //  explicitly delete exception objects at the catch site.
  133.  
  134. #define DELETE_EXCEPTION(e) do { e->Delete(); } while (0)
  135. #define NO_CPP_EXCEPTION(expr)
  136.  
  137. #else   //!_AFX_OLD_EXCEPTIONS
  138.  
  139. // In this case, the TRY..CATCH macros provide auto-delete semantics, so
  140. //  it is not necessary to explicitly delete exception objects at the catch site.
  141.  
  142. #define DELETE_EXCEPTION(e)
  143. #define NO_CPP_EXCEPTION(expr) expr
  144.  
  145. #endif  //_AFX_OLD_EXCEPTIONS
  146.  
  147. /////////////////////////////////////////////////////////////////////////////
  148.