mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 15:28:03 +00:00
wbemdisp: Implement ISWbemPropertySet::get_Count.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40534 Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a0669eeead
commit
ce923c3f57
2 changed files with 19 additions and 2 deletions
|
@ -438,8 +438,19 @@ static HRESULT WINAPI propertyset_Item( ISWbemPropertySet *iface, BSTR name,
|
||||||
|
|
||||||
static HRESULT WINAPI propertyset_get_Count( ISWbemPropertySet *iface, LONG *count )
|
static HRESULT WINAPI propertyset_get_Count( ISWbemPropertySet *iface, LONG *count )
|
||||||
{
|
{
|
||||||
FIXME( "\n" );
|
static const WCHAR propcountW[] = {'_','_','P','R','O','P','E','R','T','Y','_','C','O','U','N','T',0};
|
||||||
return E_NOTIMPL;
|
struct propertyset *propertyset = impl_from_ISWbemPropertySet( iface );
|
||||||
|
HRESULT hr;
|
||||||
|
VARIANT val;
|
||||||
|
|
||||||
|
TRACE( "%p, %p\n", propertyset, count );
|
||||||
|
|
||||||
|
hr = IWbemClassObject_Get( propertyset->object, propcountW, 0, &val, NULL, NULL );
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
*count = V_I4( &val );
|
||||||
|
}
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI propertyset_Add( ISWbemPropertySet *iface, BSTR name, WbemCimtypeEnum type,
|
static HRESULT WINAPI propertyset_Add( ISWbemPropertySet *iface, BSTR name, WbemCimtypeEnum type,
|
||||||
|
|
|
@ -302,6 +302,7 @@ static void test_locator(void)
|
||||||
ISWbemProperty *prop;
|
ISWbemProperty *prop;
|
||||||
ISWbemSecurity *security;
|
ISWbemSecurity *security;
|
||||||
VARIANT var;
|
VARIANT var;
|
||||||
|
LONG count;
|
||||||
WbemImpersonationLevelEnum imp_level;
|
WbemImpersonationLevelEnum imp_level;
|
||||||
WbemAuthenticationLevelEnum auth_level;
|
WbemAuthenticationLevelEnum auth_level;
|
||||||
|
|
||||||
|
@ -379,6 +380,11 @@ static void test_locator(void)
|
||||||
ok( hr == S_OK, "got %x\n", hr );
|
ok( hr == S_OK, "got %x\n", hr );
|
||||||
SysFreeString( procid_bstr );
|
SysFreeString( procid_bstr );
|
||||||
|
|
||||||
|
count = 0;
|
||||||
|
hr = ISWbemPropertySet_get_Count( prop_set, &count );
|
||||||
|
ok( hr == S_OK, "got %x\n", hr );
|
||||||
|
ok( count > 0, "got %d\n", count );
|
||||||
|
|
||||||
hr = ISWbemProperty_get_Value( prop, &var );
|
hr = ISWbemProperty_get_Value( prop, &var );
|
||||||
ok( hr == S_OK, "got %x\n", hr );
|
ok( hr == S_OK, "got %x\n", hr );
|
||||||
ok( V_VT(&var) == VT_BSTR, "got %x\n", V_VT(&var) );
|
ok( V_VT(&var) == VT_BSTR, "got %x\n", V_VT(&var) );
|
||||||
|
|
Loading…
Reference in a new issue