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.

72 lines
2.5 KiB

  1. //////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // WDMPerf.h
  4. //
  5. // Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved
  6. //
  7. /////////////////////////////////////////////////////////////////////
  8. #ifndef __WBEM_WMI_HIPERF_PROVIDER__H_
  9. #define __WBEM_WMI_HIPERF_PROVIDER__H_
  10. class CWMI_Prov;
  11. //////////////////////////////////////////////////////////////
  12. //
  13. // Constants and globals
  14. //
  15. //////////////////////////////////////////////////////////////
  16. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  17. //
  18. // CRefresher
  19. //
  20. // The refresher maintains an object and an enumerator cache. When an enumerator is added to the refrehser
  21. // it is added to the enumerator cache, and the index of the array is passed back as a unique ID.
  22. // The refresher creates a cache of all instances during its initialization. When an object
  23. // is added to the refresher, a mapping to the object is created between the unique ID and the index of
  24. // the object in the cache. This allows the objects to be reused and facilitates the management of objects
  25. // that have been added multiple times.
  26. //
  27. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  28. class CRefresher : public IWbemRefresher
  29. {
  30. private:
  31. //===================================================
  32. // COM reference counter & other stuff...
  33. //===================================================
  34. long m_lRef;
  35. //===================================================
  36. // The list of instances for this refresher, which
  37. // are clones of the provider's master list
  38. //===================================================
  39. CHiPerfHandleMap m_HiPerfHandleMap;
  40. //===================================================
  41. // The parent provider
  42. //===================================================
  43. CWMI_Prov* m_pProvider;
  44. public:
  45. CRefresher(CWMI_Prov* pProvider);
  46. virtual ~CRefresher();
  47. CHiPerfHandleMap * HiPerfHandleMap() { return &m_HiPerfHandleMap;}
  48. //===================================================
  49. // COM methods
  50. //===================================================
  51. STDMETHODIMP QueryInterface(REFIID riid, void** ppv);
  52. STDMETHODIMP_(ULONG) AddRef();
  53. STDMETHODIMP_(ULONG) Release();
  54. STDMETHODIMP Refresh(/* [in] */ long lFlags);
  55. };
  56. #endif