Commit 3ca5f8bb authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Add a test for the version method.

parent 7432a715
......@@ -170,32 +170,47 @@ static void test_msi_invoke(void)
r = IDispatch_Invoke( installer, dispid, &IID_NULL, 0,
DISPATCH_METHOD, &param, &result, NULL, NULL);
todo_wine ok( r == S_OK, "dispatch failed %08x\n", r);
if (FAILED(r))
if (SUCCEEDED(r))
{
skip( "failed to create record\n");
return;
}
ok( V_VT(&result) == VT_DISPATCH, "type wrong\n");
record = V_DISPATCH(&result);
ok( V_VT(&result) == VT_DISPATCH, "type wrong\n");
memset( &result, 0, sizeof result );
dispid = get_dispid( record, "FieldCount" );
record = V_DISPATCH(&result);
param.cArgs = 0;
param.cNamedArgs = 0;
param.rgvarg = &varg;
param.rgdispidNamedArgs = &arg;
r = IDispatch_Invoke( record, dispid, &IID_NULL, 0,
DISPATCH_PROPERTYGET, &param, &result, NULL, NULL );
ok( r == S_OK, "dispatch failed %08x\n", r);
ok( V_VT(&result) == VT_I4, "type wrong\n");
ok( V_I4(&result) == 1, "field count wrong\n");
IDispatch_Release( record );
}
else
skip( "failed to create record\n");
memset( &result, 0, sizeof result );
dispid = get_dispid( record, "FieldCount" );
dispid = get_dispid( installer, "Version" );
param.cArgs = 0;
param.cNamedArgs = 0;
param.rgvarg = &varg;
param.rgdispidNamedArgs = &arg;
r = IDispatch_Invoke( record, dispid, &IID_NULL, 0,
r = IDispatch_Invoke( installer, dispid, &IID_NULL, 0,
DISPATCH_PROPERTYGET, &param, &result, NULL, NULL );
todo_wine {
ok( r == S_OK, "dispatch failed %08x\n", r);
ok( V_VT(&result) == VT_BSTR, "type wrong %d\n", V_VT(&result));
}
ok( V_VT(&result) == VT_I4, "type wrong\n");
ok( V_I4(&result) == 1, "field count wrong\n");
IDispatch_Release( record );
IDispatch_Release( installer );
}
......
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