
#include "stdafx.h"
#include <eh.h>


void SETranslator(UINT uiEx, EXCEPTION_POINTERS* ppEx)
{
    CRunTimeException* pRTE = new CRunTimeException(uiEx);

    if (NULL == pRTE)
        ThrowMemoryException();
    else
        throw pRTE;
}

void WINAPI TkInitialize()
{
    // Convert Win32 exceptions to C++ typed exceptions
    _set_se_translator(SETranslator);
}

void WINAPI TkTerminate()
{
    // Remove exception translator
    _set_se_translator(NULL);
}

