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.

73 lines
2.0 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // dsproperty.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // This file declares the class DSProperty.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 03/02/1998 Original version.
  16. // 04/13/2000 Port to ATL 3.0
  17. //
  18. ///////////////////////////////////////////////////////////////////////////////
  19. #ifndef _DSPROPERTY_H_
  20. #define _DSPROPERTY_H_
  21. #include <datastore2.h>
  22. ///////////////////////////////////////////////////////////////////////////////
  23. //
  24. // CLASS
  25. //
  26. // DSProperty
  27. //
  28. // DESCRIPTION
  29. //
  30. // This class implements the IDataStoreProperty interface. It represents
  31. // a single property of an IDataStoreObject.
  32. //
  33. ///////////////////////////////////////////////////////////////////////////////
  34. class DSProperty :
  35. public CComObjectRootEx< CComMultiThreadModelNoCS >,
  36. public IDispatchImpl<
  37. IDataStoreProperty,
  38. &__uuidof(IDataStoreProperty),
  39. &__uuidof(DataStore2Lib)
  40. >
  41. {
  42. public:
  43. BEGIN_COM_MAP(DSProperty)
  44. COM_INTERFACE_ENTRY_IID(__uuidof(IDataStoreProperty), IDataStoreProperty)
  45. COM_INTERFACE_ENTRY(IDispatch)
  46. END_COM_MAP()
  47. // Create a new DSProperty object.
  48. static DSProperty* createInstance(
  49. const _bstr_t& propName,
  50. const _variant_t& propValue,
  51. IDataStoreObject* memberOf
  52. );
  53. //////////
  54. // IDataStoreProperty
  55. //////////
  56. STDMETHOD(get_Name)(/*[out, retval]*/ BSTR* pVal);
  57. STDMETHOD(get_Value)(/*[out, retval]*/ VARIANT* pVal);
  58. STDMETHOD(get_ValueEx)(/*[out, retval]*/ VARIANT* pVal);
  59. STDMETHOD(get_Owner)(/*[out, retval]*/ IDataStoreObject** pVal);
  60. protected:
  61. _bstr_t name; // Property name.
  62. _variant_t value; // Property value.
  63. CComPtr<IDataStoreObject> owner; // Object to which this property belongs.
  64. };
  65. #endif // _DSPROPERTY_H_