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.

135 lines
2.9 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // dstorex.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Defines the classes IDataStoreObjectEx and IDataStoreContainerEx.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 03/02/1998 Original version.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef _DSTOREX_H
  19. #define _DSTOREX_H
  20. #if _MSC_VER >= 1000
  21. #pragma once
  22. #endif
  23. #include <datastore2.h>
  24. ///////////////////////////////////////////////////////////////////////////////
  25. //
  26. // CLASS
  27. //
  28. // IDataStoreObjectEx
  29. //
  30. // DESCRIPTION
  31. //
  32. // This class extends IDataStoreObject in order to map the collection
  33. // related properties to alternate names. This allows a sub-class to
  34. // implement both IDataStoreObject and IDataStoreContainer without name
  35. // collisions.
  36. //
  37. ///////////////////////////////////////////////////////////////////////////////
  38. class __declspec(novtable) IDataStoreObjectEx
  39. : public IDataStoreObject
  40. {
  41. public:
  42. //////////
  43. // IDataStoreObject members that are mapped to new names.
  44. //////////
  45. STDMETHOD(get_Count)(long* pVal)
  46. {
  47. return get_PropertyCount(pVal);
  48. }
  49. STDMETHOD(get__NewEnum)(IUnknown** pVal)
  50. {
  51. return get_NewPropertyEnum(pVal);
  52. }
  53. //////////
  54. // Versions that are overriden in the derived class.
  55. //////////
  56. STDMETHOD(get_PropertyCount)(long* pVal)
  57. {
  58. return E_NOTIMPL;
  59. }
  60. STDMETHOD(get_NewPropertyEnum)(IUnknown** pVal)
  61. {
  62. return E_NOTIMPL;
  63. }
  64. STDMETHOD(Item)(BSTR bstrName, IDataStoreProperty** pVal)
  65. {
  66. return E_NOTIMPL;
  67. }
  68. };
  69. ///////////////////////////////////////////////////////////////////////////////
  70. //
  71. // CLASS
  72. //
  73. // IDataStoreContainerEx
  74. //
  75. // DESCRIPTION
  76. //
  77. // This class extends IDataStoreContainer in order to map the collection
  78. // related properties to alternate names. This allows a sub-class to
  79. // implement both IDataStoreObject and IDataStoreContainer without name
  80. // collisions.
  81. //
  82. ///////////////////////////////////////////////////////////////////////////////
  83. class __declspec(novtable) IDataStoreContainerEx
  84. : public IDataStoreContainer
  85. {
  86. public:
  87. //////////
  88. // IDataStoreContainer members that are mapped to new names.
  89. //////////
  90. STDMETHOD(get_Count)(long* pVal)
  91. {
  92. return get_ChildCount(pVal);
  93. }
  94. STDMETHOD(get__NewEnum)(IUnknown** pVal)
  95. {
  96. return get_NewChildEnum(pVal);
  97. }
  98. //////////
  99. // Alternate versions that are overriden in the derived class.
  100. //////////
  101. STDMETHOD(get_ChildCount)(long* pVal)
  102. {
  103. return E_NOTIMPL;
  104. }
  105. STDMETHOD(get_NewChildEnum)(IUnknown** pVal)
  106. {
  107. return E_NOTIMPL;
  108. }
  109. STDMETHOD(Item)(BSTR bstrName, IDataStoreObject** pVal)
  110. {
  111. return E_NOTIMPL;
  112. }
  113. };
  114. #endif // _DSTOREX_H