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.

55 lines
1.3 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (C) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // SACounter.h
  7. //
  8. // Implementation Files:
  9. // SACounter.cpp
  10. //
  11. // Description:
  12. // Declare the class CSACounter used to manage the global variable
  13. //
  14. // History:
  15. // 1. lustar.li (Guogang Li), creation date in 7-DEC-2000
  16. //
  17. // Notes:
  18. //
  19. //
  20. //////////////////////////////////////////////////////////////////////////////
  21. #ifndef _SACOUNTER_H_
  22. #define _SACOUNTER_H_
  23. //////////////////////////////////////////////////////////////////////////////
  24. //++
  25. //
  26. // class CSACounter
  27. //
  28. // Description:
  29. // The class is used to manage the global variable used by the COM
  30. //
  31. // History:
  32. // 1. lustar.li (Guogang Li), creation date in 7-DEC-2000
  33. //--
  34. //////////////////////////////////////////////////////////////////////////////
  35. class CSACounter
  36. {
  37. private:
  38. //define lock counter and object counter
  39. static ULONG s_cLock;
  40. static ULONG s_cObject;
  41. public:
  42. static ULONG GetLockCount(void);
  43. static ULONG GetObjectCount(void);
  44. static void IncLockCount(void);
  45. static void DecLockCount(void);
  46. static void IncObjectCount(void);
  47. static void DecObjectCount(void);
  48. };
  49. #endif //#ifndef _SACOUNTER_H_