Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
550 B

  1. #pragma once
  2. #include <stdio.h>
  3. #define IFFALSE_WIN32TOHR_EXIT(h,x) \
  4. do { if (!(x)) { (h) = HRESULT_FROM_WIN32(GetLastError()); goto Exit; } } while(0)
  5. #define IFFAILED_EXIT(x) \
  6. do { if ((x) != S_OK) goto Exit; } while(0)
  7. #define FN_TRACE_WIN32(f) ((f) = FALSE)
  8. #define FN_TRACE_HR(h) ((h) = E_FAIL)
  9. #define TRACE_WIN32_FAILURE(x) (fprintf(stderr, "%s failed\n", #x))
  10. #define TRACE_WIN32_FAILURE_ORIGINATION(x) TRACE_WIN32_FAILURE(x)
  11. #define IFW32FALSE_EXIT(x) \
  12. do { if ( !(x) ) { TRACE_WIN32_FAILURE(x); goto Exit; } } while (0)