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.

59 lines
801 B

  1. // DbgLvl.cpp : This file contains the
  2. // Created: Dec '97
  3. // Author : a-rakeba
  4. // History:
  5. // Copyright (C) 1997 Microsoft Corporation
  6. // All rights reserved.
  7. // Microsoft Confidential
  8. #include "DbgLvl.h"
  9. //#include "w4warn.h"
  10. using namespace _Utils;
  11. DWORD CDebugLevel::s_dwLevel = 0;
  12. void
  13. CDebugLevel::TurnOn
  14. (
  15. DWORD dwLvl
  16. )
  17. {
  18. s_dwLevel |= dwLvl;
  19. }
  20. void CDebugLevel::TurnOnAll( void )
  21. {
  22. s_dwLevel = ( DWORD ) -1;
  23. }
  24. void
  25. CDebugLevel::TurnOff
  26. (
  27. DWORD dwLvl
  28. )
  29. {
  30. s_dwLevel &= dwLvl ^ -1;
  31. }
  32. void CDebugLevel::TurnOffAll( void )
  33. {
  34. s_dwLevel = 0;
  35. }
  36. bool
  37. CDebugLevel::IsCurrLevel
  38. (
  39. DWORD dwLvl
  40. )
  41. {
  42. if( ( s_dwLevel & dwLvl ) == 0 )
  43. return ( false );
  44. else
  45. return ( true );
  46. }