oledb32: Implement IErrorRecord GetBasicErrorInfo

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Wed Sep 18 00:47:03 CDT 2013


Hi,


Changelog:
     oledb32: Implement IErrorRecord GetBasicErrorInfo


Best Regards
  Alistair Leslie-Hughes
-------------- next part --------------
>From ae522c909afdd1ada2d74b57739280d47b9d713f Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Tue, 17 Sep 2013 15:02:44 +1000
Subject: [PATCH] Implement IErrorRecord GetBasicErrorInfo
To: wine-patches <wine-patches at winehq.org>

---
 dlls/oledb32/errorinfo.c      | 15 +++++++++++++--
 dlls/oledb32/tests/database.c |  2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/dlls/oledb32/errorinfo.c b/dlls/oledb32/errorinfo.c
index 4a2a1e2..5ba5e1d 100644
--- a/dlls/oledb32/errorinfo.c
+++ b/dlls/oledb32/errorinfo.c
@@ -264,8 +264,10 @@ static HRESULT WINAPI errorrec_GetBasicErrorInfo(IErrorRecords *iface, ULONG ulR
         ERRORINFO *pErrorInfo)
 {
     ErrorInfoImpl *This = impl_from_IErrorRecords(iface);
+    struct ErrorEntry *cursor;
+    int nCnt = 0;
 
-    FIXME("(%p)->(%d %p)\n", This, ulRecordNum, pErrorInfo);
+    TRACE("(%p)->(%d %p)\n", This, ulRecordNum, pErrorInfo);
 
     if(!pErrorInfo)
         return E_INVALIDARG;
@@ -273,7 +275,16 @@ static HRESULT WINAPI errorrec_GetBasicErrorInfo(IErrorRecords *iface, ULONG ulR
     if(ulRecordNum > list_count(&This->errors))
         return DB_E_BADRECORDNUM;
 
-    return E_NOTIMPL;
+    LIST_FOR_EACH_ENTRY(cursor, &This->errors, struct ErrorEntry, entry)
+    {
+        if(nCnt == ulRecordNum)
+        {
+            *pErrorInfo = cursor->info;
+            break;
+        }
+    }
+
+    return S_OK;
 }
 
 static HRESULT WINAPI errorrec_GetCustomErrorObject(IErrorRecords *iface, ULONG ulRecordNum,
diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c
index 34891bc..0453e27 100644
--- a/dlls/oledb32/tests/database.c
+++ b/dlls/oledb32/tests/database.c
@@ -194,7 +194,7 @@ static void test_errorinfo(void)
             ok(hr == DB_E_BADRECORDNUM, "got %08x\n", hr);
 
             hr = IErrorRecords_GetBasicErrorInfo(errrecs, 0, &info3);
-            todo_wine ok(hr == S_OK, "got %08x\n", hr);
+            ok(hr == S_OK, "got %08x\n", hr);
             if(hr == S_OK)
             {
                 ok(info3.dwMinor == 2, "expected 2 got %d\n", info3.dwMinor);
-- 
1.8.1.2



More information about the wine-patches mailing list