home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / Excpt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  2.6 KB  |  113 lines

  1. /***
  2. *excpt.h - defines exception values, types and routines
  3. *
  4. *    Copyright (c) 1990-1998, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file contains the definitions and prototypes for the compiler-
  8. *    dependent intrinsics, support functions and keywords which implement
  9. *    the structured exception handling extensions.
  10. *
  11. ****/
  12.  
  13. #ifndef _INC_EXCPT
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. /*
  20.  * Exception disposition return values.
  21.  */
  22. typedef enum _EXCEPTION_DISPOSITION {
  23.     ExceptionContinueExecution,
  24.     ExceptionContinueSearch,
  25.     ExceptionNestedException,
  26.     ExceptionCollidedUnwind,
  27.     ExceptionExecuteHandler
  28. } EXCEPTION_DISPOSITION;
  29.  
  30.  
  31. /*
  32.  * Prototype for SEH support function.
  33.  */
  34.  
  35. /*
  36.  * Declarations to keep MIPS and ALPHA compiler happy
  37.  */
  38. typedef struct _EXCEPTION_POINTERS *Exception_info_ptr;
  39. struct _EXCEPTION_RECORD;
  40. struct _CONTEXT;
  41. struct _RUNTIME_FUNCTION;
  42. struct _EXCEPTION_REGISTRATION_RECORD;
  43.  
  44. typedef struct _DISPATCHER_CONTEXT {
  45. #if x86
  46.     struct _EXCEPTION_REGISTRATION_RECORD *RegistrationPointer;
  47.     ULONG ControlPc;
  48. #else
  49.     ULONG ControlPc;
  50.     struct _RUNTIME_FUNCTION *FunctionEntry;
  51.     ULONG EstablisherFrame;
  52.     PCONTEXT ContextRecord;
  53. #endif
  54. } DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
  55.  
  56. typedef EXCEPTION_DISPOSITION EXCEPTION_ROUTINE (
  57.     struct _EXCEPTION_RECORD *ExceptionRecord,
  58.     void *EstablisherFrame,
  59.     struct _CONTEXT *ContextRecord,
  60.     struct _DISPATCHER_CONTEXT *DispatcherContext
  61.     );
  62. typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE;
  63.  
  64. #if x86
  65. EXCEPTION_ROUTINE _except_handler3;
  66. #else
  67. EXCEPTION_ROUTINE __C_specific_handler;
  68. #endif
  69.  
  70. /*
  71.  * Keywords and intrinsics for SEH
  72.  */
  73.  
  74. #ifdef    _MSC_VER
  75.  
  76. #if    !defined(__cplusplus)
  77. #define try                __try
  78. #define except                __except
  79. #define finally             __finally
  80. #define leave                __leave
  81. #endif
  82.  
  83. #define GetExceptionCode        _exception_code
  84. #define exception_code            _exception_code
  85. #define GetExceptionInformation     (struct _EXCEPTION_POINTERS *)_exception_info
  86. #define exception_info            (struct _EXCEPTION_POINTERS *)_exception_info
  87. #define AbnormalTermination        _abnormal_termination
  88. #define abnormal_termination        _abnormal_termination
  89.  
  90. unsigned long __cdecl _exception_code(void);
  91. void *          __cdecl _exception_info(void);
  92. int          __cdecl _abnormal_termination(void);
  93.  
  94. #endif
  95.  
  96.  
  97. /*
  98.  * Legal values for expression in except().
  99.  */
  100.  
  101. #define EXCEPTION_EXECUTE_HANDLER     1
  102. #define EXCEPTION_CONTINUE_SEARCH     0
  103. #define EXCEPTION_CONTINUE_EXECUTION    -1
  104.  
  105.  
  106.  
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110.  
  111. #define _INC_EXCPT
  112. #endif    /* _INC_EXCPT */
  113.