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.

137 lines
4.4 KiB

  1. // CompData.h : Declaration of the CCompData
  2. #ifndef __COMPDATA_H_
  3. #define __COMPDATA_H_
  4. #include "resource.h" // main symbols
  5. #include <mmc.h>
  6. #include "DeleBase.h"
  7. #include "StatNode.h"
  8. #include "Comp.h"
  9. #include "EvtVwr.h"
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CCompData
  12. class ATL_NO_VTABLE CCompData :
  13. public CComObjectRootEx<CComSingleThreadModel>,
  14. public CComCoClass<CCompData, &CLSID_CompData>,
  15. public IComponentData,
  16. public IExtendPropertySheet2, //for configuration wizard
  17. public IExtendContextMenu,
  18. public IPersistStream
  19. {
  20. friend class CComponent;
  21. private:
  22. ULONG m_cref;
  23. LPCONSOLE m_ipConsole;
  24. LPCONSOLENAMESPACE2 m_ipConsoleNameSpace2;
  25. CStaticNode *m_pStaticNode;
  26. public:
  27. CCompData();
  28. ~CCompData();
  29. DECLARE_REGISTRY_RESOURCEID(IDR_COMPDATA)
  30. DECLARE_NOT_AGGREGATABLE(CCompData)
  31. DECLARE_PROTECT_FINAL_CONSTRUCT()
  32. BEGIN_COM_MAP(CCompData)
  33. COM_INTERFACE_ENTRY(IComponentData)
  34. COM_INTERFACE_ENTRY(IExtendPropertySheet2)
  35. COM_INTERFACE_ENTRY(IExtendContextMenu)
  36. COM_INTERFACE_ENTRY(IPersistStream)
  37. END_COM_MAP()
  38. public:
  39. ///////////////////////////////
  40. // Interface IComponentData
  41. ///////////////////////////////
  42. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Initialize(
  43. /* [in] */ LPUNKNOWN pUnknown);
  44. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateComponent(
  45. /* [out] */ LPCOMPONENT __RPC_FAR *ppComponent);
  46. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Notify(
  47. /* [in] */ LPDATAOBJECT lpDataObject,
  48. /* [in] */ MMC_NOTIFY_TYPE event,
  49. /* [in] */ LPARAM arg,
  50. /* [in] */ LPARAM param);
  51. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Destroy( void);
  52. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryDataObject(
  53. /* [in] */ MMC_COOKIE cookie,
  54. /* [in] */ DATA_OBJECT_TYPES type,
  55. /* [out] */ LPDATAOBJECT __RPC_FAR *ppDataObject);
  56. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDisplayInfo(
  57. /* [out][in] */ SCOPEDATAITEM __RPC_FAR *pScopeDataItem);
  58. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CompareObjects(
  59. /* [in] */ LPDATAOBJECT lpDataObjectA,
  60. /* [in] */ LPDATAOBJECT lpDataObjectB);
  61. //////////////////////////////////
  62. // Interface IExtendPropertySheet2
  63. //////////////////////////////////
  64. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreatePropertyPages(
  65. /* [in] */ LPPROPERTYSHEETCALLBACK lpProvider,
  66. /* [in] */ LONG_PTR handle,
  67. /* [in] */ LPDATAOBJECT lpIDataObject);
  68. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryPagesFor(
  69. /* [in] */ LPDATAOBJECT lpDataObject);
  70. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetWatermarks(
  71. /* [in] */ LPDATAOBJECT lpIDataObject,
  72. /* [out] */ HBITMAP __RPC_FAR *lphWatermark,
  73. /* [out] */ HBITMAP __RPC_FAR *lphHeader,
  74. /* [out] */ HPALETTE __RPC_FAR *lphPalette,
  75. /* [out] */ BOOL __RPC_FAR *bStretch);
  76. ///////////////////////////////
  77. // Interface IExtendContextMenu
  78. ///////////////////////////////
  79. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddMenuItems(
  80. /* [in] */ LPDATAOBJECT piDataObject,
  81. /* [in] */ LPCONTEXTMENUCALLBACK piCallback,
  82. /* [out][in] */ long __RPC_FAR *pInsertionAllowed);
  83. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Command(
  84. /* [in] */ long lCommandID,
  85. /* [in] */ LPDATAOBJECT piDataObject);
  86. ///////////////////////////////
  87. // Interface IPersistStream
  88. ///////////////////////////////
  89. virtual HRESULT STDMETHODCALLTYPE GetClassID(
  90. /* [out] */ CLSID __RPC_FAR *pClassID);
  91. virtual HRESULT STDMETHODCALLTYPE IsDirty( void);
  92. virtual HRESULT STDMETHODCALLTYPE Load(
  93. /* [unique][in] */ IStream __RPC_FAR *pStm);
  94. virtual HRESULT STDMETHODCALLTYPE Save(
  95. /* [unique][in] */ IStream __RPC_FAR *pStm,
  96. /* [in] */ BOOL fClearDirty);
  97. virtual HRESULT STDMETHODCALLTYPE GetSizeMax(
  98. /* [out] */ ULARGE_INTEGER __RPC_FAR *pcbSize);
  99. private:
  100. HRESULT OnPreLoad(LPDATAOBJECT lpDataObject, LPARAM arg, LPARAM param);
  101. static HBITMAP m_pBMapSm;
  102. static HBITMAP m_pBMapLg;
  103. };
  104. #endif //__COMPDATA_H_