locked
How to convert from PROPVARIANT to LONGLONG

    Question

  • In C++ one can convert from PROPVARIANT to LONGLONG through the PropVariantToInt64 function. In Windows Store Apps this is not available. Does anybody know how to do this conversion?

    Thanks

    Ronald

    Saturday, January 12, 2013 3:37 PM

Answers

  • The PROPVARIANT is just a union. You don't need helper functions to read it, just check the type and read the appropriate field. Something like:

    if (propVal.vt == VT_I8)
    {
       return propVal.hVal;
    }
    --Rob


    Sunday, January 13, 2013 9:55 AM
    Owner