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.

65 lines
1.4 KiB

  1. /******************************Module*Header*******************************\
  2. *
  3. * *******************
  4. * * GDI SAMPLE CODE *
  5. * *******************
  6. *
  7. * Module Name: debug.c
  8. *
  9. * debug helpers routine
  10. *
  11. * Copyright (c) 1992-1998 Microsoft Corporation
  12. *
  13. \**************************************************************************/
  14. #include "driver.h"
  15. #if DBG
  16. ULONG DebugLevel = 0;
  17. /*****************************************************************************
  18. *
  19. * Routine Description:
  20. *
  21. * This function is variable-argument, level-sensitive debug print
  22. * routine.
  23. * If the specified debug level for the print statement is lower or equal
  24. * to the current debug level, the message will be printed.
  25. *
  26. * Arguments:
  27. *
  28. * DebugPrintLevel - Specifies at which debugging level the string should
  29. * be printed
  30. *
  31. * DebugMessage - Variable argument ascii c string
  32. *
  33. * Return Value:
  34. *
  35. * None.
  36. *
  37. ***************************************************************************/
  38. VOID
  39. DebugPrint(
  40. ULONG DebugPrintLevel,
  41. PCHAR DebugMessage,
  42. ...
  43. )
  44. {
  45. va_list ap;
  46. va_start(ap, DebugMessage);
  47. if (DebugPrintLevel <= DebugLevel)
  48. {
  49. EngDebugPrint("", DebugMessage, ap);
  50. }
  51. va_end(ap);
  52. }
  53. #endif