ReactOS 0.4.15-dev-7934-g1dc8d80
seh0007.c File Reference
#include <windows.h>
#include "seh.h"
Include dependency graph for seh0007.c:

Go to the source code of this file.

Functions

int main ()
 

Variables

char test [] = "SEH0007.c"
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 10 of file seh0007.c.

10 {
11 PLONG BadAddress;
12 PLONG BlackHole;
14
15 // startest();
16
17 BadAddress = (PLONG)((PVOID)0);
18 BlackHole = &Counter;
19
20 Counter = 0;
21 try {
22 try {
23 Counter += 1;
24 *BlackHole += *BadAddress;
25 }
26 finally {
27 if (abnormal_termination() != 0)
28 /*
29 * should execute handler as not abnormal
30 * termination
31 */
32 {
33 Counter += 1;
34 }
35 }
36 endtry
37 }
39 /* counter is positive == EXECUTE_HANDLER */
40 {
41 if (Counter == 2)
42 /* counter should equal 2 and execute handler */
43 {
44 Counter += 1;
45 }
46 }
47 endtry
48
49 if (Counter != 3) {
50 printf("TEST 7 FAILED. Counter = %d\n\r", Counter);
51 return -1;
52 }
53
54 return 0;
55}
#define except(x)
Definition: btrfs_drv.h:136
#define printf
Definition: freeldr.h:97
long LONG
Definition: pedump.c:60
#define endtry
Definition: seh.h:24
#define abnormal_termination
Definition: seh.h:25
static LARGE_INTEGER Counter
Definition: clock.c:43
int32_t * PLONG
Definition: typedefs.h:58

Variable Documentation

◆ test

char test[] = "SEH0007.c"

Definition at line 8 of file seh0007.c.