April 12th, 2010, 12:14 PM
>> Something like storing them in a Generic Variable then converting that generic variable to a string?
The closest thing to it would be to store each of the SAFEARRAY members into a VARIANT (which...
April 11th, 2010, 09:16 PM
For a SAFEARRAY variant, the SAFEARRAY API's are what you have to work with. So you'll have to use those API's to process it into what ever representation yourself.
gg
April 10th, 2010, 08:22 AM
>> Does this mean that it is possible ...
Anything is possible when you don't use structures/API's correctly. Only access "bstrVal" if "vt" is VT_BSTR.
The call to SafeArrayGetElement() looks...
April 9th, 2010, 12:28 PM
>> I need to convert the VARIANT to SAFEARRAY?
V_ARRAY() is a macro that accesses the "parray" member of the VARIANT - just like V_VT() accesses the "vt" member.
If the vt member is "VT_I4 |...
April 9th, 2010, 09:48 AM
>> Additional question, is this the correct way to get the contents of the array?
No. You access the SAFEARRAY member of the variant using V_ARRAY(). Then use SAFEARRAY api's -...
April 9th, 2010, 08:59 AM
VARTYPE is a bit-field. So an array of BSTR's would be "VT_ARRAY | VT_BSTR" etc...
http://msdn.microsoft.com/en-us/library/ms221627.aspx
gg