Read
Collapse the table of content
Expand the table of content

Read method

Causes one or more properties to be read from the property bag.

Syntax


HRESULT retVal = object.Read(cProperties, pPropBag, pErrLog, pvarValue, phrError);

Parameters

cProperties [in]

Type: unsigned long

The number of properties to read. This argument specifies the number of elements in the arrays at pPropBag, pvarValue, and phrError.

pPropBag [in]

Type: PROPBAG2

The address of an array of PROPBAG2 structures that specify the properties that are requested. The vt member and the pstrName member of these structures must be filled in before this method can be called. The dwHint member of these structures is optional. There must be at least cProperties elements in this array. This argument cannot be NULL.

pErrLog [in]

Type: IErrorLog

The address of an IErrorlog interface in which the property bag stores any errors that occur during the reads. This argument can be NULL; in which case, the caller receives no logging errors.

pvarValue [out]

Type: VARIANT

The address of an array of VARIANT structures that receive the property values. The caller does not have to initialize these structures before calling IPropertyBag2::Read. The IPropertyBag2::Read method fills the type field and the value field in these structures before it returns. There must be at least cProperties elements in this array. The calling application is responsible for freeing any allocations that are contained in these structures. This argument cannot be NULL.

phrError [out]

Type: HRESULT

The address of an array of HRESULT values that receives the result of each property read. There must be at least cProperties elements in this array. This argument cannot be NULL.

See also

Reference
PROPBAG2
PROPBAG2_TYPE

 

 

Show:
© 2016 Microsoft