Module: wine Branch: master Commit: 3fdfea778638f85184f2b069db108c81be3c6cc5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3fdfea778638f85184f2b069db...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Tue Nov 15 20:26:50 2016 +0300
oledb32: Implement GetBasicErrorInfo().
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/oledb32/errorinfo.c | 10 ++++++---- dlls/oledb32/tests/database.c | 7 ++----- 2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/oledb32/errorinfo.c b/dlls/oledb32/errorinfo.c index 48db723..dd39173 100644 --- a/dlls/oledb32/errorinfo.c +++ b/dlls/oledb32/errorinfo.c @@ -267,19 +267,21 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p return S_OK; }
-static HRESULT WINAPI errorrec_GetBasicErrorInfo(IErrorRecords *iface, ULONG index, ERRORINFO *pErrorInfo) +static HRESULT WINAPI errorrec_GetBasicErrorInfo(IErrorRecords *iface, ULONG index, ERRORINFO *info) { ErrorInfoImpl *This = impl_from_IErrorRecords(iface);
- FIXME("(%p)->(%u %p)\n", This, index, pErrorInfo); + TRACE("(%p)->(%u %p)\n", This, index, info);
- if(!pErrorInfo) + if (!info) return E_INVALIDARG;
if (index >= This->count) return DB_E_BADRECORDNUM;
- return E_NOTIMPL; + index = This->count - index - 1; + *info = This->records[index].info; + return S_OK; }
static HRESULT WINAPI errorrec_GetCustomErrorObject(IErrorRecords *iface, ULONG index, diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c index 980dacd..b45ef4d 100644 --- a/dlls/oledb32/tests/database.c +++ b/dlls/oledb32/tests/database.c @@ -434,11 +434,8 @@ 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); - if(hr == S_OK) - { - ok(info3.dwMinor == 2, "expected 2 got %d\n", info3.dwMinor); - } + ok(hr == S_OK, "got %08x\n", hr); + ok(info3.dwMinor == 2, "expected 2 got %d\n", info3.dwMinor);
IErrorRecords_Release(errrecs); IUnknown_Release(unk);