Porting MS Structured Exception Handling to Linux.

Ove Kaaven ovehk at ping.uio.no
Thu Jul 12 03:39:28 CDT 2001


TAtanassov at printrak.com (Tervel Atanassov) writes:

> 2. call the Windows API function _set_se_translator(translateException).

That's not a Windows API function. More like a MS Visual C++ runtime
library function. For a Windows API function, it would be more like
SetUnhandledExceptionFilter.

You're using Winelib, right? Then you could look at Wine's way of
handling SEH, include/wine/exception.h, but that's mostly for C
code, I guess... I'm not sure whether a C++ throw inside an exception
filter would work. But by all means, use it if it does work.

At least definitely don't use sigaction yourself, or you'll mess up
Wine's handling of this stuff.

It'd probably be a good idea for an exception guru to implement that
_set_se_translator in Wine's msvcrt, though, if we can find one...
then it could create a thunk layer that preserves a register context
(like the "this" pointer) across a C++ throw from a structured
exception handler.



More information about the wine-users mailing list