From d62974a508d7427d3189cf2c3fba4ae41d4c1d4d Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 20 Jun 2016 14:00:31 +0300 Subject: [PATCH] msscript: Implement GetActivationPolicy(). Signed-off-by: Nikolay Sivov Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/msscript.ocx/msscript.c | 8 ++++++-- dlls/msscript.ocx/tests/msscript.c | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c index db4d901735b..66018d3fbf0 100644 --- a/dlls/msscript.ocx/msscript.c +++ b/dlls/msscript.ocx/msscript.c @@ -1078,9 +1078,13 @@ static HRESULT WINAPI PointerInactive_GetActivationPolicy(IPointerInactive *ifac { ScriptControl *This = impl_from_IPointerInactive(iface); - FIXME("(%p)->(%p)\n", This, policy); + TRACE("(%p)->(%p)\n", This, policy); - return E_NOTIMPL; + if (!policy) + return E_POINTER; + + *policy = 0; + return S_OK; } static HRESULT WINAPI PointerInactive_OnInactiveMouseMove(IPointerInactive *iface, const RECT *bounds, diff --git a/dlls/msscript.ocx/tests/msscript.c b/dlls/msscript.ocx/tests/msscript.c index 287daf90e32..90433612a9c 100644 --- a/dlls/msscript.ocx/tests/msscript.c +++ b/dlls/msscript.ocx/tests/msscript.c @@ -847,6 +847,7 @@ static void test_pointerinactive(void) { IPointerInactive *pi; IScriptControl *sc; + DWORD policy; HRESULT hr; hr = CoCreateInstance(&CLSID_ScriptControl, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, @@ -856,6 +857,14 @@ static void test_pointerinactive(void) hr = IScriptControl_QueryInterface(sc, &IID_IPointerInactive, (void**)&pi); ok(hr == S_OK, "got 0x%08x\n", hr); + if (0) /* crashes w2k3 */ + hr = IPointerInactive_GetActivationPolicy(pi, NULL); + + policy = 123; + hr = IPointerInactive_GetActivationPolicy(pi, &policy); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(policy == 0, "got %#x\n", policy); + IPointerInactive_Release(pi); IScriptControl_Release(sc); }