oleaut32: Add a successful test for IFontDisp::Invoke.

This commit is contained in:
Robert Shearman 2006-07-28 01:20:52 +01:00 committed by Alexandre Julliard
parent c2afb5cbfb
commit fd48f795ff
1 changed files with 6 additions and 2 deletions

View File

@ -431,12 +431,13 @@ static void test_Invoke(void)
HRESULT hr; HRESULT hr;
VARIANTARG vararg; VARIANTARG vararg;
DISPPARAMS dispparams; DISPPARAMS dispparams;
VARIANT varresult;
hr = pOleCreateFontIndirect(NULL, &IID_IFontDisp, (void **)&fontdisp); hr = pOleCreateFontIndirect(NULL, &IID_IFontDisp, (void **)&fontdisp);
ok_ole_success(hr, "OleCreateFontIndirect\n"); ok_ole_success(hr, "OleCreateFontIndirect");
V_VT(&vararg) = VT_BOOL; V_VT(&vararg) = VT_BOOL;
V_BOOL(&vararg) = FALSE; V_BOOL(&vararg) = VARIANT_FALSE;
dispparams.cNamedArgs = 0; dispparams.cNamedArgs = 0;
dispparams.rgdispidNamedArgs = NULL; dispparams.rgdispidNamedArgs = NULL;
dispparams.cArgs = 1; dispparams.cArgs = 1;
@ -455,6 +456,9 @@ static void test_Invoke(void)
hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL);
ok(hr == DISP_E_PARAMNOTOPTIONAL, "IFontDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\n", hr); ok(hr == DISP_E_PARAMNOTOPTIONAL, "IFontDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\n", hr);
hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, &varresult, NULL, NULL);
ok_ole_success(hr, "IFontDisp_Invoke");
IFontDisp_Release(fontdisp); IFontDisp_Release(fontdisp);
} }