From: Fabian Maurer dark.shadow4@web.de
--- dlls/wbemprox/tests/query.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index ea108e31e49..63c92f8e60c 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -549,6 +549,7 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path ) IWbemClassObject *process, *sig_in, *sig_out, *out, *params; WCHAR cmdlineW[MAX_PATH + 64 + 1]; IWbemQualifierSet *qualifiers; + WCHAR executable_path[255]; VARIANT retval, val; SAFEARRAY *names; LONG bound, i; @@ -718,7 +719,6 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path ) hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, NULL, &out, NULL ); ok( hr == S_OK, "failed to execute method %#lx\n", hr ); SysFreeString( method ); - SysFreeString( class );
type = 0xdeadbeef; VariantInit( &retval ); @@ -765,8 +765,29 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path ) hr = IWbemQualifierSet_Get( qualifiers, L"ID", 0, &val, &flavor ); ok( hr == WBEM_E_NOT_FOUND, "got %#lx\n", hr );
+ /* Test instance properties */ + + hr = IWbemServices_GetObject( services, class, 0, NULL, &process, NULL ); + ok( hr == S_OK, "got %#lx\n", hr ); + + type = 0xdeadbeef; + VariantInit( &val ); + hr = IWbemClassObject_Get( process, L"ExecutablePath", 0, &val, &type, NULL ); + todo_wine + ok( hr == S_OK, "IWbemClassObject_Get failed with %#lx\n", hr ); + todo_wine + ok( V_VT( &val ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &val ) ); + todo_wine + ok( type == CIM_STRING, "unexpected type %#lx\n", type ); + GetModuleFileNameW( NULL, executable_path, ARRAY_SIZE(executable_path) ); + todo_wine + ok( !lstrcmpiW( V_BSTR( &val ), executable_path ), "got %s, expected %s\n", wine_dbgstr_w(V_BSTR(&val)), wine_dbgstr_w(executable_path) ); + VariantClear( &val ); + IWbemClassObject_Release( process ); + IWbemQualifierSet_Release( qualifiers ); IWbemClassObject_Release( out ); + SysFreeString( class ); }
static void test_Win32_ComputerSystem( IWbemServices *services )