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.

167 lines
3.5 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. // Compdata.h : Declaration of the CCompdata
  3. #ifndef __COMPDATA_H_
  4. #define __COMPDATA_H_
  5. #include "resource.h" // main symbols
  6. #include <mmc.h>
  7. #include "tarray.h"
  8. #include "twiz.h"
  9. #include "rnodes.h"
  10. #include "snodes.h"
  11. //#include "cfgbkend.h"
  12. #define IDM_CREATECON 101
  13. #define MS_DIALOG_COUNT 8
  14. #define FIN_PAGE 7
  15. #define LAN_PAGE 5
  16. #define ASYNC_PAGE 6
  17. //enum { DELETED_DIRS_ONEXIT , PERSESSION_TEMPDIR , DEF_CONSECURITY , LICENSING , MAX_SETTINGS };
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CCompdata
  20. class ATL_NO_VTABLE CCompdata :
  21. public CComObjectRootEx<CComSingleThreadModel>,
  22. public CComCoClass<CCompdata, &CLSID_Compdata>,
  23. public IExtendContextMenu,
  24. public ISnapinAbout,
  25. public ISnapinHelp,
  26. public IComponentData
  27. {
  28. public:
  29. DECLARE_REGISTRY_RESOURCEID( IDR_COMPDATA )
  30. DECLARE_NOT_AGGREGATABLE( CCompdata )
  31. BEGIN_COM_MAP( CCompdata )
  32. COM_INTERFACE_ENTRY( IComponentData )
  33. COM_INTERFACE_ENTRY( ISnapinAbout )
  34. COM_INTERFACE_ENTRY( IExtendContextMenu )
  35. COM_INTERFACE_ENTRY( ISnapinHelp )
  36. END_COM_MAP()
  37. // ICompdata
  38. public:
  39. CCompdata();
  40. STDMETHOD( CompareObjects )( LPDATAOBJECT , LPDATAOBJECT );
  41. STDMETHOD( GetDisplayInfo )( LPSCOPEDATAITEM );
  42. STDMETHOD( QueryDataObject )( MMC_COOKIE , DATA_OBJECT_TYPES , LPDATAOBJECT * );
  43. STDMETHOD( Notify )( LPDATAOBJECT , MMC_NOTIFY_TYPE , LPARAM , LPARAM );
  44. STDMETHOD( CreateComponent )( LPCOMPONENT * );
  45. STDMETHOD( Initialize )( LPUNKNOWN );
  46. STDMETHOD( Destroy )();
  47. //IExtendContextMenu
  48. STDMETHOD( AddMenuItems )( LPDATAOBJECT , LPCONTEXTMENUCALLBACK , PLONG );
  49. STDMETHOD( Command )( LONG , LPDATAOBJECT );
  50. // ISnapinAbout
  51. STDMETHOD( GetSnapinDescription )( LPOLESTR * );
  52. STDMETHOD( GetProvider )( LPOLESTR * );
  53. STDMETHOD( GetSnapinVersion )( LPOLESTR * );
  54. STDMETHOD( GetSnapinImage )( HICON * );
  55. STDMETHOD( GetStaticFolderImage )( HBITMAP * , HBITMAP *, HBITMAP *, COLORREF * );
  56. // ISnapinHelp
  57. STDMETHOD( GetHelpTopic )( LPOLESTR * );
  58. //IComponentdata helper methods
  59. BOOL ExpandScopeTree( LPDATAOBJECT , BOOL , HSCOPEITEM );
  60. BOOL InitDialogObjects( );
  61. BOOL BuildWizardPath( );
  62. BOOL FreeDialogObjects( );
  63. BOOL IsConnectionFolder( LPDATAOBJECT );
  64. BOOL IsSettingsFolder( LPDATAOBJECT );
  65. HRESULT BuildResultNodes( );
  66. // BOOL GetResultNode( int , CResultNode** );
  67. CResultNode * GetResultNode( int );
  68. HRESULT InsertFolderItems( LPRESULTDATA );
  69. int GetServer( ICfgComp ** );
  70. BOOL OnDeleteItem( LPDATAOBJECT );
  71. HRESULT UpdateAllResultNodes( );
  72. HRESULT InsertSettingItems( LPRESULTDATA );
  73. HRESULT BuildSettingsNodes( );
  74. BOOL GetMaxTextLengthSetting( LPTSTR , PINT );
  75. BOOL GetMaxTextLengthAttribute( LPTSTR , PINT );
  76. private:
  77. LPCONSOLE m_pConsole;
  78. LPCONSOLENAMESPACE m_pConsoleNameSpace;
  79. //LPDATAOBJECT m_pMainRoot;
  80. CBaseNode *m_pMainRoot[ 2 ];
  81. ICfgComp *m_pCfgcomp;
  82. public:
  83. TCHAR m_tchMainFolderName[ 80 ];
  84. TCHAR m_tchSettingsFolderName[ 80 ];
  85. CDialogWizBase *m_pDlg[ MS_DIALOG_COUNT ];
  86. CArrayT< HPROPSHEETPAGE > m_hPages;
  87. CArrayT< CResultNode * > m_rnNodes;
  88. CArrayT< CSettingNode * > m_rgsNodes;//[ MAX_SETTINGS ];
  89. };
  90. #endif //__COMPDATA_H_