1370b324cSopenharmony_ci// ComTry.h 2370b324cSopenharmony_ci 3370b324cSopenharmony_ci#ifndef ZIP7_INC_COM_TRY_H 4370b324cSopenharmony_ci#define ZIP7_INC_COM_TRY_H 5370b324cSopenharmony_ci 6370b324cSopenharmony_ci#include "MyWindows.h" 7370b324cSopenharmony_ci// #include "Exception.h" 8370b324cSopenharmony_ci// #include "NewHandler.h" 9370b324cSopenharmony_ci 10370b324cSopenharmony_ci#define COM_TRY_BEGIN try { 11370b324cSopenharmony_ci#define COM_TRY_END } catch(...) { return E_OUTOFMEMORY; } 12370b324cSopenharmony_ci 13370b324cSopenharmony_ci/* 14370b324cSopenharmony_ci#define COM_TRY_END } \ 15370b324cSopenharmony_ci catch(const CNewException &) { return E_OUTOFMEMORY; } \ 16370b324cSopenharmony_ci catch(...) { return HRESULT_FROM_WIN32(ERROR_NOACCESS); } \ 17370b324cSopenharmony_ci*/ 18370b324cSopenharmony_ci // catch(const CSystemException &e) { return e.ErrorCode; } 19370b324cSopenharmony_ci // catch(...) { return E_FAIL; } 20370b324cSopenharmony_ci 21370b324cSopenharmony_ci#endif 22