ReactOS
0.4.16-dev-1059-gb1cf981
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
seh0009.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
[] =
"SEH0009.c"
;
9
10
void
AccessViolation
(
PLONG
BlackHole,
PLONG
BadAddress) {
11
*BlackHole += *BadAddress;
12
return
;
13
}
14
15
int
main
() {
16
PLONG
BadAddress;
17
PLONG
BlackHole;
18
LONG
Counter
;
19
20
BadAddress = (
PLONG
)((
PVOID
)0);
21
BlackHole = &
Counter
;
22
23
Counter
= 0;
24
25
try
{
26
Counter
+= 1;
27
AccessViolation
(BlackHole, BadAddress);
28
}
29
except
((
GetExceptionCode
() ==
STATUS_ACCESS_VIOLATION
) ? 1 : 0)
30
/*
31
* should be ACCESS VIOLATOIN 0xC0000005L) causing
32
* execution of handler
33
*/
34
{
35
Counter
+= 1;
36
}
37
endtry
38
39
if
(
Counter
!= 2) {
40
printf
(
"TEST 9 FAILED. Counter = %d\n\r"
,
Counter
);
41
return
-1;
42
}
43
44
return
0;
45
}
except
#define except(x)
Definition:
btrfs_drv.h:136
printf
#define printf
Definition:
freeldr.h:97
void
Definition:
nsiface.idl:2307
STATUS_ACCESS_VIOLATION
#define STATUS_ACCESS_VIOLATION
Definition:
ntstatus.h:242
LONG
long LONG
Definition:
pedump.c:60
GetExceptionCode
#define GetExceptionCode()
Definition:
exception.h:68
AccessViolation
void AccessViolation(PLONG BlackHole, PLONG BadAddress)
Definition:
seh0009.c:10
test
char test[]
Definition:
seh0009.c:8
main
int main()
Definition:
seh0009.c:15
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
seh0009.c
Generated on Wed Apr 30 2025 06:08:17 for ReactOS by
1.9.6