-
April 9th, 2010, 08:36 AM
#1
How to determine if VARIANT contains an Array?
Hi all,
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:
if(V_VT(&vtProp) == VT_ARRAY)
cout << "VTPROP IS AN ARRAY" << endl;
else if(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.
Can anyone help me?
Thank you all!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|