ReactOS
0.4.16-dev-306-g647d351
seh0016.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
[] =
"SEH0016.c"
;
9
10
void
rtlRaiseExceptin
(
DWORD
Status
) {
11
RaiseException
(
Status
, 0,
/*no flags*/
0, 0);
12
return
;
13
}
14
15
int
main
() {
16
LONG
Counter
;
17
18
Counter
= 0;
19
20
try
{
21
try
{
22
try
{
23
/* set counter = 1 and raise exception */
24
Counter
+= 1;
25
rtlRaiseExceptin
(
EXCEPTION_INT_OVERFLOW
);
26
}
27
except
(1) {
28
/* set counter = 2 */
29
Counter
+= 1;
30
goto
t11;
/* can't jump into the body of a try/finally */
31
}
32
endtry
33
}
34
finally
{
35
/* set counter = 3 */
36
Counter
+= 1;
37
}
38
endtry
39
40
t11:
41
;
42
}
43
finally
{
44
/* set counter = 4 */
45
Counter
+= 1;
46
}
47
endtry
48
49
if
(
Counter
!= 4) {
50
printf
(
"TEST 16 FAILED. Counter = %d\n\r"
,
Counter
);
51
return
-1;
52
}
53
54
return
0;
55
}
except
#define except(x)
Definition:
btrfs_drv.h:136
RaiseException
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition:
except.c:700
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
printf
#define printf
Definition:
freeldr.h:97
Status
Status
Definition:
gdiplustypes.h:25
LONG
long LONG
Definition:
pedump.c:60
rtlRaiseExceptin
void rtlRaiseExceptin(DWORD Status)
Definition:
seh0016.c:10
test
char test[]
Definition:
seh0016.c:8
main
int main()
Definition:
seh0016.c:15
seh.h
endtry
#define endtry
Definition:
seh.h:24
Counter
static LARGE_INTEGER Counter
Definition:
clock.c:43
EXCEPTION_INT_OVERFLOW
#define EXCEPTION_INT_OVERFLOW
Definition:
winbase.h:350
modules
rostests
apitests
compiler
ms
seh
seh0016.c
Generated on Mon Dec 2 2024 06:09:03 for ReactOS by
1.9.6