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=34770 Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a0c9aab5de
commit
06e455c247
|
@ -484,13 +484,21 @@ static HRESULT WINAPI class_object_GetNames(
|
|||
TRACE("%p, %s, %08x, %s, %p\n", iface, debugstr_w(wszQualifierName), lFlags,
|
||||
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_SYSTEM_ONLY)
|
||||
lFlags != WBEM_FLAG_SYSTEM_ONLY))
|
||||
{
|
||||
FIXME("flags %08x not supported\n", lFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
if (wszQualifierName || pQualifierVal)
|
||||
FIXME("qualifier not supported\n");
|
||||
|
||||
|
|
|
@ -1015,6 +1015,21 @@ static void test_GetNames( IWbemServices *services )
|
|||
IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
|
||||
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 );
|
||||
hr = IWbemClassObject_GetNames( obj, NULL, WBEM_FLAG_NONSYSTEM_ONLY, &val, &names );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
|
|
Loading…
Reference in New Issue