Source code of Windows XP (NT5)
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.

101 lines
3.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 2000.
  5. //
  6. // File: PValXpr.cxx
  7. //
  8. // Contents: Property value expression class
  9. //
  10. // Classes: CXpr
  11. //
  12. // History: 11-Sep-91 KyleP Created
  13. //
  14. //----------------------------------------------------------------------------
  15. #include <pch.cxx>
  16. #pragma hdrstop
  17. #include <objcur.hxx>
  18. #include <pvalxpr.hxx>
  19. //+---------------------------------------------------------------------------
  20. //
  21. // Member: CXprPropertyValue::CXprPropertyValue, public
  22. //
  23. // Synopsis: Constructs a property value expression.
  24. //
  25. // Arguments: [pcxpr] -- Expression to evaluate.
  26. // [propinfo] -- Used to query statistics of specific property
  27. //
  28. // Requires: [cxpr] Must be just a property name in Win 4.0
  29. //
  30. // Returns: GVRSuccess if successful
  31. //
  32. // History: 14-Oct-91 KyleP Created.
  33. //
  34. //----------------------------------------------------------------------------
  35. CXprPropertyValue::CXprPropertyValue( PROPID pid )
  36. : _pid( pid )
  37. {
  38. }
  39. //+---------------------------------------------------------------------------
  40. //
  41. // Member: CXprPropertyValue::~CXprPropertyValue, public
  42. //
  43. // Synopsis: Virtual destructor required.
  44. //
  45. // History: 15-Oct-91 KyleP Created.
  46. //
  47. //----------------------------------------------------------------------------
  48. CXprPropertyValue::~CXprPropertyValue()
  49. {
  50. }
  51. //+---------------------------------------------------------------------------
  52. //
  53. // Member: CXprPropertyValue::GetValue, public
  54. //
  55. // Synopsis: Computes the value of the expression for the current row.
  56. //
  57. // Arguments: [obj] -- Objects table to retrieve values from. It is
  58. // assumed to be positioned on the object whose
  59. // property values are to be extracted.
  60. // [p] -- Storage for the returned property value. On
  61. // return this will contain a PROPVARIANT at its head.
  62. // [pcb] -- Size allocated for p. Space after the PROPVARIANT
  63. // structure itself can be used by GetValue to
  64. // append structures which are sometimes pointed
  65. // at by an PROPVARIANT.
  66. //
  67. // Returns: GVRSuccess if successful
  68. // *[pcb] contains the size required for p.
  69. //
  70. // History: 16-Oct-91 KyleP Created.
  71. //
  72. //----------------------------------------------------------------------------
  73. GetValueResult CXprPropertyValue::GetValue( CRetriever & obj,
  74. PROPVARIANT * p,
  75. ULONG * pcb )
  76. {
  77. return( obj.GetPropertyValue( _pid, p, pcb ) );
  78. }
  79. //+---------------------------------------------------------------------------
  80. //
  81. // Member: CXprPropertyValue::ValueType, public
  82. //
  83. // Returns: The property type of the property.
  84. //
  85. // History: 26-Nov-91 KyleP Created.
  86. //
  87. //----------------------------------------------------------------------------
  88. ULONG CXprPropertyValue::ValueType() const
  89. {
  90. return( 0 );
  91. }