Example #1
0
EXCEPTION_DISPOSITION Exc::MonitorRaw::HandlerStat(EXCEPTION_RECORD* pExc, PVOID pPtr, CONTEXT* pCpuCtx)
{
	ASSERT(pPtr);
	ExcReg* pExcReg = (ExcReg*) pPtr;
	Monitor* pThis = (Monitor*) (PBYTE(pPtr) - offsetof(Monitor, m_pOpaque));

	if (EXC_FLAG_UNWIND & pExc->ExceptionFlags)
	{
		pExcReg->m_pfnHandler = NULL; // dismissed
		pThis->AbnormalExit();
	} else
		if (pThis->Handle(pExc, pCpuCtx))
		{
			ASSERT(!(EXCEPTION_NONCONTINUABLE & pExc->ExceptionFlags));
			return ExceptionContinueExecution;
		}

	return ExceptionContinueSearch;

}