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.

37 lines
1.2 KiB

  1. /*
  2. * DEBUG.H
  3. *
  4. * Point-of-Sale Control Panel Applet
  5. *
  6. * Author: Ervin Peretz
  7. *
  8. * (c) 2001 Microsoft Corporation
  9. */
  10. #if DBG
  11. PWCHAR DbgHidStatusStr(DWORD hidStatus);
  12. #define ASSERT(fact) { if (!(fact)) MessageBox(NULL, L#fact, L"POSCPL assertion failed", MB_OK); }
  13. #define DBGERR(msg, arg) { \
  14. WCHAR __s[200]={0}; \
  15. WCHAR __narg[11]; \
  16. WStrNCpy(__s, msg, 100); \
  17. WStrNCpy(__s+wcslen(__s), L", ", 3); \
  18. IntToWChar(__narg, arg); \
  19. WStrNCpy(__s+wcslen(__s), __narg, 100); \
  20. WStrNCpy(__s+wcslen(__s), L"=", 2); \
  21. HexToWChar(__narg, arg); \
  22. WStrNCpy(__s+wcslen(__s), __narg, 100); \
  23. WStrNCpy(__s+wcslen(__s), L"h.", 3); \
  24. MessageBox(NULL, __s, L"POSCPL error message", MB_OK); \
  25. }
  26. #define DBGHIDSTATUSSTR(hidStatus) DbgHidStatusStr(hidStatus)
  27. #else
  28. #define ASSERT(fact)
  29. #define DBGERR(msg, arg)
  30. #define DBGHIDSTATUSSTR(hidStatus)
  31. #endif