pl.AddNamedProperty(paramName, CComVariant(paramValue));
CComVariant v(paramValue); pl.AddNamedProperty(paramName, v);
NewControl(const char *pluginType,           PluginInstanceData *pData,           uint16 mode,           int16 argc,           char *argn[],           char *argv[]){    // Read the parameters    CLSID clsid = CLSID_NULL;    CComBSTR codebase;    PropertyList pl;    if (strcmp(pluginType, MIME_OLEOBJECT1) != 0 &&        strcmp(pluginType, MIME_OLEOBJECT2) != 0)    {        clsid = MozAxPlugin::GetCLSIDForType(pluginType);    }    for (int16 i = 0; i < argc; i++)    {        if (stricmp(argn[i], "CLSID") == 0 ||            stricmp(argn[i], "CLASSID") == 0)        {            // Accept CLSIDs specified in various ways            // e.g:            //   "CLSID:C16DF970-D1BA-11d2-A252-000000000000"            //   "C16DF970-D1BA-11d2-A252-000000000000"            //   "{C16DF970-D1BA-11d2-A252-000000000000}"            //            // The first example is the proper way            const kCLSIDLen = 256;            char szCLSID[kCLSIDLen];            if (strlen(argv[i]) < sizeof(szCLSID))            {                if (strnicmp(argv[i], "CLSID:", 6) == 0)                {                    _snprintf(szCLSID, kCLSIDLen - 1, "{%s}", argv[i]+6);                }                else if(argv[i][0] != '{')                {                    _snprintf(szCLSID, kCLSIDLen - 1, "{%s}", argv[i]);                }                else                {                    strncpy(szCLSID, argv[i], kCLSIDLen - 1);                }                szCLSID[kCLSIDLen - 1] = '\0';                USES_CONVERSION;                CLSIDFromString(A2OLE(szCLSID), &clsid);            }        }        else if (stricmp(argn[i], "CODEBASE") == 0)        {            codebase = argv[i];#ifdef XPC_IDISPATCH_SUPPORT            // resolve relative URLs on CODEBASE            if (argv[i])            {                nsCOMPtr<nsIDOMElement> element;                NPN_GetValue(pData->pPluginInstance, NPNVDOMElement,                              NS_STATIC_CAST(nsIDOMElement **, getter_AddRefs(element)));                if (element)                {                    nsCOMPtr<nsIDOMNode> tagAsNode (do_QueryInterface(element));                    if (tagAsNode)                    {                        nsCOMPtr<nsIDOMDocument> DOMdocument;                        tagAsNode->GetOwnerDocument(getter_AddRefs(DOMdocument));                        // XXX nsIDocument is not frozen!!!                        nsCOMPtr<nsIDocument> doc(do_QueryInterface(DOMdocument));                        if (doc)                        {                            nsCOMPtr<nsIURI> baseURI;                            doc->GetBaseURL(*getter_AddRefs(baseURI));                            if (baseURI)                            {                                nsCAutoString newURL;                                if (NS_SUCCEEDED(baseURI->Resolve(nsDependentCString(argv[i]), newURL)))                                {                                    codebase = newURL.get();                                }                            }                        }                    }                }            }#endif        }        else         {            CComBSTR paramName;            if (strnicmp(argn[i], "PARAM_", 6) == 0)            {                paramName = argn[i] + 6;            }            else if (stricmp(argn[i], "PARAM") == 0)            {                // The next argn and argv values after this symbol                // will be <param> tag names and values                continue;            }            else            {                paramName = argn[i];            }            // Empty parameters are ignored            if (!paramName.m_str || paramName.Length() == 0)            {                continue;            }            USES_CONVERSION;            CComBSTR paramValue(A2W(argv[i]));            // Check for existing params with the same name            BOOL bFound = FALSE;            for (unsigned long i = 0; i < pl.GetSize(); i++)            {                if (wcscmp(pl.GetNameOf(i), (BSTR) paramName) == 0)                {                    bFound = TRUE;                    break;                }            }            // If the parameter already exists, don't add it to the            // list again.            if (bFound)            {                continue;            }            // Add named parameter to list            pl.AddNamedProperty(paramName, CComVariant(paramValue));        }    }    return CreateControl(clsid, pData, pl, codebase.m_str);}