Hi,
I was bored and I played around with SEH exceptions. It might be useful in some cases when you can't catch an exception in a dll but there might also be easier methods in some cases. I though before the code will be forgotten and deleted again I post it here:
the unit seh.pas contains the handler. This handler is very simple, it will handle all exceptions and always restore the stack to the state it was when the handler was installed and use the address that was pushed to the stack to continue execution.
the file sehtest.pas uses this unit and sets up a try/except construct with two asm blocks and some labels and then triggers an exception somewhere deeper in the callstack (to test the proper restoring of the stack). If FPC had more flexible macros then it could be made a bit nicer but it fulfills its purpose.
Bernd
