|Exception Compilation firstname.lastname@example.org (Alon Horesh) (2000-01-19)|
|Re: Exception Compilation email@example.com (2000-01-21)|
|From:||firstname.lastname@example.org (Roger Corman)|
|Date:||21 Jan 2000 00:46:48 -0500|
On 19 Jan 2000 01:15:24 -0500, Alon Horesh <email@example.com> 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.
Return to the
Search the comp.compilers archives again.