-#if (defined(_MSC_VER) && (_MSC_VER <= 1000) && !defined(__MWERKS__) ) //GC
-#ifndef HAVE_BOOL // Can't use bool operator if no native bool type
- variant = (long) (oleVariant.bool != 0);
-#else
- variant = (bool) (oleVariant.bool != 0);
-#endif
-#else
-#ifndef HAVE_BOOL // Can't use bool operator if no native bool type
- variant = (long) (oleVariant.boolVal != 0);
-#else
- variant = (bool) (oleVariant.boolVal != 0);
-#endif
-#endif
- break;
+ case VT_VARIANT:
+ {
+ variant.ClearList();
+ VARIANTARG *variant_data=(VARIANTARG*)pvdata;
+ for ( int i = 0; i < cElements; i++ )
+ {
+ VARIANTARG& oleElement = variant_data[i];
+ wxVariant vElement;
+ if ( !wxConvertOleToVariant(oleElement, vElement) )
+ {
+ ok = false;
+ variant.ClearList();
+ break;
+ }
+
+ variant.Append(vElement);
+ }
+ }
+ break;
+
+ case VT_BSTR:
+ {
+ wxArrayString strings;
+ BSTR *string_val=(BSTR*)pvdata;
+ for ( int i = 0; i < cElements; ++i )
+ {
+ wxString str=wxConvertStringFromOle(*string_val);
+ strings.Add(str);
+ ++string_val;
+ }
+ variant=strings;
+ }
+ break;
+
+ default:
+ wxLogDebug(_T("unhandled VT_ARRAY type %x in wxConvertOleToVariant"),
+ oleVariant.vt & VT_TYPEMASK);
+ variant = wxVariant();
+ ok = false;
+ break;