I have a problem regarding VARIANTS. What I want to do is how to determine if a VARIANT contains an array. I want to do this because I am accessing a WMI variable and sometimes, the returned variable is an array, which will then be put into the VARIANT.
I tried doing this:
1 2 3 4
if(V_VT(&vtProp) == VT_ARRAY)
cout << "VTPROP IS AN ARRAY" << endl;
elseif(V_VT(&vtProp) == VT_BSTR)
cout << "VT PROP IS AN BSTR" << endl;
But it does not correctly identify if the VARIANT contains an array. However, it does correctly identify if the VARIANT is a BSTR.