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.

96 lines
3.3 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to existing Microsoft documentation.
  4. //
  5. //
  6. //
  7. //
  8. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  9. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  10. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  11. // PURPOSE.
  12. //
  13. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  14. //
  15. //
  16. //
  17. //==============================================================;
  18. #ifndef _SAMPCOMP_H_
  19. #define _SAMPCOMP_H_
  20. #include <mmc.h>
  21. class CComponent : public IComponent,
  22. IExtendControlbar
  23. {
  24. private:
  25. ULONG m_cref;
  26. IConsole* m_ipConsole;
  27. IDisplayHelp* m_ipDisplayHelp;
  28. IControlbar* m_ipControlBar;
  29. IToolbar* m_ipToolbar;
  30. class CComponentData *m_pComponentData;
  31. public:
  32. CComponent(CComponentData *parent);
  33. ~CComponent();
  34. ///////////////////////////////
  35. // Interface IUnknown
  36. ///////////////////////////////
  37. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  38. STDMETHODIMP_(ULONG) AddRef();
  39. STDMETHODIMP_(ULONG) Release();
  40. ///////////////////////////////
  41. // Interface IComponent
  42. ///////////////////////////////
  43. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Initialize(
  44. /* [in] */ LPCONSOLE lpConsole);
  45. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Notify(
  46. /* [in] */ LPDATAOBJECT lpDataObject,
  47. /* [in] */ MMC_NOTIFY_TYPE event,
  48. /* [in] */ LPARAM arg,
  49. /* [in] */ LPARAM param);
  50. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Destroy(
  51. /* [in] */ MMC_COOKIE cookie);
  52. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryDataObject(
  53. /* [in] */ MMC_COOKIE cookie,
  54. /* [in] */ DATA_OBJECT_TYPES type,
  55. /* [out] */ LPDATAOBJECT __RPC_FAR *ppDataObject);
  56. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetResultViewType(
  57. /* [in] */ MMC_COOKIE cookie,
  58. /* [out] */ LPOLESTR __RPC_FAR *ppViewType,
  59. /* [out] */ long __RPC_FAR *pViewOptions);
  60. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDisplayInfo(
  61. /* [out][in] */ RESULTDATAITEM __RPC_FAR *pResultDataItem);
  62. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CompareObjects(
  63. /* [in] */ LPDATAOBJECT lpDataObjectA,
  64. /* [in] */ LPDATAOBJECT lpDataObjectB);
  65. ///////////////////////////////
  66. // Interface IExtendControlBar
  67. ///////////////////////////////
  68. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetControlbar(
  69. /* [in] */ LPCONTROLBAR pControlbar);
  70. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ControlbarNotify(
  71. /* [in] */ MMC_NOTIFY_TYPE event,
  72. /* [in] */ LPARAM arg,
  73. /* [in] */ LPARAM param);
  74. public:
  75. IToolbar *getToolbar() { return m_ipToolbar; }
  76. };
  77. #endif _SAMPCOMP_H_