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