IPropertyStorage::ReadMultiple method (propidlbase.h)

The ReadMultiple method reads specified properties from the current property set.

Syntax

HRESULT ReadMultiple(
  [in]  ULONG             cpspec,
  [in]  const PROPSPEC [] rgpspec,
  [out] PROPVARIANT []    rgpropvar
);

Parameters

[in] cpspec

The numeric count of properties to be specified in the rgpspec array. The value of this parameter can be set to zero; however, that defeats the purpose of the method as no properties are thereby read, regardless of the values set in rgpspec.

[in] rgpspec

An array of PROPSPEC structures specifies which properties are read. Properties can be specified either by a property ID or by an optional string name. It is not necessary to specify properties in any particular order in the array. The array can contain duplicate properties, resulting in duplicate property values on return for simple properties. Nonsimple properties should return access denied on an attempt to open them a second time. The array can contain a mixture of property IDs and string IDs.

[out] rgpropvar

Caller-allocated array of a PROPVARIANT structure that, on return, contains the values of the properties specified by the corresponding elements in the rgpspec array. The array must be at least large enough to hold values of the cpspec parameter of the PROPVARIANT structure. The cpspec parameter specifies the number of properties set in the array. The caller is not required to initialize these PROPVARIANT structure values in any specific order. However, the implementation must fill all members correctly on return. If there is no other appropriate value, the implementation must set the vt member of each PROPVARIANT structure to VT_EMPTY.

Return value

This method supports the standard return value E_UNEXPECTED, as well as the following:

This function can also return any file system errors or Win32 errors wrapped in an HRESULT data type. For more information, see Error Handling Strategies.

For more information, see Property Storage Considerations.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header propidlbase.h (include Objbase.h, Propidlbase.h)
Library Uuid.lib
DLL Ole32.dll

See also

EnumAll Sample

IPropertySetStorage

IPropertyStorage

IPropertyStorage::WriteMultiple

IPropertyStorage::WritePropertyNames

Samples

StgCreatePropSetStg Sample

WriteRead Sample