[VBSCRIPT] Sync with Wine Staging 1.9.23. CORE-12409
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 17 Nov 2016 23:15:02 +0000 (23:15 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 17 Nov 2016 23:15:02 +0000 (23:15 +0000)
svn path=/trunk/; revision=73298

reactos/dll/win32/vbscript/global.c
reactos/dll/win32/vbscript/interp.c
reactos/media/doc/README.WINE

index 77b3943..1534805 100644 (file)
@@ -1020,10 +1020,47 @@ static HRESULT Global_MidB(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
     return E_NOTIMPL;
 }
 
     return E_NOTIMPL;
 }
 
-static HRESULT Global_StrComp(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
+static HRESULT Global_StrComp(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIANT *res)
 {
 {
-    FIXME("\n");
-    return E_NOTIMPL;
+    BSTR left, right;
+    int mode, ret;
+    HRESULT hres;
+    short val;
+
+    TRACE("(%s %s ...)\n", debugstr_variant(args), debugstr_variant(args+1));
+
+    assert(args_cnt == 2 || args_cnt == 3);
+
+    if (args_cnt == 3) {
+        hres = to_int(args+2, &mode);
+        if(FAILED(hres))
+            return hres;
+
+        if (mode != 0 && mode != 1) {
+            FIXME("unknown compare mode = %d\n", mode);
+            return E_FAIL;
+        }
+    }
+    else
+        mode = 0;
+
+    hres = to_string(args, &left);
+    if(FAILED(hres))
+        return hres;
+
+    hres = to_string(args+1, &right);
+    if(FAILED(hres))
+    {
+        SysFreeString(left);
+        return hres;
+    }
+
+    ret = mode ? strcmpiW(left, right) : strcmpW(left, right);
+    val = ret < 0 ? -1 : (ret > 0 ? 1 : 0);
+
+    SysFreeString(left);
+    SysFreeString(right);
+    return return_short(res, val);
 }
 
 static HRESULT Global_LCase(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
 }
 
 static HRESULT Global_LCase(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
index 4487e11..9e30715 100644 (file)
@@ -177,7 +177,7 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
             if(!item->disp) {
                 IUnknown *unk;
 
             if(!item->disp) {
                 IUnknown *unk;
 
-                hres = IActiveScriptSite_GetItemInfo(ctx->script->site, name, SCRIPTINFO_IUNKNOWN, &unk, NULL);
+                hres = IActiveScriptSite_GetItemInfo(ctx->script->site, item->name, SCRIPTINFO_IUNKNOWN, &unk, NULL);
                 if(FAILED(hres)) {
                     WARN("GetItemInfo failed: %08x\n", hres);
                     continue;
                 if(FAILED(hres)) {
                     WARN("GetItemInfo failed: %08x\n", hres);
                     continue;
index 7f83087..d7c0ac4 100644 (file)
@@ -191,7 +191,7 @@ reactos/dll/win32/url                 # Synced to WineStaging-1.9.11
 reactos/dll/win32/urlmon              # Synced to WineStaging-1.9.23
 reactos/dll/win32/usp10               # Synced to WineStaging-1.9.23
 reactos/dll/win32/uxtheme             # Forked
 reactos/dll/win32/urlmon              # Synced to WineStaging-1.9.23
 reactos/dll/win32/usp10               # Synced to WineStaging-1.9.23
 reactos/dll/win32/uxtheme             # Forked
-reactos/dll/win32/vbscript            # Synced to WineStaging-1.9.11
+reactos/dll/win32/vbscript            # Synced to WineStaging-1.9.23
 reactos/dll/win32/version             # Synced to WineStaging-1.9.11
 reactos/dll/win32/vssapi              # Synced to WineStaging-1.9.11
 reactos/dll/win32/wbemdisp            # Synced to WineStaging-1.9.16
 reactos/dll/win32/version             # Synced to WineStaging-1.9.11
 reactos/dll/win32/vssapi              # Synced to WineStaging-1.9.11
 reactos/dll/win32/wbemdisp            # Synced to WineStaging-1.9.16