Re: Exception Compilation (Roger Corman)
21 Jan 2000 00:46:48 -0500

          From comp.compilers

Related articles
Exception Compilation (Alon Horesh) (2000-01-19)
Re: Exception Compilation (2000-01-21)
| List of all articles for this month |

From: (Roger Corman)
Newsgroups: comp.compilers
Date: 21 Jan 2000 00:46:48 -0500
Organization: Compilers Central
References: 00-01-077
Keywords: Windows

On 19 Jan 2000 01:15:24 -0500, Alon Horesh <> wrote:

>Does anyone know how Microsoft VC ( version 6 ) implement exception and
>exception handling ??
>The question is whether i can simulate throwing an exception from one
>thread into another thread's address space by understanding the
>mechanism of the exception and simulate the exception throwing in
>another thread ??

I am not sure if this does exactly what you want, but I sometimes have
need to cause an exception to be thrown in another thread under Win32.
What I do is:

Suspend the other thread

Get the ContextRecord for the thread.

Modify the instruction pointer of the other thread to be positioned at
the start of a function which I supply. This function takes no
arguments and simply throws the type of exception I want thrown.

Set the thread's context record.

Resume the other thread.

When control returns to the other thread, it will throw the exception.

-Roger Corman

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.