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.

70 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 1990-1995 Microsoft Corporation
  3. Module Name:
  4. debug.c
  5. Abstract:
  6. NDIS wrapper definitions
  7. Author:
  8. Environment:
  9. Kernel mode, FSD
  10. Revision History:
  11. 10/22/95 Kyle Brandon Created.
  12. --*/
  13. #include <precomp.h>
  14. #pragma hdrstop
  15. #if DBG
  16. //
  17. // Define module number for debug code
  18. //
  19. #define MODULE_NUMBER MODULE_DEBUG
  20. VOID
  21. ndisDbgPrintUnicodeString(
  22. IN PUNICODE_STRING UnicodeString
  23. )
  24. {
  25. UCHAR Buffer[256];
  26. USHORT i;
  27. for (i = 0; (i < UnicodeString->Length / 2) && (i < 255); i++)
  28. Buffer[i] = (UCHAR)UnicodeString->Buffer[i];
  29. Buffer[i] = '\0';
  30. DbgPrint("%s", Buffer);
  31. }
  32. #endif // DBG
  33. #if ASSERT_ON_FREE_BUILDS
  34. VOID
  35. ndisAssert(
  36. IN PVOID exp,
  37. IN PUCHAR File,
  38. IN UINT Line
  39. )
  40. {
  41. DbgPrint("Assertion failed: \"%s\", File %s, Line %d\n", exp, File, Line);
  42. DbgBreakPoint();
  43. }
  44. #endif