IVisualTreeService::GetCollectionElements method (xamlom.h)
Gets the elements in a collection.
Syntax
HRESULT GetCollectionElements(
[in] InstanceHandle instanceHandle,
[in] unsigned int startIndex,
[in, out] unsigned int *pElementCount,
[out] CollectionElementValue **ppElementValues
);
Parameters
[in] instanceHandle
A handle to the collection object.
[in] startIndex
The index in the collection to start getting elements from.
[in, out] pElementCount
The count of elements in the returned array.
[out] ppElementValues
An array of elements returned from the collection.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
For any collection method, the caller should query the properties of a known element and should only call this method if the property has MetadataBit::IsValueCollectionset.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 [desktop apps only] |
Minimum supported server | Windows Server 2016 [desktop apps only] |
Target Platform | Windows |
Header | xamlom.h |