ReactOS  0.4.15-dev-2703-g05fb0f1
seh0019.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[] = "SEH0019.c";
9 int perfect;
10 
12  try {
13  try {
14  /* set counter = 2 */
15  *Counter += 1;
16  }
17  finally {
18  /* set counter = 3 */
19  *Counter += 1;
20 #ifdef _MSC_VER
21  return;
22 #endif
23  }
24  endtry
25 #ifndef _MSC_VER
26  return;
27 #endif
28  }
29  finally {
30  /* set counter = 4 */
31  *Counter += 1;
32  }
33  endtry
34  return;
35 }
36 
37 int main() {
38  LONG Counter;
39 
40  Counter = 0;
41 
42  try {
43  /* set counter = 1 */
44  Counter += 1;
45  fret(&Counter);
46  }
47  finally {
48  /* set counter = 5 */
49  Counter += 1;
50  }
51  endtry
52 
53  if (Counter != 5) {
54  printf("TEST 19 FAILED. Counter = %d\n\r", Counter);
55  return -1;
56  }
57 
58  return 0;
59 }
#define endtry
Definition: seh.h:24
long LONG
Definition: pedump.c:60
int perfect
Definition: seh0019.c:9
int main()
Definition: seh0019.c:37
void fret(PLONG Counter)
Definition: seh0019.c:11
char test[]
Definition: seh0019.c:8
static LARGE_INTEGER Counter
Definition: clock.c:43
signed int * PLONG
Definition: retypes.h:5
#define printf
Definition: config.h:203