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.

58 lines
1.6 KiB

  1. //////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // misc.cpp
  7. //
  8. // Abstract:
  9. // This module contains code which implements various misc
  10. // commands from the dll
  11. //
  12. //////////////////////////////////////////////////////////////////////////
  13. #include "stdafx.h"
  14. // --------------------------------------------------------------------
  15. //
  16. // Function: DoDebugLevel
  17. //
  18. // Arguments: ulLevel -- debug level to set driver to
  19. //
  20. // Returns: none
  21. //
  22. // Descript: This function sets the amount of debug output generated by
  23. // the driver (tdisample.sys)
  24. //
  25. //---------------------------------------------------------------------
  26. VOID
  27. DoDebugLevel(ULONG ulLevel)
  28. {
  29. RECEIVE_BUFFER ReceiveBuffer; // return info from command
  30. SEND_BUFFER SendBuffer; // arguments for command
  31. //
  32. // set up arguments
  33. //
  34. SendBuffer.COMMAND_ARGS.ulDebugLevel = ulLevel & 0x0000FFFF;
  35. //
  36. // call the driver
  37. //
  38. NTSTATUS lStatus = TdiLibDeviceIO(ulDEBUGLEVEL,
  39. &SendBuffer,
  40. &ReceiveBuffer);
  41. if (lStatus != STATUS_SUCCESS)
  42. {
  43. _tprintf(TEXT("DoDebugLevel: failure, status = %s\n"), TdiLibStatusMessage(lStatus));
  44. }
  45. }
  46. //////////////////////////////////////////////////////////////////////////
  47. // end of misc.cpp
  48. //////////////////////////////////////////////////////////////////////////