Commit e265d534 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

ole32: Return success from OleLockRunning when the object does not support IRunnableObject.

parent b82f615c
...@@ -1140,8 +1140,8 @@ HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCl ...@@ -1140,8 +1140,8 @@ HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCl
return hres; return hres;
} }
else
return E_INVALIDARG; return S_OK;
} }
......
...@@ -1556,6 +1556,45 @@ static void test_runnable(void) ...@@ -1556,6 +1556,45 @@ static void test_runnable(void)
g_showRunnable = TRUE; g_showRunnable = TRUE;
} }
static HRESULT WINAPI Unknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
{
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown)) *ppv = iface;
if (*ppv)
{
IUnknown_AddRef((IUnknown *)*ppv);
return S_OK;
}
return E_NOINTERFACE;
}
static ULONG WINAPI Unknown_AddRef(IUnknown *iface)
{
return 2;
}
static ULONG WINAPI Unknown_Release(IUnknown *iface)
{
return 1;
}
static const IUnknownVtbl UnknownVtbl =
{
Unknown_QueryInterface,
Unknown_AddRef,
Unknown_Release
};
static IUnknown Unknown = { &UnknownVtbl };
static void test_OleLockRunning(void)
{
HRESULT hr;
hr = OleLockRunning((LPUNKNOWN)&Unknown, TRUE, FALSE);
ok(hr == S_OK, "OleLockRunning failed 0x%08x\n", hr);
}
START_TEST(ole2) START_TEST(ole2)
{ {
DWORD dwRegister; DWORD dwRegister;
...@@ -1587,6 +1626,7 @@ START_TEST(ole2) ...@@ -1587,6 +1626,7 @@ START_TEST(ole2)
test_data_cache(); test_data_cache();
test_default_handler(); test_default_handler();
test_runnable(); test_runnable();
test_OleLockRunning();
CoUninitialize(); CoUninitialize();
} }
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