Commit fc9ecfe0 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msscript: Added IQuickActivate stub.

parent e9fa3f42
...@@ -44,6 +44,7 @@ struct ScriptControl { ...@@ -44,6 +44,7 @@ struct ScriptControl {
IPersistStreamInit IPersistStreamInit_iface; IPersistStreamInit IPersistStreamInit_iface;
IOleObject IOleObject_iface; IOleObject IOleObject_iface;
IOleControl IOleControl_iface; IOleControl IOleControl_iface;
IQuickActivate IQuickActivate_iface;
IConnectionPointContainer IConnectionPointContainer_iface; IConnectionPointContainer IConnectionPointContainer_iface;
LONG ref; LONG ref;
IOleClientSite *site; IOleClientSite *site;
...@@ -156,6 +157,11 @@ static inline ScriptControl *impl_from_IOleControl(IOleControl *iface) ...@@ -156,6 +157,11 @@ static inline ScriptControl *impl_from_IOleControl(IOleControl *iface)
return CONTAINING_RECORD(iface, ScriptControl, 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) static inline ScriptControl *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
{ {
return CONTAINING_RECORD(iface, ScriptControl, IConnectionPointContainer_iface); return CONTAINING_RECORD(iface, ScriptControl, IConnectionPointContainer_iface);
...@@ -191,6 +197,9 @@ static HRESULT WINAPI ScriptControl_QueryInterface(IScriptControl *iface, REFIID ...@@ -191,6 +197,9 @@ static HRESULT WINAPI ScriptControl_QueryInterface(IScriptControl *iface, REFIID
}else if(IsEqualGUID(&IID_IOleControl, riid)) { }else if(IsEqualGUID(&IID_IOleControl, riid)) {
TRACE("(%p)->(IID_IOleControl %p)\n", This, ppv); TRACE("(%p)->(IID_IOleControl %p)\n", This, ppv);
*ppv = &This->IOleControl_iface; *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)) { }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv); TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
*ppv = &This->IConnectionPointContainer_iface; *ppv = &This->IConnectionPointContainer_iface;
...@@ -885,6 +894,60 @@ static const IOleControlVtbl OleControlVtbl = { ...@@ -885,6 +894,60 @@ static const IOleControlVtbl OleControlVtbl = {
OleControl_FreezeEvents 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) static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, void **obj)
{ {
ScriptControl *This = impl_from_IConnectionPointContainer(iface); ScriptControl *This = impl_from_IConnectionPointContainer(iface);
...@@ -1063,6 +1126,7 @@ static HRESULT WINAPI ScriptControl_CreateInstance(IClassFactory *iface, IUnknow ...@@ -1063,6 +1126,7 @@ static HRESULT WINAPI ScriptControl_CreateInstance(IClassFactory *iface, IUnknow
script_control->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; script_control->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl;
script_control->IOleObject_iface.lpVtbl = &OleObjectVtbl; script_control->IOleObject_iface.lpVtbl = &OleObjectVtbl;
script_control->IOleControl_iface.lpVtbl = &OleControlVtbl; script_control->IOleControl_iface.lpVtbl = &OleControlVtbl;
script_control->IQuickActivate_iface.lpVtbl = &QuickActivateVtbl;
script_control->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; script_control->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl;
script_control->ref = 1; script_control->ref = 1;
script_control->site = NULL; script_control->site = NULL;
......
...@@ -809,6 +809,23 @@ static void test_connectionpoints(void) ...@@ -809,6 +809,23 @@ static void test_connectionpoints(void)
IScriptControl_Release(sc); 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) START_TEST(msscript)
{ {
IUnknown *unk; IUnknown *unk;
...@@ -829,6 +846,7 @@ START_TEST(msscript) ...@@ -829,6 +846,7 @@ START_TEST(msscript)
test_olecontrol(); test_olecontrol();
test_Language(); test_Language();
test_connectionpoints(); test_connectionpoints();
test_quickactivate();
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