diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c
index 486accebc95..c056e8b39e7 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 a670532ed57..6ed9f970a9d 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\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 11b2036440f..d45eefbb8fc 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\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 35e6a9cb31d..092d4a7a66e 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\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 fccbde896ae..3852046cdb3 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)) {