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.

38 lines
748 B

  1. #ifndef _ERRCTRL_H
  2. #define _ERRCTRL_H
  3. #ifdef DBG
  4. // Parameters:
  5. // (BOOL bCond, LPCTSTR cszFmt, ...)
  6. // Semantics:
  7. // Condition bCond is expected to be TRUE. If this
  8. // doesn't happen, message is displayed and program
  9. // is exited.
  10. // Usage:
  11. // _Assert((
  12. // errCode == ERROR_SUCCESS,
  13. // "Err code %d returned from call.\n",
  14. // GetLastError()
  15. // ));
  16. // Output:
  17. //
  18. #define _Assert(params) _Asrt params;
  19. #else
  20. // No code is generated for asserts in fre builds
  21. #define _Assert
  22. #endif
  23. VOID _Asrt(BOOL bCond,
  24. LPCTSTR cszFmt,
  25. ...);
  26. DWORD _Err(DWORD dwErrCode,
  27. LPCTSTR cszFmt,
  28. ...);
  29. DWORD _Wrn(DWORD dwWarnCode,
  30. LPCTSTR cszFmt,
  31. ...);
  32. #endif