WinRT WRL ABI 集合

WinRT WRL ABI collections

我尝试使用 WRL 并坚持使用集合。

我需要传递函数附加属性:

ABI::Windows::Devices::Enumeration::IDeviceInformationStatics::FindAllAsyncAqsFilterAndAdditionalProperties(
  /* [in] */ __RPC__in HSTRING aqsFilter,
  /* [in] */ __RPC__in_opt ABI::Windows::Foundation::Collections::IIterable<HSTRING>* additionalProperties, ...)

但是 IIterable 没有填充它的方法,并且与 IVector<T> 没有任何联系(它有填充方法,但它是抽象接口)。

我是否需要像 there 那样实现自己的向量,或者是否存在更简单的方法来处理集合?这些接口下有哪些集合return ABI 功能?

您需要实现自己的(或重复使用您发布的 link 中的那些)。

请注意,IIterable 确实有一个方法 "First",如果您想自己实现,可以实现该方法。查看 windows.foundation.collections.h 了解更多详情。