msi: Add a test for the version method.

This commit is contained in:
Mike McCormack 2007-02-07 20:21:11 +09:00 committed by Alexandre Julliard
parent 7432a715ed
commit 3ca5f8bbf9
1 changed files with 28 additions and 13 deletions

View File

@ -170,12 +170,8 @@ static void test_msi_invoke(void)
r = IDispatch_Invoke( installer, dispid, &IID_NULL, 0, r = IDispatch_Invoke( installer, dispid, &IID_NULL, 0,
DISPATCH_METHOD, &param, &result, NULL, NULL); DISPATCH_METHOD, &param, &result, NULL, NULL);
todo_wine ok( r == S_OK, "dispatch failed %08x\n", r); 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"); ok( V_VT(&result) == VT_DISPATCH, "type wrong\n");
record = V_DISPATCH(&result); record = V_DISPATCH(&result);
@ -196,6 +192,25 @@ static void test_msi_invoke(void)
ok( V_I4(&result) == 1, "field count wrong\n"); ok( V_I4(&result) == 1, "field count wrong\n");
IDispatch_Release( record ); IDispatch_Release( record );
}
else
skip( "failed to create record\n");
memset( &result, 0, sizeof result );
dispid = get_dispid( installer, "Version" );
param.cArgs = 0;
param.cNamedArgs = 0;
param.rgvarg = &varg;
param.rgdispidNamedArgs = &arg;
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));
}
IDispatch_Release( installer ); IDispatch_Release( installer );
} }