4 ms·
This was bread and butter error handling in COM, everything old is new again!
by cube00 5y ago
This was bread and butter error handling in COM, everything old is new again!
- Joker_vD 5y agoYep, all hail the mighty #define CHECK(com_expr) hr = (com_expr); if (FAILED(hr)) { return hr; } Ah, the memories... glad I don't have to touch it ever again. "And a million other things that, basically, only Don Box ever understood, and even Don Box can’t bear to look at them any more".
- pjmlp 5y agoCOM is where all new OS APIs land nowadays, since Vista. Even if they are eventually wrapped in .NET libraries.
- pjmlp 5y agoStill is, for those that never discovered C++/CX, WIL or C++/WinRT and are stuck in the ways of Windows XP. https://docs.microsoft.com/en-us/cpp/cppcx/exceptions-c-cx?view=msvc-160 https://docs.microsoft.com/en-us/cpp/cppcx/exceptions-c-cx?v... https://github.com/microsoft/wil/blob/5a21cac10640f54b7ef886031f4d9ed427bef4c5/include/wil/result_macros.h#L798 https://github.com/microsoft/wil/blob/5a21cac10640f54b7ef886... https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/error-handling https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-a...