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