Source code of Windows XP (NT5)
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.

99 lines
2.9 KiB

  1. /***
  2. *eh.h - User include file for exception handling.
  3. *
  4. * Copyright (c) 1993-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * User include file for exception handling.
  8. *
  9. * [Public]
  10. *
  11. *Revision History:
  12. * 10-12-93 BSC Module created.
  13. * 11-04-93 CFW Converted to CRT format.
  14. * 11-03-94 GJF Ensure 8 byte alignment. Also, changed nested include
  15. * macro to match our naming convention.
  16. * 12-15-94 XY merged with mac header
  17. * 02-11-95 CFW Add _CRTBLD to avoid users getting wrong headers.
  18. * 02-14-95 CFW Clean up Mac merge.
  19. * 12-14-95 JWM Add "#pragma once".
  20. * 02-20-97 GJF Cleaned out obsolete support for _CRTAPI* and _NTSDK.
  21. * Replaced !defined(_M_MPPC) && !defined(_M_M68K) with
  22. * !defined(_MAC). Also, detab-ed.
  23. * 09-30-97 JWM Restored not-so-obsolete _CRTAPI1 support.
  24. * 10-07-97 RDL Added IA64.
  25. * 05-13-99 PML Remove _CRTAPI1
  26. * 05-17-99 PML Remove all Macintosh support.
  27. * 12-10-99 GB Added __uncaught_exception().
  28. *
  29. ****/
  30. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  31. #pragma once
  32. #endif
  33. #ifndef _INC_EH
  34. #define _INC_EH
  35. #if !defined(_WIN32)
  36. #error ERROR: Only Win32 target supported!
  37. #endif
  38. #ifndef _CRTBLD
  39. /* This version of the header files is NOT for user programs.
  40. * It is intended for use when building the C runtimes ONLY.
  41. * The version intended for public use will not have this message.
  42. */
  43. #error ERROR: Use of C runtime library internal header file.
  44. #endif /* _CRTBLD */
  45. #ifdef _MSC_VER
  46. // Currently, all MS C compilers for Win32 platforms default to 8 byte
  47. // alignment.
  48. #pragma pack(push,8)
  49. #endif // _MSC_VER
  50. #ifndef __cplusplus
  51. #error "eh.h is only for C++!"
  52. #endif
  53. /* Define _CRTIMP */
  54. #ifndef _CRTIMP
  55. #ifdef CRTDLL
  56. #define _CRTIMP __declspec(dllexport)
  57. #else /* ndef CRTDLL */
  58. #ifdef _DLL
  59. #define _CRTIMP __declspec(dllimport)
  60. #else /* ndef _DLL */
  61. #define _CRTIMP
  62. #endif /* _DLL */
  63. #endif /* CRTDLL */
  64. #endif /* _CRTIMP */
  65. typedef void (__cdecl *terminate_function)();
  66. typedef void (__cdecl *unexpected_function)();
  67. typedef void (__cdecl *terminate_handler)();
  68. typedef void (__cdecl *unexpected_handler)();
  69. struct _EXCEPTION_POINTERS;
  70. typedef void (__cdecl *_se_translator_function)(unsigned int, struct _EXCEPTION_POINTERS*);
  71. #if _MSC_VER >= 1200 /*IFSTRIP=IGN*/
  72. _CRTIMP __declspec(noreturn) void __cdecl terminate(void);
  73. _CRTIMP __declspec(noreturn) void __cdecl unexpected(void);
  74. #else
  75. _CRTIMP void __cdecl terminate(void);
  76. _CRTIMP void __cdecl unexpected(void);
  77. #endif
  78. _CRTIMP terminate_function __cdecl set_terminate(terminate_function);
  79. _CRTIMP unexpected_function __cdecl set_unexpected(unexpected_function);
  80. _CRTIMP _se_translator_function __cdecl _set_se_translator(_se_translator_function);
  81. _CRTIMP bool __uncaught_exception();
  82. #ifdef _MSC_VER
  83. #pragma pack(pop)
  84. #endif // _MSC_VER
  85. #endif // _INC_EH