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.

49 lines
1.1 KiB

  1. // Consumer.h: interface for the CConsumer class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined( __CONSUMER_H )
  5. #define __CONSUMER_H
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. class CConsumer : public IWbemUnboundObjectSink
  10. {
  11. // Constructor/Destructor
  12. public:
  13. CConsumer();
  14. virtual ~CConsumer();
  15. public:
  16. // IUnknown
  17. STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv);
  18. STDMETHODIMP_(ULONG) AddRef(void);
  19. STDMETHODIMP_(ULONG) Release(void);
  20. // IWbemUnboundObjectSink override
  21. STDMETHODIMP IndicateToConsumer(IWbemClassObject* pLogicalConsumer,
  22. LONG lNumObjects, IWbemClassObject** ppObjects);
  23. // CConsumer
  24. private:
  25. HRESULT ProcessEvent(IWbemClassObject*);
  26. HRESULT ProcessModEvent(IWbemClassObject*, IWbemClassObject*);
  27. // HRESULT GetWbemClassObject(IWbemClassObject**, VARIANT*);
  28. private:
  29. DWORD m_cRef;
  30. // Static thread function
  31. protected:
  32. static unsigned int __stdcall Update(void *pv);
  33. HANDLE m_hUpdateThrdFn;
  34. unsigned m_uThrdId;
  35. long m_lAgentInterval;
  36. };
  37. #endif // __CONSUMER_H