Say you have the following global exception handlers/filters:
LONG WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS exception)
{
return EXCEPTION_CONTINUE_SEARCH;
}
LONG WINAPI VectoredExceptionHandler(PEXCEPTION_POINTERS exception)
{
return EXCEPTION_CONTINUE_SEARCH;
}
Called using:
SetUnhandledExceptionFilter(UnhandledExceptionFilter);
AddVectoredExceptionHandler(1, VectoredExceptionHandler);
I might have a separate thread throw an exception back to the main thread that I use to set the filter or handler...but in the logic for UnhandledExceptionFilter
and VectoredExceptionHandler
, how do I get the HANDLE
to the thread that threw the exception?