Commit 0c5107af authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

wbemdisp: Support DISPATCH_PROPERTYGET in Object Invoke.

parent 02081ed6
......@@ -1286,7 +1286,8 @@ static HRESULT WINAPI object_Invoke(
if (!(name = get_member_name( object, member, &type )))
return DISP_E_MEMBERNOTFOUND;
if (flags == (DISPATCH_METHOD|DISPATCH_PROPERTYGET))
if (flags == (DISPATCH_METHOD|DISPATCH_PROPERTYGET) ||
flags == DISPATCH_PROPERTYGET)
{
memset( params, 0, sizeof(*params) );
return IWbemClassObject_Get( object->object, name, 0, result, NULL, NULL );
......
......@@ -223,6 +223,21 @@ static void test_ParseDisplayName(void)
ok( V_VT( &res ) == VT_BSTR, "got %u\n", V_VT( &res ) );
ok( V_BSTR( &res ) != (BSTR)0xdeadbeef, "got %u\n", V_VT( &res ) );
VariantClear( &res );
V_VT( &res ) = VT_ERROR;
V_BSTR( &res ) = (BSTR)0xdeadbeef;
memset( &params, 0, sizeof(params) );
hr = IDispatch_Invoke( dispatch, dispid, &IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_PROPERTYGET,
&params, &res, NULL, NULL );
ok( hr == S_OK, "got %#lx\n", hr );
ok( params.rgvarg == NULL, "got %p\n", params.rgvarg );
ok( params.rgdispidNamedArgs == NULL, "got %p\n", params.rgdispidNamedArgs );
ok( !params.cArgs, "got %u\n", params.cArgs );
ok( !params.cNamedArgs, "got %u\n", params.cNamedArgs );
ok( V_VT( &res ) == VT_BSTR, "got %u\n", V_VT( &res ) );
ok( V_BSTR( &res ) != (BSTR)0xdeadbeef, "got %u\n", V_VT( &res ) );
VariantClear( &res );
VariantClear( &var );
fetched = 0xdeadbeef;
......
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