Hi,

I can not find out how to read what is in a VARIANT, which is the result of calling a method GetAllProperties. The doc of this method only specifies that a VARIANT is returned. It should contain some kind of strings. I tried this :

VARIANT names;
_variant_t v1;
VARTYPE vtype;
long ix;
...
x->GetAllProperties(&names);

if (V_ISARRAY(&names)) {
SafeArrayGetVartype(names.parray,&vtype);
// this returns 0x0800 in vtype, so I assume it is an array of _variant_t !!!
for (ix=0;ix<nprops;ix++) {
SafeArrayGetElement(names.parray,&ix,&v1);
_bstr_t s1(v1);
printf("name=%s\n",(char *)s1);
}
}

But this ends in an exception during the statement "_bstr_t s1(v1);"

What do I do wrong ???

Linde Ackermans