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.

62 lines
1.0 KiB

  1. #include "pch.h"
  2. VOID
  3. SoftPCIDbgPrint(
  4. IN ULONG DebugPrintLevel,
  5. IN PCCHAR DebugMessage,
  6. ...
  7. )
  8. /*++
  9. Routine Description:
  10. This is the debug print routine
  11. Arguments:
  12. DebugPrintLevel - The bit mask that when anded with the debuglevel, must
  13. equal itself
  14. DebugMessage - The string to feed through vsprintf
  15. Return Value:
  16. None
  17. --*/
  18. {
  19. #if DBG
  20. va_list ap;
  21. CHAR debugBuffer[SOFTPCI_DEBUG_BUFFER_SIZE];
  22. //
  23. // Get the variable arguments
  24. //
  25. va_start(ap, DebugMessage );
  26. //
  27. // Call the kernel function to print the message
  28. //
  29. _vsnprintf(debugBuffer, SOFTPCI_DEBUG_BUFFER_SIZE, DebugMessage, ap);
  30. DbgPrintEx(DPFLTR_SOFTPCI_ID, DebugPrintLevel, "%s", debugBuffer);
  31. //
  32. // We are done with the varargs
  33. //
  34. va_end(ap);
  35. #else
  36. UNREFERENCED_PARAMETER(DebugPrintLevel);
  37. UNREFERENCED_PARAMETER(DebugMessage);
  38. #endif //DBG
  39. }