mshtml,shdocvw: Initialize OLEINPLACEFRAMEINFO.cb for IOleInPlaceSite::GetWindowContext

Thomas Faber thfabba at gmx.de
Wed Mar 16 05:02:38 CDT 2011


---
 dlls/mshtml/tests/activex.c     |    2 +-
 dlls/mshtml/tests/events.c      |    2 +-
 dlls/mshtml/tests/htmldoc.c     |    2 +-
 dlls/mshtml/tests/script.c      |    2 +-
 dlls/mshtml/view.c              |    1 +
 dlls/shdocvw/client.c           |    1 -
 dlls/shdocvw/oleobject.c        |    1 +
 dlls/shdocvw/tests/webbrowser.c |    2 +-
 8 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c
index 486acce..c056e8b 100644
--- a/dlls/mshtml/tests/activex.c
+++ b/dlls/mshtml/tests/activex.c
@@ -889,6 +889,7 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
 
     ip_frame = NULL;
     ip_uiwindow = NULL;
+    frame_info.cb = sizeof(OLEINPLACEFRAMEINFO);
     hres = IOleInPlaceSiteEx_GetWindowContext(ip_site, &ip_frame, &ip_uiwindow, &pos_rect, &clip_rect, &frame_info);
     ok(hres == S_OK, "GetWindowContext failed: %08x\n", hres);
     ok(ip_frame != NULL, "ip_frame == NULL\n");
@@ -1534,7 +1535,6 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
     *lprcPosRect = rect;
     *lprcClipRect = rect;
 
-    lpFrameInfo->cb = sizeof(*lpFrameInfo);
     lpFrameInfo->fMDIApp = FALSE;
     lpFrameInfo->hwndFrame = container_hwnd;
     lpFrameInfo->haccel = NULL;
diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c
index a670532..da6d2ab 100644
--- a/dlls/mshtml/tests/events.c
+++ b/dlls/mshtml/tests/events.c
@@ -1969,7 +1969,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
     *lprcPosRect = rect;
     *lprcClipRect = rect;
 
-    lpFrameInfo->cb = sizeof(*lpFrameInfo);
+    ok(lpFrameInfo->cb >= sizeof(*lpFrameInfo), "lpFrameInfo->cb = %u, expected %u or more\n", lpFrameInfo->cb, (unsigned)sizeof(*lpFrameInfo));
     lpFrameInfo->fMDIApp = FALSE;
     lpFrameInfo->hwndFrame = container_hwnd;
     lpFrameInfo->haccel = NULL;
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index 11b2036..55a581e 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -1701,7 +1701,7 @@ static HRESULT WINAPI InPlaceSiteWindowless_GetWindowContext(
         memcpy(lprcClipRect, &rect, sizeof(RECT));
     ok(lpFrameInfo != NULL, "lpFrameInfo = NULL\n");
     if(lpFrameInfo) {
-        lpFrameInfo->cb = sizeof(*lpFrameInfo);
+        ok(lpFrameInfo->cb >= sizeof(*lpFrameInfo), "lpFrameInfo->cb = %u, expected %u or more\n", lpFrameInfo->cb, (unsigned)sizeof(*lpFrameInfo));
         lpFrameInfo->fMDIApp = FALSE;
         lpFrameInfo->hwndFrame = container_hwnd;
         lpFrameInfo->haccel = NULL;
diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c
index 35e6a9c..28f501f 100644
--- a/dlls/mshtml/tests/script.c
+++ b/dlls/mshtml/tests/script.c
@@ -883,7 +883,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
     *lprcPosRect = rect;
     *lprcClipRect = rect;
 
-    lpFrameInfo->cb = sizeof(*lpFrameInfo);
+    ok(lpFrameInfo->cb >= sizeof(*lpFrameInfo), "lpFrameInfo->cb = %u, expected %u or more\n", lpFrameInfo->cb, (unsigned)sizeof(*lpFrameInfo));
     lpFrameInfo->fMDIApp = FALSE;
     lpFrameInfo->hwndFrame = container_hwnd;
     lpFrameInfo->haccel = NULL;
diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c
index fccbde8..3852046 100644
--- a/dlls/mshtml/view.c
+++ b/dlls/mshtml/view.c
@@ -259,6 +259,7 @@ static HRESULT activate_window(HTMLDocumentObj *This)
         return FAILED(hres) ? hres : E_FAIL;
     }
 
+    frameinfo.cb = sizeof(OLEINPLACEFRAMEINFO);
     hres = IOleInPlaceSite_GetWindowContext(This->ipsite, &pIPFrame, &This->ip_window,
             &posrect, &cliprect, &frameinfo);
     if(FAILED(hres)) {
diff --git a/dlls/shdocvw/client.c b/dlls/shdocvw/client.c
index 3443170..729669b 100644
--- a/dlls/shdocvw/client.c
+++ b/dlls/shdocvw/client.c
@@ -230,7 +230,6 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
     GetClientRect(This->hwnd, lprcPosRect);
     *lprcClipRect = *lprcPosRect;
 
-    lpFrameInfo->cb = sizeof(*lpFrameInfo);
     lpFrameInfo->fMDIApp = FALSE;
     lpFrameInfo->hwndFrame = This->frame_hwnd;
     lpFrameInfo->haccel = NULL;
diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c
index 97fbfaa..df06028 100644
--- a/dlls/shdocvw/oleobject.c
+++ b/dlls/shdocvw/oleobject.c
@@ -141,6 +141,7 @@ static HRESULT activate_inplace(WebBrowser *This, IOleClientSite *active_site)
 
     IOleInPlaceSite_OnInPlaceActivate(This->inplace);
 
+    This->frameinfo.cb = sizeof(OLEINPLACEFRAMEINFO);
     IOleInPlaceSite_GetWindowContext(This->inplace, &This->doc_host.frame, &This->uiwindow,
                                      &This->pos_rect, &This->clip_rect,
                                      &This->frameinfo);
diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c
index e433b13..c0aaebc 100644
--- a/dlls/shdocvw/tests/webbrowser.c
+++ b/dlls/shdocvw/tests/webbrowser.c
@@ -1275,7 +1275,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface,
 
     ok(lpFrameInfo != NULL, "lpFrameInfo = NULL\n");
     if(lpFrameInfo) {
-        lpFrameInfo->cb = sizeof(*lpFrameInfo);
+        ok(lpFrameInfo->cb >= sizeof(*lpFrameInfo), "lpFrameInfo->cb = %u, expected %u or more\n", lpFrameInfo->cb, (unsigned)sizeof(*lpFrameInfo));
         lpFrameInfo->fMDIApp = FALSE;
         lpFrameInfo->hwndFrame = container_hwnd;
         lpFrameInfo->haccel = NULL;
-- 
1.7.3.4


--Multipart=_Wed__16_Mar_2011_11_21_26_+0100_1461WJOQtWRihO_9--



More information about the wine-patches mailing list