msscript: Added IQuickActivate stub.

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:28 +03:00 committed by Alexandre Julliard
parent e9fa3f427a
commit fc9ecfe04d
2 changed files with 82 additions and 0 deletions

View file

@ -44,6 +44,7 @@ struct ScriptControl {
IPersistStreamInit IPersistStreamInit_iface;
IOleObject IOleObject_iface;
IOleControl IOleControl_iface;
IQuickActivate IQuickActivate_iface;
IConnectionPointContainer IConnectionPointContainer_iface;
LONG ref;
IOleClientSite *site;
@ -156,6 +157,11 @@ static inline ScriptControl *impl_from_IOleControl(IOleControl *iface)
return CONTAINING_RECORD(iface, ScriptControl, IOleControl_iface);
}
static inline ScriptControl *impl_from_IQuickActivate(IQuickActivate *iface)
{
return CONTAINING_RECORD(iface, ScriptControl, IQuickActivate_iface);
}
static inline ScriptControl *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
{
return CONTAINING_RECORD(iface, ScriptControl, IConnectionPointContainer_iface);
@ -191,6 +197,9 @@ static HRESULT WINAPI ScriptControl_QueryInterface(IScriptControl *iface, REFIID
}else if(IsEqualGUID(&IID_IOleControl, riid)) {
TRACE("(%p)->(IID_IOleControl %p)\n", This, ppv);
*ppv = &This->IOleControl_iface;
}else if(IsEqualGUID(&IID_IQuickActivate, riid)) {
TRACE("(%p)->(IID_IQuickActivate %p)\n", This, ppv);
*ppv = &This->IQuickActivate_iface;
}else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
*ppv = &This->IConnectionPointContainer_iface;
@ -885,6 +894,60 @@ static const IOleControlVtbl OleControlVtbl = {
OleControl_FreezeEvents
};
static HRESULT WINAPI QuickActivate_QueryInterface(IQuickActivate *iface, REFIID riid, void **obj)
{
ScriptControl *This = impl_from_IQuickActivate(iface);
return IScriptControl_QueryInterface(&This->IScriptControl_iface, riid, obj);
}
static ULONG WINAPI QuickActivate_AddRef(IQuickActivate *iface)
{
ScriptControl *This = impl_from_IQuickActivate(iface);
return IScriptControl_AddRef(&This->IScriptControl_iface);
}
static ULONG WINAPI QuickActivate_Release(IQuickActivate *iface)
{
ScriptControl *This = impl_from_IQuickActivate(iface);
return IScriptControl_Release(&This->IScriptControl_iface);
}
static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTAINER *container, QACONTROL *control)
{
ScriptControl *This = impl_from_IQuickActivate(iface);
FIXME("(%p)->(%p %p)\n", This, container, control);
return E_NOTIMPL;
}
static HRESULT WINAPI QuickActivate_SetContentExtent(IQuickActivate *iface, SIZEL *size)
{
ScriptControl *This = impl_from_IQuickActivate(iface);
FIXME("(%p)->(%p)\n", This, size);
return E_NOTIMPL;
}
static HRESULT WINAPI QuickActivate_GetContentExtent(IQuickActivate *iface, SIZEL *size)
{
ScriptControl *This = impl_from_IQuickActivate(iface);
FIXME("(%p)->(%p)\n", This, size);
return E_NOTIMPL;
}
static const IQuickActivateVtbl QuickActivateVtbl = {
QuickActivate_QueryInterface,
QuickActivate_AddRef,
QuickActivate_Release,
QuickActivate_QuickActivate,
QuickActivate_SetContentExtent,
QuickActivate_GetContentExtent
};
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, void **obj)
{
ScriptControl *This = impl_from_IConnectionPointContainer(iface);
@ -1063,6 +1126,7 @@ static HRESULT WINAPI ScriptControl_CreateInstance(IClassFactory *iface, IUnknow
script_control->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl;
script_control->IOleObject_iface.lpVtbl = &OleObjectVtbl;
script_control->IOleControl_iface.lpVtbl = &OleControlVtbl;
script_control->IQuickActivate_iface.lpVtbl = &QuickActivateVtbl;
script_control->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl;
script_control->ref = 1;
script_control->site = NULL;

View file

@ -809,6 +809,23 @@ static void test_connectionpoints(void)
IScriptControl_Release(sc);
}
static void test_quickactivate(void)
{
IScriptControl *sc;
IQuickActivate *qa;
HRESULT hr;
hr = CoCreateInstance(&CLSID_ScriptControl, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IScriptControl, (void**)&sc);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = IScriptControl_QueryInterface(sc, &IID_IQuickActivate, (void**)&qa);
ok(hr == S_OK, "got 0x%08x\n", hr);
IQuickActivate_Release(qa);
IScriptControl_Release(sc);
}
START_TEST(msscript)
{
IUnknown *unk;
@ -829,6 +846,7 @@ START_TEST(msscript)
test_olecontrol();
test_Language();
test_connectionpoints();
test_quickactivate();
CoUninitialize();
}