ComTry.h 388 B

1234567891011121314151617
  1. // ComTry.h
  2. #ifndef __COM_TRY_H
  3. #define __COM_TRY_H
  4. #include "MyWindows.h"
  5. // #include "Exception.h"
  6. // #include "NewHandler.h"
  7. #define COM_TRY_BEGIN try {
  8. #define COM_TRY_END } catch(...) { return E_OUTOFMEMORY; }
  9. // catch(const CNewException &) { return E_OUTOFMEMORY; }\
  10. // catch(const CSystemException &e) { return e.ErrorCode; }\
  11. // catch(...) { return E_FAIL; }
  12. #endif