michael@0: // ComTry.h michael@0: michael@0: #ifndef __COM_TRY_H michael@0: #define __COM_TRY_H michael@0: michael@0: #include "MyWindows.h" michael@0: // #include "Exception.h" michael@0: // #include "NewHandler.h" michael@0: michael@0: #define COM_TRY_BEGIN try { michael@0: #define COM_TRY_END } catch(...) { return E_OUTOFMEMORY; } michael@0: michael@0: // catch(const CNewException &) { return E_OUTOFMEMORY; }\ michael@0: // catch(const CSystemException &e) { return e.ErrorCode; }\ michael@0: // catch(...) { return E_FAIL; } michael@0: michael@0: #endif