msscript: Implement GetControlInfo().
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:
parent
08cdd05be0
commit
10f58a5e25
|
@ -808,9 +808,15 @@ static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO
|
|||
{
|
||||
ScriptControl *This = impl_from_IOleControl(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, info);
|
||||
TRACE("(%p)->(%p)\n", This, info);
|
||||
|
||||
return E_NOTIMPL;
|
||||
if (!info)
|
||||
return E_POINTER;
|
||||
|
||||
info->hAccel = NULL;
|
||||
info->cAccel = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *msg)
|
||||
|
|
|
@ -181,12 +181,35 @@ static void test_persiststreaminit(void)
|
|||
static void test_olecontrol(void)
|
||||
{
|
||||
IOleControl *olecontrol;
|
||||
CONTROLINFO info;
|
||||
HRESULT hr;
|
||||
|
||||
hr = CoCreateInstance(&CLSID_ScriptControl, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
||||
&IID_IOleControl, (void**)&olecontrol);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
memset(&info, 0xab, sizeof(info));
|
||||
info.cb = sizeof(info);
|
||||
hr = IOleControl_GetControlInfo(olecontrol, &info);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(info.hAccel == NULL, "got %p\n", info.hAccel);
|
||||
ok(info.cAccel == 0, "got %d\n", info.cAccel);
|
||||
ok(info.dwFlags == 0xabababab, "got %x\n", info.dwFlags);
|
||||
|
||||
memset(&info, 0xab, sizeof(info));
|
||||
info.cb = sizeof(info) - 1;
|
||||
hr = IOleControl_GetControlInfo(olecontrol, &info);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(info.hAccel == NULL, "got %p\n", info.hAccel);
|
||||
ok(info.cAccel == 0, "got %d\n", info.cAccel);
|
||||
ok(info.dwFlags == 0xabababab, "got %x\n", info.dwFlags);
|
||||
|
||||
if (0) /* crashes on win2k3 */
|
||||
{
|
||||
hr = IOleControl_GetControlInfo(olecontrol, NULL);
|
||||
ok(hr == E_POINTER, "got 0x%08x\n", hr);
|
||||
}
|
||||
|
||||
IOleControl_Release(olecontrol);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue