I want to pass a SafeArray to a function in C++ COM.
I have an object of MetadataListEntity class that I have initialized
IMetadataListEntityPtr metadataListEntity = NULL;
hr = CoCreateInstance(
__uuidof(MetadataListEntity),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IMetadataListEntityPtr),
(void**)&metadataListEntity);
metadataListEntity->PutBaseType(0);
metadataListEntity->PutDescription("");
metadataListEntity->PutId("78ba31f9-11ed-4669-9143-c4ac9f11b28b");
metadataListEntity->PutIsChecked(true);
metadataListEntity->PutItemCount(24);
metadataListEntity->PutTitle("AgeMaster");
I want to create an array of MetadataListEntity objects and pass it to a function that accepts a SafeArray.
Ho do I do that ?
Thanks, Gagan