Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com ---
This avoids a fixme in FinanceExplorer and CMS-Client.
dlls/msado15/connection.c | 7 +++++++ dlls/msado15/recordset.c | 7 +++++++ dlls/msado15/tests/msado15.c | 6 ++++++ 3 files changed, 20 insertions(+)
diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index 9e8c05522e..b9474e1b78 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -98,6 +98,8 @@ static HRESULT WINAPI connection_QueryInterface( _Connection *iface, REFIID riid struct connection *connection = impl_from_Connection( iface ); TRACE( "%p, %s, %p\n", connection, debugstr_guid(riid), obj );
+ *obj = NULL; + if (IsEqualGUID( riid, &IID__Connection ) || IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IUnknown )) { @@ -111,6 +113,11 @@ static HRESULT WINAPI connection_QueryInterface( _Connection *iface, REFIID riid { *obj = &connection->IConnectionPointContainer_iface; } + else if (IsEqualGUID( riid, &IID_IRunnableObject )) + { + TRACE("IID_IRunnableObject not supported returning NULL\n"); + return E_NOINTERFACE; + } else { FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index ffb3788531..a5096e5c4f 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -784,6 +784,8 @@ static HRESULT WINAPI recordset_QueryInterface( _Recordset *iface, REFIID riid, struct recordset *recordset = impl_from_Recordset( iface ); TRACE( "%p, %s, %p\n", iface, debugstr_guid(riid), obj );
+ *obj = NULL; + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch) || IsEqualIID(riid, &IID__ADO) || IsEqualIID(riid, &IID_Recordset15) || IsEqualIID(riid, &IID_Recordset20) || IsEqualIID(riid, &IID_Recordset21) || @@ -795,6 +797,11 @@ static HRESULT WINAPI recordset_QueryInterface( _Recordset *iface, REFIID riid, { *obj = &recordset->ISupportErrorInfo_iface; } + else if (IsEqualGUID( riid, &IID_IRunnableObject )) + { + TRACE("IID_IRunnableObject not supported returning NULL\n"); + return E_NOINTERFACE; + } else { FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index a8d2afdd41..1d457a703d 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -61,6 +61,7 @@ static LONG get_refs_recordset( _Recordset *recordset ) static void test_Recordset(void) { _Recordset *recordset; + IRunnableObject *runtime; ISupportErrorInfo *errorinfo; Fields *fields, *fields2; Field *field; @@ -73,6 +74,10 @@ static void test_Recordset(void) hr = CoCreateInstance( &CLSID_Recordset, NULL, CLSCTX_INPROC_SERVER, &IID__Recordset, (void **)&recordset ); ok( hr == S_OK, "got %08x\n", hr );
+ hr = _Recordset_QueryInterface( recordset, &IID_IRunnableObject, (void**)&runtime); + ok(hr == E_NOINTERFACE, "Unexpected IRunnableObject interface\n"); + ok(runtime == NULL, "expected NULL\n"); + /* _Recordset object supports ISupportErrorInfo */ errorinfo = NULL; hr = _Recordset_QueryInterface( recordset, &IID_ISupportErrorInfo, (void **)&errorinfo ); @@ -676,6 +681,7 @@ static void test_Connection(void)
hr = _Connection_QueryInterface(connection, &IID_IRunnableObject, (void**)&runtime); ok(hr == E_NOINTERFACE, "Unexpected IRunnableObject interface\n"); + ok(runtime == NULL, "expected NULL\n");
hr = _Connection_QueryInterface(connection, &IID_ISupportErrorInfo, (void**)&errorinfo); ok(hr == S_OK, "Failed to get ISupportErrorInfo interface\n");