First, create a VARIANT variable.
Second, convert your CString into a type that is one of the VariantType enumerated types. and assign the result to your VARIANT.
Third, set the vt member of your VARIANT.
There are code examples in MSDN on how to create VARIANTS.
Comment