Jacek Caban : mshtml: Moved Invoke(DISPID_ENABLED) invocation to separated function.
Alexandre Julliard
julliard at winehq.org
Thu Aug 16 15:26:14 CDT 2012
Module: wine
Branch: master
Commit: 31201da6fa4c5cea25dc9e2355ec0ceaee7a2aaa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=31201da6fa4c5cea25dc9e2355ec0ceaee7a2aaa
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Aug 16 15:42:06 2012 +0200
mshtml: Moved Invoke(DISPID_ENABLED) invocation to separated function.
---
dlls/mshtml/pluginhost.c | 43 ++++++++++++++++++++++++-------------------
1 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c
index e24131b..8fb0bfb 100644
--- a/dlls/mshtml/pluginhost.c
+++ b/dlls/mshtml/pluginhost.c
@@ -329,6 +329,29 @@ void update_plugin_window(PluginHost *host, HWND hwnd, const RECT *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)
{
PluginHost *host;
@@ -849,11 +872,6 @@ static HRESULT WINAPI PHInPlaceSite_OnInPlaceActivate(IOleInPlaceSiteEx *iface)
static HRESULT WINAPI PHInPlaceSite_OnUIActivate(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);
@@ -864,20 +882,7 @@ static HRESULT WINAPI PHInPlaceSite_OnUIActivate(IOleInPlaceSiteEx *iface)
This->ui_active = TRUE;
- hres = IUnknown_QueryInterface(This->plugin_unk, &IID_IDispatch, (void**)&disp);
- 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);
- }
-
+ notif_enabled(This);
return S_OK;
}
More information about the wine-cvs
mailing list