65ad667218e5194c205ccd46b08c5b0156386fae
[reactos.git] / reactos / lib / ntdll / rtl / exception.c
1 /* $Id: exception.c,v 1.7 2001/09/24 00:51:16 chorns Exp $
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * PURPOSE: User-mode exception support
6 * FILE: lib/ntdll/rtl/exception.c
7 * PROGRAMER: David Welch <welch@cwcom.net>
8 */
9
10 /* INCLUDES *****************************************************************/
11
12 #include <ddk/ntddk.h>
13 #include <windows.h>
14 #include <string.h>
15
16 /* FUNCTIONS ***************************************************************/
17
18 VOID STDCALL
19 RtlRaiseException(PEXCEPTION_RECORD ExceptionRecord)
20 {
21 }
22
23 ULONG
24 RtlDispatchException(PEXCEPTION_RECORD ExceptionRecord,
25 PCONTEXT Context)
26 {
27
28 }
29
30 VOID STDCALL
31 KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord,
32 PCONTEXT Context)
33 {
34 EXCEPTION_RECORD NestedExceptionRecord;
35 NTSTATUS Status;
36
37 if (RtlDispatchException(ExceptionRecord, Context) == 1)
38 {
39 Status = ZwContinue(Context, FALSE);
40 }
41 else
42 {
43 Status = ZwRaiseException(ExceptionRecord, Context, FALSE);
44 }
45
46 NestedExceptionRecord.ExceptionCode = Status;
47 NestedExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
48 NestedExceptionRecord.ExceptionRecord = ExceptionRecord;
49
50 RtlRaiseException(&NestedExceptionRecord);
51 }
52
53 VOID STDCALL
54 RtlRaiseStatus(NTSTATUS Status)
55 {
56 EXCEPTION_RECORD ExceptionRecord;
57
58 ExceptionRecord.ExceptionCode = Status;
59 ExceptionRecord.ExceptionRecord = NULL;
60 ExceptionRecord.NumberParameters = 0;
61 ExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
62 RtlRaiseException (& ExceptionRecord);
63 }
64
65
66 VOID STDCALL
67 RtlUnwind(PEXCEPTION_REGISTRATION RegistrationFrame,
68 PVOID ReturnAddress,
69 PEXCEPTION_RECORD ExceptionRecord,
70 DWORD EaxValue)
71 {
72
73 }
74
75 /* EOF */