Hans Leidekker : oledb32: Add a partial implementation of IErrorRecords_GetErrorInfo().

Alexandre Julliard julliard at winehq.org
Fri Nov 27 16:04:37 CST 2020


Module: wine
Branch: master
Commit: b7f70aa02682005abc6d82cf1a75b97ab23a117d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b7f70aa02682005abc6d82cf1a75b97ab23a117d

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Fri Nov 27 09:14:44 2020 +0100

oledb32: Add a partial implementation of IErrorRecords_GetErrorInfo().

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oledb32/errorinfo.c      | 2 +-
 dlls/oledb32/tests/database.c | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/dlls/oledb32/errorinfo.c b/dlls/oledb32/errorinfo.c
index 985d5837a29..9987b2113bf 100644
--- a/dlls/oledb32/errorinfo.c
+++ b/dlls/oledb32/errorinfo.c
@@ -361,7 +361,7 @@ static HRESULT WINAPI errorrec_GetErrorInfo(IErrorRecords *iface, ULONG index,
     if (index >= This->count)
         return DB_E_BADRECORDNUM;
 
-    return E_NOTIMPL;
+    return IErrorInfo_QueryInterface(&This->IErrorInfo_iface, &IID_IErrorInfo, (void **)ppErrorInfo);
 }
 
 static HRESULT WINAPI errorrec_GetErrorParameters(IErrorRecords *iface, ULONG index, DISPPARAMS *pdispparams)
diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c
index c2b7e0598dd..1897d57623f 100644
--- a/dlls/oledb32/tests/database.c
+++ b/dlls/oledb32/tests/database.c
@@ -486,6 +486,14 @@ static void test_errorinfo(void)
     ok(dispparams.cArgs == 1, "Got argument count %u\n", dispparams.cArgs);
     ok(dispparams.cNamedArgs == 1, "Got named argument count %u\n", dispparams.cNamedArgs);
 
+    EXPECT_REF(errrecs, 2);
+    EXPECT_REF(errorinfo, 2);
+    hr = IErrorRecords_GetErrorInfo(errrecs, 0, 0, &errorinfo2);
+    ok(hr == S_OK, "got %08x\n", hr);
+    ok(errorinfo == errorinfo2, "different object\n");
+    EXPECT_REF(errorinfo, 3);
+    IErrorInfo_Release(errorinfo2);
+
     free_dispparams(&dispparams);
     VariantClear(&arg);
 




More information about the wine-cvs mailing list