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.

62 lines
1.4 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright: Microsoft Corp. 1997-1999. All rights reserved
  4. //
  5. /////////////////////////////////////////////////////////////////////////////
  6. // Logs.h : Declaration of the CLogs
  7. #ifndef __LOGS_H_
  8. #define __LOGS_H_
  9. #include "resource.h" // main symbols
  10. #include "Log.h"
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CLogs
  13. class ATL_NO_VTABLE CLogs :
  14. public CComObjectRootEx<CComSingleThreadModel>,
  15. // public CComCoClass<CLogs, &CLSID_Logs>,
  16. public ISupportErrorInfo,
  17. public IDispatchImpl<ILogs, &IID_ILogs, &LIBID_EventLogUtilities>
  18. {
  19. private:
  20. ULONG m_Count;
  21. CComVariant* m_pVector;
  22. _bstr_t m_btCurrentLogName;
  23. public:
  24. _bstr_t m_ServerName;
  25. CLogs() : m_Count(0), m_pVector(NULL)
  26. {
  27. }
  28. ~CLogs()
  29. {
  30. delete [] m_pVector;
  31. }
  32. // Internal functions
  33. HRESULT Init();
  34. DECLARE_REGISTRY_RESOURCEID(IDR_LOGS)
  35. DECLARE_NOT_AGGREGATABLE(CLogs)
  36. DECLARE_PROTECT_FINAL_CONSTRUCT()
  37. BEGIN_COM_MAP(CLogs)
  38. COM_INTERFACE_ENTRY(ILogs)
  39. COM_INTERFACE_ENTRY(IDispatch)
  40. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  41. END_COM_MAP()
  42. // ISupportsErrorInfo
  43. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  44. // ILogs
  45. STDMETHOD(get_Item)(/*[in]*/ VARIANT Index, /*[out, retval]*/ VARIANT *pVal);
  46. STDMETHOD(get__NewEnum)(/*[out, retval]*/ LPUNKNOWN *pVal);
  47. STDMETHOD(get_Count)(/*[out, retval]*/ long *pVal);
  48. };
  49. #endif //__LOGS_H_