msado15: Ignore IRunnableObject interface in recordset/connection_QueryInterface.

Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gijs Vermeulen 2020-06-07 15:51:19 +02:00 committed by Alexandre Julliard
parent 0c14b1a962
commit 79228f64a0
3 changed files with 20 additions and 0 deletions

View File

@ -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) );

View File

@ -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) );

View File

@ -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");