urlmon: SecManagerImpl_QueryInterface clean up.
This commit is contained in:
parent
8f108a0f4d
commit
4ffcf3359d
|
@ -854,31 +854,23 @@ static HRESULT WINAPI SecManagerImpl_QueryInterface(IInternetSecurityManagerEx2*
|
||||||
{
|
{
|
||||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||||
|
|
||||||
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppvObject);
|
TRACE("(%p)->(%s %p)\n",This,debugstr_guid(riid),ppvObject);
|
||||||
|
|
||||||
/* Perform a sanity check on the parameters.*/
|
if(!ppvObject)
|
||||||
if ( (This==0) || (ppvObject==0) )
|
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
/* Initialize the return parameter */
|
|
||||||
*ppvObject = 0;
|
|
||||||
|
|
||||||
/* Compare the riid with the interface IDs implemented by this object.*/
|
|
||||||
if(IsEqualIID(&IID_IUnknown, riid) ||
|
if(IsEqualIID(&IID_IUnknown, riid) ||
|
||||||
IsEqualIID(&IID_IInternetSecurityManager, riid) ||
|
IsEqualIID(&IID_IInternetSecurityManager, riid) ||
|
||||||
IsEqualIID(&IID_IInternetSecurityManagerEx, riid) ||
|
IsEqualIID(&IID_IInternetSecurityManagerEx, riid) ||
|
||||||
IsEqualIID(&IID_IInternetSecurityManagerEx2, riid))
|
IsEqualIID(&IID_IInternetSecurityManagerEx2, riid)) {
|
||||||
*ppvObject = iface;
|
*ppvObject = iface;
|
||||||
|
} else {
|
||||||
/* Check that we obtained an interface.*/
|
|
||||||
if (!*ppvObject) {
|
|
||||||
WARN("not supported interface %s\n", debugstr_guid(riid));
|
WARN("not supported interface %s\n", debugstr_guid(riid));
|
||||||
|
*ppvObject = NULL;
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Query Interface always increases the reference count by one when it is successful */
|
|
||||||
IInternetSecurityManagerEx2_AddRef(iface);
|
IInternetSecurityManagerEx2_AddRef(iface);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue