IVisualTreeService::GetCollectionCount method (xamlom.h)

Gets the count of a collection.

Syntax

HRESULT GetCollectionCount(
  [in]  InstanceHandle instanceHandle,
  [out] unsigned int   *pCollectionSize
);

Parameters

[in] instanceHandle

A handle to the collection object.

[out] pCollectionSize

The number of elements in 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

See also

IVisualTreeService