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.

70 lines
1.6 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. ****/
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif
  15. #ifndef _INC_EH
  16. #define _INC_EH
  17. #if !defined(_WIN32)
  18. #error ERROR: Only Win32 target supported!
  19. #endif
  20. #ifdef _MSC_VER
  21. // Currently, all MS C compilers for Win32 platforms default to 8 byte
  22. // alignment.
  23. #pragma pack(push,8)
  24. #endif // _MSC_VER
  25. #ifndef __cplusplus
  26. #error "eh.h is only for C++!"
  27. #endif
  28. /* Define _CRTIMP */
  29. #ifndef _CRTIMP
  30. #ifdef _DLL
  31. #define _CRTIMP __declspec(dllimport)
  32. #else /* ndef _DLL */
  33. #define _CRTIMP
  34. #endif /* _DLL */
  35. #endif /* _CRTIMP */
  36. typedef void (__cdecl *terminate_function)();
  37. typedef void (__cdecl *unexpected_function)();
  38. typedef void (__cdecl *terminate_handler)();
  39. typedef void (__cdecl *unexpected_handler)();
  40. struct _EXCEPTION_POINTERS;
  41. typedef void (__cdecl *_se_translator_function)(unsigned int, struct _EXCEPTION_POINTERS*);
  42. #if _MSC_VER >= 1200
  43. _CRTIMP __declspec(noreturn) void __cdecl terminate(void);
  44. _CRTIMP __declspec(noreturn) void __cdecl unexpected(void);
  45. #else
  46. _CRTIMP void __cdecl terminate(void);
  47. _CRTIMP void __cdecl unexpected(void);
  48. #endif
  49. _CRTIMP terminate_function __cdecl set_terminate(terminate_function);
  50. _CRTIMP unexpected_function __cdecl set_unexpected(unexpected_function);
  51. _CRTIMP _se_translator_function __cdecl _set_se_translator(_se_translator_function);
  52. _CRTIMP bool __uncaught_exception();
  53. #ifdef _MSC_VER
  54. #pragma pack(pop)
  55. #endif // _MSC_VER
  56. #endif // _INC_EH