I have asked same question here as well.
I am having trouble with making API that would return Array of objects.
Here is what I have tried so far.
I wrote method that would return array as parameter
HRESULT GetMyObjectList([out] UINT32* objCount, [out, size_is(*objCount)] MyObject myobj[*]);
This gives me following error:
Error MIDL4048 [msg]Unsupported array pattern detected. [context]myobj
Also, I tried to add array into custom Object, i.e.
[version(1.0)]
typedef struct MyCustomObject
{
UINT32 count;
[size_is(count)] UINT32 someParams1[*];
} MyCustomObject;
In this case I am getting following error:
Error MIDL4000 [msg]A structure field cannot be a type of pointer. [context]: someParams1 [ Field 'someParams1' of Struct 'MyName.Space.MyCustomObject' ]
Can anyone tell me what is the problem here? Or provide working example to retrive array of Objects through WRL idl