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.

113 lines
4.2 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. IExtendPropertySheet2, IExtendControlbar
  23. {
  24. private:
  25. ULONG m_cref;
  26. IConsole* m_ipConsole;
  27. IControlbar* m_ipControlBar;
  28. IToolbar* m_ipToolbar;
  29. class CComponentData *m_pComponentData;
  30. public:
  31. CComponent(CComponentData *parent);
  32. ~CComponent();
  33. ///////////////////////////////
  34. // Interface IUnknown
  35. ///////////////////////////////
  36. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  37. STDMETHODIMP_(ULONG) AddRef();
  38. STDMETHODIMP_(ULONG) Release();
  39. ///////////////////////////////
  40. // Interface IComponent
  41. ///////////////////////////////
  42. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Initialize(
  43. /* [in] */ LPCONSOLE lpConsole);
  44. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Notify(
  45. /* [in] */ LPDATAOBJECT lpDataObject,
  46. /* [in] */ MMC_NOTIFY_TYPE event,
  47. /* [in] */ LPARAM arg,
  48. /* [in] */ LPARAM param);
  49. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Destroy(
  50. /* [in] */ MMC_COOKIE cookie);
  51. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryDataObject(
  52. /* [in] */ MMC_COOKIE cookie,
  53. /* [in] */ DATA_OBJECT_TYPES type,
  54. /* [out] */ LPDATAOBJECT __RPC_FAR *ppDataObject);
  55. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetResultViewType(
  56. /* [in] */ MMC_COOKIE cookie,
  57. /* [out] */ LPOLESTR __RPC_FAR *ppViewType,
  58. /* [out] */ long __RPC_FAR *pViewOptions);
  59. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDisplayInfo(
  60. /* [out][in] */ RESULTDATAITEM __RPC_FAR *pResultDataItem);
  61. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CompareObjects(
  62. /* [in] */ LPDATAOBJECT lpDataObjectA,
  63. /* [in] */ LPDATAOBJECT lpDataObjectB);
  64. //////////////////////////////////
  65. // Interface IExtendPropertySheet2
  66. //////////////////////////////////
  67. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreatePropertyPages(
  68. /* [in] */ LPPROPERTYSHEETCALLBACK lpProvider,
  69. /* [in] */ LONG_PTR handle,
  70. /* [in] */ LPDATAOBJECT lpIDataObject);
  71. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryPagesFor(
  72. /* [in] */ LPDATAOBJECT lpDataObject);
  73. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetWatermarks(
  74. /* [in] */ LPDATAOBJECT lpIDataObject,
  75. /* [out] */ HBITMAP __RPC_FAR *lphWatermark,
  76. /* [out] */ HBITMAP __RPC_FAR *lphHeader,
  77. /* [out] */ HPALETTE __RPC_FAR *lphPalette,
  78. /* [out] */ BOOL __RPC_FAR *bStretch);
  79. ///////////////////////////////
  80. // Interface IExtendControlBar
  81. ///////////////////////////////
  82. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetControlbar(
  83. /* [in] */ LPCONTROLBAR pControlbar);
  84. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ControlbarNotify(
  85. /* [in] */ MMC_NOTIFY_TYPE event,
  86. /* [in] */ LPARAM arg,
  87. /* [in] */ LPARAM param);
  88. public:
  89. IToolbar *getToolbar() { return m_ipToolbar; }
  90. };
  91. #endif _SAMPCOMP_H_