Huw Davies : oleaut32: Fix return value in the element not found case.

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 18 13:56:07 CDT 2007


Module: wine
Branch: master
Commit: 356970e529d274f0f07acddd62dbf39ff82b18a2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=356970e529d274f0f07acddd62dbf39ff82b18a2

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri May 11 15:28:40 2007 +0100

oleaut32: Fix return value in the element not found case.

---

 dlls/oleaut32/tests/typelib.c |    4 ----
 dlls/oleaut32/typelib.c       |    2 +-
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index fced34b..d67e315 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -623,9 +623,7 @@ todo_wine {
 
     /* Should have six methods */
     hr = ITypeInfo_GetFuncDesc(pTI, 6, &pFD);
-todo_wine{
     ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr);
-}
     hr = ITypeInfo_GetFuncDesc(pTI, 5, &pFD);
 todo_wine {
     ok(hr == S_OK, "hr %08x\n", hr);
@@ -662,9 +660,7 @@ todo_wine {
     ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
     ITypeInfo_Release(pTI_p);
     hr = ITypeInfo_GetFuncDesc(pTI, 1, &pFD);
-todo_wine {
     ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr);
- }
     hr = ITypeInfo_GetFuncDesc(pTI, 0, &pFD);
     ok(hr == S_OK, "hr %08x\n", hr);
     ok(pFD->memid == 0x1c, "memid %08x\n", pFD->memid);
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 6c663ac..857145e 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -4692,7 +4692,7 @@ HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const F
         return S_OK;
     }
 
-    return E_INVALIDARG;
+    return TYPE_E_ELEMENTNOTFOUND;
 }
 
 /* internal function to make the inherited interfaces' methods appear




More information about the wine-cvs mailing list