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.

81 lines
2.3 KiB

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