Source code of Windows XP (NT5)
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.

84 lines
1.9 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. counters.h
  5. Abstract:
  6. Header file for the implementation of the ICounters object.
  7. --*/
  8. #ifndef _COUNTERS_H_
  9. #define _COUNTERS_H_
  10. class CPolyline;
  11. class CImpICounters : public ICounters
  12. {
  13. protected:
  14. ULONG m_cRef;
  15. CPolyline *m_pObj;
  16. LPUNKNOWN m_pUnkOuter;
  17. public:
  18. CImpICounters(CPolyline*, LPUNKNOWN);
  19. ~CImpICounters();
  20. /* IUnknown methods */
  21. STDMETHOD(QueryInterface) (REFIID riid, LPVOID *ppvObj);
  22. STDMETHOD_(ULONG, AddRef) ();
  23. STDMETHOD_(ULONG, Release) ();
  24. /* IDispatch methods */
  25. STDMETHOD(GetTypeInfoCount) (UINT *pctinfo);
  26. STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo **pptinfo);
  27. STDMETHOD(GetIDsOfNames) (REFIID riid, OLECHAR **rgszNames,
  28. UINT cNames, LCID lcid, DISPID *rgdispid);
  29. STDMETHOD(Invoke) (DISPID dispidMember, REFIID riid, LCID lcid,WORD wFlags,
  30. DISPPARAMS *pdispparams, VARIANT *pvarResult,
  31. EXCEPINFO *pexcepinfo, UINT *puArgErr);
  32. /* Counters methods */
  33. STDMETHOD(get_Count) (long *pLong);
  34. STDMETHOD(get__NewEnum) (IUnknown **ppIunk);
  35. STDMETHOD(get_Item) (VARIANT index, DICounterItem **ppI);
  36. STDMETHOD(Add) (BSTR bstrPath, DICounterItem **ppI);
  37. STDMETHOD(Remove) (VARIANT index);
  38. };
  39. typedef CImpICounters *PCImpICounters;
  40. // Counter enumerator
  41. class CImpIEnumCounter : public IEnumVARIANT
  42. {
  43. protected:
  44. DWORD m_cRef;
  45. PCGraphItem *m_paGraphItem;
  46. ULONG m_cItems;
  47. ULONG m_uCurrent;
  48. public:
  49. CImpIEnumCounter (VOID);
  50. HRESULT Init (PCGraphItem pGraphItem, INT cItems);
  51. // IUnknown methods
  52. STDMETHOD(QueryInterface) (REFIID riid, LPVOID *ppvObj);
  53. STDMETHOD_(ULONG, AddRef) ();
  54. STDMETHOD_(ULONG, Release) ();
  55. // Enum methods
  56. STDMETHOD(Next) (ULONG cItems, VARIANT *varItems, ULONG *pcReturned);
  57. STDMETHOD(Skip) (ULONG cSkip);
  58. STDMETHOD(Reset) (VOID);
  59. STDMETHOD(Clone) (IEnumVARIANT **pIEnum);
  60. };
  61. #endif //_COUNTERS_H_