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.

76 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. iwdbg.c
  5. Abstract:
  6. The debug functions
  7. Author:
  8. Stefan Solomon 03/11/1996
  9. Revision History:
  10. --*/
  11. #include "precomp.h"
  12. #pragma hdrstop
  13. //*** TRACE ID FOR IPXWAN ***
  14. DWORD IpxWanTraceID;
  15. //*** Functions for Debug Printing ***
  16. #if DBG
  17. VOID
  18. SsAssert(
  19. IN PVOID FailedAssertion,
  20. IN PVOID FileName,
  21. IN ULONG LineNumber
  22. )
  23. {
  24. Trace(IPXWAN_ALERT, "\nAssertion failed: %s\n at line %ld of %s\n",
  25. FailedAssertion, LineNumber, FileName);
  26. DbgUserBreakPoint( );
  27. } // SsAssert
  28. #endif
  29. VOID
  30. StartTracing(VOID)
  31. {
  32. IpxWanTraceID = TraceRegister("IPXWAN");
  33. }
  34. VOID
  35. Trace(ULONG ComponentID,
  36. char *Format,
  37. ...)
  38. {
  39. va_list arglist;
  40. va_start(arglist, Format);
  41. TraceVprintfEx(IpxWanTraceID,
  42. ComponentID | TRACE_USE_MASK,
  43. Format,
  44. arglist);
  45. va_end(arglist);
  46. }
  47. VOID
  48. StopTracing(VOID)
  49. {
  50. TraceDeregister(IpxWanTraceID);
  51. }