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.

49 lines
1.1 KiB

  1. /*----------------------------------------------------------------------------
  2. cpsmon.h
  3. Header file shared by pbsmon.cpp & pbserver.dll -- Has the shared memory object
  4. Copyright (c) 1997-1998 Microsoft Corporation
  5. All rights reserved.
  6. Authors:
  7. t-geetat Geeta Tarachandani
  8. History:
  9. 5/29/97 t-geetat Created
  10. --------------------------------------------------------------------------*/
  11. #define SHARED_OBJECT "MyCCpsCounter"
  12. enum CPS_COUNTERS
  13. {
  14. TOTAL,
  15. NO_UPGRADE,
  16. DELTA_UPGRADE,
  17. FULL_UPGRADE,
  18. ERRORS
  19. };
  20. typedef struct _PERF_COUNTERS
  21. {
  22. DWORD dwTotalHits;
  23. DWORD dwNoUpgradeHits;
  24. DWORD dwDeltaUpgradeHits;
  25. DWORD dwFullUpgradeHits;
  26. DWORD dwErrors;
  27. }
  28. PERF_COUNTERS;
  29. class CCpsCounter
  30. {
  31. private:
  32. PERF_COUNTERS * m_pPerfCtrs;
  33. HANDLE m_hSharedFileMapping;
  34. public :
  35. void InitializeCounters( void );
  36. BOOL InitializeSharedMem( SECURITY_ATTRIBUTES sa );
  37. void CleanUpSharedMem();
  38. void AddHit(enum CPS_COUNTERS eCounter);
  39. };