Listing 1 A boilerplate _CxxThrowException implementation
#include <windows.h> const DWORD CPP_EXCEPTION = 0xE06D7363; const DWORD MS_MAGIC = 0x19930520; extern "C" void __stdcall _CxxThrowException(void * pObject, _s__ThrowInfo const * pObjectInfo) { const ULONG_PTR args[] ={ MS_MAGIC, (ULONG_PTR)pObject, (ULONG_PTR)pObjectInfo }; RaiseException(CPP_EXCEPTION, EXCEPTION_NONCONTINUABLE, sizeof(args)/sizeof(args[0]), args); }