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.

149 lines
4.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. atlkcomp.h
  7. This file contains the prototypes for the derived classes
  8. for CComponent and CComponentData. Most of these functions
  9. are pure virtual functions that need to be overridden
  10. for snapin functionality.
  11. FILE HISTORY:
  12. */
  13. #include "resource.h" // main symbols
  14. #ifndef __mmc_h__
  15. #include <mmc.h>
  16. #endif
  17. #ifndef _CCDATA_H
  18. #include "ccdata.h"
  19. #endif
  20. #ifndef _COMPONT_H
  21. #include "compont.h"
  22. #endif
  23. #ifndef _COLUMN_H
  24. #include "column.h"
  25. #endif
  26. #ifndef _atlkSTRM_H
  27. #include "atlkstrm.h"
  28. #endif
  29. /*---------------------------------------------------------------------------
  30. CATLKComponentData
  31. This is the base implementation of ComponentData. This will be
  32. incorporated into the two derived classes.
  33. ---------------------------------------------------------------------------*/
  34. class CATLKComponentData :
  35. public CComponentData,
  36. public CComObjectRoot,
  37. public CComCoClass<CATLKComponentData, &CLSID_ATLKAdminExtension>
  38. {
  39. public:
  40. BEGIN_COM_MAP(CATLKComponentData)
  41. COM_INTERFACE_ENTRY(IComponentData)
  42. COM_INTERFACE_ENTRY(IExtendPropertySheet)
  43. COM_INTERFACE_ENTRY(IExtendContextMenu)
  44. COM_INTERFACE_ENTRY(IPersistStreamInit)
  45. COM_INTERFACE_ENTRY(ISnapinHelp)
  46. END_COM_MAP()
  47. DECLARE_REGISTRY(CATLKComponentData,
  48. _T("RouterATLKAdminExtension.RouterATLKAdminExtension.1"),
  49. _T("RouterATLKAdminExtension.RouterATLKAdminExtension"),
  50. IDS_ATLK_DESC, THREADFLAGS_APARTMENT);
  51. // These are the interfaces that we MUST implement
  52. // We will implement our common behavior here, with the derived
  53. // classes implementing the specific behavior.
  54. DeclareIPersistStreamInitMembers(IMPL)
  55. DeclareITFSCompDataCallbackMembers(IMPL)
  56. CATLKComponentData();
  57. HRESULT FinalConstruct();
  58. void FinalRelease();
  59. protected:
  60. SPITFSNodeMgr m_spNodeMgr;
  61. };
  62. /////////////////////////////////////////////////////////////////////////////
  63. //
  64. // CSampleComponent
  65. //
  66. /////////////////////////////////////////////////////////////////////////////
  67. class CATLKComponent :
  68. public TFSComponent,
  69. public IPersistStreamInit
  70. {
  71. public:
  72. CATLKComponent();
  73. ~CATLKComponent();
  74. DeclareIUnknownMembers(IMPL)
  75. DeclareIPersistStreamInitMembers(IMPL)
  76. DeclareITFSCompCallbackMembers(IMPL)
  77. // Override OnQueryDataObject, so that we can forward
  78. // the calls down to the Result Handlers
  79. STDMETHOD(QueryDataObject)(MMC_COOKIE cookie, DATA_OBJECT_TYPES type,
  80. LPDATAOBJECT* ppDataObject);
  81. STDMETHOD(OnSnapinHelp)(LPDATAOBJECT pDataObject, LPARAM arg, LPARAM param);
  82. //Attributes
  83. private:
  84. ATLKComponentConfigStream m_ComponentConfig;
  85. };
  86. /*---------------------------------------------------------------------------
  87. This is the derived class for handling the IAbout interface from MMC
  88. Author: EricDav
  89. ---------------------------------------------------------------------------*/
  90. class CATLKAbout :
  91. public CAbout,
  92. public CComCoClass<CATLKAbout, &CLSID_ATLKAdminAbout>
  93. {
  94. public:
  95. DECLARE_REGISTRY(CATLKAbout,
  96. _T("RouterATLKSnapin.About.1"),
  97. _T("RouterATLKSnapin.About"),
  98. IDS_ATLK_DESC,
  99. THREADFLAGS_APARTMENT)
  100. BEGIN_COM_MAP(CATLKAbout)
  101. COM_INTERFACE_ENTRY(ISnapinAbout) // Must have one static entry
  102. COM_INTERFACE_ENTRY_CHAIN(CAbout) // chain to the base class
  103. END_COM_MAP()
  104. DECLARE_NOT_AGGREGATABLE(CATLKAbout)
  105. // these must be overridden to provide values to the base class
  106. protected:
  107. virtual UINT GetAboutDescriptionId() { return IDS_ABOUT_ATLKDESC; }
  108. virtual UINT GetAboutProviderId() { return IDS_ABOUT_ATLKPROVIDER; }
  109. virtual UINT GetAboutVersionId() { return IDS_ABOUT_ATLKVERSION; }
  110. virtual UINT GetAboutIconId() { return IDI_ATLK_ICON; }
  111. virtual UINT GetSmallRootId() { return 0; }
  112. virtual UINT GetSmallOpenRootId() { return 0; }
  113. virtual UINT GetLargeRootId() { return 0; }
  114. virtual COLORREF GetLargeColorMask() { return (COLORREF) 0; }
  115. };