oledb32: Silence interfaces for IDataSourceLocator QI.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Alistair Leslie-Hughes 2018-01-03 04:21:53 +00:00 committed by Alexandre Julliard
parent 4ee4d4e2ad
commit cce5ac1dea
2 changed files with 27 additions and 0 deletions

View File

@ -78,6 +78,21 @@ static HRESULT WINAPI dslocator_QueryInterface(IDataSourceLocator *iface, REFIID
TRACE("IID_IRunnableObject returning NULL\n");
return E_NOINTERFACE;
}
else if (IsEqualIID(riid, &IID_IProvideClassInfo))
{
TRACE("IID_IProvideClassInfo returning NULL\n");
return E_NOINTERFACE;
}
else if (IsEqualIID(riid, &IID_IMarshal))
{
TRACE("IID_IMarshal returning NULL\n");
return E_NOINTERFACE;
}
else if (IsEqualIID(riid, &IID_IRpcOptions))
{
TRACE("IID_IRpcOptions returning NULL\n");
return E_NOINTERFACE;
}
if(*ppvoid)
{

View File

@ -886,6 +886,9 @@ static void test_dslocator(void)
{
IDataInitialize *datainit, *datainit2;
IRunnableObject *runable;
IProvideClassInfo *info;
IMarshal *marshal;
IRpcOptions *opts;
COMPATIBLE_LONG hwnd = 0;
if (0) /* Crashes under Window 7 */
@ -928,6 +931,15 @@ static void test_dslocator(void)
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IRunnableObject, (void **)&runable);
ok(hr == E_NOINTERFACE, "got %08x\n", hr);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IMarshal, (void **)&marshal);
ok(hr == E_NOINTERFACE, "got %08x\n", hr);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IProvideClassInfo, (void **)&info);
ok(hr == E_NOINTERFACE, "got %08x\n", hr);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IRpcOptions, (void **)&opts);
ok(hr == E_NOINTERFACE, "got %08x\n", hr);
IDataInitialize_Release(datainit2);
IDataInitialize_Release(datainit);