views:

31

answers:

1

Is it possible to do a null check on a COleVariant or at the very least check if it's type is set to VT_NULL? I see that there is a ChangeType() method but was hoping I could somehow figure out what the current type was before I attempt to change the type as changing from VT_NULL to VT_INT throws a type mismatch.

+1  A: 

Check the vt member.

DanDan
+1. Yes, sucky documentation. COleVariant inherits from VARIANT so all the VARIANT members are available.
Hans Passant
Took a lot of searching before I actually found that, oddly enough not mentioned on MSDN at all under COleVariant members.
LeSabo