Commit 06e455c2 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

wbemprox: Accept 0 and WBEM_FLAG_ALWAYS | WBEM_MASK_CONDITION_ORIGIN as flags in…

wbemprox: Accept 0 and WBEM_FLAG_ALWAYS | WBEM_MASK_CONDITION_ORIGIN as flags in IWbemClassObject::GetNames(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34770Signed-off-by: 's avatarGijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: 's avatarHans Leidekker <hans@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a0c9aab5
...@@ -484,13 +484,21 @@ static HRESULT WINAPI class_object_GetNames( ...@@ -484,13 +484,21 @@ static HRESULT WINAPI class_object_GetNames(
TRACE("%p, %s, %08x, %s, %p\n", iface, debugstr_w(wszQualifierName), lFlags, TRACE("%p, %s, %08x, %s, %p\n", iface, debugstr_w(wszQualifierName), lFlags,
debugstr_variant(pQualifierVal), pNames); debugstr_variant(pQualifierVal), pNames);
if (lFlags != WBEM_FLAG_ALWAYS && if (!pNames)
return WBEM_E_INVALID_PARAMETER;
/* Combination used in a handful of broken apps */
if (lFlags == (WBEM_FLAG_ALWAYS | WBEM_MASK_CONDITION_ORIGIN))
lFlags = WBEM_FLAG_ALWAYS;
if (lFlags && (lFlags != WBEM_FLAG_ALWAYS &&
lFlags != WBEM_FLAG_NONSYSTEM_ONLY && lFlags != WBEM_FLAG_NONSYSTEM_ONLY &&
lFlags != WBEM_FLAG_SYSTEM_ONLY) lFlags != WBEM_FLAG_SYSTEM_ONLY))
{ {
FIXME("flags %08x not supported\n", lFlags); FIXME("flags %08x not supported\n", lFlags);
return E_NOTIMPL; return E_NOTIMPL;
} }
if (wszQualifierName || pQualifierVal) if (wszQualifierName || pQualifierVal)
FIXME("qualifier not supported\n"); FIXME("qualifier not supported\n");
......
...@@ -1015,6 +1015,21 @@ static void test_GetNames( IWbemServices *services ) ...@@ -1015,6 +1015,21 @@ static void test_GetNames( IWbemServices *services )
IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count ); IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
if (!count) break; if (!count) break;
hr = IWbemClassObject_GetNames( obj, NULL, 0, NULL, NULL );
ok( hr == WBEM_E_INVALID_PARAMETER, "got %08x\n", hr );
hr = IWbemClassObject_GetNames( obj, NULL, 0, NULL, &names );
ok( hr == S_OK, "got %08x\n", hr );
SafeArrayDestroy( names );
hr = IWbemClassObject_GetNames( obj, NULL, WBEM_FLAG_ALWAYS, NULL, &names );
ok( hr == S_OK, "got %08x\n", hr );
SafeArrayDestroy( names );
hr = IWbemClassObject_GetNames( obj, NULL, WBEM_FLAG_ALWAYS | WBEM_MASK_CONDITION_ORIGIN, NULL, &names );
ok( hr == S_OK, "got %08x\n", hr );
SafeArrayDestroy( names );
VariantInit( &val ); VariantInit( &val );
hr = IWbemClassObject_GetNames( obj, NULL, WBEM_FLAG_NONSYSTEM_ONLY, &val, &names ); hr = IWbemClassObject_GetNames( obj, NULL, WBEM_FLAG_NONSYSTEM_ONLY, &val, &names );
ok( hr == S_OK, "got %08x\n", hr ); ok( hr == S_OK, "got %08x\n", hr );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment