mshtml: Moved Invoke(DISPID_ENABLED) invocation to separated function.
This commit is contained in:
parent
af318c5fd0
commit
31201da6fa
|
@ -329,6 +329,29 @@ void update_plugin_window(PluginHost *host, HWND hwnd, const RECT *rect)
|
||||||
IOleInPlaceObject_SetObjectRects(host->ip_object, &host->rect, &host->rect);
|
IOleInPlaceObject_SetObjectRects(host->ip_object, &host->rect, &host->rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void notif_enabled(PluginHost *plugin_host)
|
||||||
|
{
|
||||||
|
DISPPARAMS args = {NULL, NULL, 0, 0};
|
||||||
|
IDispatch *disp;
|
||||||
|
ULONG err = 0;
|
||||||
|
VARIANT res;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
hres = IUnknown_QueryInterface(plugin_host->plugin_unk, &IID_IDispatch, (void**)&disp);
|
||||||
|
if(FAILED(hres)) {
|
||||||
|
FIXME("Could not get IDispatch iface: %08x\n", hres);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
V_VT(&res) = VT_EMPTY;
|
||||||
|
hres = IDispatch_Invoke(disp, DISPID_ENABLED, &IID_NULL, 0/*FIXME*/, DISPATCH_PROPERTYGET, &args, &res, NULL, &err);
|
||||||
|
IDispatch_Release(disp);
|
||||||
|
if(SUCCEEDED(hres)) {
|
||||||
|
FIXME("Got enabled %s\n", debugstr_variant(&res));
|
||||||
|
VariantClear(&res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HRESULT get_plugin_disp(HTMLPluginContainer *plugin_container, IDispatch **ret)
|
HRESULT get_plugin_disp(HTMLPluginContainer *plugin_container, IDispatch **ret)
|
||||||
{
|
{
|
||||||
PluginHost *host;
|
PluginHost *host;
|
||||||
|
@ -849,11 +872,6 @@ static HRESULT WINAPI PHInPlaceSite_OnInPlaceActivate(IOleInPlaceSiteEx *iface)
|
||||||
static HRESULT WINAPI PHInPlaceSite_OnUIActivate(IOleInPlaceSiteEx *iface)
|
static HRESULT WINAPI PHInPlaceSite_OnUIActivate(IOleInPlaceSiteEx *iface)
|
||||||
{
|
{
|
||||||
PluginHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
PluginHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||||
DISPPARAMS args = {NULL, NULL, 0, 0};
|
|
||||||
IDispatch *disp;
|
|
||||||
ULONG err = 0;
|
|
||||||
VARIANT res;
|
|
||||||
HRESULT hres;
|
|
||||||
|
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
|
|
||||||
|
@ -864,20 +882,7 @@ static HRESULT WINAPI PHInPlaceSite_OnUIActivate(IOleInPlaceSiteEx *iface)
|
||||||
|
|
||||||
This->ui_active = TRUE;
|
This->ui_active = TRUE;
|
||||||
|
|
||||||
hres = IUnknown_QueryInterface(This->plugin_unk, &IID_IDispatch, (void**)&disp);
|
notif_enabled(This);
|
||||||
if(FAILED(hres)) {
|
|
||||||
FIXME("Could not get IDispatch iface: %08x\n", hres);
|
|
||||||
return hres;
|
|
||||||
}
|
|
||||||
|
|
||||||
V_VT(&res) = VT_EMPTY;
|
|
||||||
hres = IDispatch_Invoke(disp, DISPID_ENABLED, &IID_NULL, 0/*FIXME*/, DISPATCH_PROPERTYGET, &args, &res, NULL, &err);
|
|
||||||
IDispatch_Release(disp);
|
|
||||||
if(SUCCEEDED(hres)) {
|
|
||||||
FIXME("Got enabled %s\n", debugstr_variant(&res));
|
|
||||||
VariantClear(&res);
|
|
||||||
}
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue