mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 10:46:58 +00:00
MS-compatible but interface contract violating return value for QueryInterface with NULL ppvObject.
svn path=/trunk/; revision=57317
This commit is contained in:
parent
c3b0c6cca2
commit
7152be13fb
2 changed files with 16 additions and 11 deletions
|
@ -24,17 +24,18 @@ Index: msxml3.spec
|
|||
|
||||
Index: nodelist.c
|
||||
===================================================================
|
||||
--- nodelist.c (revision 57307)
|
||||
--- nodelist.c (revision 57316)
|
||||
+++ nodelist.c (working copy)
|
||||
@@ -87,6 +87,11 @@
|
||||
@@ -89,7 +89,11 @@
|
||||
|
||||
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||
if (!ppvObject)
|
||||
{
|
||||
- return E_POINTER;
|
||||
+ /* NOTE: Interface documentation for IUnknown explicitly states
|
||||
+ * this case should return E_POINTER. Empirical data proves
|
||||
+ * MS violates this contract and instead return E_INVALIDARG.
|
||||
+ */
|
||||
+ return E_INVALIDARG;
|
||||
}
|
||||
|
||||
+ if (!ppvObject)
|
||||
+ {
|
||||
+ return E_POINTER;
|
||||
+ }
|
||||
+
|
||||
if ( IsEqualGUID( riid, &IID_IUnknown ) ||
|
||||
IsEqualGUID( riid, &IID_IDispatch ) ||
|
||||
IsEqualGUID( riid, &IID_IXMLDOMNodeList ) )
|
||||
|
|
|
@ -89,7 +89,11 @@ static HRESULT WINAPI xmlnodelist_QueryInterface(
|
|||
|
||||
if (!ppvObject)
|
||||
{
|
||||
return E_POINTER;
|
||||
/* NOTE: Interface documentation for IUnknown explicitly states
|
||||
* this case should return E_POINTER. Empirical data proves
|
||||
* MS violates this contract and instead return E_INVALIDARG.
|
||||
*/
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
if ( IsEqualGUID( riid, &IID_IUnknown ) ||
|
||||
|
|
Loading…
Reference in a new issue