Firing a VARIANT type from ATL project
-
Hi there, i try to fire a VARIANT from ATL object. So, the ATL wizard creates a xxxCP.h file that implements the Fire_XXX function. However, the wizard writes wrong statement: pvars[0] = &Data; since pvars is CComVariant type then the operator '=' for bool is called instead of the operator '=' for VARIANT. I needed to change the code to 'pvars[0] = Data;' (without the '&'). Changing the xxxCP.h file is dangerous since the ATL wizard can overwrite it. Can anyone help me with this?
-
Hi there, i try to fire a VARIANT from ATL object. So, the ATL wizard creates a xxxCP.h file that implements the Fire_XXX function. However, the wizard writes wrong statement: pvars[0] = &Data; since pvars is CComVariant type then the operator '=' for bool is called instead of the operator '=' for VARIANT. I needed to change the code to 'pvars[0] = Data;' (without the '&'). Changing the xxxCP.h file is dangerous since the ATL wizard can overwrite it. Can anyone help me with this?
It is a known bug. Take a look at article Q264985 and Q250847.