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.

78 lines
1.6 KiB

  1. //***************************************************************************
  2. //
  3. // File:
  4. //
  5. // Module: MS SNMP Provider
  6. //
  7. // Purpose:
  8. //
  9. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  10. //
  11. //***************************************************************************
  12. #ifndef _EVTCONS_H_
  13. #define _EVTCONS_H_
  14. #define SMIR_EVT_COUNT 2
  15. #define SMIR_CHANGE_EVT 0
  16. #define SMIR_THREAD_EVT 1
  17. class CSmirWbemEventConsumer : public ISMIRWbemEventConsumer
  18. {
  19. private:
  20. LONG m_cRef;
  21. HANDLE *m_hEvents;
  22. CNotifyThread *m_callbackThread;
  23. IWbemServices *m_Serv;
  24. //private copy constructors to prevent bcopy
  25. CSmirWbemEventConsumer(CSmirWbemEventConsumer&);
  26. const CSmirWbemEventConsumer& operator=(CSmirWbemEventConsumer &);
  27. public:
  28. //Implementation
  29. //===============
  30. CSmirWbemEventConsumer(CSmir* psmir);
  31. HRESULT Register(CSmir* psmir);
  32. HRESULT UnRegister(CSmir* psmir, IWbemServices* pServ);
  33. HRESULT GetUnRegisterParams(IWbemServices** ppServ);
  34. ~CSmirWbemEventConsumer();
  35. //IUnknown methods
  36. //=================
  37. STDMETHODIMP QueryInterface(IN REFIID riid,OUT PPVOID ppv);
  38. STDMETHODIMP_(ULONG) AddRef();
  39. STDMETHODIMP_(ULONG) Release();
  40. //IWbemObjectSink methods
  41. //=======================
  42. STDMETHODIMP_(HRESULT) Indicate( IN long lObjectCount,
  43. IN IWbemClassObject **ppObjArray
  44. );
  45. STDMETHODIMP_(HRESULT) SetStatus( IN long lFlags,
  46. IN long lParam,
  47. IN BSTR strParam,
  48. IN IWbemClassObject *pObjParam
  49. );
  50. };
  51. #endif //_EVTCONS_H_