[PATCH 5/5] windows.globalization: Fake empty IGlobalizationPreferencesStatics properties.

Rémi Bernon rbernon at codeweavers.com
Wed Mar 24 05:32:27 CDT 2021


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/windows.globalization/main.c             |  6 ++--
 .../tests/globalization.c                     | 36 ++++++++++++++++++-
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/dlls/windows.globalization/main.c b/dlls/windows.globalization/main.c
index f96ea88b08d..afc1af2854e 100644
--- a/dlls/windows.globalization/main.c
+++ b/dlls/windows.globalization/main.c
@@ -374,21 +374,21 @@ static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Calendars(
         IGlobalizationPreferencesStatics *iface, IVectorView_HSTRING **out)
 {
     FIXME("iface %p, out %p stub!\n", iface, out);
-    return E_NOTIMPL;
+    return hstring_vector_create(NULL, 0, out);
 }
 
 static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Clocks(
         IGlobalizationPreferencesStatics *iface, IVectorView_HSTRING **out)
 {
     FIXME("iface %p, out %p stub!\n", iface, out);
-    return E_NOTIMPL;
+    return hstring_vector_create(NULL, 0, out);
 }
 
 static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Currencies(
         IGlobalizationPreferencesStatics *iface, IVectorView_HSTRING **out)
 {
     FIXME("iface %p, out %p stub!\n", iface, out);
-    return E_NOTIMPL;
+    return hstring_vector_create(NULL, 0, out);
 }
 
 static HRESULT STDMETHODCALLTYPE globalization_preferences_get_Languages(
diff --git a/dlls/windows.globalization/tests/globalization.c b/dlls/windows.globalization/tests/globalization.c
index e471384869f..f43982976ce 100644
--- a/dlls/windows.globalization/tests/globalization.c
+++ b/dlls/windows.globalization/tests/globalization.c
@@ -47,7 +47,7 @@ static void test_GlobalizationPreferences(void)
     static const WCHAR *class_name = L"Windows.System.UserProfile.GlobalizationPreferences";
 
     IGlobalizationPreferencesStatics *preferences_statics = NULL;
-    IVectorView_HSTRING *languages = NULL;
+    IVectorView_HSTRING *languages = NULL, *calendars, *clocks, *currencies;
     IActivationFactory *factory = NULL;
     IInspectable *inspectable = NULL, *tmp_inspectable = NULL;
     IAgileObject *agile_object = NULL, *tmp_agile_object = NULL;
@@ -182,6 +182,40 @@ static void test_GlobalizationPreferences(void)
 
     IVectorView_HSTRING_Release(languages);
 
+
+    hr = IGlobalizationPreferencesStatics_get_Calendars(preferences_statics, &calendars);
+    ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Calendars failed, hr %#x\n", hr);
+
+    size = 0xdeadbeef;
+    hr = IVectorView_HSTRING_get_Size(calendars, &size);
+    ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr);
+    todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size);
+
+    IVectorView_HSTRING_Release(calendars);
+
+
+    hr = IGlobalizationPreferencesStatics_get_Clocks(preferences_statics, &clocks);
+    ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Clocks failed, hr %#x\n", hr);
+
+    size = 0xdeadbeef;
+    hr = IVectorView_HSTRING_get_Size(clocks, &size);
+    ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr);
+    todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size);
+
+    IVectorView_HSTRING_Release(clocks);
+
+
+    hr = IGlobalizationPreferencesStatics_get_Currencies(preferences_statics, &currencies);
+    ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Currencies failed, hr %#x\n", hr);
+
+    size = 0xdeadbeef;
+    hr = IVectorView_HSTRING_get_Size(currencies, &size);
+    ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr);
+    todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size);
+
+    IVectorView_HSTRING_Release(currencies);
+
+
     IGlobalizationPreferencesStatics_Release(preferences_statics);
 
     IAgileObject_Release(agile_object);
-- 
2.30.2




More information about the wine-devel mailing list