Leaked source code of windows server 2003
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.

42 lines
1.1 KiB

  1. /****************************************************************************
  2. *
  3. * debug.h
  4. *
  5. * Microsoft Confidential
  6. * Copyright (c) 1998-1999 Microsoft Corporation
  7. * All rights reserved
  8. *
  9. * Debug support
  10. *
  11. * 09/02/99 quintinb Created Header
  12. *
  13. ***************************************************************************/
  14. #ifndef _PHBKDEBUG
  15. #define _PHBKDEBUG
  16. void Dprintf(LPCSTR pcsz, ...);
  17. BOOL FAssertProc(LPCSTR szFile, DWORD dwLine, LPCSTR szMsg, DWORD dwFlags);
  18. void DebugSz(LPCSTR psz);
  19. DWORD WINAPI GetOSVersion();
  20. DWORD WINAPI GetOSBuildNumber();
  21. DWORD GetOSMajorVersion(void);
  22. //
  23. // OS version macros
  24. //
  25. #define OS_NT51 ((GetOSVersion() == VER_PLATFORM_WIN32_NT) && (GetOSMajorVersion() >= 5) && (GetOSBuildNumber() > 2195))
  26. #ifdef _DEBUG
  27. #define AssertSzFlg(f, sz, dwFlg) ( (f) ? 0 : FAssertProc(__FILE__, __LINE__, sz, dwFlg) ? DebugBreak() : 1 )
  28. #define AssertSz(f, sz) AssertSzFlg(f, sz, 0)
  29. #define Assert(f) AssertSz((f), "!(" #f ")")
  30. #else
  31. #define AssertSzFlg(f, sz, dwFlg)
  32. #define AssertSz(f, sz)
  33. #define Assert(f)
  34. #endif
  35. #endif //_PHBKDEBUG