[Mono-list] Exceptions and error codes.

Sergey Chaban serge@wildwestsoftware.com
Wed, 26 Mar 2003 18:13:27 +0200

> Managed code on the MS CLR doesn't use SEH internally

Why do you think so? I'm curious.

The following code intercepts managed exception with a thread-level SEH handler (set up via generated native code),
prints some messages and terminates execution.

There are two source files:

Compiled like this:
ilasm /dll /output=calli.dll calli.il
csc /nowarn:162 /o+ /unsafe /r:calli.dll /out:seh.exe seh.cs


----- Original Message ----- 
From: "Piers Haken" <piersh@friskit.com>
To: "Paolo Molaro" <lupus@ximian.com>; <mono-list@lists.ximian.com>
Sent: Tuesday, March 25, 2003 6:05 PM
Subject: RE: [Mono-list] Exceptions and error codes.

Managed code on the MS CLR doesn't use SEH internally, but the interop
services rethrow System.Runtime.InteropServices.SEHException. The Win32
C++ ABI uses SEH. Similarly, COM error codes are rethrown as