now properly handles queries for nsIFactory.

This commit is contained in:
michaelp%netscape.com 1998-09-27 22:14:15 +00:00
parent 2e6ed50582
commit 920c80c057
2 changed files with 16 additions and 0 deletions

View File

@ -96,6 +96,7 @@ NS_IMPL_RELEASE(ns4xPlugin);
static NS_DEFINE_IID(kILiveConnectPluginIID, NS_ILIVECONNECTPLUGIN_IID);
static NS_DEFINE_IID(kIPluginIID, NS_IPLUGIN_IID);
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kIWindowlessPluginInstancePeerIID, NS_IWINDOWLESSPLUGININSTANCEPEER_IID);
static NS_DEFINE_IID(kISeekablePluginStreamPeerIID, NS_ISEEKABLEPLUGINSTREAMPEER_IID);
@ -125,6 +126,13 @@ ns4xPlugin::QueryInterface(const nsIID& iid, void** instance)
return NS_OK;
}
if (iid.Equals(kIFactoryIID))
{
*instance = (void *)(nsIFactory *)this;
AddRef();
return NS_OK;
}
if (iid.Equals(kISupportsIID))
{
*instance = (void *)(nsISupports *)this;

View File

@ -96,6 +96,7 @@ NS_IMPL_RELEASE(ns4xPlugin);
static NS_DEFINE_IID(kILiveConnectPluginIID, NS_ILIVECONNECTPLUGIN_IID);
static NS_DEFINE_IID(kIPluginIID, NS_IPLUGIN_IID);
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kIWindowlessPluginInstancePeerIID, NS_IWINDOWLESSPLUGININSTANCEPEER_IID);
static NS_DEFINE_IID(kISeekablePluginStreamPeerIID, NS_ISEEKABLEPLUGINSTREAMPEER_IID);
@ -125,6 +126,13 @@ ns4xPlugin::QueryInterface(const nsIID& iid, void** instance)
return NS_OK;
}
if (iid.Equals(kIFactoryIID))
{
*instance = (void *)(nsIFactory *)this;
AddRef();
return NS_OK;
}
if (iid.Equals(kISupportsIID))
{
*instance = (void *)(nsISupports *)this;