FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Dobbs M-Dev
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
December 01, 2002

Visual C++ Exception-Handling Instrumentation

(Page 2 of 8)
December 2002/Visual C++ Exception-Handling Instrumentation

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);
}

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK