From 41eedc6d0ba8a23b8d1d82c381b5e89077bfc899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zi=C4=99tek?= Date: Tue, 28 Jun 2011 13:38:56 +0200 Subject: [PATCH] wscript: Implemented Host_get_Version. --- programs/wscript/host.c | 8 ++++++-- programs/wscript/tests/run.js | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 302165673ca..f6dfaa0d22f 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -30,6 +30,7 @@ #include static const WCHAR wshNameW[] = {'W','i','n','d','o','w','s',' ','S','c','r','i','p','t',' ','H','o','s','t',0}; +static const WCHAR wshVersionW[] = {'5','.','8'}; WINE_DEFAULT_DEBUG_CHANNEL(wscript); @@ -159,8 +160,11 @@ static HRESULT WINAPI Host_get_Arguments(IHost *iface, IArguments2 **out_Argumen static HRESULT WINAPI Host_get_Version(IHost *iface, BSTR *out_Version) { - WINE_FIXME("(%p)\n", out_Version); - return E_NOTIMPL; + WINE_TRACE("(%p)\n", out_Version); + + if(!(*out_Version = SysAllocString(wshVersionW))) + return E_OUTOFMEMORY; + return S_OK; } static HRESULT WINAPI Host_get_BuildVersion(IHost *iface, int *out_Build) diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index 84d7789a476..8b43ce758d0 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -26,5 +26,6 @@ ok(typeof(WScript) === "object", "typeof(WScript) = " + typeof(WScript)); ok(typeof(WSH) === "object", "typeof(WSH) = " + typeof(WSH)); ok(WScript === WSH, "WScript !== WSH"); ok(WScript.Name === "Windows Script Host", "WScript.Name = " + WScript.Name); +ok(typeof(WScript.Version) === "string", "typeof(WScript.Version) = " + typeof(WScript.Version)); winetest.reportSuccess();