File: except.h

package info (click to toggle)
wine 0.0.980315-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 10,136 kB
  • ctags: 26,112
  • sloc: ansic: 156,310; makefile: 1,160; yacc: 807; perl: 655; lex: 555; sh: 304
file content (63 lines) | stat: -rw-r--r-- 1,955 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 * except.h
 * Copyright (c) 1996, Onno Hovers (onno@stack.urc.tue.nl)
 */

#ifndef __WINE_EXCEPT_H
#define __WINE_EXCEPT_H

#include "winnt.h"

/*
 * the function pointer to a exception handler
 */

/* forward definition */
struct __EXCEPTION_FRAME;

typedef DWORD (CALLBACK *PEXCEPTION_HANDLER)( PEXCEPTION_RECORD pexcrec,
                                      struct __EXCEPTION_FRAME  *pestframe,
                                      PCONTEXT                   pcontext,
                                      LPVOID                     pdispatcher);

/*
 * The exception frame, used for registering exception handlers 
 * Win32 cares only about this, but compilers generally emit 
 * larger exception frames for their own use.
 */

typedef struct __EXCEPTION_FRAME
{
  struct __EXCEPTION_FRAME *Prev;
  PEXCEPTION_HANDLER       Handler;
} EXCEPTION_FRAME, *PEXCEPTION_FRAME;

/*
 * Function definitions  
 */
 
void WINAPI RaiseException(DWORD exccode, DWORD excflags, 
                           DWORD nargs, const LPDWORD pargs,
                           PCONTEXT pcontext /* Wine additional parameter */); 
                        
/*
 *  this undocumented function is called when an exception
 *  handler wants all the frames to be unwound. RtlUnwind
 *  calls all exception handlers with the EH_UNWIND or
 *  EH_EXIT_UNWIND flags set in the exception record
 *
 *  This prototype assumes RtlUnwind takes the same
 *  parameters as OS/2 2.0 DosUnwindException
 *  Disassembling RtlUnwind shows this is true, except for
 *  the TargetEIP parameter, which is unused. There is 
 *  a fourth parameter, that is used as the eax in the 
 *  context.   
 */

void WINAPI RtlUnwind( PEXCEPTION_FRAME pestframe,
                       LPVOID unusedEIP,
                       PEXCEPTION_RECORD pexcrec,
                       DWORD contextEAX,
                       PCONTEXT pcontext /* Wine additional parameter */ );

#endif  /* __WINE_EXCEPT_H */