mirror of https://github.com/tongzx/nt5src
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
49 lines
1.1 KiB
// Consumer.h: interface for the CConsumer class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined( __CONSUMER_H )
|
|
#define __CONSUMER_H
|
|
|
|
#if _MSC_VER >= 1000
|
|
#pragma once
|
|
#endif // _MSC_VER >= 1000
|
|
|
|
class CConsumer : public IWbemUnboundObjectSink
|
|
{
|
|
// Constructor/Destructor
|
|
public:
|
|
CConsumer();
|
|
virtual ~CConsumer();
|
|
|
|
|
|
public:
|
|
// IUnknown
|
|
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv);
|
|
STDMETHODIMP_(ULONG) AddRef(void);
|
|
STDMETHODIMP_(ULONG) Release(void);
|
|
|
|
// IWbemUnboundObjectSink override
|
|
STDMETHODIMP IndicateToConsumer(IWbemClassObject* pLogicalConsumer,
|
|
LONG lNumObjects, IWbemClassObject** ppObjects);
|
|
|
|
// CConsumer
|
|
private:
|
|
HRESULT ProcessEvent(IWbemClassObject*);
|
|
HRESULT ProcessModEvent(IWbemClassObject*, IWbemClassObject*);
|
|
// HRESULT GetWbemClassObject(IWbemClassObject**, VARIANT*);
|
|
|
|
private:
|
|
DWORD m_cRef;
|
|
|
|
// Static thread function
|
|
protected:
|
|
static unsigned int __stdcall Update(void *pv);
|
|
|
|
HANDLE m_hUpdateThrdFn;
|
|
unsigned m_uThrdId;
|
|
long m_lAgentInterval;
|
|
|
|
};
|
|
|
|
#endif // __CONSUMER_H
|