Commit 79228f64 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

msado15: Ignore IRunnableObject interface in recordset/connection_QueryInterface.

parent 0c14b1a9
......@@ -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) );
......
......@@ -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) );
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment