ReactOS
0.4.16-dev-122-g325d74c
seh0005.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
[] =
"SEH0005.c"
;
9
10
int
main
() {
11
PLONG
BadAddress;
12
PLONG
BlackHole;
13
LONG
Counter
;
14
15
BadAddress = (
PLONG
)((
PVOID
)0);
16
BlackHole = &
Counter
;
17
18
Counter
= 0;
19
20
try
{
21
Counter
+= 1;
22
*BlackHole += *BadAddress;
23
}
24
except
(
Counter
)
25
/* counter == 1 (EXECUTE HANDLER) */
26
{
27
Counter
+= 1;
28
}
29
endtry
30
31
if
(
Counter
!= 2) {
32
printf
(
"TEST 5 FAILED. Counter = %d\n\r"
,
Counter
);
33
return
-1;
34
}
35
36
return
0;
37
}
except
#define except(x)
Definition:
btrfs_drv.h:136
printf
#define printf
Definition:
freeldr.h:97
void
Definition:
nsiface.idl:2307
LONG
long LONG
Definition:
pedump.c:60
test
char test[]
Definition:
seh0005.c:8
main
int main()
Definition:
seh0005.c:10
seh.h
endtry
#define endtry
Definition:
seh.h:24
Counter
static LARGE_INTEGER Counter
Definition:
clock.c:43
PLONG
int32_t * PLONG
Definition:
typedefs.h:58
modules
rostests
apitests
compiler
ms
seh
seh0005.c
Generated on Sun Oct 13 2024 06:06:43 for ReactOS by
1.9.6