[v2 PATCH] oledb32: Ignore IRunnableObject in IDataSourceLocator_QueryInterface.

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Sun Mar 12 00:26:54 CST 2017


Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/oledb32/dslocator.c      | 5 +++++
 dlls/oledb32/tests/database.c | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/dlls/oledb32/dslocator.c b/dlls/oledb32/dslocator.c
index 11ed3e9905..5c4bdad097 100644
--- a/dlls/oledb32/dslocator.c
+++ b/dlls/oledb32/dslocator.c
@@ -73,6 +73,11 @@ static HRESULT WINAPI dslocator_QueryInterface(IDataSourceLocator *iface, REFIID
     {
       *ppvoid = &This->IDataInitialize_iface;
     }
+    else if (IsEqualIID(riid, &IID_IRunnableObject))
+    {
+      TRACE("IID_IRunnableObject returning NULL\n");
+      return E_NOINTERFACE;
+    }
 
     if(*ppvoid)
     {
diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c
index 7f71f8b0e1..f39c2f5c7e 100644
--- a/dlls/oledb32/tests/database.c
+++ b/dlls/oledb32/tests/database.c
@@ -859,6 +859,7 @@ static void test_dslocator(void)
     if(SUCCEEDED(hr))
     {
         IDataInitialize *datainit, *datainit2;
+        IRunnableObject *runable;
         COMPATIBLE_LONG hwnd = 0;
 
         if (0) /* Crashes under Window 7 */
@@ -898,6 +899,9 @@ static void test_dslocator(void)
         ok(hr == S_OK, "got %08x\n", hr);
         ok(datainit == datainit2, "Got %p, previous %p\n", datainit, datainit2);
 
+        hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IRunnableObject, (void **)&runable);
+        ok(hr == E_NOINTERFACE, "got %08x\n", hr);
+
         IDataInitialize_Release(datainit2);
         IDataInitialize_Release(datainit);
 
-- 
2.11.0




More information about the wine-patches mailing list