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.

85 lines
2.2 KiB

  1. //
  2. // CComponentData class
  3. //
  4. class CComponentData:
  5. public IComponentData,
  6. public IPersistStreamInit
  7. {
  8. friend class CDataObject;
  9. friend class CSnapIn;
  10. protected:
  11. ULONG m_cRef;
  12. HWND m_hwndFrame;
  13. LPCONSOLENAMESPACE m_pScope;
  14. LPCONSOLE m_pConsole;
  15. HSCOPEITEM m_hRoot;
  16. LPGPEINFORMATION m_pGPTInformation;
  17. public:
  18. CComponentData();
  19. ~CComponentData();
  20. // IUnknown methods
  21. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  22. STDMETHODIMP_(ULONG) AddRef();
  23. STDMETHODIMP_(ULONG) Release();
  24. //
  25. // Implemented IComponentData methods
  26. //
  27. STDMETHODIMP Initialize(LPUNKNOWN pUnknown);
  28. STDMETHODIMP CreateComponent(LPCOMPONENT* ppComponent);
  29. STDMETHODIMP QueryDataObject(long cookie, DATA_OBJECT_TYPES type, LPDATAOBJECT* ppDataObject);
  30. STDMETHODIMP Destroy(void);
  31. STDMETHODIMP Notify(LPDATAOBJECT lpDataObject, MMC_NOTIFY_TYPE event, long arg, long param);
  32. STDMETHODIMP GetDisplayInfo(LPSCOPEDATAITEM pItem);
  33. STDMETHODIMP CompareObjects(LPDATAOBJECT lpDataObjectA, LPDATAOBJECT lpDataObjectB);
  34. //
  35. // Implemented IPersistStreamInit interface members
  36. //
  37. STDMETHODIMP GetClassID(CLSID *pClassID);
  38. STDMETHODIMP IsDirty(VOID);
  39. STDMETHODIMP Load(IStream *pStm);
  40. STDMETHODIMP Save(IStream *pStm, BOOL fClearDirty);
  41. STDMETHODIMP GetSizeMax(ULARGE_INTEGER *pcbSize);
  42. STDMETHODIMP InitNew(VOID);
  43. private:
  44. HRESULT EnumerateScopePane(LPDATAOBJECT lpDataObject, HSCOPEITEM hParent);
  45. };
  46. //
  47. // ComponentData class factory
  48. //
  49. class CComponentDataCF : public IClassFactory
  50. {
  51. protected:
  52. ULONG m_cRef;
  53. public:
  54. CComponentDataCF();
  55. ~CComponentDataCF();
  56. // IUnknown methods
  57. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  58. STDMETHODIMP_(ULONG) AddRef();
  59. STDMETHODIMP_(ULONG) Release();
  60. // IClassFactory methods
  61. STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID FAR *);
  62. STDMETHODIMP LockServer(BOOL);
  63. };