Microsoft-specific exception handling mechanisms: Difference between revisions

Content deleted Content added
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 17 templates: del empty params (5×); hyphenate params (12×);
m Enum 1 author/editor WL; WP:GenFixes on
Line 1:
[[Microsoft Windows]] OS family employs some [[exception handling]] mechanisms that are based on the [[operating system]] specifics.
 
== {{Anchor|SEH}}Structured Exception Handling ==
Microsoft Structured Exception Handling is the native exception handling mechanism for Windows and a forerunner technology to [[#Vectored Exception Handling|Vectored Exception Handling]] (VEH).<ref name=devx>{{cite web|url=http://www.devx.com/microsoftISV/Article/15992 |title=Vectored Exception Handling in Windows Server 2003 (Through Internet Archive) |archive-url = https://web.archive.org/web/20080118162324/http://www.devx.com/microsoftISV/Article/15992 |archive-date = 2008-01-18}}</ref> It features the <code>finally</code> mechanism not present in standard C++ exceptions (but present in most [[Imperative programming|imperative]] languages introduced later). SEH is set up and handled separately for each [[Thread (computing)|thread of execution]].
Line 34 ⟶ 35:
==External links==
* {{cite web |url=http://msdn.microsoft.com/en-us/library/ms680657%28VS.85%29.aspx |title=Structured Exception Handling |date=2009-11-12 |work=MSDN Library |author=Microsoft Corp. |access-date=2009-11-17 }}
* {{cite journal |author=[[Matt Pietrek]] |author-link=Matt Pietrek |date=Jan 1997 |title=A Crash Course on the Depths of Win32 Structured Exception Handling |journal=MSJ |volume=12 |issue=1 |url=http://www.microsoft.com/msj/0197/Exception/Exception.aspx }} Note that the examples given there do not work as-is on modern Windows systems (post XP SP2) due to the changes Microsoft made to address the security issues present in the early SEH design. The examples still work on later versions of Windows if compiled with <code>/link /safeseh:no</code>.
* {{cite web|url=https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html|title=win32: Safe Structured Exception Handling|publisher=[[Yasm]] manual}}
* {{US patent|7,480,919|US patent 7,480,919 - Safe exceptions}}