| 1 | /* $Id: except.h,v 1.1 1999-05-24 20:19:12 ktk Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * except.h
|
|---|
| 5 | * Copyright (c) 1996, Onno Hovers (onno@stack.urc.tue.nl)
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef __WINE_EXCEPT_H
|
|---|
| 9 | #define __WINE_EXCEPT_H
|
|---|
| 10 |
|
|---|
| 11 | #include "winnt.h"
|
|---|
| 12 |
|
|---|
| 13 | /*
|
|---|
| 14 | * the function pointer to a exception handler
|
|---|
| 15 | */
|
|---|
| 16 |
|
|---|
| 17 | /* forward definition */
|
|---|
| 18 | struct __EXCEPTION_FRAME;
|
|---|
| 19 |
|
|---|
| 20 | typedef DWORD (CALLBACK *PEXCEPTION_HANDLER)( PEXCEPTION_RECORD pexcrec,
|
|---|
| 21 | struct __EXCEPTION_FRAME *pestframe,
|
|---|
| 22 | PCONTEXT pcontext,
|
|---|
| 23 | LPVOID pdispatcher);
|
|---|
| 24 |
|
|---|
| 25 | /*
|
|---|
| 26 | * The exception frame, used for registering exception handlers
|
|---|
| 27 | * Win32 cares only about this, but compilers generally emit
|
|---|
| 28 | * larger exception frames for their own use.
|
|---|
| 29 | */
|
|---|
| 30 |
|
|---|
| 31 | typedef struct __EXCEPTION_FRAME
|
|---|
| 32 | {
|
|---|
| 33 | struct __EXCEPTION_FRAME *Prev;
|
|---|
| 34 | PEXCEPTION_HANDLER Handler;
|
|---|
| 35 | } EXCEPTION_FRAME, *PEXCEPTION_FRAME;
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | /*
|
|---|
| 39 | * this undocumented function is called when an exception
|
|---|
| 40 | * handler wants all the frames to be unwound. RtlUnwind
|
|---|
| 41 | * calls all exception handlers with the EH_UNWIND or
|
|---|
| 42 | * EH_EXIT_UNWIND flags set in the exception record
|
|---|
| 43 | *
|
|---|
| 44 | * This prototype assumes RtlUnwind takes the same
|
|---|
| 45 | * parameters as OS/2 2.0 DosUnwindException
|
|---|
| 46 | * Disassembling RtlUnwind shows this is true, except for
|
|---|
| 47 | * the TargetEIP parameter, which is unused. There is
|
|---|
| 48 | * a fourth parameter, that is used as the eax in the
|
|---|
| 49 | * context.
|
|---|
| 50 | */
|
|---|
| 51 | void WINAPI RtlUnwind( PEXCEPTION_FRAME pestframe,
|
|---|
| 52 | LPVOID unusedEIP,
|
|---|
| 53 | PEXCEPTION_RECORD pexcrec,
|
|---|
| 54 | DWORD contextEAX );
|
|---|
| 55 |
|
|---|
| 56 | #endif /* __WINE_EXCEPT_H */
|
|---|