mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
tst: winfsp-tests: UnhandledExceptionFilter
This commit is contained in:
parent
5014e8bd35
commit
e1b1284153
@ -175,6 +175,16 @@ static void abort_handler(int sig)
|
||||
|
||||
LONG WINAPI UnhandledExceptionHandler(struct _EXCEPTION_POINTERS *ExceptionInfo)
|
||||
{
|
||||
if (0 != ExceptionInfo && 0 != ExceptionInfo->ExceptionRecord)
|
||||
{
|
||||
static CHAR Buf[64];
|
||||
static DWORD Bytes;
|
||||
wsprintfA(Buf, "\nEXCEPTION 0x%lx at 0x%p\n",
|
||||
ExceptionInfo->ExceptionRecord->ExceptionCode,
|
||||
ExceptionInfo->ExceptionRecord->ExceptionAddress);
|
||||
WriteFile(GetStdHandle(STD_ERROR_HANDLE), Buf, lstrlenA(Buf), &Bytes, 0);
|
||||
}
|
||||
|
||||
exiting();
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user