home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / tstcon / excepinf.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  586 b   |  37 lines

  1. #include "StdAfx.H"
  2. #include "TestCon.H"
  3.  
  4. #ifdef _DEBUG
  5. #define new DEBUG_NEW
  6. #undef THIS_FILE
  7. static char THIS_FILE[] = __FILE__;
  8. #endif
  9.  
  10. CExcepInfo::CExcepInfo()
  11. {
  12.    memset( this, 0, sizeof( *this ) );
  13. }
  14.  
  15. CExcepInfo::~CExcepInfo()
  16. {
  17.    Clear();
  18. }
  19.  
  20. void CExcepInfo::Clear()
  21. {
  22.    if( bstrSource != NULL )
  23.    {
  24.       ::SysFreeString( bstrSource );
  25.    }
  26.    if( bstrDescription != NULL )
  27.    {
  28.       ::SysFreeString( bstrDescription );
  29.    }
  30.    if( bstrHelpFile != NULL )
  31.    {
  32.       ::SysFreeString( bstrHelpFile );
  33.    }
  34.  
  35.    memset( this, 0, sizeof( *this ) );
  36. }
  37.