ReactOS 0.4.15-dev-7906-g1b85a5f
seh0010.c File Reference
#include <windows.h>
#include "seh.h"
Include dependency graph for seh0010.c:

Go to the source code of this file.

Functions

void rtlRaiseExcpt (DWORD Status)
 
void tfRaiseExcpt (DWORD Status, PLONG Counter)
 
int main ()
 

Variables

char test [] = "SEH0010.c"
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 35 of file seh0010.c.

35 {
37
38 Counter = 0;
39
40 try {
42 }
44 /* exception raised was 0xC0000005L, and execute handler */
45 {
46 Counter -= 1;
47 }
48 endtry
49
50 if (Counter != 98) {
51 printf("TEST 10 FAILED. Counter = %d\n\r", Counter);
52 return -1;
53 }
54
55 return 0;
56}
#define except(x)
Definition: btrfs_drv.h:136
#define printf
Definition: freeldr.h:93
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
long LONG
Definition: pedump.c:60
void tfRaiseExcpt(DWORD Status, PLONG Counter)
Definition: seh0010.c:15
#define endtry
Definition: seh.h:24
#define GetExceptionCode()
Definition: seh.h:27
static LARGE_INTEGER Counter
Definition: clock.c:43

◆ rtlRaiseExcpt()

void rtlRaiseExcpt ( DWORD  Status)

Definition at line 10 of file seh0010.c.

10 {
11 RaiseException(Status, 0, /*no flags*/ 0, 0);
12 return;
13}
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
Status
Definition: gdiplustypes.h:25

Referenced by tfRaiseExcpt().

◆ tfRaiseExcpt()

void tfRaiseExcpt ( DWORD  Status,
PLONG  Counter 
)

Definition at line 15 of file seh0010.c.

15 {
16 try {
18 }
19 finally {
20 if (abnormal_termination() != 0)
21 /*
22 * not abnormal termination
23 * counter should eqaul 99
24 */
25 {
26 *Counter = 99;
27 } else {
28 *Counter = 100;
29 }
30 }
31 endtry
32 return;
33}
void rtlRaiseExcpt(DWORD Status)
Definition: seh0010.c:10
#define abnormal_termination
Definition: seh.h:25

Referenced by main().

Variable Documentation

◆ test

char test[] = "SEH0010.c"

Definition at line 8 of file seh0010.c.