ReactOS  0.4.15-dev-1636-gf634010
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 int perfect;
10 
11 int main() {
12  long Counter;
13 
14  Counter = 0;
15 
16  try {
17  Counter += 1;
18  }
19  finally {
20  if (abnormal_termination() == 0) {
21  Counter += 1;
22  }
23  }
24  endtry
25 
26  if (Counter != 2) {
27  printf("TEST 1 FAILED. Counter = %d\n\r", Counter);
28  return -1;
29  }
30  return 0;
31 }
#define endtry
Definition: seh.h:24
int perfect
Definition: seh0001.c:9
char test[]
Definition: seh0001.c:8
int main()
Definition: seh0001.c:11
static LARGE_INTEGER Counter
Definition: clock.c:43
#define abnormal_termination
Definition: seh.h:25
#define printf
Definition: config.h:203