ReactOS  0.4.15-dev-5112-g22d8c0f
seh0005.c File Reference
#include <windows.h>
#include "seh.h"
Include dependency graph for seh0005.c:

Go to the source code of this file.

Functions

int main ()
 

Variables

char test [] = "SEH0005.c"
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 10 of file seh0005.c.

10  {
11  PLONG BadAddress;
12  PLONG BlackHole;
13  LONG Counter;
14 
15  BadAddress = (PLONG)((PVOID)0);
16  BlackHole = &Counter;
17 
18  Counter = 0;
19 
20  try {
21  Counter += 1;
22  *BlackHole += *BadAddress;
23  }
25  /* counter == 1 (EXECUTE HANDLER) */
26  {
27  Counter += 1;
28  }
29  endtry
30 
31  if (Counter != 2) {
32  printf("TEST 5 FAILED. Counter = %d\n\r", Counter);
33  return -1;
34  }
35 
36  return 0;
37 }
#define endtry
Definition: seh.h:24
long LONG
Definition: pedump.c:60
#define printf
Definition: freeldr.h:94
#define except(x)
Definition: btrfs_drv.h:136
static LARGE_INTEGER Counter
Definition: clock.c:43
signed int * PLONG
Definition: retypes.h:5

Variable Documentation

◆ test

char test[] = "SEH0005.c"

Definition at line 8 of file seh0005.c.