Module: wine Branch: master Commit: 89c76714038d60ee6a62e98157c2477b2d87ca27 URL: http://source.winehq.org/git/wine.git/?a=commit;h=89c76714038d60ee6a62e98157...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Oct 21 12:42:37 2011 +0200
vbscript: Added vbSunday constant implementation.
---
dlls/vbscript/global.c | 14 ++++++++++++-- dlls/vbscript/tests/api.vbs | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 56cedf6..d3c4c0c 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -75,6 +75,16 @@ static HRESULT return_bstr(VARIANT *res, const WCHAR *str) return S_OK; }
+static HRESULT return_short(VARIANT *res, short val) +{ + if(res) { + V_VT(res) = VT_I2; + V_I2(res) = val; + } + + return S_OK; +} + static IUnknown *create_object(script_ctx_t *ctx, const WCHAR *progid) { IInternetHostSecurityManager *secmgr = NULL; @@ -897,8 +907,8 @@ static HRESULT Global_vbUseSystemDayOfWeek(vbdisp_t *This, VARIANT *arg, unsigne
static HRESULT Global_vbSunday(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + return return_short(res, 1); }
static HRESULT Global_vbMonday(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) diff --git a/dlls/vbscript/tests/api.vbs b/dlls/vbscript/tests/api.vbs index 126f1e0..c201bea 100644 --- a/dlls/vbscript/tests/api.vbs +++ b/dlls/vbscript/tests/api.vbs @@ -23,6 +23,9 @@ Dim x Class EmptyClass End Class
+Call ok(vbSunday = 1, "vbSunday = " & vbSunday) +Call ok(getVT(vbSunday) = "VT_I2", "getVT(vbSunday) = " & getVT(vbSunday)) + Call ok(isObject(new EmptyClass), "isObject(new EmptyClass) is not true?") Set x = new EmptyClass Call ok(isObject(x), "isObject(x) is not true?")