Share via


IPropertyBag2.Read(UInt32, PROPBAG2[], IErrorLog, Object, Int32) Method

Definition

Reads one or more properties from the property bag.

public:
 void Read(System::UInt32 cProperties, cli::array <Microsoft::VisualStudio::OLE::Interop::PROPBAG2> ^ pPropBag, Microsoft::VisualStudio::OLE::Interop::IErrorLog ^ pErrLog, [Runtime::InteropServices::Out] System::Object ^ % pvarValue, [Runtime::InteropServices::Out] int % phrError);
void Read(unsigned int cProperties, std::Array <Microsoft::VisualStudio::OLE::Interop::PROPBAG2> const & pPropBag, Microsoft::VisualStudio::OLE::Interop::IErrorLog const & pErrLog, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & pvarValue, [Runtime::InteropServices::Out] int & phrError);
public void Read (uint cProperties, Microsoft.VisualStudio.OLE.Interop.PROPBAG2[] pPropBag, Microsoft.VisualStudio.OLE.Interop.IErrorLog pErrLog, out object pvarValue, out int phrError);
abstract member Read : uint32 * Microsoft.VisualStudio.OLE.Interop.PROPBAG2[] * Microsoft.VisualStudio.OLE.Interop.IErrorLog * obj * int -> unit
Public Sub Read (cProperties As UInteger, pPropBag As PROPBAG2(), pErrLog As IErrorLog, ByRef pvarValue As Object, ByRef phrError As Integer)

Parameters

cProperties
UInt32

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

pPropBag
PROPBAG2[]

[in[ An array of PROPBAG2 structures that specify the properties that are requested. The vt and pstrName members 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
IErrorLog

[in] 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
Object

[out] An array of VARIANT structures that receive the property values. The caller does not have to initialize these structures before calling Read(UInt32, PROPBAG2[], IErrorLog, Object, Int32). The Read(UInt32, PROPBAG2[], IErrorLog, Object, Int32)method fills the type and value fields in these structures before it returns. There must be at least cProperties elements in this array. The calling application is frees any allocations contained in these structures. This argument cannot be NULL.

phrError
Int32

[out] 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.

Applies to