There are a lot of variant access macros in OleAuto.h. When you have get the value, you should ensure that it has the correct type. Then you can read it:
int value;
if (V_VT(variable) == VT_INT)
{
value = V_INT(variable);
}
There are several integer types defined for variants. Please look at wtypes.h and check what actual type is stored in your current variant object and use the appropriate V_xxx macro.