This is based on top of !6526, will mark ready after !6526 is merged.
-- v8: propsys: Support converting to BSTR for PropVariantToVariant. propsys: Use debugstr_variant for the trace in VariantToPropVariant. propsys: Implement PropVariantToBSTR. propsys/tests: Test truncating for PropVariantToString. propsys/tests: Test PropVariantToBSTR. propsys: Add PropVariantToBSTR stub.
From: Ziqing Hui zhui@codeweavers.com
--- dlls/propsys/propsys.spec | 2 +- dlls/propsys/propvar.c | 7 +++++++ include/propvarutil.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/propsys/propsys.spec b/dlls/propsys/propsys.spec index e6f2853b2a0..6a608ca88c1 100644 --- a/dlls/propsys/propsys.spec +++ b/dlls/propsys/propsys.spec @@ -106,7 +106,7 @@ @ stub PropVariantGetUInt16Elem @ stub PropVariantGetUInt32Elem @ stub PropVariantGetUInt64Elem -@ stub PropVariantToBSTR +@ stdcall PropVariantToBSTR(ptr ptr) @ stdcall PropVariantToBoolean(ptr ptr) @ stub PropVariantToBooleanVector @ stub PropVariantToBooleanVectorAlloc diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c index 9bdb11f7de7..4a60f2c2c7e 100644 --- a/dlls/propsys/propvar.c +++ b/dlls/propsys/propvar.c @@ -332,6 +332,13 @@ HRESULT WINAPI PropVariantToBoolean(REFPROPVARIANT propvarIn, BOOL *ret) return hr; }
+HRESULT WINAPI PropVariantToBSTR(REFPROPVARIANT propvar, BSTR *bstr) +{ + FIXME("propvar %p, bstr %p.\n", propvar, bstr); + + return E_NOTIMPL; +} + HRESULT WINAPI PropVariantToBuffer(REFPROPVARIANT propvarIn, void *ret, UINT cb) { HRESULT hr = S_OK; diff --git a/include/propvarutil.h b/include/propvarutil.h index 29c0bf7796b..0c23c7caa70 100644 --- a/include/propvarutil.h +++ b/include/propvarutil.h @@ -102,6 +102,7 @@ PSSTDAPI PropVariantToUInt32(REFPROPVARIANT propvarIn, ULONG *ret); PSSTDAPI_(ULONG) PropVariantToUInt32WithDefault(REFPROPVARIANT propvarIn, ULONG uLDefault); PSSTDAPI PropVariantToUInt64(REFPROPVARIANT propvarIn, ULONGLONG *ret); PSSTDAPI PropVariantToBoolean(REFPROPVARIANT propvarIn, BOOL *ret); +PSSTDAPI PropVariantToBSTR(REFPROPVARIANT propvar, BSTR *bstr); PSSTDAPI PropVariantToBuffer(REFPROPVARIANT propvarIn, void *ret, UINT cb); PSSTDAPI PropVariantToString(REFPROPVARIANT propvarIn, PWSTR ret, UINT cch); PSSTDAPI_(PCWSTR) PropVariantToStringWithDefault(REFPROPVARIANT propvarIn, LPCWSTR pszDefault);
From: Ziqing Hui zhui@codeweavers.com
--- dlls/propsys/tests/propsys.c | 110 ++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-)
diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c index 5d8f549a44d..134702c8b86 100644 --- a/dlls/propsys/tests/propsys.c +++ b/dlls/propsys/tests/propsys.c @@ -1621,6 +1621,112 @@ static void test_PropVariantToString(void) memset(bufferW, 0, sizeof(bufferW)); }
+#define check_PropVariantToBSTR(type, member, value, expect_str) \ +do \ +{ \ + PROPVARIANT check_propvar_ = {.vt = (type), .member = (value)}; \ + HRESULT check_hr_; \ + BSTR check_bstr_; \ + \ + check_hr_ = PropVariantToBSTR(&check_propvar_, &check_bstr_); \ + ok_(__FILE__, __LINE__)(check_hr_ == S_OK, \ + "PropVariantToBSTR returned %#lx.\n", check_hr_); \ + \ + if (check_hr_ == S_OK) \ + { \ + ok_(__FILE__, __LINE__)(!wcscmp(check_bstr_, (expect_str)), \ + "Unexpected bstr %s.\n", debugstr_w(check_bstr_)); \ + SysFreeString(check_bstr_); \ + } \ +} while (0) + +static void test_PropVariantToBSTR(void) +{ + unsigned char test_bytes[] = {1, 20, 30, 4}; + WCHAR test_bstr[] = {'a', 0, 'b', 0, 'c'}; + PROPVARIANT propvar; + UINT length; + HRESULT hr; + BSTR bstr; + + if (0) /* Crashes. */ + { + hr = PropVariantToBSTR(&propvar, NULL); + hr = PropVariantToBSTR(NULL, &bstr); + } + + todo_wine + { + check_PropVariantToBSTR(VT_I1, cVal, -123, L"-123"); + check_PropVariantToBSTR(VT_I2, iVal, -456, L"-456"); + check_PropVariantToBSTR(VT_I4, lVal, -789, L"-789"); + check_PropVariantToBSTR(VT_I8, hVal.QuadPart, -101112, L"-101112"); + check_PropVariantToBSTR(VT_UI1, bVal, 0xcd, L"205"); + check_PropVariantToBSTR(VT_UI2, uiVal, 0xdead, L"57005"); + check_PropVariantToBSTR(VT_UI4, ulVal, 0xdeadbeef, L"3735928559"); + check_PropVariantToBSTR(VT_UI8, uhVal.QuadPart, 0xdeadbeefdeadbeef, L"16045690984833335023"); + check_PropVariantToBSTR(VT_BOOL, boolVal, TRUE, L"1"); + check_PropVariantToBSTR(VT_R4, fltVal, 0.123f, L"0.123000003397464752"); + check_PropVariantToBSTR(VT_R8, dblVal, 0.456, L"0.456000000238418579"); + check_PropVariantToBSTR(VT_CLSID, puuid, (CLSID *)&dummy_guid, dummy_guid_str); + check_PropVariantToBSTR(VT_LPSTR, pszVal, (char *)topic, topicW); + check_PropVariantToBSTR(VT_LPWSTR, pwszVal, (WCHAR *)topicW, topicW); + } + + PropVariantInit(&propvar); + propvar.vt = VT_FILETIME; + propvar.filetime.dwLowDateTime = 0xdead; + propvar.filetime.dwHighDateTime = 0xbeef; + hr = PropVariantToBSTR(&propvar, &bstr); + todo_wine + ok(hr == S_OK, "PropVariantToBSTR returned %#lx.\n", hr); + if (hr == S_OK) + { + ok(!wcscmp(bstr, L"1601/08/31:23:29:30.651"), "Unexpected bstr %s.\n", debugstr_w(bstr)); + SysFreeString(bstr); + } + + PropVariantInit(&propvar); + propvar.vt = VT_DATE; + propvar.date = 123.123f; + hr = PropVariantToBSTR(&propvar, &bstr); + todo_wine + ok(hr == S_OK, "PropVariantToBSTR returned %#lx.\n", hr); + if (hr == S_OK) + { + ok(!wcscmp(bstr, L"1900/05/02:02:57:07.000"), "Unexpected bstr %s.\n", debugstr_w(bstr)); + SysFreeString(bstr); + } + + PropVariantInit(&propvar); + propvar.vt = VT_VECTOR | VT_I1; + propvar.caub.cElems = ARRAY_SIZE(test_bytes); + propvar.caub.pElems = test_bytes; + hr = PropVariantToBSTR(&propvar, &bstr); + todo_wine + ok(hr == S_OK, "PropVariantToBSTR returned %#lx.\n", hr); + if (hr == S_OK) + { + ok(!wcscmp(bstr, L"1; 20; 30; 4"), "Unexpected bstr %s.\n", debugstr_w(bstr)); + SysFreeString(bstr); + } + + PropVariantInit(&propvar); + propvar.vt = VT_BSTR; + propvar.bstrVal = SysAllocStringLen(test_bstr, ARRAY_SIZE(test_bstr)); + hr = PropVariantToBSTR(&propvar, &bstr); + todo_wine + ok(hr == S_OK, "PropVariantToBSTR returned %#lx.\n", hr); + if (hr == S_OK) + { + length = SysStringLen(bstr); + ok(length == wcslen(test_bstr), "Unexpected length %u.\n", length); + ok(!wcscmp(bstr, test_bstr), "Unexpected bstr %s.", debugstr_wn(bstr, ARRAY_SIZE(test_bstr))); + SysFreeString(bstr); + } + PropVariantClear(&propvar); +} + static void test_PropVariantToBuffer(void) { PROPVARIANT propvar; @@ -1630,7 +1736,7 @@ static void test_PropVariantToBuffer(void) SAFEARRAY *sa; SAFEARRAYBOUND sabound; void *pdata; - UINT8 buffer[256]; + UINT8 buffer[256] = {0};
hr = InitPropVariantFromBuffer(data, 10, &propvar); ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08lx.\n", hr); @@ -2365,7 +2471,6 @@ static void test_VariantToString(void) "Unexpected V_"#type"(&var) "format".\n", (propvar).member); \ } while (0)
- static void test_VariantToPropVariant(void) { PROPVARIANT propvar; @@ -2549,6 +2654,7 @@ START_TEST(propsys) test_PropVariantToStringWithDefault(); test_PropVariantToDouble(); test_PropVariantToString(); + test_PropVariantToBSTR(); test_PropVariantToBuffer(); test_inmemorystore(); test_persistserialized();
From: Ziqing Hui zhui@codeweavers.com
--- dlls/propsys/tests/propsys.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c index 134702c8b86..0b53cfcaf5a 100644 --- a/dlls/propsys/tests/propsys.c +++ b/dlls/propsys/tests/propsys.c @@ -1526,10 +1526,10 @@ static void test_PropVariantToDouble(void)
static void test_PropVariantToString(void) { - PROPVARIANT propvar; + static WCHAR stringW[] = L"Wine"; static CHAR string[] = "Wine"; - static WCHAR stringW[] = {'W','i','n','e',0}; WCHAR bufferW[256] = {0}; + PROPVARIANT propvar; HRESULT hr;
PropVariantInit(&propvar); @@ -1587,12 +1587,23 @@ static void test_PropVariantToString(void) ok(!lstrcmpW(bufferW, stringW), "got wrong string: "%s".\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW));
+ /* Result string will be truncated if output buffer is too small. */ + PropVariantInit(&propvar); + propvar.vt = VT_UI4; + propvar.lVal = 123456; + hr = PropVariantToString(&propvar, bufferW, 4); + todo_wine + ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "PropVariantToString returned: %#lx.\n", hr); + todo_wine + ok(!wcscmp(bufferW, L"123"), "Unexpected string %s.\n", debugstr_w(bufferW)); + memset(bufferW, 0, sizeof(bufferW)); + PropVariantInit(&propvar); propvar.vt = VT_LPWSTR; propvar.pwszVal = stringW; hr = PropVariantToString(&propvar, bufferW, 4); ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "PropVariantToString returned: 0x%08lx.\n", hr); - ok(!memcmp(bufferW, stringW, 4), "got wrong string.\n"); + ok(!wcscmp(bufferW, L"Win"), "Unexpected string %s.\n", debugstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW));
PropVariantInit(&propvar); @@ -1600,7 +1611,7 @@ static void test_PropVariantToString(void) propvar.pszVal = string; hr = PropVariantToString(&propvar, bufferW, 4); ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "PropVariantToString returned: 0x%08lx.\n", hr); - ok(!memcmp(bufferW, stringW, 4), "got wrong string.\n"); + ok(!wcscmp(bufferW, L"Win"), "Unexpected string %s.\n", debugstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW));
PropVariantInit(&propvar);
From: Ziqing Hui zhui@codeweavers.com
--- dlls/propsys/propvar.c | 17 +++++++++++++++-- dlls/propsys/tests/propsys.c | 6 +----- 2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c index 4a60f2c2c7e..c42a6e00525 100644 --- a/dlls/propsys/propvar.c +++ b/dlls/propsys/propvar.c @@ -334,9 +334,22 @@ HRESULT WINAPI PropVariantToBoolean(REFPROPVARIANT propvarIn, BOOL *ret)
HRESULT WINAPI PropVariantToBSTR(REFPROPVARIANT propvar, BSTR *bstr) { - FIXME("propvar %p, bstr %p.\n", propvar, bstr); + WCHAR *str; + HRESULT hr; + + TRACE("propvar %p, propvar->vt %#x, bstr %p.\n", + propvar, propvar ? propvar->vt : 0, bstr); + + if (FAILED(hr = PropVariantToStringAlloc(propvar, &str))) + return hr;
- return E_NOTIMPL; + *bstr = SysAllocString(str); + CoTaskMemFree(str); + + if (!*bstr) + return E_OUTOFMEMORY; + + return S_OK; }
HRESULT WINAPI PropVariantToBuffer(REFPROPVARIANT propvarIn, void *ret, UINT cb) diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c index 0b53cfcaf5a..a6151008576 100644 --- a/dlls/propsys/tests/propsys.c +++ b/dlls/propsys/tests/propsys.c @@ -1679,10 +1679,10 @@ static void test_PropVariantToBSTR(void) check_PropVariantToBSTR(VT_BOOL, boolVal, TRUE, L"1"); check_PropVariantToBSTR(VT_R4, fltVal, 0.123f, L"0.123000003397464752"); check_PropVariantToBSTR(VT_R8, dblVal, 0.456, L"0.456000000238418579"); + } check_PropVariantToBSTR(VT_CLSID, puuid, (CLSID *)&dummy_guid, dummy_guid_str); check_PropVariantToBSTR(VT_LPSTR, pszVal, (char *)topic, topicW); check_PropVariantToBSTR(VT_LPWSTR, pwszVal, (WCHAR *)topicW, topicW); - }
PropVariantInit(&propvar); propvar.vt = VT_FILETIME; @@ -1726,15 +1726,11 @@ static void test_PropVariantToBSTR(void) propvar.vt = VT_BSTR; propvar.bstrVal = SysAllocStringLen(test_bstr, ARRAY_SIZE(test_bstr)); hr = PropVariantToBSTR(&propvar, &bstr); - todo_wine ok(hr == S_OK, "PropVariantToBSTR returned %#lx.\n", hr); - if (hr == S_OK) - { length = SysStringLen(bstr); ok(length == wcslen(test_bstr), "Unexpected length %u.\n", length); ok(!wcscmp(bstr, test_bstr), "Unexpected bstr %s.", debugstr_wn(bstr, ARRAY_SIZE(test_bstr))); SysFreeString(bstr); - } PropVariantClear(&propvar); }
From: Ziqing Hui zhui@codeweavers.com
--- dlls/propsys/propvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c index c42a6e00525..bbdca5f3fb3 100644 --- a/dlls/propsys/propvar.c +++ b/dlls/propsys/propvar.c @@ -1127,7 +1127,7 @@ HRESULT WINAPI VariantToPropVariant(const VARIANT *var, PROPVARIANT *propvar) { HRESULT hr;
- TRACE("var %p, propvar %p, var->vt %04x.\n", var, propvar, var->vt); + TRACE("var %p, propvar %p.\n", debugstr_variant(var), propvar);
if (!var || !propvar) return E_INVALIDARG;
From: Ziqing Hui zhui@codeweavers.com
--- dlls/propsys/propvar.c | 11 ++++++++++- dlls/propsys/tests/propsys.c | 15 --------------- 2 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c index bbdca5f3fb3..d681b910e90 100644 --- a/dlls/propsys/propvar.c +++ b/dlls/propsys/propvar.c @@ -1069,6 +1069,8 @@ INT WINAPI PropVariantCompareEx(REFPROPVARIANT propvar1, REFPROPVARIANT propvar2
HRESULT WINAPI PropVariantToVariant(const PROPVARIANT *propvar, VARIANT *var) { + HRESULT hr = S_OK; + TRACE("propvar %p, var %p, propvar->vt %#x.\n", propvar, var, propvar ? propvar->vt : 0);
if (!var || !propvar) @@ -1115,12 +1117,19 @@ HRESULT WINAPI PropVariantToVariant(const PROPVARIANT *propvar, VARIANT *var) case VT_R8: V_R8(var) = propvar->dblVal; break; + case VT_LPSTR: + case VT_LPWSTR: + case VT_BSTR: + case VT_CLSID: + var->vt = VT_BSTR; + hr = PropVariantToBSTR(propvar, &V_BSTR(var)); + break; default: FIXME("Unsupported type %d.\n", propvar->vt); return E_INVALIDARG; }
- return S_OK; + return hr; }
HRESULT WINAPI VariantToPropVariant(const VARIANT *var, PROPVARIANT *propvar) diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c index a6151008576..fe32c41c217 100644 --- a/dlls/propsys/tests/propsys.c +++ b/dlls/propsys/tests/propsys.c @@ -2592,14 +2592,10 @@ static void test_PropVariantToVariant(void) propvar.vt = VT_BSTR; propvar.bstrVal = SysAllocString(L"test"); hr = PropVariantToVariant(&propvar, &var); - todo_wine ok(hr == S_OK, "PropVariantToVariant returned %#lx.\n", hr); - if (hr == S_OK) - { ok(V_VT(&var) == VT_BSTR, "Unexpected V_VT(&var) %d.\n", V_VT(&var)); ok(V_BSTR(&var) != propvar.bstrVal, "Got same string pointer.\n"); ok(!wcscmp(V_BSTR(&var), propvar.bstrVal), "Unexpected V_BSTR(&var) %s.\n", debugstr_w(V_BSTR(&var))); - } PropVariantClear(&propvar); VariantClear(&var);
@@ -2608,36 +2604,25 @@ static void test_PropVariantToVariant(void) hr = PropVariantToVariant(&propvar, &var); todo_wine ok(hr == 39, "PropVariantToVariant returned %#lx.\n", hr); - if (hr == 39) - { ok(V_VT(&var) == VT_BSTR, "Unexpected V_VT(&var) %d.\n", V_VT(&var)); ok(!wcscmp(V_BSTR(&var), dummy_guid_str), "Unexpected V_BSTR(&var) %s.\n", debugstr_w(V_BSTR(&var))); - } VariantClear(&var);
propvar.vt = VT_LPSTR; propvar.pszVal = (char *)topic; hr = PropVariantToVariant(&propvar, &var); - todo_wine ok(hr == S_OK, "PropVariantToVariant returned %#lx.\n", hr); - if (hr == S_OK) - { ok(V_VT(&var) == VT_BSTR, "Unexpected V_VT(&var) %d.\n", V_VT(&var)); ok(!wcscmp(V_BSTR(&var), topicW), "Unexpected V_BSTR(&var) %s.\n", debugstr_w(V_BSTR(&var))); - } VariantClear(&var);
propvar.vt = VT_LPWSTR; propvar.pwszVal = (WCHAR *)topicW; hr = PropVariantToVariant(&propvar, &var); - todo_wine ok(hr == S_OK, "PropVariantToVariant returned %#lx.\n", hr); - if (hr == S_OK) - { ok(V_VT(&var) == VT_BSTR, "Unexpected V_VT(&var) %d.\n", V_VT(&var)); ok(V_BSTR(&var) != topicW, "Got same string pointer.\n"); ok(!wcscmp(V_BSTR(&var), topicW), "Unexpected V_BSTR(&var) %s.\n", debugstr_w(V_BSTR(&var))); - } VariantClear(&var); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=149612
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"5.1378823111276E-315". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w7u_adm (32 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"5.1378823111276E-315". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w7u_el (32 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"5.1378823111276E-315". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w8 (32 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"0.12300000339746475". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w8adm (32 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"0.12300000339746475". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w864 (32 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"0.12300000339746475". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w1064v1507 (32 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"0.12300000339746475". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w1064v1809 (32 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"0.12300000339746475". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w1064_tsign (32 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w10pro64 (32 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w10pro64_en_AE_u8 (32 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w11pro64 (32 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w7pro64 (64 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"5.1378823111276E-315". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w864 (64 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"0.12300000339746475". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w1064v1507 (64 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"0.12300000339746475". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w1064v1809 (64 bit report) ===
propsys: propsys.c:1680: Test failed: Unexpected bstr L"0.12300000339746475". propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w1064_2qxl (64 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w1064_adm (64 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w1064_tsign (64 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w10pro64 (64 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w10pro64_ar (64 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w10pro64_ja (64 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w10pro64_zh_CN (64 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
=== w11pro64_amd (64 bit report) ===
propsys: propsys.c:1681: Test failed: Unexpected bstr L"0.456".
Nikolay Sivov (@nsivov) commented about dlls/propsys/tests/propsys.c:
SAFEARRAY *sa; SAFEARRAYBOUND sabound; void *pdata;
- UINT8 buffer[256];
- UINT8 buffer[256] = {0};
Was this change related to the rest of the commit?
Nikolay Sivov (@nsivov) commented about dlls/propsys/tests/propsys.c:
hr = PropVariantToBSTR(NULL, &bstr);
- }
- todo_wine
- {
- check_PropVariantToBSTR(VT_I1, cVal, -123, L"-123");
- check_PropVariantToBSTR(VT_I2, iVal, -456, L"-456");
- check_PropVariantToBSTR(VT_I4, lVal, -789, L"-789");
- check_PropVariantToBSTR(VT_I8, hVal.QuadPart, -101112, L"-101112");
- check_PropVariantToBSTR(VT_UI1, bVal, 0xcd, L"205");
- check_PropVariantToBSTR(VT_UI2, uiVal, 0xdead, L"57005");
- check_PropVariantToBSTR(VT_UI4, ulVal, 0xdeadbeef, L"3735928559");
- check_PropVariantToBSTR(VT_UI8, uhVal.QuadPart, 0xdeadbeefdeadbeef, L"16045690984833335023");
- check_PropVariantToBSTR(VT_BOOL, boolVal, TRUE, L"1");
- check_PropVariantToBSTR(VT_R4, fltVal, 0.123f, L"0.123000003397464752");
- check_PropVariantToBSTR(VT_R8, dblVal, 0.456, L"0.456000000238418579");
Double test fails for me on Windows, I get "0.456".
On Thu Nov 14 10:24:38 2024 +0000, Nikolay Sivov wrote:
Was this change related to the rest of the commit?
No, it's just to fix the win10 test failure we met above. While the rest of the commit happen to make the test failure happen.