Extractors in the
_variant_t
class are nothing but overloaded operators like
short
,
long
,
float
,
double
etc. that finally end up calling the
VariantChangeType
API.
The syntax would be the same as a type cast -
_variant_t var(25.4);
short s = (short)var;
long l = (long)var;
OR
short s = short(var);
long l = long(var);