NOT PART OF BUILD. ActiveX plugin. Treat PARAMs with "True"/"False" values as VT_BOOL properties.

This commit is contained in:
locka%iol.ie 2002-03-04 13:55:55 +00:00
parent 80647b66e6
commit 78de0c12c1

View File

@ -236,9 +236,10 @@ NPError NewControl(const char *pluginType,
CComVariant vsValue(szParam.c_str()); CComVariant vsValue(szParam.c_str());
CComVariant vIValue; // Value converted to int CComVariant vIValue; // Value converted to int
CComVariant vRValue; // Value converted to real CComVariant vRValue; // Value converted to real
CComVariant vBValue; // Value converted to bool
CComVariant &vValue = vsValue; CComVariant &vValue = vsValue;
// See if the variant can be converted to an integer // See if the variant can be converted to a number or boolean
if (VariantChangeType(&vIValue, &vsValue, 0, VT_I4) == S_OK) if (VariantChangeType(&vIValue, &vsValue, 0, VT_I4) == S_OK)
{ {
vValue = vIValue; vValue = vIValue;
@ -247,6 +248,11 @@ NPError NewControl(const char *pluginType,
{ {
vValue = vRValue; vValue = vRValue;
} }
else if (VariantChangeType(&vBValue, &vsValue, 0, VT_BOOL) == S_OK)
{
vValue = vBValue;
}
// Add named parameter to list // Add named parameter to list
Property p; Property p;