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.

102 lines
3.7 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. #include "DataObj.h"
  22. class CComponent : public IComponent, IResultOwnerData
  23. {
  24. private:
  25. ULONG m_cref;
  26. IConsole *m_ipConsole;
  27. class CComponentData *m_pParent;
  28. class CDelegationBase *m_pLastNode;
  29. public:
  30. CComponent(CComponentData *pParent);
  31. ~CComponent();
  32. ///////////////////////////////
  33. // Interface IUnknown
  34. ///////////////////////////////
  35. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  36. STDMETHODIMP_(ULONG) AddRef();
  37. STDMETHODIMP_(ULONG) Release();
  38. ///////////////////////////////
  39. // Interface IComponent
  40. ///////////////////////////////
  41. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Initialize(
  42. /* [in] */ LPCONSOLE lpConsole);
  43. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Notify(
  44. /* [in] */ LPDATAOBJECT lpDataObject,
  45. /* [in] */ MMC_NOTIFY_TYPE event,
  46. /* [in] */ LPARAM arg,
  47. /* [in] */ LPARAM param);
  48. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Destroy(
  49. /* [in] */ MMC_COOKIE cookie);
  50. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryDataObject(
  51. /* [in] */ MMC_COOKIE cookie,
  52. /* [in] */ DATA_OBJECT_TYPES type,
  53. /* [out] */ LPDATAOBJECT __RPC_FAR *ppDataObject);
  54. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetResultViewType(
  55. /* [in] */ MMC_COOKIE cookie,
  56. /* [out] */ LPOLESTR __RPC_FAR *ppViewType,
  57. /* [out] */ long __RPC_FAR *pViewOptions);
  58. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDisplayInfo(
  59. /* [out][in] */ RESULTDATAITEM __RPC_FAR *pResultDataItem);
  60. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CompareObjects(
  61. /* [in] */ LPDATAOBJECT lpDataObjectA,
  62. /* [in] */ LPDATAOBJECT lpDataObjectB);
  63. ///////////////////////////////
  64. // Interface IComponent
  65. ///////////////////////////////
  66. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FindItem(
  67. /* [in] */ LPRESULTFINDINFO pFindInfo,
  68. /* [out] */ int __RPC_FAR *pnFoundIndex);
  69. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CacheHint(
  70. /* [in] */ int nStartIndex,
  71. /* [in] */ int nEndIndex);
  72. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SortItems(
  73. /* [in] */ int nColumn,
  74. /* [in] */ DWORD dwSortOptions,
  75. /* [in] */ LPARAM lUserParam);
  76. ///////////////////////////////////////////
  77. // Special code for handling multiselection
  78. ///////////////////////////////////////////
  79. public:
  80. HRESULT GetCurrentSelections(CDataObject *pMultiSelectDataObject);
  81. void DisplayMessageBox(CDelegationBase *base);
  82. };
  83. #endif _SAMPCOMP_H_