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.

55 lines
938 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. gmdebug.cpp
  5. Abstract:
  6. Debug support routines - show simple data in message box using
  7. simple macros when GMDEBUG is defined.
  8. Author:
  9. georgema 000310 created
  10. Environment:
  11. Revision History:
  12. --*/
  13. #include <windows.h>
  14. #include <tchar.h>
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17. ULONG DbgPrint(PCH Fmt,...);
  18. TCHAR Bug[256];
  19. void ShowBugString(const TCHAR *pC) {
  20. if (NULL == pC) {
  21. _stprintf(Bug,_T("NULL ptr"));
  22. }
  23. else {
  24. _stprintf(Bug,_T("%s"),pC);
  25. }
  26. MessageBox(NULL,Bug,_T("Bug"),MB_OK);
  27. }
  28. void ShowBugDecimal(INT i) {
  29. _stprintf(Bug,_T("Decimal: %d"),i);
  30. MessageBox(NULL,Bug,_T("Bug"),MB_OK);
  31. }
  32. void ShowBugHex(DWORD dwIn) {
  33. _stprintf(Bug,_T("Hex: %X"),dwIn);
  34. MessageBox(NULL,Bug,_T("Bug"),MB_OK);
  35. }
  36. void OutBug(TCHAR *pc,DWORD dwin) {
  37. _stprintf(Bug,pc,dwin);
  38. OutputDebugString(Bug);
  39. }