[PATCH 2/6] msscript.ocx: Implement IScriptControl::put_SitehWnd.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Wed Sep 2 08:01:07 CDT 2020
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/msscript.ocx/msscript.c | 7 ++++++-
dlls/msscript.ocx/tests/msscript.c | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c
index ee0cf25..f096296 100644
--- a/dlls/msscript.ocx/msscript.c
+++ b/dlls/msscript.ocx/msscript.c
@@ -166,6 +166,7 @@ struct ScriptControl {
LONG ref;
IOleClientSite *site;
SIZEL extent;
+ LONG site_hwnd;
LONG timeout;
VARIANT_BOOL allow_ui;
VARIANT_BOOL use_safe_subset;
@@ -2751,8 +2752,12 @@ static HRESULT WINAPI ScriptControl_put_SitehWnd(IScriptControl *iface, LONG hwn
{
ScriptControl *This = impl_from_IScriptControl(iface);
- FIXME("(%p)->(%x)\n", This, hwnd);
+ TRACE("(%p)->(%x)\n", This, hwnd);
+ if (hwnd && !IsWindow((HWND)hwnd))
+ return CTL_E_INVALIDPROPERTYVALUE;
+
+ This->site_hwnd = hwnd;
return S_OK;
}
diff --git a/dlls/msscript.ocx/tests/msscript.c b/dlls/msscript.ocx/tests/msscript.c
index 5a29c7e..8b63e97 100644
--- a/dlls/msscript.ocx/tests/msscript.c
+++ b/dlls/msscript.ocx/tests/msscript.c
@@ -1929,7 +1929,7 @@ static void test_SitehWnd(void)
todo_wine ok(!site_hwnd, "got %p\n", (HWND)(LONG_PTR)site_hwnd);
hr = IScriptControl_put_SitehWnd(sc, 1);
- todo_wine ok(hr == CTL_E_INVALIDPROPERTYVALUE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_INVALIDPROPERTYVALUE, "got 0x%08x\n", hr);
site_hwnd = 0xdeadbeef;
hr = IScriptControl_get_SitehWnd(sc, &site_hwnd);
--
2.21.0
More information about the wine-devel
mailing list