From 89fae7eb30e5dfe80ee156e98f465117874fad5a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 12 May 1999 12:47:01 +0000 Subject: [PATCH] Moved some exception definitions to winnt.h and ntddk.h. --- include/except.h | 26 -------------------------- include/ntddk.h | 6 ++++-- include/winnt.h | 18 ++++++++++++++++++ misc/crtdll.c | 2 +- win32/init.c | 1 - 5 files changed, 23 insertions(+), 30 deletions(-) diff --git a/include/except.h b/include/except.h index 979fb0c92c0..e52b096ef5f 100644 --- a/include/except.h +++ b/include/except.h @@ -11,33 +11,7 @@ #include "winnt.h" #include "thread.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, - struct __EXCEPTION_FRAME **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; - -void WINAPI RtlUnwind(PEXCEPTION_FRAME,LPVOID,PEXCEPTION_RECORD,DWORD); - static inline EXCEPTION_FRAME *EXC_push_frame( EXCEPTION_FRAME *frame ) { TEB * teb = NtCurrentTeb(); diff --git a/include/ntddk.h b/include/ntddk.h index 4d19e40edde..937f32f3099 100644 --- a/include/ntddk.h +++ b/include/ntddk.h @@ -6,8 +6,8 @@ #ifndef __WINE_NTDDK_H #define __WINE_NTDDK_H -#include -#include +#include "ntdef.h" +#include "winnt.h" #include "winbase.h" /* fixme: should be taken out sometimes */ #ifdef __cplusplus @@ -575,6 +575,8 @@ BOOLEAN WINAPI RtlFreeHeap( void __cdecl DbgPrint(LPCSTR fmt,LPVOID args); DWORD WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL); void WINAPI RtlRaiseException(PEXCEPTION_RECORD); +void WINAPI RtlRaiseStatus(NTSTATUS); +void WINAPI RtlUnwind(PEXCEPTION_FRAME,LPVOID,PEXCEPTION_RECORD,DWORD); VOID WINAPI RtlAcquirePebLock(void); VOID WINAPI RtlReleasePebLock(void); DWORD WINAPI RtlAdjustPrivilege(DWORD x1,DWORD x2,DWORD x3,DWORD x4); diff --git a/include/winnt.h b/include/winnt.h index a05415bdfd5..113f92b7934 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -321,6 +321,24 @@ typedef struct _EXCEPTION_POINTERS PCONTEXT ContextRecord; } EXCEPTION_POINTERS, *PEXCEPTION_POINTERS; + +/* + * The exception frame, used for registering exception handlers + * Win32 cares only about this, but compilers generally emit + * larger exception frames for their own use. + */ + +struct __EXCEPTION_FRAME; + +typedef DWORD (CALLBACK *PEXCEPTION_HANDLER)(PEXCEPTION_RECORD,struct __EXCEPTION_FRAME*, + PCONTEXT,struct __EXCEPTION_FRAME **); + +typedef struct __EXCEPTION_FRAME +{ + struct __EXCEPTION_FRAME *Prev; + PEXCEPTION_HANDLER Handler; +} EXCEPTION_FRAME, *PEXCEPTION_FRAME; + #include "poppack.h" /* diff --git a/misc/crtdll.c b/misc/crtdll.c index e039fafb8df..9d8386add03 100644 --- a/misc/crtdll.c +++ b/misc/crtdll.c @@ -41,13 +41,13 @@ AJ 990101: #include "winbase.h" #include "winuser.h" #include "winerror.h" +#include "ntddk.h" #include "debug.h" #include "module.h" #include "heap.h" #include "crtdll.h" #include "drive.h" #include "file.h" -#include "except.h" #include "options.h" #include "winnls.h" diff --git a/win32/init.c b/win32/init.c index 64044330987..b608fcc1606 100644 --- a/win32/init.c +++ b/win32/init.c @@ -10,7 +10,6 @@ #include #include "winerror.h" #include "wine/winestring.h" -#include "except.h" #include "heap.h" #include "task.h" #include "debug.h"