Search code examples
c++collectionswindows-runtimewrl

WinRT WRL ABI collections


I trying work with WRL and stuck with collections.

I need pass to function additional properties:

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

but IIterable has no methods to fill it, and has no touch with IVector<T> (which has methods for filling, but it abstract interface).

Am I need implement my own vector like there or there exist a simpler way to work with collections? What kind of collections return ABI functions under these interfaces?


Solution

  • You'll need to implement your own (or reuse the ones from the link you posted).

    Note that IIterable does have a single method, "First", that you can implement if you want to do it yourself. Have a look in windows.foundation.collections.h for more details.