<s>
The	O
Microsoft	B-Application
Windows	I-Application
family	O
of	O
operating	B-General_Concept
systems	I-General_Concept
employ	O
some	O
specific	O
exception	B-General_Concept
handling	I-General_Concept
mechanisms	O
.	O
</s>
<s>
Microsoft	O
Structured	B-Library
Exception	I-Library
Handling	I-Library
is	O
the	O
native	O
exception	B-General_Concept
handling	I-General_Concept
mechanism	O
for	O
Windows	O
and	O
a	O
forerunner	O
technology	O
to	O
Vectored	O
Exception	B-General_Concept
Handling	I-General_Concept
(	O
VEH	O
)	O
.	O
</s>
<s>
It	O
features	O
the	O
finally	O
mechanism	O
not	O
present	O
in	O
standard	O
C++	B-Language
exceptions	O
(	O
but	O
present	O
in	O
most	O
imperative	B-Application
languages	I-Application
introduced	O
later	O
)	O
.	O
</s>
<s>
SEH	O
is	O
set	O
up	O
and	O
handled	O
separately	O
for	O
each	O
thread	B-Operating_System
of	I-Operating_System
execution	I-Operating_System
.	O
</s>
<s>
MS	O
Visual	O
C++	B-Language
compiler	O
features	O
three	O
non-standard	O
keywords	O
:	O
__try	O
,	O
__except	O
and	O
__finally	O
—	O
for	O
this	O
purpose	O
.	O
</s>
<s>
Other	O
exception	B-General_Concept
handling	I-General_Concept
aspects	O
are	O
backed	O
by	O
a	O
number	O
of	O
Win32	B-Library
API	I-Library
functions	O
,	O
for	O
example	O
,	O
RaiseException	O
to	O
raise	O
SEH	O
exceptions	O
manually	O
.	O
</s>
<s>
Each	O
thread	B-Operating_System
of	I-Operating_System
execution	I-Operating_System
in	O
Windows	O
IA-32	B-Device
edition	O
or	O
the	O
WoW64	B-Application
emulation	O
layer	O
for	O
the	O
x86-64	B-Device
version	O
has	O
a	O
link	O
to	O
an	O
undocumented	O
list	O
at	O
the	O
start	O
of	O
its	O
Thread	B-Operating_System
Information	I-Operating_System
Block	I-Operating_System
.	O
</s>
<s>
That	O
function	O
allocates	O
an	O
on	B-General_Concept
the	I-General_Concept
stack	I-General_Concept
pointing	O
to	O
the	O
__except_handler3	O
function	O
in	O
msvcrt.dll	O
,	O
then	O
adds	O
the	O
record	O
to	O
the	O
list	O
's	O
head	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
an	O
exception	O
in	O
user	B-Operating_System
mode	I-Operating_System
code	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
parses	O
the	O
thread	B-Operating_System
's	O
list	O
and	O
calls	O
each	O
exception	B-General_Concept
handler	I-General_Concept
in	O
sequence	O
until	O
a	O
handler	O
signals	O
it	O
has	O
handled	O
the	O
exception	O
(	O
by	O
return	B-Language
value	I-Language
)	O
or	O
the	O
list	O
is	O
exhausted	O
.	O
</s>
<s>
The	O
last	O
one	O
in	O
the	O
list	O
is	O
always	O
the	O
kernel32	O
!	O
UnhandledExceptionFilter	O
which	O
displays	O
the	O
General	B-Operating_System
protection	I-Operating_System
fault	I-Operating_System
error	O
message	O
.	O
</s>
<s>
SEH	O
on	O
64-bit	O
Windows	O
does	O
not	O
involve	O
a	O
runtime	B-General_Concept
exception	I-General_Concept
handler	O
list	O
;	O
instead	O
,	O
it	O
uses	O
a	O
stack	O
unwinding	O
table	O
(	O
UNWIND_INFO	O
)	O
interpreted	O
by	O
the	O
system	O
when	O
an	O
exception	O
occurs	O
.	O
</s>
<s>
This	O
means	O
that	O
the	O
compiler	O
does	O
not	O
have	O
to	O
generate	O
extra	O
code	O
to	O
manually	O
perform	O
stack	O
unwinding	O
and	O
to	O
call	O
exception	B-General_Concept
handlers	I-General_Concept
appropriately	O
.	O
</s>
<s>
It	O
merely	O
has	O
to	O
emit	O
information	O
in	O
the	O
form	O
of	O
unwinding	O
tables	O
about	O
the	O
stack	O
frame	O
layout	O
and	O
specified	O
exception	B-General_Concept
handlers	I-General_Concept
.	O
</s>
<s>
GCC	O
4.8	O
+	O
from	O
Mingw-w64	B-Application
supports	O
using	O
64-bit	O
SEH	O
for	O
C++	B-Language
exceptions	O
.	O
</s>
<s>
LLVM	B-Application
clang	O
supports	O
__try	O
on	O
both	O
x86	O
and	O
x64	B-Device
.	O
</s>
<s>
Vectored	O
Exception	B-General_Concept
Handling	I-General_Concept
was	O
introduced	O
in	O
Windows	B-Application
XP	I-Application
.	O
</s>
<s>
Vectored	O
Exception	B-General_Concept
Handling	I-General_Concept
is	O
made	O
available	O
to	O
Windows	O
programmers	O
using	O
languages	O
such	O
as	O
C++	B-Language
and	O
Visual	B-Language
Basic	I-Language
.	O
</s>
<s>
VEH	O
does	O
not	O
replace	O
Structured	B-Library
Exception	I-Library
Handling	I-Library
(	O
SEH	O
)	O
;	O
rather	O
,	O
VEH	O
and	O
SEH	O
coexist	O
,	O
with	O
VEH	O
handlers	O
having	O
priority	O
over	O
SEH	O
handlers	O
.	O
</s>
<s>
Compared	O
with	O
SEH	O
,	O
VEH	O
works	O
more	O
like	O
kernel-delivered	O
Unix	B-Operating_System
signals	I-Operating_System
.	O
</s>
