From f19f813537c7aea1c20749c914e756b54a9c3cf5 Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Mon, 27 Dec 2021 00:00:00 +0000 Subject: '21.07' --- CPP/Common/ComTry.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CPP/Common/ComTry.h (limited to 'CPP/Common/ComTry.h') diff --git a/CPP/Common/ComTry.h b/CPP/Common/ComTry.h new file mode 100644 index 0000000..297c407 --- /dev/null +++ b/CPP/Common/ComTry.h @@ -0,0 +1,21 @@ +// ComTry.h + +#ifndef __COM_TRY_H +#define __COM_TRY_H + +#include "MyWindows.h" +// #include "Exception.h" +// #include "NewHandler.h" + +#define COM_TRY_BEGIN try { +#define COM_TRY_END } catch(...) { return E_OUTOFMEMORY; } + +/* +#define COM_TRY_END } \ + catch(const CNewException &) { return E_OUTOFMEMORY; } \ + catch(...) { return HRESULT_FROM_WIN32(ERROR_NOACCESS); } \ +*/ + // catch(const CSystemException &e) { return e.ErrorCode; } + // catch(...) { return E_FAIL; } + +#endif -- cgit v1.2.3-55-g6feb