[PATCH v2 5/5] wbemprox: Add Microsoft\\Windows\\Storage namespace.
Paul Gofman
pgofman at codeweavers.com
Mon Sep 13 09:13:29 CDT 2021
Fixes Life is Strange: True Colors error on start.
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
dlls/wbemprox/builtin.c | 1 +
dlls/wbemprox/tests/services.c | 39 ++++++++++++++++++++++++++++++++
dlls/wbemprox/wbemprox_private.h | 1 +
3 files changed, 41 insertions(+)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index ad96182af6b..442a9015951 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -4128,6 +4128,7 @@ static const struct
builtin_namespaces[WBEMPROX_NAMESPACE_LAST] =
{
{L"cimv2", cimv2_builtin_classes, ARRAY_SIZE(cimv2_builtin_classes)},
+ {L"Microsoft\\Windows\\Storage", NULL, 0},
};
void init_table_list( void )
diff --git a/dlls/wbemprox/tests/services.c b/dlls/wbemprox/tests/services.c
index 5ad73e7a8ec..86ee99c335c 100644
--- a/dlls/wbemprox/tests/services.c
+++ b/dlls/wbemprox/tests/services.c
@@ -247,11 +247,50 @@ todo_wine
IWbemContext_Release( context );
}
+static void test_namespaces(void)
+{
+ static const struct
+ {
+ const WCHAR *path;
+ BOOL broken;
+ }
+ tests[] =
+ {
+ {L"ROOT\\CIMV2"},
+ {L"ROOT\\Microsoft\\Windows\\Storage", TRUE /* Before Win8. */},
+ };
+ IWbemLocator *locator;
+ IWbemServices *services;
+ unsigned int i;
+ BSTR resource;
+ HRESULT hr;
+
+ hr = CoCreateInstance( &CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_IWbemLocator, (void **)&locator );
+ if (hr != S_OK)
+ {
+ win_skip( "can't create instance of WbemLocator.\n" );
+ return;
+ }
+
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
+ {
+ resource = SysAllocString( tests[i].path );
+ hr = IWbemLocator_ConnectServer( locator, resource, NULL, NULL, NULL, 0, NULL, NULL, &services );
+ ok( hr == S_OK || broken( tests[i].broken && hr == WBEM_E_INVALID_NAMESPACE ), "%u: got %08x\n", i, hr );
+ SysFreeString( resource );
+ if (hr == S_OK)
+ IWbemServices_Release( services );
+ }
+
+ IWbemLocator_Release( locator );
+}
+
START_TEST(services)
{
CoInitialize( NULL );
test_IClientSecurity();
test_IWbemLocator();
test_IWbemContext();
+ test_namespaces();
CoUninitialize();
}
diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h
index cd655e54243..6b94bbb9ef6 100644
--- a/dlls/wbemprox/wbemprox_private.h
+++ b/dlls/wbemprox/wbemprox_private.h
@@ -23,6 +23,7 @@
enum wbm_namespace
{
WBEMPROX_NAMESPACE_CIMV2,
+ WBEMPROX_NAMESPACE_MS_WINDOWS_STORAGE,
WBEMPROX_NAMESPACE_LAST,
};
--
2.31.1
More information about the wine-devel
mailing list