#define HR_GENERAL(_ex, _msg, _ret) do {\
HRESULT _hr = _ex;\ if (FAILED(_hr)) {\
SK_TRACEHR(_hr, _msg);\ return _ret;\
}\
} while(false)
//@{ /** These macros are for reporting HRESULT errors. The expression will be evaluated. If the resulting HRESULT SUCCEEDED then execution will continue normally. If the HRESULT FAILED then the macro will return from the current function. In variants ending with 'M' the given message will be traced when FAILED. The HR variants will return the HRESULT when FAILED. The HRB variants will return false when FAILED. The HRN variants will return nullptr when FAILED. The HRV variants will simply return when FAILED. The HRZ variants will return 0 when FAILED.
*/ #define HR(ex) HR_GENERAL(ex, nullptr, _hr) #define HRM(ex, msg) HR_GENERAL(ex, msg, _hr)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.