dxdiagn: Make the IDxDiag* interfaces conform to the IUnknown::QueryInterface contract.
This commit is contained in:
parent
3eea5a8ae9
commit
d36e3b4a1d
|
@ -33,6 +33,8 @@ HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFII
|
||||||
{
|
{
|
||||||
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
|
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
|
||||||
|
|
||||||
|
if (!ppobj) return E_INVALIDARG;
|
||||||
|
|
||||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||||
|| IsEqualGUID(riid, &IID_IDxDiagContainer)) {
|
|| IsEqualGUID(riid, &IID_IDxDiagContainer)) {
|
||||||
IUnknown_AddRef(iface);
|
IUnknown_AddRef(iface);
|
||||||
|
@ -41,6 +43,7 @@ HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFII
|
||||||
}
|
}
|
||||||
|
|
||||||
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
|
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
|
||||||
|
*ppobj = NULL;
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,8 @@ static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface,
|
||||||
{
|
{
|
||||||
IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
|
IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
|
||||||
|
|
||||||
|
if (!ppobj) return E_INVALIDARG;
|
||||||
|
|
||||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||||
|| IsEqualGUID(riid, &IID_IDxDiagProvider)) {
|
|| IsEqualGUID(riid, &IID_IDxDiagProvider)) {
|
||||||
IUnknown_AddRef(iface);
|
IUnknown_AddRef(iface);
|
||||||
|
@ -56,6 +58,7 @@ static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
|
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
|
||||||
|
*ppobj = NULL;
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue