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.

114 lines
4.2 KiB

  1. #pragma once
  2. #include <mmc.h>
  3. #include "delebase.h"
  4. #include "uddiservicesnode.h"
  5. #include "comp.h"
  6. #include "objidl.h"
  7. class CComponentData
  8. : public IComponentData
  9. , IExtendPropertySheet2
  10. , IExtendContextMenu
  11. , IPersistStream
  12. , ISnapinHelp2
  13. {
  14. friend class CComponent;
  15. private:
  16. ULONG m_cref;
  17. LPCONSOLE m_ipConsole;
  18. LPCONSOLENAMESPACE m_ipConsoleNameSpace;
  19. BOOL m_bExpanded;
  20. CUDDIServicesNode *m_pStaticNode;
  21. public:
  22. CComponentData();
  23. ~CComponentData();
  24. HRESULT ExtractObjectTypeGUID( IDataObject* piDataObject, GUID* pguidObjectType );
  25. HRESULT ExtractSnapInCLSID( IDataObject* piDataObject, CLSID* pclsidSnapin );
  26. HRESULT ExtractString( IDataObject *piDataObject, CLIPFORMAT cfClipFormat, _TCHAR *pstr, DWORD cchMaxLength);
  27. HRESULT ExtractData( IDataObject* piDataObject, CLIPFORMAT cfClipFormat, BYTE* pbData, DWORD cbData );
  28. HRESULT ExtractComputerNameExt( IDataObject * pDataObject, tstring& strComputer );
  29. HRESULT OnExpand(IConsoleNameSpace *pConsoleNameSpace, IConsole *pConsole, HSCOPEITEM parent);
  30. ///////////////////////////////
  31. // Interface IUnknown
  32. ///////////////////////////////
  33. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  34. STDMETHODIMP_(ULONG) AddRef();
  35. STDMETHODIMP_(ULONG) Release();
  36. ///////////////////////////////
  37. // Interface IComponentData
  38. ///////////////////////////////
  39. virtual HRESULT STDMETHODCALLTYPE Initialize( /* [in] */ LPUNKNOWN pUnknown );
  40. virtual HRESULT STDMETHODCALLTYPE CreateComponent( /* [out] */ LPCOMPONENT __RPC_FAR *ppComponent);
  41. virtual HRESULT STDMETHODCALLTYPE Notify(
  42. /* [in] */ LPDATAOBJECT lpDataObject,
  43. /* [in] */ MMC_NOTIFY_TYPE event,
  44. /* [in] */ LPARAM arg,
  45. /* [in] */ LPARAM param);
  46. virtual HRESULT STDMETHODCALLTYPE Destroy( void );
  47. virtual HRESULT STDMETHODCALLTYPE QueryDataObject(
  48. /* [in] */ MMC_COOKIE cookie,
  49. /* [in] */ DATA_OBJECT_TYPES type,
  50. /* [out] */ LPDATAOBJECT __RPC_FAR *ppDataObject);
  51. virtual HRESULT STDMETHODCALLTYPE GetDisplayInfo( /* [out][in] */ SCOPEDATAITEM __RPC_FAR *pScopeDataItem );
  52. virtual HRESULT STDMETHODCALLTYPE CompareObjects(
  53. /* [in] */ LPDATAOBJECT lpDataObjectA,
  54. /* [in] */ LPDATAOBJECT lpDataObjectB );
  55. //////////////////////////////////
  56. // Interface IExtendPropertySheet2
  57. //////////////////////////////////
  58. virtual HRESULT STDMETHODCALLTYPE CreatePropertyPages(
  59. /* [in] */ LPPROPERTYSHEETCALLBACK lpProvider,
  60. /* [in] */ LONG_PTR handle,
  61. /* [in] */ LPDATAOBJECT lpIDataObject );
  62. virtual HRESULT STDMETHODCALLTYPE QueryPagesFor(
  63. /* [in] */ LPDATAOBJECT lpDataObject );
  64. virtual HRESULT STDMETHODCALLTYPE GetWatermarks(
  65. /* [in] */ LPDATAOBJECT lpIDataObject,
  66. /* [out] */ HBITMAP __RPC_FAR *lphWatermark,
  67. /* [out] */ HBITMAP __RPC_FAR *lphHeader,
  68. /* [out] */ HPALETTE __RPC_FAR *lphPalette,
  69. /* [out] */ BOOL __RPC_FAR *bStretch );
  70. ///////////////////////////////
  71. // Interface IExtendContextMenu
  72. ///////////////////////////////
  73. virtual HRESULT STDMETHODCALLTYPE AddMenuItems(
  74. /* [in] */ LPDATAOBJECT piDataObject,
  75. /* [in] */ LPCONTEXTMENUCALLBACK piCallback,
  76. /* [out][in] */ long __RPC_FAR *pInsertionAllowed );
  77. virtual HRESULT STDMETHODCALLTYPE Command(
  78. /* [in] */ long lCommandID,
  79. /* [in] */ LPDATAOBJECT piDataObject );
  80. ///////////////////////////////
  81. // Interface IPersistStream
  82. ///////////////////////////////
  83. virtual HRESULT STDMETHODCALLTYPE GetClassID( /*[out]*/ CLSID *pClassID );
  84. virtual HRESULT STDMETHODCALLTYPE IsDirty();
  85. virtual HRESULT STDMETHODCALLTYPE Load( /*[unique][in]*/ IStream *pStm );
  86. virtual HRESULT STDMETHODCALLTYPE Save( /*[unique][in]*/ IStream *pStm, /*[in]*/ BOOL fClearDirty );
  87. virtual HRESULT STDMETHODCALLTYPE GetSizeMax( /*[out]*/ ULARGE_INTEGER *pcbSize );
  88. ///////////////////////////////
  89. // Interface ISnapinHelp
  90. ///////////////////////////////
  91. virtual HRESULT STDMETHODCALLTYPE GetHelpTopic( LPOLESTR* lpCompiledHelpFile);
  92. virtual HRESULT STDMETHODCALLTYPE GetLinkedTopics( LPOLESTR* lpCompiledHelpFiles );
  93. };