ReactOS  0.4.15-dev-5112-g22d8c0f
seh0001.c
Go to the documentation of this file.
1 // Copyright (c) Microsoft. All rights reserved.
2 // Licensed under the MIT license. See LICENSE file in the project root for
3 // full license information.
4 
5 #include <windows.h>
6 #include "seh.h"
7 
8 char test[] = "SEH0001.c";
9 
10 int main() {
11  long Counter;
12 
13  Counter = 0;
14 
15  try {
16  Counter += 1;
17  }
18  finally {
19  if (abnormal_termination() == 0) {
20  Counter += 1;
21  }
22  }
23  endtry
24 
25  if (Counter != 2) {
26  printf("TEST 1 FAILED. Counter = %d\n\r", Counter);
27  return -1;
28  }
29  return 0;
30 }
#define endtry
Definition: seh.h:24
char test[]
Definition: seh0001.c:8
int main()
Definition: seh0001.c:10
#define printf
Definition: freeldr.h:94
static LARGE_INTEGER Counter
Definition: clock.c:43
#define abnormal_termination
Definition: seh.h:25