SEHException Class
Assembly: mscorlib (in mscorlib.dll)
'Declaration <SerializableAttribute> _ <ComVisibleAttribute(True)> _ Public Class SEHException Inherits ExternalException 'Usage Dim instance As SEHException
/** @attribute SerializableAttribute() */ /** @attribute ComVisibleAttribute(true) */ public class SEHException extends ExternalException
SerializableAttribute ComVisibleAttribute(true) public class SEHException extends ExternalException
Not applicable.
The SEHException class handles SEH errors that are thrown from unmanaged code, but have not been mapped to another .NET Framework exception. The SEHException class also responds to the HRESULT E_FAIL, which has the value 0x80004005.
The .NET Framework often encounters unmanaged SEH exceptions that are automatically mapped to managed equivalents. For example, a STATUS_NO_MEMORY SEH exception is automatically mapped to the OutOfMemoryException class and the STATUS_ACCESS_VIOLATION SEH exception is automatically mapped the NullReferenceException class. However, any SEH exception that is not automatically mapped to a specific exception is mapped to the SEHException class by default.
For more information about SEH exceptions, see the documentation for unmanaged exceptions at http://msdn.microsoft.com.
Note that the SEHException class does not cause unmanaged C++ exception destructors be called. To ensure that unmanaged C++ exception destructors are called, use the following syntax in the catch block.
[Visual Basic]
Catch
' Handle catch here.
End Try
[C#]
catch
{
// Handle catch here.
}
[C++]
catch(…)
{
// Handle catch here.
}
System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
System.Runtime.InteropServices.SEHException
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.