1
votes

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?

1
You will need to implement your own IVector. - kiewic
This function returns result in 'ABI::Windows::Foundation::Collections::IVectorView<T>', I just give it non initialized pointer to this 'IVectorView<T>'. Result is implemented and has working methods like GetAt(N). Can I use same implementation? Also I read that collections.h implements this interfaces with std containers, but all I see there - c++/cx code. - Рома Архипкин
@РомаАрхипкин: hey, I know it's been awhile, but have you solved it? If so, can you please post a code example of how you initialized that IIterable<HSTRING> parameter? - c00000fd
as @Damyan answered you need implement your own vector or use from link I posted in question. Also there a sample code how use it - Рома Архипкин

1 Answers

0
votes

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.