[PATCH 4/6] msdasql: Trace unsupported session interfaces.
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Sun Nov 7 01:26:41 CDT 2021
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/msdasql/session.c | 15 +++++++++++++++
dlls/msdasql/tests/provider.c | 10 ++++++++++
2 files changed, 25 insertions(+)
diff --git a/dlls/msdasql/session.c b/dlls/msdasql/session.c
index 0298c7e7424..e42aa2e21f2 100644
--- a/dlls/msdasql/session.c
+++ b/dlls/msdasql/session.c
@@ -102,6 +102,21 @@ static HRESULT WINAPI session_QueryInterface(IUnknown *iface, REFIID riid, void
TRACE("(%p)->(IDBCreateCommand_iface %p)\n", iface, ppv);
*ppv = &session->IDBCreateCommand_iface;
}
+ else if(IsEqualGUID(&IID_ITransactionJoin, riid))
+ {
+ TRACE("(%p)->(IID_ITransactionJoin not support)\n", iface);
+ return E_NOINTERFACE;
+ }
+ else if(IsEqualGUID(&IID_IBindResource, riid))
+ {
+ TRACE("(%p)->(IID_IBindResource not support)\n", iface);
+ return E_NOINTERFACE;
+ }
+ else if(IsEqualGUID(&IID_ICreateRow, riid))
+ {
+ TRACE("(%p)->(IID_ICreateRow not support)\n", iface);
+ return E_NOINTERFACE;
+ }
if(*ppv)
{
diff --git a/dlls/msdasql/tests/provider.c b/dlls/msdasql/tests/provider.c
index 6ffe17e7028..63a51c6f60e 100644
--- a/dlls/msdasql/tests/provider.c
+++ b/dlls/msdasql/tests/provider.c
@@ -367,6 +367,7 @@ static void test_sessions(void)
IDBCreateCommand *create_command = NULL;
IGetDataSource *datasource = NULL;
ISessionProperties *session_props = NULL;
+ IUnknown *unimplemented = NULL;
IUnknown *cmd = NULL;
HRESULT hr;
BSTR connect_str;
@@ -415,6 +416,15 @@ static void test_sessions(void)
ok(hr == S_OK, "got 0x%08x\n", hr);
IGetDataSource_Release(datasource);
+ hr = IUnknown_QueryInterface(session, &IID_ITransactionJoin, (void**)&unimplemented);
+ ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+
+ hr = IUnknown_QueryInterface(session, &IID_IBindResource, (void**)&unimplemented);
+ ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+
+ hr = IUnknown_QueryInterface(session, &IID_ICreateRow, (void**)&unimplemented);
+ ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+
hr = IUnknown_QueryInterface(session, &IID_ISessionProperties, (void**)&session_props);
ok(hr == S_OK, "got 0x%08x\n", hr);
ISessionProperties_Release(session_props);
--
2.33.0
More information about the wine-devel
mailing list