How to convert Cstring to variant /variant to cstring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tezu
    New Member
    • Dec 2008
    • 39

    How to convert Cstring to variant /variant to cstring

    Hi all ,
    How can i convert a Cstring to VARIANT and vice versa ...

    Thanks in advance
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    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

    Working...