msscript: Implement GetActivationPolicy().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-06-20 14:00:31 +03:00 committed by Alexandre Julliard
parent e780228947
commit d62974a508
2 changed files with 15 additions and 2 deletions

View File

@ -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,

View File

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