oleaut32/tests: Win64 printf format warning fixes.
This commit is contained in:
parent
449dfadf51
commit
279207b258
|
@ -5,7 +5,6 @@ VPATH = @srcdir@
|
|||
TESTDLL = oleaut32.dll
|
||||
IMPORTS = oleaut32 ole32 gdi32 kernel32
|
||||
EXTRALIBS = -luuid
|
||||
EXTRADEFS = -DWINE_NO_LONG_AS_INT
|
||||
|
||||
CTESTS = \
|
||||
olefont.c \
|
||||
|
|
|
@ -44,7 +44,7 @@ static HMODULE hOleaut32;
|
|||
|
||||
static HRESULT (WINAPI *pOleCreateFontIndirect)(LPFONTDESC,REFIID,LPVOID*);
|
||||
|
||||
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08lx\n", hr)
|
||||
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
|
||||
|
||||
/* Create a font with cySize given by lo_size, hi_size, */
|
||||
/* SetRatio to ratio_logical, ratio_himetric, */
|
||||
|
@ -77,37 +77,37 @@ static void test_ifont_sizes(long lo_size, long hi_size,
|
|||
/* Create font, test that it worked. */
|
||||
hres = pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj);
|
||||
ifnt = pvObj;
|
||||
ok(hres == S_OK,"%s: OCFI returns 0x%08lx instead of S_OK.\n",
|
||||
ok(hres == S_OK,"%s: OCFI returns 0x%08x instead of S_OK.\n",
|
||||
test_name, hres);
|
||||
ok(pvObj != NULL,"%s: OCFI returns NULL.\n", test_name);
|
||||
|
||||
/* Read back size. Hi part was ignored. */
|
||||
hres = IFont_get_Size(ifnt, &psize);
|
||||
ok(hres == S_OK,"%s: IFont_get_size returns 0x%08lx instead of S_OK.\n",
|
||||
ok(hres == S_OK,"%s: IFont_get_size returns 0x%08x instead of S_OK.\n",
|
||||
test_name, hres);
|
||||
ok(S(psize).Lo == lo_size && S(psize).Hi == 0,
|
||||
"%s: get_Size: Lo=%ld, Hi=%ld; expected Lo=%ld, Hi=%ld.\n",
|
||||
"%s: get_Size: Lo=%d, Hi=%d; expected Lo=%ld, Hi=%ld.\n",
|
||||
test_name, S(psize).Lo, S(psize).Hi, lo_size, 0L);
|
||||
|
||||
/* Change ratio, check size unchanged. Standard is 72, 2540. */
|
||||
hres = IFont_SetRatio(ifnt, ratio_logical, ratio_himetric);
|
||||
ok(hres == S_OK,"%s: IFont_SR returns 0x%08lx instead of S_OK.\n",
|
||||
ok(hres == S_OK,"%s: IFont_SR returns 0x%08x instead of S_OK.\n",
|
||||
test_name, hres);
|
||||
hres = IFont_get_Size(ifnt, &psize);
|
||||
ok(hres == S_OK,"%s: IFont_get_size returns 0x%08lx instead of S_OK.\n",
|
||||
ok(hres == S_OK,"%s: IFont_get_size returns 0x%08x instead of S_OK.\n",
|
||||
test_name, hres);
|
||||
ok(S(psize).Lo == lo_size && S(psize).Hi == 0,
|
||||
"%s: gS after SR: Lo=%ld, Hi=%ld; expected Lo=%ld, Hi=%ld.\n",
|
||||
"%s: gS after SR: Lo=%d, Hi=%d; expected Lo=%ld, Hi=%ld.\n",
|
||||
test_name, S(psize).Lo, S(psize).Hi, lo_size, 0L);
|
||||
|
||||
/* Check hFont size with this ratio. This tests an important */
|
||||
/* conversion for which MSDN is very wrong. */
|
||||
hres = IFont_get_hFont (ifnt, &hfont);
|
||||
ok(hres == S_OK, "%s: IFont_get_hFont returns 0x%08lx instead of S_OK.\n",
|
||||
ok(hres == S_OK, "%s: IFont_get_hFont returns 0x%08x instead of S_OK.\n",
|
||||
test_name, hres);
|
||||
hres = GetObject (hfont, sizeof(LOGFONT), &lf);
|
||||
ok(lf.lfHeight == hfont_height,
|
||||
"%s: hFont has lf.lfHeight=%ld, expected %ld.\n",
|
||||
"%s: hFont has lf.lfHeight=%d, expected %ld.\n",
|
||||
test_name, lf.lfHeight, hfont_height);
|
||||
|
||||
/* Free IFont. */
|
||||
|
@ -124,7 +124,7 @@ void test_QueryInterface(void)
|
|||
hres = pOleCreateFontIndirect(NULL, &IID_IFont, &pvObj);
|
||||
font = pvObj;
|
||||
|
||||
ok(hres == S_OK,"OCFI (NULL,..) does not return 0, but 0x%08lx\n",hres);
|
||||
ok(hres == S_OK,"OCFI (NULL,..) does not return 0, but 0x%08x\n",hres);
|
||||
ok(font != NULL,"OCFI (NULL,..) returns NULL, instead of !NULL\n");
|
||||
|
||||
pvObj = NULL;
|
||||
|
@ -132,10 +132,10 @@ void test_QueryInterface(void)
|
|||
|
||||
/* Test if QueryInterface increments ref counter for IFONTs */
|
||||
ret = IFont_AddRef(font);
|
||||
ok(ret == 3, "IFont_QI expected ref value 3 but instead got %12lu\n",ret);
|
||||
ok(ret == 3, "IFont_QI expected ref value 3 but instead got %12u\n",ret);
|
||||
IFont_Release(font);
|
||||
|
||||
ok(hres == S_OK,"IFont_QI does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"IFont_QI does not return S_OK, but 0x%08x\n", hres);
|
||||
ok(pvObj != NULL,"IFont_QI does return NULL, instead of a ptr\n");
|
||||
|
||||
/* Orignial ref and QueryInterface ref both have to be released */
|
||||
|
@ -161,11 +161,11 @@ void test_type_info(void)
|
|||
fontdisp = pvObj;
|
||||
|
||||
hres = IFontDisp_GetTypeInfo(fontdisp, 0, en_us, &pTInfo);
|
||||
ok(hres == S_OK, "GTI returned 0x%08lx instead of S_OK.\n", hres);
|
||||
ok(hres == S_OK, "GTI returned 0x%08x instead of S_OK.\n", hres);
|
||||
ok(pTInfo != NULL, "GTI returned NULL.\n");
|
||||
|
||||
hres = ITypeInfo_GetNames(pTInfo, DISPID_FONT_NAME, names, 3, &n);
|
||||
ok(hres == S_OK, "GetNames returned 0x%08lx instead of S_OK.\n", hres);
|
||||
ok(hres == S_OK, "GetNames returned 0x%08x instead of S_OK.\n", hres);
|
||||
ok(n == 1, "GetNames returned %d names instead of 1.\n", n);
|
||||
ok(!lstrcmpiW(names[0],name_Name), "DISPID_FONT_NAME doesn't get 'Names'.\n");
|
||||
|
||||
|
@ -179,7 +179,7 @@ void test_type_info(void)
|
|||
hres = IFontDisp_Invoke(fontdisp, DISPID_FONT_NAME, &IID_NULL,
|
||||
LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult,
|
||||
NULL, NULL);
|
||||
ok(hres == S_OK, "IFontDisp_Invoke return 0x%08lx instead of S_OK.\n", hres);
|
||||
ok(hres == S_OK, "IFontDisp_Invoke return 0x%08x instead of S_OK.\n", hres);
|
||||
VariantClear(&varresult);
|
||||
|
||||
IFontDisp_Release(fontdisp);
|
||||
|
@ -230,7 +230,7 @@ static HRESULT WINAPI FontEventsDisp_Invoke(
|
|||
{
|
||||
static const WCHAR wszBold[] = {'B','o','l','d',0};
|
||||
ok(wFlags == INVOKE_FUNC, "invoke flags should have been INVOKE_FUNC instead of 0x%x\n", wFlags);
|
||||
ok(dispIdMember == DISPID_FONT_CHANGED, "dispIdMember should have been DISPID_FONT_CHANGED instead of 0x%lx\n", dispIdMember);
|
||||
ok(dispIdMember == DISPID_FONT_CHANGED, "dispIdMember should have been DISPID_FONT_CHANGED instead of 0x%x\n", dispIdMember);
|
||||
ok(pDispParams->cArgs == 1, "pDispParams->cArgs should have been 1 instead of %d\n", pDispParams->cArgs);
|
||||
ok(V_VT(&pDispParams->rgvarg[0]) == VT_BSTR, "VT of first param should have been VT_BSTR instead of %d\n", V_VT(&pDispParams->rgvarg[0]));
|
||||
ok(!lstrcmpW(V_BSTR(&pDispParams->rgvarg[0]), wszBold), "String in first param should have been \"Bold\"\n");
|
||||
|
@ -343,19 +343,19 @@ void test_names_ids(WCHAR* w_name_1, const char* a_name_1,
|
|||
|
||||
/* test hres */
|
||||
ok(hres == hres_expect,
|
||||
"GetIDsOfNames: \"%s\", \"%s\" returns 0x%08lx, expected 0x%08lx.\n",
|
||||
"GetIDsOfNames: \"%s\", \"%s\" returns 0x%08x, expected 0x%08x.\n",
|
||||
a_name_1, a_name_2, hres, hres_expect);
|
||||
|
||||
/* test first DISPID */
|
||||
ok(rgDispId[0]==id_1,
|
||||
"GetIDsOfNames: \"%s\" gets DISPID 0x%08lx, expected 0x%08lx.\n",
|
||||
"GetIDsOfNames: \"%s\" gets DISPID 0x%08x, expected 0x%08x.\n",
|
||||
a_name_1, rgDispId[0], id_1);
|
||||
|
||||
/* test second DISPID is present */
|
||||
if (numnames == 2)
|
||||
{
|
||||
ok(rgDispId[1]==id_2,
|
||||
"GetIDsOfNames: ..., \"%s\" gets DISPID 0x%08lx, expected 0x%08lx.\n",
|
||||
"GetIDsOfNames: ..., \"%s\" gets DISPID 0x%08x, expected 0x%08x.\n",
|
||||
a_name_2, rgDispId[1], id_2);
|
||||
}
|
||||
|
||||
|
@ -451,27 +451,27 @@ static void test_Invoke(void)
|
|||
dispparams.cArgs = 1;
|
||||
dispparams.rgvarg = &vararg;
|
||||
hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_IFontDisp, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_UNKNOWNINTERFACE, "IFontDisp_Invoke should have returned DISP_E_UNKNOWNINTERFACE instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_UNKNOWNINTERFACE, "IFontDisp_Invoke should have returned DISP_E_UNKNOWNINTERFACE instead of 0x%08x\n", hr);
|
||||
|
||||
dispparams.cArgs = 0;
|
||||
dispparams.rgvarg = NULL;
|
||||
hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_BADPARAMCOUNT, "IFontDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_BADPARAMCOUNT, "IFontDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr);
|
||||
|
||||
hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYPUT, 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%08x\n", hr);
|
||||
|
||||
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%08x\n", hr);
|
||||
|
||||
hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, &varresult, NULL, NULL);
|
||||
ok_ole_success(hr, "IFontDisp_Invoke");
|
||||
|
||||
hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_METHOD, NULL, &varresult, NULL, NULL);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "IFontDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "IFontDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
|
||||
|
||||
hr = IFontDisp_Invoke(fontdisp, 0xdeadbeef, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, &varresult, NULL, NULL);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "IFontDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "IFontDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
|
||||
|
||||
dispparams.cArgs = 1;
|
||||
dispparams.rgvarg = &vararg;
|
||||
|
@ -512,20 +512,20 @@ static void test_IsEqual()
|
|||
ifnt2 = pvObj2;
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_OK,
|
||||
"IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08x\n",hres);
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
/* Check for bad pointer */
|
||||
hres = IFont_IsEqual(ifnt,NULL);
|
||||
ok(hres == E_POINTER,
|
||||
"IFont_IsEqual: (NULL) Expected 0x80004003 but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (NULL) Expected 0x80004003 but got 0x%08x\n",hres);
|
||||
|
||||
/* Test strName */
|
||||
fd.lpstrName = (WCHAR*)arial_font;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
fd.lpstrName = (WCHAR*)system_font;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
|
@ -535,7 +535,7 @@ static void test_IsEqual()
|
|||
ifnt2 = pvObj2;
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
S(fd.cySize).Lo = 100;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
|
@ -545,7 +545,7 @@ static void test_IsEqual()
|
|||
ifnt2 = pvObj2;
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
S(fd.cySize).Hi = 100;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
|
@ -555,7 +555,7 @@ static void test_IsEqual()
|
|||
ifnt2 = pvObj2;
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
fd.sWeight = 0;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
|
@ -564,7 +564,7 @@ static void test_IsEqual()
|
|||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
fd.sCharset = 0;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
|
@ -573,7 +573,7 @@ static void test_IsEqual()
|
|||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
fd.fItalic = 0;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
|
@ -582,7 +582,7 @@ static void test_IsEqual()
|
|||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
fd.fUnderline = 0;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
|
@ -591,7 +591,7 @@ static void test_IsEqual()
|
|||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08lx\n",hres);
|
||||
"IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
fd.fStrikethrough = 0;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
|
@ -635,36 +635,36 @@ static void test_ReleaseHfont(void)
|
|||
/* Try invalid HFONT */
|
||||
hres = IFont_ReleaseHfont(ifnt1,NULL);
|
||||
ok(hres == E_INVALIDARG,
|
||||
"IFont_ReleaseHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08lx\n",
|
||||
"IFont_ReleaseHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08x\n",
|
||||
hres);
|
||||
|
||||
/* Try to add a bad HFONT */
|
||||
hres = IFont_ReleaseHfont(ifnt1,(HFONT)32);
|
||||
todo_wine {ok(hres == S_FALSE,
|
||||
"IFont_ReleaseHfont: (Bad HFONT) Expected S_FALSE but got 0x%08lx\n",
|
||||
"IFont_ReleaseHfont: (Bad HFONT) Expected S_FALSE but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Release all refs */
|
||||
hres = IFont_ReleaseHfont(ifnt1,hfnt1);
|
||||
ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);
|
||||
|
||||
hres = IFont_ReleaseHfont(ifnt2,hfnt2);
|
||||
ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);
|
||||
|
||||
/* Check that both lists are empty */
|
||||
hres = IFont_ReleaseHfont(ifnt1,hfnt1);
|
||||
todo_wine {ok(hres == S_FALSE,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* The list should be empty */
|
||||
hres = IFont_ReleaseHfont(ifnt2,hfnt2);
|
||||
todo_wine {ok(hres == S_FALSE,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
IFont_Release(ifnt1);
|
||||
|
@ -710,59 +710,59 @@ static void test_AddRefHfont(void)
|
|||
/* Try invalid HFONT */
|
||||
hres = IFont_AddRefHfont(ifnt1,NULL);
|
||||
ok(hres == E_INVALIDARG,
|
||||
"IFont_AddRefHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08x\n",
|
||||
hres);
|
||||
|
||||
/* Try to add a bad HFONT */
|
||||
hres = IFont_AddRefHfont(ifnt1,(HFONT)32);
|
||||
todo_wine{ ok(hres == S_FALSE,
|
||||
"IFont_AddRefHfont: (Bad HFONT) Expected S_FALSE but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Bad HFONT) Expected S_FALSE but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Add simple IFONT HFONT pair */
|
||||
hres = IFont_AddRefHfont(ifnt1,hfnt1);
|
||||
ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);
|
||||
|
||||
/* IFONT and HFONT do not have to be the same (always looks at HFONT) */
|
||||
hres = IFont_AddRefHfont(ifnt2,hfnt1);
|
||||
todo_wine {ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Release all hfnt1 refs */
|
||||
hres = IFont_ReleaseHfont(ifnt1,hfnt1);
|
||||
ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);
|
||||
|
||||
hres = IFont_ReleaseHfont(ifnt1,hfnt1);
|
||||
todo_wine {ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
hres = IFont_ReleaseHfont(ifnt1,hfnt1);
|
||||
todo_wine {ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Check if hfnt1 is empty */
|
||||
hres = IFont_ReleaseHfont(ifnt1,hfnt1);
|
||||
todo_wine {ok(hres == S_FALSE,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Release all hfnt2 refs */
|
||||
hres = IFont_ReleaseHfont(ifnt2,hfnt2);
|
||||
ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);
|
||||
|
||||
/* Check if hfnt2 is empty */
|
||||
hres = IFont_ReleaseHfont(ifnt2,hfnt2);
|
||||
todo_wine {ok(hres == S_FALSE,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Show that releasing an IFONT does not always release it from the HFONT cache. */
|
||||
|
@ -772,13 +772,13 @@ static void test_AddRefHfont(void)
|
|||
/* Add a reference for destroyed hfnt1 */
|
||||
hres = IFont_AddRefHfont(ifnt2,hfnt1);
|
||||
todo_wine {ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Decrement reference for destroyed hfnt1 */
|
||||
hres = IFont_ReleaseHfont(ifnt2,hfnt1);
|
||||
todo_wine {ok(hres == S_OK,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Shows that releasing all IFONT's does clear the HFONT cache. */
|
||||
|
@ -794,13 +794,13 @@ static void test_AddRefHfont(void)
|
|||
/* Add a reference for destroyed hfnt1 */
|
||||
hres = IFont_AddRefHfont(ifnt3,hfnt1);
|
||||
todo_wine {ok(hres == S_FALSE,
|
||||
"IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
/* Decrement reference for destroyed hfnt1 */
|
||||
hres = IFont_ReleaseHfont(ifnt3,hfnt1);
|
||||
todo_wine {ok(hres == S_FALSE,
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n",
|
||||
"IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n",
|
||||
hres);}
|
||||
|
||||
hres = IFont_Release(ifnt3);
|
||||
|
|
|
@ -44,7 +44,7 @@ static HMODULE hOleaut32;
|
|||
|
||||
static HRESULT (WINAPI *pOleLoadPicture)(LPSTREAM,LONG,BOOL,REFIID,LPVOID*);
|
||||
|
||||
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08lx\n", hr)
|
||||
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
|
||||
|
||||
/* 1x1 pixel gif */
|
||||
static const unsigned char gifimage[35] = {
|
||||
|
@ -133,7 +133,7 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)
|
|||
hres = pOleLoadPicture(stream, imgsize, TRUE, &IID_IPicture, &pvObj);
|
||||
pic = pvObj;
|
||||
|
||||
ok(hres == S_OK,"OLP (NULL,..) does not return 0, but 0x%08lx\n",hres);
|
||||
ok(hres == S_OK,"OLP (NULL,..) does not return 0, but 0x%08x\n",hres);
|
||||
ok(pic != NULL,"OLP (NULL,..) returns NULL, instead of !NULL\n");
|
||||
if (pic == NULL)
|
||||
return;
|
||||
|
@ -141,44 +141,44 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)
|
|||
pvObj = NULL;
|
||||
hres = IPicture_QueryInterface (pic, &IID_IPicture, &pvObj);
|
||||
|
||||
ok(hres == S_OK,"IPicture_QI does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"IPicture_QI does not return S_OK, but 0x%08x\n", hres);
|
||||
ok(pvObj != NULL,"IPicture_QI does return NULL, instead of a ptr\n");
|
||||
|
||||
IPicture_Release ((IPicture*)pvObj);
|
||||
|
||||
handle = 0;
|
||||
hres = IPicture_get_Handle (pic, &handle);
|
||||
ok(hres == S_OK,"IPicture_get_Handle does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"IPicture_get_Handle does not return S_OK, but 0x%08x\n", hres);
|
||||
ok(handle != 0, "IPicture_get_Handle returns a NULL handle, but it should be non NULL\n");
|
||||
|
||||
width = 0;
|
||||
hres = IPicture_get_Width (pic, &width);
|
||||
ok(hres == S_OK,"IPicture_get_Width does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"IPicture_get_Width does not return S_OK, but 0x%08x\n", hres);
|
||||
ok(width != 0, "IPicture_get_Width returns 0, but it should not be 0.\n");
|
||||
|
||||
height = 0;
|
||||
hres = IPicture_get_Height (pic, &height);
|
||||
ok(hres == S_OK,"IPicture_get_Height does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"IPicture_get_Height does not return S_OK, but 0x%08x\n", hres);
|
||||
ok(height != 0, "IPicture_get_Height returns 0, but it should not be 0.\n");
|
||||
|
||||
type = 0;
|
||||
hres = IPicture_get_Type (pic, &type);
|
||||
ok(hres == S_OK,"IPicture_get_Type does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"IPicture_get_Type does not return S_OK, but 0x%08x\n", hres);
|
||||
ok(type == PICTYPE_BITMAP, "IPicture_get_Type returns %d, but it should be PICTYPE_BITMAP(%d).\n", type, PICTYPE_BITMAP);
|
||||
|
||||
attr = 0;
|
||||
hres = IPicture_get_Attributes (pic, &attr);
|
||||
ok(hres == S_OK,"IPicture_get_Attributes does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(attr == 0, "IPicture_get_Attributes returns %ld, but it should be 0.\n", attr);
|
||||
ok(hres == S_OK,"IPicture_get_Attributes does not return S_OK, but 0x%08x\n", hres);
|
||||
ok(attr == 0, "IPicture_get_Attributes returns %d, but it should be 0.\n", attr);
|
||||
|
||||
hPal = 0;
|
||||
hres = IPicture_get_hPal (pic, &hPal);
|
||||
ok(hres == S_OK,"IPicture_get_hPal does not return S_OK, but 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"IPicture_get_hPal does not return S_OK, but 0x%08x\n", hres);
|
||||
/* a single pixel b/w image has no palette */
|
||||
ok(hPal == 0, "IPicture_get_hPal returns %ld, but it should be 0.\n", (long)hPal);
|
||||
ok(hPal == 0, "IPicture_get_hPal returns %d, but it should be 0.\n", hPal);
|
||||
|
||||
res = IPicture_Release (pic);
|
||||
ok (res == 0, "refcount after release is %ld, but should be 0?\n", res);
|
||||
ok (res == 0, "refcount after release is %d, but should be 0?\n", res);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -197,11 +197,11 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize)
|
|||
memcpy(data, imgdata, imgsize);
|
||||
|
||||
hres = CreateStreamOnHGlobal (hglob, FALSE, &stream);
|
||||
ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08x\n", hres);
|
||||
|
||||
memset(&seekto,0,sizeof(seekto));
|
||||
hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1);
|
||||
ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres);
|
||||
test_pic_with_stream(stream, imgsize);
|
||||
|
||||
/* again with Non Statable and Non Seekable stream */
|
||||
|
@ -227,24 +227,24 @@ static void test_empty_image(void) {
|
|||
memcpy(data,"lt\0\0",4);
|
||||
((DWORD*)data)[1] = 0;
|
||||
hres = CreateStreamOnHGlobal (hglob, TRUE, &stream);
|
||||
ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08x\n", hres);
|
||||
|
||||
memset(&seekto,0,sizeof(seekto));
|
||||
hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1);
|
||||
ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres);
|
||||
|
||||
pvObj = NULL;
|
||||
hres = pOleLoadPicture(stream, 8, TRUE, &IID_IPicture, &pvObj);
|
||||
pic = pvObj;
|
||||
ok(hres == S_OK,"empty picture not loaded, hres 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"empty picture not loaded, hres 0x%08x\n", hres);
|
||||
ok(pic != NULL,"empty picture not loaded, pic is NULL\n");
|
||||
|
||||
hres = IPicture_get_Type (pic, &type);
|
||||
ok (hres == S_OK,"empty picture get type failed with hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK,"empty picture get type failed with hres 0x%08x\n", hres);
|
||||
ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type);
|
||||
|
||||
hres = IPicture_get_Handle (pic, &handle);
|
||||
ok (hres == S_OK,"empty picture get handle failed with hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK,"empty picture get handle failed with hres 0x%08x\n", hres);
|
||||
ok (handle == 0, "empty picture get handle did not return 0, but 0x%08x\n", handle);
|
||||
IPicture_Release (pic);
|
||||
}
|
||||
|
@ -267,21 +267,21 @@ static void test_empty_image_2(void) {
|
|||
memcpy(data,"lt\0\0",4);
|
||||
((DWORD*)data)[1] = 0;
|
||||
hres = CreateStreamOnHGlobal (hglob, TRUE, &stream);
|
||||
ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08x\n", hres);
|
||||
|
||||
memset(&seekto,0,sizeof(seekto));
|
||||
seekto.u.LowPart = 42;
|
||||
hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1);
|
||||
ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres);
|
||||
|
||||
pvObj = NULL;
|
||||
hres = pOleLoadPicture(stream, 8, TRUE, &IID_IPicture, &pvObj);
|
||||
pic = pvObj;
|
||||
ok(hres == S_OK,"empty picture not loaded, hres 0x%08lx\n", hres);
|
||||
ok(hres == S_OK,"empty picture not loaded, hres 0x%08x\n", hres);
|
||||
ok(pic != NULL,"empty picture not loaded, pic is NULL\n");
|
||||
|
||||
hres = IPicture_get_Type (pic, &type);
|
||||
ok (hres == S_OK,"empty picture get type failed with hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK,"empty picture get type failed with hres 0x%08x\n", hres);
|
||||
ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type);
|
||||
|
||||
IPicture_Release (pic);
|
||||
|
@ -317,43 +317,43 @@ static void test_Invoke(void)
|
|||
dispparams.cArgs = 1;
|
||||
dispparams.rgvarg = &vararg;
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_IPictureDisp, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n", hr);
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_IUnknown, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n", hr);
|
||||
|
||||
dispparams.cArgs = 0;
|
||||
dispparams.rgvarg = NULL;
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr);
|
||||
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYPUT, NULL, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr);
|
||||
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr);
|
||||
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, &varresult, NULL, NULL);
|
||||
ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr);
|
||||
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL);
|
||||
ok_ole_success(hr, "IPictureDisp_Invoke");
|
||||
ok(V_VT(&varresult) == VT_I4, "V_VT(&varresult) should have been VT_UINT instead of %d\n", V_VT(&varresult));
|
||||
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
|
||||
|
||||
hr = IPictureDisp_Invoke(picdisp, 0xdeadbeef, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
|
||||
|
||||
dispparams.cArgs = 1;
|
||||
dispparams.rgvarg = &vararg;
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL);
|
||||
ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr);
|
||||
|
||||
dispparams.cArgs = 1;
|
||||
dispparams.rgvarg = &vararg;
|
||||
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL);
|
||||
ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr);
|
||||
|
||||
IPictureDisp_Release(picdisp);
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ static void test_safearray(void)
|
|||
unsigned char *ptr1, *ptr2;
|
||||
|
||||
hres = SafeArrayDestroy( NULL);
|
||||
ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%lx\n", hres);
|
||||
ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%x\n", hres);
|
||||
|
||||
bound.cElements = 1;
|
||||
bound.lLbound = 0;
|
||||
|
@ -301,25 +301,25 @@ static void test_safearray(void)
|
|||
ok(NULL != a,"SAC(VT_I4,1,[0,0]) failed.\n");
|
||||
|
||||
hres = SafeArrayGetLBound(a, 1, &l);
|
||||
ok(hres == S_OK, "SAGLB of 0 size dimensioned array failed with %lx\n",hres);
|
||||
ok(l == 42, "SAGLB of 0 size dimensioned array failed to return 42, but returned %ld\n",l);
|
||||
ok(hres == S_OK, "SAGLB of 0 size dimensioned array failed with %x\n",hres);
|
||||
ok(l == 42, "SAGLB of 0 size dimensioned array failed to return 42, but returned %d\n",l);
|
||||
hres = SafeArrayGetUBound(a, 1, &l);
|
||||
ok(hres == S_OK, "SAGUB of 0 size dimensioned array failed with %lx\n",hres);
|
||||
ok(l == 41, "SAGUB of 0 size dimensioned array failed to return 41, but returned %ld\n",l);
|
||||
ok(hres == S_OK, "SAGUB of 0 size dimensioned array failed with %x\n",hres);
|
||||
ok(l == 41, "SAGUB of 0 size dimensioned array failed to return 41, but returned %d\n",l);
|
||||
|
||||
hres = SafeArrayAccessData(a, &data);
|
||||
ok(hres == S_OK, "SafeArrayAccessData of 0 size dimensioned array failed with %lx\n", hres);
|
||||
ok(hres == S_OK, "SafeArrayAccessData of 0 size dimensioned array failed with %x\n", hres);
|
||||
SafeArrayUnaccessData(a);
|
||||
|
||||
bound.cElements = 2;
|
||||
hres = SafeArrayRedim(a, &bound);
|
||||
ok(hres == S_OK,"SAR of a 0 elements dimension failed with hres %lx\n", hres);
|
||||
ok(hres == S_OK,"SAR of a 0 elements dimension failed with hres %x\n", hres);
|
||||
bound.cElements = 0;
|
||||
hres = SafeArrayRedim(a, &bound);
|
||||
ok(hres == S_OK || hres == E_OUTOFMEMORY,
|
||||
"SAR to a 0 elements dimension failed with hres %lx\n", hres);
|
||||
"SAR to a 0 elements dimension failed with hres %x\n", hres);
|
||||
hres = SafeArrayDestroy(a);
|
||||
ok(hres == S_OK,"SAD of 0 dim array faild with hres %lx\n", hres);
|
||||
ok(hres == S_OK,"SAD of 0 dim array faild with hres %x\n", hres);
|
||||
|
||||
SafeArrayAllocDescriptor(2, &a);
|
||||
a->rgsabound[0].cElements = 2;
|
||||
|
@ -332,7 +332,7 @@ static void test_safearray(void)
|
|||
indices[0] = 4;
|
||||
indices[1] = 2;
|
||||
hres = SafeArrayPtrOfIndex(a, indices, (void **)&ptr1);
|
||||
ok(hres == S_OK, "SAPOI failed with hres %lx\n", hres);
|
||||
ok(hres == S_OK, "SAPOI failed with hres %x\n", hres);
|
||||
SafeArrayAccessData(a, (void **)&ptr2);
|
||||
ok(ptr1 - ptr2 == 14, "SAPOI got wrong ptr\n");
|
||||
*(WORD *)ptr1 = 0x55aa;
|
||||
|
@ -370,26 +370,26 @@ static void test_safearray(void)
|
|||
ok(a != NULL,"SAC(VT_INT32,2,...) failed.\n");
|
||||
|
||||
hres = SafeArrayGetLBound (a, 0, &l);
|
||||
ok (hres == DISP_E_BADINDEX, "SAGLB 0 failed with %lx\n", hres);
|
||||
ok (hres == DISP_E_BADINDEX, "SAGLB 0 failed with %x\n", hres);
|
||||
hres = SafeArrayGetLBound (a, 1, &l);
|
||||
ok (hres == S_OK, "SAGLB 1 failed with %lx\n", hres);
|
||||
ok (l == 1, "SAGLB 1 returned %ld instead of 1\n", l);
|
||||
ok (hres == S_OK, "SAGLB 1 failed with %x\n", hres);
|
||||
ok (l == 1, "SAGLB 1 returned %d instead of 1\n", l);
|
||||
hres = SafeArrayGetLBound (a, 2, &l);
|
||||
ok (hres == S_OK, "SAGLB 2 failed with %lx\n", hres);
|
||||
ok (l == 23, "SAGLB 2 returned %ld instead of 23\n", l);
|
||||
ok (hres == S_OK, "SAGLB 2 failed with %x\n", hres);
|
||||
ok (l == 23, "SAGLB 2 returned %d instead of 23\n", l);
|
||||
hres = SafeArrayGetLBound (a, 3, &l);
|
||||
ok (hres == DISP_E_BADINDEX, "SAGLB 3 failed with %lx\n", hres);
|
||||
ok (hres == DISP_E_BADINDEX, "SAGLB 3 failed with %x\n", hres);
|
||||
|
||||
hres = SafeArrayGetUBound (a, 0, &l);
|
||||
ok (hres == DISP_E_BADINDEX, "SAGUB 0 failed with %lx\n", hres);
|
||||
ok (hres == DISP_E_BADINDEX, "SAGUB 0 failed with %x\n", hres);
|
||||
hres = SafeArrayGetUBound (a, 1, &l);
|
||||
ok (hres == S_OK, "SAGUB 1 failed with %lx\n", hres);
|
||||
ok (l == 42, "SAGUB 1 returned %ld instead of 42\n", l);
|
||||
ok (hres == S_OK, "SAGUB 1 failed with %x\n", hres);
|
||||
ok (l == 42, "SAGUB 1 returned %d instead of 42\n", l);
|
||||
hres = SafeArrayGetUBound (a, 2, &l);
|
||||
ok (hres == S_OK, "SAGUB 2 failed with %lx\n", hres);
|
||||
ok (l == 24, "SAGUB 2 returned %ld instead of 24\n", l);
|
||||
ok (hres == S_OK, "SAGUB 2 failed with %x\n", hres);
|
||||
ok (l == 24, "SAGUB 2 returned %d instead of 24\n", l);
|
||||
hres = SafeArrayGetUBound (a, 3, &l);
|
||||
ok (hres == DISP_E_BADINDEX, "SAGUB 3 failed with %lx\n", hres);
|
||||
ok (hres == DISP_E_BADINDEX, "SAGUB 3 failed with %x\n", hres);
|
||||
|
||||
i = SafeArrayGetDim(a);
|
||||
ok(i == 2, "getdims of 2 din array returned %d\n",i);
|
||||
|
@ -397,51 +397,51 @@ static void test_safearray(void)
|
|||
indices[0] = 0;
|
||||
indices[1] = 23;
|
||||
hres = SafeArrayGetElement(a, indices, &i);
|
||||
ok(DISP_E_BADINDEX == hres,"SAGE failed [0,23], hres 0x%lx\n",hres);
|
||||
ok(DISP_E_BADINDEX == hres,"SAGE failed [0,23], hres 0x%x\n",hres);
|
||||
|
||||
indices[0] = 1;
|
||||
indices[1] = 22;
|
||||
hres = SafeArrayGetElement(a, indices, &i);
|
||||
ok(DISP_E_BADINDEX == hres,"SAGE failed [1,22], hres 0x%lx\n",hres);
|
||||
ok(DISP_E_BADINDEX == hres,"SAGE failed [1,22], hres 0x%x\n",hres);
|
||||
|
||||
indices[0] = 1;
|
||||
indices[1] = 23;
|
||||
hres = SafeArrayGetElement(a, indices, &i);
|
||||
ok(S_OK == hres,"SAGE failed [1,23], hres 0x%lx\n",hres);
|
||||
ok(S_OK == hres,"SAGE failed [1,23], hres 0x%x\n",hres);
|
||||
|
||||
indices[0] = 1;
|
||||
indices[1] = 25;
|
||||
hres = SafeArrayGetElement(a, indices, &i);
|
||||
ok(DISP_E_BADINDEX == hres,"SAGE failed [1,24], hres 0x%lx\n",hres);
|
||||
ok(DISP_E_BADINDEX == hres,"SAGE failed [1,24], hres 0x%x\n",hres);
|
||||
|
||||
indices[0] = 3;
|
||||
indices[1] = 23;
|
||||
hres = SafeArrayGetElement(a, indices, &i);
|
||||
ok(S_OK == hres,"SAGE failed [42,23], hres 0x%lx\n",hres);
|
||||
ok(S_OK == hres,"SAGE failed [42,23], hres 0x%x\n",hres);
|
||||
|
||||
hres = SafeArrayAccessData(a, (void**)&ptr1);
|
||||
ok(S_OK == hres, "SAAD failed with 0x%lx\n", hres);
|
||||
ok(S_OK == hres, "SAAD failed with 0x%x\n", hres);
|
||||
|
||||
indices[0] = 3;
|
||||
indices[1] = 23;
|
||||
hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2);
|
||||
ok(S_OK == hres,"SAPOI failed [1,23], hres 0x%lx\n",hres);
|
||||
ok(S_OK == hres,"SAPOI failed [1,23], hres 0x%x\n",hres);
|
||||
ok(ptr2 - ptr1 == 8,"ptr difference is not 8, but %d (%p vs %p)\n", ptr2-ptr1, ptr2, ptr1);
|
||||
|
||||
indices[0] = 3;
|
||||
indices[1] = 24;
|
||||
hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2);
|
||||
ok(S_OK == hres,"SAPOI failed [5,24], hres 0x%lx\n",hres);
|
||||
ok(S_OK == hres,"SAPOI failed [5,24], hres 0x%x\n",hres);
|
||||
ok(ptr2 - ptr1 == 176,"ptr difference is not 176, but %d (%p vs %p)\n", ptr2-ptr1, ptr2, ptr1);
|
||||
|
||||
indices[0] = 20;
|
||||
indices[1] = 23;
|
||||
hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2);
|
||||
ok(S_OK == hres,"SAPOI failed [20,23], hres 0x%lx\n",hres);
|
||||
ok(S_OK == hres,"SAPOI failed [20,23], hres 0x%x\n",hres);
|
||||
ok(ptr2 - ptr1 == 76,"ptr difference is not 76, but %d (%p vs %p)\n", ptr2-ptr1, ptr2, ptr1);
|
||||
|
||||
hres = SafeArrayUnaccessData(a);
|
||||
ok(S_OK == hres, "SAUAD failed with 0x%lx\n", hres);
|
||||
ok(S_OK == hres, "SAUAD failed with 0x%x\n", hres);
|
||||
|
||||
for (i=0;i<sizeof(vttypes)/sizeof(vttypes[0]);i++) {
|
||||
if ((i == VT_I8 || i == VT_UI8) && HAVE_OLEAUT32_I8)
|
||||
|
@ -456,7 +456,7 @@ static void test_safearray(void)
|
|||
(IS_ANCIENT && (vttypes[i].vt == VT_DECIMAL || vttypes[i].vt == VT_I1 ||
|
||||
vttypes[i].vt == VT_UI2 || vttypes[i].vt == VT_UI4 || vttypes[i].vt == VT_INT ||
|
||||
vttypes[i].vt == VT_UINT)),
|
||||
"SAC(%d,1,[1,0]), %p result %ld, expected %d\n",
|
||||
"SAC(%d,1,[1,0]), %p result %d, expected %d\n",
|
||||
vttypes[i].vt,a,(a?a->cbElements:0),vttypes[i].elemsize);
|
||||
|
||||
if (a)
|
||||
|
@ -477,7 +477,7 @@ static void test_safearray(void)
|
|||
if (pSafeArrayGetVartype)
|
||||
{
|
||||
hres = pSafeArrayGetVartype(a, &vt);
|
||||
ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %x\n", vttypes[i].vt, hres);
|
||||
if (vttypes[i].vt == VT_DISPATCH) {
|
||||
/* Special case. Checked against Windows. */
|
||||
ok(vt == VT_UNKNOWN, "SAGVT of a rray with VT_DISPATCH returned not VT_UNKNOWN, but %d\n", vt);
|
||||
|
@ -487,16 +487,16 @@ static void test_safearray(void)
|
|||
}
|
||||
|
||||
hres = SafeArrayCopy(a, &c);
|
||||
ok(hres == S_OK, "failed to copy safearray of vt %d with hres %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK, "failed to copy safearray of vt %d with hres %x\n", vttypes[i].vt, hres);
|
||||
|
||||
ok(vttypes[i].elemsize == c->cbElements,"copy of SAC(%d,1,[1,0]), result %ld, expected %d\n",vttypes[i].vt,(c?c->cbElements:0),vttypes[i].elemsize
|
||||
ok(vttypes[i].elemsize == c->cbElements,"copy of SAC(%d,1,[1,0]), result %d, expected %d\n",vttypes[i].vt,(c?c->cbElements:0),vttypes[i].elemsize
|
||||
);
|
||||
ok(c->fFeatures == (vttypes[i].expflags | vttypes[i].addflags),"SAC of %d returned feature flags %x, expected %x\n", vttypes[i].vt, c->fFeatures, vttypes[i].expflags|vttypes[i].addflags);
|
||||
ok(SafeArrayGetElemsize(c) == vttypes[i].elemsize,"SAGE for vt %d returned elemsize %d instead of expected %d\n",vttypes[i].vt, SafeArrayGetElemsize(c),vttypes[i].elemsize);
|
||||
|
||||
if (pSafeArrayGetVartype) {
|
||||
hres = pSafeArrayGetVartype(c, &vt);
|
||||
ok(hres == S_OK, "SAGVT of array with vt %d failed with %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres);
|
||||
if (vttypes[i].vt == VT_DISPATCH) {
|
||||
/* Special case. Checked against Windows. */
|
||||
ok(vt == VT_UNKNOWN, "SAGVT of array with VT_DISPATCH returned not VT_UNKNOWN, but %d\n", vt);
|
||||
|
@ -507,14 +507,14 @@ static void test_safearray(void)
|
|||
|
||||
if (pSafeArrayCopyData) {
|
||||
hres = pSafeArrayCopyData(a, c);
|
||||
ok(hres == S_OK, "failed to copy safearray data of vt %d with hres %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK, "failed to copy safearray data of vt %d with hres %x\n", vttypes[i].vt, hres);
|
||||
|
||||
hres = SafeArrayDestroyData(c);
|
||||
ok(hres == S_OK,"SADD of copy of array with vt %d failed with hres %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK,"SADD of copy of array with vt %d failed with hres %x\n", vttypes[i].vt, hres);
|
||||
}
|
||||
|
||||
hres = SafeArrayDestroy(a);
|
||||
ok(hres == S_OK,"SAD of array with vt %d failed with hres %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK,"SAD of array with vt %d failed with hres %x\n", vttypes[i].vt, hres);
|
||||
}
|
||||
|
||||
/* Test conversion of type|VT_ARRAY <-> VT_BSTR */
|
||||
|
@ -528,7 +528,7 @@ static void test_safearray(void)
|
|||
V_VT(&v) = VT_ARRAY|VT_UI1;
|
||||
V_ARRAY(&v) = a;
|
||||
hres = VariantChangeTypeEx(&v, &v, 0, 0, VT_BSTR);
|
||||
ok(hres==S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\n",hres);
|
||||
ok(hres==S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n",hres);
|
||||
ok(V_VT(&v) == VT_BSTR,"CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.v\n",V_VT(&v));
|
||||
ok(V_BSTR(&v)[0] == 0x6548,"First letter are not 'He', but %x\n", V_BSTR(&v)[0]);
|
||||
|
||||
|
@ -537,16 +537,16 @@ static void test_safearray(void)
|
|||
ok(a!=NULL,"SAC should not fail\n");
|
||||
|
||||
hres = SafeArrayAccessData(a, &data);
|
||||
ok(hres == S_OK,"SAAD failed with hres %lx\n",hres);
|
||||
ok(hres == S_OK,"SAAD failed with hres %x\n",hres);
|
||||
|
||||
hres = SafeArrayDestroy(a);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres);
|
||||
|
||||
hres = SafeArrayDestroyData(a);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy data not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy data not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres);
|
||||
|
||||
hres = SafeArrayDestroyDescriptor(a);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy descriptor not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy descriptor not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres);
|
||||
|
||||
hres = SafeArrayUnaccessData(a);
|
||||
ok(hres == S_OK,"SAUD failed after lock/destroy test\n");
|
||||
|
@ -558,7 +558,7 @@ static void test_safearray(void)
|
|||
a = SafeArrayCreate(VT_I4, 1, &bound);
|
||||
ok(a!=NULL,"SAC should not fail\n");
|
||||
hres = SafeArrayDestroyDescriptor(a);
|
||||
ok(hres == S_OK,"SADD with data in array failed with hres %lx\n",hres);
|
||||
ok(hres == S_OK,"SADD with data in array failed with hres %x\n",hres);
|
||||
|
||||
|
||||
/* IID functions */
|
||||
|
@ -568,12 +568,12 @@ static void test_safearray(void)
|
|||
b.cDims = 1;
|
||||
memset(&iid, 0x42, sizeof(IID));
|
||||
hres = pSafeArraySetIID(&b,&iid);
|
||||
ok(hres == E_INVALIDARG,"SafeArraySetIID of non IID capable safearray did not return E_INVALIDARG, but %lx\n",hres);
|
||||
ok(hres == E_INVALIDARG,"SafeArraySetIID of non IID capable safearray did not return E_INVALIDARG, but %x\n",hres);
|
||||
|
||||
hres = SafeArrayAllocDescriptor(1,&a);
|
||||
ok((a->fFeatures & FADF_HAVEIID) == 0,"newly allocated descriptor with SAAD should not have FADF_HAVEIID\n");
|
||||
hres = pSafeArraySetIID(a,&iid);
|
||||
ok(hres == E_INVALIDARG,"SafeArraySetIID of newly allocated descriptor with SAAD should return E_INVALIDARG, but %lx\n",hres);
|
||||
ok(hres == E_INVALIDARG,"SafeArraySetIID of newly allocated descriptor with SAAD should return E_INVALIDARG, but %x\n",hres);
|
||||
}
|
||||
|
||||
if (!pSafeArrayAllocDescriptorEx)
|
||||
|
@ -585,7 +585,7 @@ static void test_safearray(void)
|
|||
ok(a->fFeatures == vttypes[i].expflags,"SAADE(%d) resulted with flags %x, expected %x\n", vttypes[i].vt, a->fFeatures, vttypes[i].expflags);
|
||||
if (a->fFeatures & FADF_HAVEIID) {
|
||||
hres = pSafeArrayGetIID(a, &iid);
|
||||
ok(hres == S_OK,"SAGIID failed for vt %d with hres %lx\n", vttypes[i].vt,hres);
|
||||
ok(hres == S_OK,"SAGIID failed for vt %d with hres %x\n", vttypes[i].vt,hres);
|
||||
switch (vttypes[i].vt) {
|
||||
case VT_UNKNOWN:
|
||||
ok(IsEqualGUID(((GUID*)a)-1,&IID_IUnknown),"guid for VT_UNKNOWN is not IID_IUnknown\n");
|
||||
|
@ -601,17 +601,17 @@ static void test_safearray(void)
|
|||
}
|
||||
} else {
|
||||
hres = pSafeArrayGetIID(a, &iid);
|
||||
ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %lx\n", vttypes[i].vt,hres);
|
||||
ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %x\n", vttypes[i].vt,hres);
|
||||
}
|
||||
if (a->fFeatures & FADF_RECORD) {
|
||||
ok(vttypes[i].vt == VT_RECORD,"FADF_RECORD for non record %d\n",vttypes[i].vt);
|
||||
}
|
||||
if (a->fFeatures & FADF_HAVEVARTYPE) {
|
||||
ok(vttypes[i].vt == ((DWORD*)a)[-1], "FADF_HAVEVARTYPE set, but vt %d mismatch stored %ld\n",vttypes[i].vt,((DWORD*)a)[-1]);
|
||||
ok(vttypes[i].vt == ((DWORD*)a)[-1], "FADF_HAVEVARTYPE set, but vt %d mismatch stored %d\n",vttypes[i].vt,((DWORD*)a)[-1]);
|
||||
}
|
||||
|
||||
hres = pSafeArrayGetVartype(a, &vt);
|
||||
ok(hres == S_OK, "SAGVT of array with vt %d failed with %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres);
|
||||
|
||||
if (vttypes[i].vt == VT_DISPATCH) {
|
||||
/* Special case. Checked against Windows. */
|
||||
|
@ -622,16 +622,16 @@ static void test_safearray(void)
|
|||
|
||||
if (a->fFeatures & FADF_HAVEIID) {
|
||||
hres = pSafeArraySetIID(a, &IID_IStorage); /* random IID */
|
||||
ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres);
|
||||
hres = pSafeArrayGetIID(a, &iid);
|
||||
ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres);
|
||||
ok(IsEqualGUID(&iid, &IID_IStorage),"returned iid is not IID_IStorage\n");
|
||||
} else {
|
||||
hres = pSafeArraySetIID(a, &IID_IStorage); /* random IID */
|
||||
ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres);
|
||||
ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres);
|
||||
}
|
||||
hres = SafeArrayDestroyDescriptor(a);
|
||||
ok(hres == S_OK,"SADD failed with hres %lx\n",hres);
|
||||
ok(hres == S_OK,"SADD failed with hres %x\n",hres);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -643,23 +643,23 @@ static void test_SafeArrayAllocDestroyDescriptor(void)
|
|||
|
||||
/* Failure cases */
|
||||
hres = SafeArrayAllocDescriptor(0, &sa);
|
||||
ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%x\n", hres);
|
||||
|
||||
hres = SafeArrayAllocDescriptor(65536, &sa);
|
||||
ok(IS_ANCIENT || hres == E_INVALIDARG,
|
||||
"65536 dimensions gave hres 0x%lx\n", hres);
|
||||
"65536 dimensions gave hres 0x%x\n", hres);
|
||||
|
||||
#if 0
|
||||
/* Crashes on 95: XP & Wine return E_POINTER */
|
||||
hres=SafeArrayAllocDescriptor(1, NULL);
|
||||
ok(hres == E_POINTER,"NULL parm gave hres 0x%lx\n", hres);
|
||||
ok(hres == E_POINTER,"NULL parm gave hres 0x%x\n", hres);
|
||||
#endif
|
||||
|
||||
/* Test up to the dimension boundary case */
|
||||
for (i = 5; i <= 65535; i += 30)
|
||||
{
|
||||
hres = SafeArrayAllocDescriptor(i, &sa);
|
||||
ok(hres == S_OK, "%d dimensions failed; hres 0x%lx\n", i, hres);
|
||||
ok(hres == S_OK, "%d dimensions failed; hres 0x%x\n", i, hres);
|
||||
|
||||
if (hres == S_OK)
|
||||
{
|
||||
|
@ -667,7 +667,7 @@ static void test_SafeArrayAllocDestroyDescriptor(void)
|
|||
SafeArrayGetDim(sa), i);
|
||||
|
||||
hres = SafeArrayDestroyDescriptor(sa);
|
||||
ok(hres == S_OK, "destroy failed; hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "destroy failed; hres 0x%x\n", hres);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -675,16 +675,16 @@ static void test_SafeArrayAllocDestroyDescriptor(void)
|
|||
return;
|
||||
|
||||
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 0, &sa);
|
||||
ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%x\n", hres);
|
||||
|
||||
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 65536, &sa);
|
||||
ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%x\n", hres);
|
||||
|
||||
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 1, NULL);
|
||||
ok(hres == E_POINTER,"NULL parm gave hres 0x%lx\n", hres);
|
||||
ok(hres == E_POINTER,"NULL parm gave hres 0x%x\n", hres);
|
||||
|
||||
hres = pSafeArrayAllocDescriptorEx(-1, 1, &sa);
|
||||
ok(hres == S_OK, "VT = -1 gave hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "VT = -1 gave hres 0x%x\n", hres);
|
||||
|
||||
sa->rgsabound[0].cElements = 0;
|
||||
sa->rgsabound[0].lLbound = 1;
|
||||
|
@ -692,7 +692,7 @@ static void test_SafeArrayAllocDestroyDescriptor(void)
|
|||
hres = SafeArrayAllocData(sa);
|
||||
todo_wine
|
||||
{
|
||||
ok(hres == S_OK, "SafeArrayAllocData gave hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "SafeArrayAllocData gave hres 0x%x\n", hres);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -750,7 +750,7 @@ static void test_SafeArrayCreateLockDestroy(void)
|
|||
"VARTYPE %d (@%d dimensions) cDims is %d, expected %d\n",
|
||||
vt, dimension, SafeArrayGetDim(sa), dimension);
|
||||
ok(SafeArrayGetElemsize(sa) == dwLen || vt == VT_R8,
|
||||
"VARTYPE %d (@%d dimensions) cbElements is %d, expected %ld\n",
|
||||
"VARTYPE %d (@%d dimensions) cbElements is %d, expected %d\n",
|
||||
vt, dimension, SafeArrayGetElemsize(sa), dwLen);
|
||||
|
||||
if (vt != VT_UNKNOWN && vt != VT_DISPATCH)
|
||||
|
@ -761,7 +761,7 @@ static void test_SafeArrayCreateLockDestroy(void)
|
|||
{
|
||||
hres = pSafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == E_INVALIDARG,
|
||||
"Non interface type allowed SetIID(), hres %lx\n", hres);
|
||||
"Non interface type allowed SetIID(), hres %x\n", hres);
|
||||
}
|
||||
if (vt != VT_RECORD)
|
||||
{
|
||||
|
@ -773,7 +773,7 @@ static void test_SafeArrayCreateLockDestroy(void)
|
|||
{
|
||||
hres = pSafeArrayGetVartype(sa, &aVt);
|
||||
ok(hres == S_OK && aVt == vt,
|
||||
"Non interface type %d: bad type %d, hres %lx\n", vt, aVt, hres);
|
||||
"Non interface type %d: bad type %d, hres %x\n", vt, aVt, hres);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -785,33 +785,33 @@ static void test_SafeArrayCreateLockDestroy(void)
|
|||
{
|
||||
hres = pSafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == S_OK,
|
||||
"Non interface type disallowed SetIID(), hres %lx\n", hres);
|
||||
"Non interface type disallowed SetIID(), hres %x\n", hres);
|
||||
}
|
||||
ok((sa->fFeatures & FADF_HAVEVARTYPE) == 0,
|
||||
"Interface type %d should not have FADF_HAVEVARTYPE\n", vt);
|
||||
}
|
||||
|
||||
hres = SafeArrayLock(sa);
|
||||
ok(hres == S_OK, "Lock VARTYPE %d (@%d dimensions) failed; hres 0x%lx\n",
|
||||
ok(hres == S_OK, "Lock VARTYPE %d (@%d dimensions) failed; hres 0x%x\n",
|
||||
vt, dimension, hres);
|
||||
|
||||
if (hres == S_OK)
|
||||
{
|
||||
hres = SafeArrayDestroy(sa);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"Destroy() got hres %lx\n", hres);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"Destroy() got hres %x\n", hres);
|
||||
|
||||
hres = SafeArrayDestroyData(sa);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"DestroyData() got hres %lx\n", hres);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"DestroyData() got hres %x\n", hres);
|
||||
|
||||
hres = SafeArrayDestroyDescriptor(sa);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"DestroyDescriptor() got hres %lx\n", hres);
|
||||
ok(hres == DISP_E_ARRAYISLOCKED,"DestroyDescriptor() got hres %x\n", hres);
|
||||
|
||||
hres = SafeArrayUnlock(sa);
|
||||
ok(hres == S_OK, "Unlock VARTYPE %d (@%d dims) hres 0x%lx\n",
|
||||
ok(hres == S_OK, "Unlock VARTYPE %d (@%d dims) hres 0x%x\n",
|
||||
vt, dimension, hres);
|
||||
|
||||
hres = SafeArrayDestroyDescriptor(sa);
|
||||
ok(hres == S_OK, "destroy VARTYPE %d (@%d dims) hres 0x%lx\n",
|
||||
ok(hres == S_OK, "destroy VARTYPE %d (@%d dims) hres 0x%x\n",
|
||||
vt, dimension, hres);
|
||||
}
|
||||
}
|
||||
|
@ -850,21 +850,21 @@ static void test_VectorCreateLockDestroy(void)
|
|||
ok(SafeArrayGetDim(sa) == 1, "VARTYPE %d (@%d elements) cDims %d, not 1\n",
|
||||
vt, element, SafeArrayGetDim(sa));
|
||||
ok(SafeArrayGetElemsize(sa) == dwLen,
|
||||
"VARTYPE %d (@%d elements) cbElements is %d, expected %ld\n",
|
||||
"VARTYPE %d (@%d elements) cbElements is %d, expected %d\n",
|
||||
vt, element, SafeArrayGetElemsize(sa), dwLen);
|
||||
|
||||
hres = SafeArrayLock(sa);
|
||||
ok(hres == S_OK, "Lock VARTYPE %d (@%d elements) failed; hres 0x%lx\n",
|
||||
ok(hres == S_OK, "Lock VARTYPE %d (@%d elements) failed; hres 0x%x\n",
|
||||
vt, element, hres);
|
||||
|
||||
if (hres == S_OK)
|
||||
{
|
||||
hres = SafeArrayUnlock(sa);
|
||||
ok(hres == S_OK, "Unlock VARTYPE %d (@%d elements) failed; hres 0x%lx\n",
|
||||
ok(hres == S_OK, "Unlock VARTYPE %d (@%d elements) failed; hres 0x%x\n",
|
||||
vt, element, hres);
|
||||
|
||||
hres = SafeArrayDestroyDescriptor(sa);
|
||||
ok(hres == S_OK, "destroy VARTYPE %d (@%d elements) failed; hres 0x%lx\n",
|
||||
ok(hres == S_OK, "destroy VARTYPE %d (@%d elements) failed; hres 0x%x\n",
|
||||
vt, element, hres);
|
||||
}
|
||||
}
|
||||
|
@ -882,9 +882,9 @@ static void test_LockUnlock(void)
|
|||
|
||||
/* Failure cases */
|
||||
hres = SafeArrayLock(NULL);
|
||||
ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%x\n", hres);
|
||||
hres = SafeArrayUnlock(NULL);
|
||||
ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%x\n", hres);
|
||||
|
||||
for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++)
|
||||
{
|
||||
|
@ -901,19 +901,19 @@ test_LockUnlock_Vector:
|
|||
int count = 0;
|
||||
|
||||
hres = SafeArrayUnlock(sa);
|
||||
ok (hres == E_UNEXPECTED, "Bad %sUnlock gave hres 0x%lx\n",
|
||||
ok (hres == E_UNEXPECTED, "Bad %sUnlock gave hres 0x%x\n",
|
||||
bVector ? "vector " : "\n", hres);
|
||||
|
||||
while ((hres = SafeArrayLock(sa)) == S_OK)
|
||||
count++;
|
||||
ok (count == 65535 && hres == E_UNEXPECTED, "Lock %sfailed at %d; hres 0x%lx\n",
|
||||
ok (count == 65535 && hres == E_UNEXPECTED, "Lock %sfailed at %d; hres 0x%x\n",
|
||||
bVector ? "vector " : "\n", count, hres);
|
||||
|
||||
if (count == 65535 && hres == E_UNEXPECTED)
|
||||
{
|
||||
while ((hres = SafeArrayUnlock(sa)) == S_OK)
|
||||
count--;
|
||||
ok (count == 0 && hres == E_UNEXPECTED, "Unlock %sfailed at %d; hres 0x%lx\n",
|
||||
ok (count == 0 && hres == E_UNEXPECTED, "Unlock %sfailed at %d; hres 0x%x\n",
|
||||
bVector ? "vector " : "\n", count, hres);
|
||||
}
|
||||
|
||||
|
@ -979,25 +979,25 @@ static void test_SafeArrayGetPutElement(void)
|
|||
indices[3] = sab[3].lLbound;
|
||||
|
||||
hres = SafeArrayPutElement(NULL, indices, &value);
|
||||
ok(hres == E_INVALIDARG, "Put NULL array hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Put NULL array hres 0x%x\n", hres);
|
||||
hres = SafeArrayGetElement(NULL, indices, &value);
|
||||
ok(hres == E_INVALIDARG, "Get NULL array hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Get NULL array hres 0x%x\n", hres);
|
||||
|
||||
hres = SafeArrayPutElement(sa, NULL, &value);
|
||||
ok(hres == E_INVALIDARG, "Put NULL indices hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Put NULL indices hres 0x%x\n", hres);
|
||||
hres = SafeArrayGetElement(sa, NULL, &value);
|
||||
ok(hres == E_INVALIDARG, "Get NULL indices hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Get NULL indices hres 0x%x\n", hres);
|
||||
|
||||
#if 0
|
||||
/* This is retarded. Windows checks every case of invalid parameters
|
||||
* except the following, which crashes. We ERR this in Wine.
|
||||
*/
|
||||
hres = SafeArrayPutElement(sa, indices, NULL);
|
||||
ok(hres == E_INVALIDARG, "Put NULL value hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Put NULL value hres 0x%x\n", hres);
|
||||
#endif
|
||||
|
||||
hres = SafeArrayGetElement(sa, indices, NULL);
|
||||
ok(hres == E_INVALIDARG, "Get NULL value hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Get NULL value hres 0x%x\n", hres);
|
||||
|
||||
value = 0;
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ static void test_SafeArrayGetPutElement(void)
|
|||
{
|
||||
indices[3] = sab[3].lLbound + a;
|
||||
hres = SafeArrayPutElement(sa, indices, &value);
|
||||
ok(hres == S_OK, "Failed to put element at (%d,%d,%d,%d) hres 0x%lx\n",
|
||||
ok(hres == S_OK, "Failed to put element at (%d,%d,%d,%d) hres 0x%x\n",
|
||||
x, y, z, a, hres);
|
||||
value++;
|
||||
}
|
||||
|
@ -1041,7 +1041,7 @@ static void test_SafeArrayGetPutElement(void)
|
|||
indices[3] = sab[3].lLbound + a;
|
||||
gotvalue = value / 3;
|
||||
hres = SafeArrayGetElement(sa, indices, &gotvalue);
|
||||
ok(hres == S_OK, "Failed to get element at (%d,%d,%d,%d) hres 0x%lx\n",
|
||||
ok(hres == S_OK, "Failed to get element at (%d,%d,%d,%d) hres 0x%x\n",
|
||||
x, y, z, a, hres);
|
||||
if (hres == S_OK)
|
||||
ok(value == gotvalue, "Got value %d instead of %d at (%d,%d,%d,%d)\n",
|
||||
|
@ -1079,10 +1079,10 @@ static void test_SafeArrayGetPutElement_BSTR(void)
|
|||
value = SysAllocString(szTest);
|
||||
ok (value != NULL, "Expected non-NULL\n");
|
||||
hres = SafeArrayPutElement(sa, indices, value);
|
||||
ok(hres == S_OK, "Failed to put bstr element hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to put bstr element hres 0x%x\n", hres);
|
||||
gotvalue = NULL;
|
||||
hres = SafeArrayGetElement(sa, indices, &gotvalue);
|
||||
ok(hres == S_OK, "Failed to get bstr element at hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to get bstr element at hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
ok(SysStringLen(value) == SysStringLen(gotvalue), "Got len %d instead of %d\n", SysStringLen(gotvalue), SysStringLen(value));
|
||||
SafeArrayDestroy(sa);
|
||||
|
@ -1136,12 +1136,12 @@ static void test_SafeArrayGetPutElement_IUnknown(void)
|
|||
tunk_xref = 1;
|
||||
ok (value != NULL, "Expected non-NULL\n");
|
||||
hres = SafeArrayPutElement(sa, indices, value);
|
||||
ok(hres == S_OK, "Failed to put bstr element hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to put bstr element hres 0x%x\n", hres);
|
||||
ok(tunk_xref == 2,"Failed to increment refcount of iface.\n");
|
||||
gotvalue = NULL;
|
||||
hres = SafeArrayGetElement(sa, indices, &gotvalue);
|
||||
ok(tunk_xref == 3,"Failed to increment refcount of iface.\n");
|
||||
ok(hres == S_OK, "Failed to get bstr element at hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to get bstr element at hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
ok(value == gotvalue, "Got %p instead of %p\n", gotvalue, value);
|
||||
SafeArrayDestroy(sa);
|
||||
|
@ -1172,11 +1172,11 @@ static void test_SafeArrayRedim_IUnknown(void)
|
|||
value = (LPUNKNOWN)&xtunk_iface;
|
||||
tunk_xref = 1;
|
||||
hres = SafeArrayPutElement(sa, indices, value);
|
||||
ok(hres == S_OK, "Failed to put IUnknown element hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to put IUnknown element hres 0x%x\n", hres);
|
||||
ok(tunk_xref == 2,"Failed to increment refcount of iface.\n");
|
||||
sab.cElements = 1;
|
||||
hres = SafeArrayRedim(sa, &sab);
|
||||
ok(hres == S_OK, "Failed to shrink array hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to shrink array hres 0x%x\n", hres);
|
||||
ok(tunk_xref == 1, "Failed to decrement refcount\n");
|
||||
SafeArrayDestroy(sa);
|
||||
}
|
||||
|
@ -1204,19 +1204,19 @@ static void test_SafeArrayGetPutElement_VARIANT(void)
|
|||
V_VT(&value) = VT_I4;
|
||||
V_I4(&value) = 0x42424242;
|
||||
hres = SafeArrayPutElement(sa, indices, &value);
|
||||
ok(hres == S_OK, "Failed to put Variant I4 element hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to put Variant I4 element hres 0x%x\n", hres);
|
||||
|
||||
V_VT(&gotvalue) = 0xdead;
|
||||
hres = SafeArrayGetElement(sa, indices, &gotvalue);
|
||||
ok(hres == S_OK, "Failed to get variant element at hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to get variant element at hres 0x%x\n", hres);
|
||||
|
||||
V_VT(&gotvalue) = VT_EMPTY;
|
||||
hres = SafeArrayGetElement(sa, indices, &gotvalue);
|
||||
ok(hres == S_OK, "Failed to get variant element at hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to get variant element at hres 0x%x\n", hres);
|
||||
if (hres == S_OK) {
|
||||
ok(V_VT(&value) == V_VT(&gotvalue), "Got type 0x%x instead of 0x%x\n", V_VT(&value), V_VT(&gotvalue));
|
||||
if (V_VT(&value) == V_VT(&gotvalue))
|
||||
ok(V_I4(&value) == V_I4(&gotvalue), "Got %ld instead of %d\n", V_I4(&value), V_VT(&gotvalue));
|
||||
ok(V_I4(&value) == V_I4(&gotvalue), "Got %d instead of %d\n", V_I4(&value), V_VT(&gotvalue));
|
||||
}
|
||||
SafeArrayDestroy(sa);
|
||||
}
|
||||
|
@ -1260,7 +1260,7 @@ static void test_SafeArrayCopyData(void)
|
|||
}
|
||||
|
||||
hres = pSafeArrayCopyData(sa, sacopy);
|
||||
ok(hres == S_OK, "copy data failed hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "copy data failed hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n");
|
||||
|
@ -1268,35 +1268,35 @@ static void test_SafeArrayCopyData(void)
|
|||
|
||||
/* Failure cases */
|
||||
hres = pSafeArrayCopyData(NULL, sacopy);
|
||||
ok(hres == E_INVALIDARG, "Null copy source hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Null copy source hres 0x%x\n", hres);
|
||||
hres = pSafeArrayCopyData(sa, NULL);
|
||||
ok(hres == E_INVALIDARG, "Null copy hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Null copy hres 0x%x\n", hres);
|
||||
|
||||
sacopy->rgsabound[0].cElements += 1;
|
||||
hres = pSafeArrayCopyData(sa, sacopy);
|
||||
ok(hres == E_INVALIDARG, "Bigger copy first dimension hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Bigger copy first dimension hres 0x%x\n", hres);
|
||||
|
||||
sacopy->rgsabound[0].cElements -= 2;
|
||||
hres = pSafeArrayCopyData(sa, sacopy);
|
||||
ok(hres == E_INVALIDARG, "Smaller copy first dimension hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Smaller copy first dimension hres 0x%x\n", hres);
|
||||
sacopy->rgsabound[0].cElements += 1;
|
||||
|
||||
sacopy->rgsabound[3].cElements += 1;
|
||||
hres = pSafeArrayCopyData(sa, sacopy);
|
||||
ok(hres == E_INVALIDARG, "Bigger copy last dimension hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Bigger copy last dimension hres 0x%x\n", hres);
|
||||
|
||||
sacopy->rgsabound[3].cElements -= 2;
|
||||
hres = pSafeArrayCopyData(sa, sacopy);
|
||||
ok(hres == E_INVALIDARG, "Smaller copy last dimension hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Smaller copy last dimension hres 0x%x\n", hres);
|
||||
sacopy->rgsabound[3].cElements += 1;
|
||||
|
||||
SafeArrayDestroy(sacopy);
|
||||
sacopy = NULL;
|
||||
hres = pSafeArrayCopyData(sa, sacopy);
|
||||
ok(hres == E_INVALIDARG, "->Null copy hres 0x%lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "->Null copy hres 0x%x\n", hres);
|
||||
|
||||
hres = SafeArrayCopy(sa, &sacopy);
|
||||
ok(hres == S_OK, "copy failed hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "copy failed hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(SafeArrayGetElemsize(sa) == SafeArrayGetElemsize(sacopy),"elemsize wrong\n");
|
||||
|
@ -1338,7 +1338,7 @@ static void test_SafeArrayCreateEx(void)
|
|||
if (pSafeArrayGetIID)
|
||||
{
|
||||
hres = pSafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "CreateEx (ITypeInfo) no IID hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "CreateEx (ITypeInfo) no IID hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(IsEqualGUID(&guid, &IID_ITypeInfo), "CreateEx (ITypeInfo) bad IID\n");
|
||||
|
@ -1347,7 +1347,7 @@ static void test_SafeArrayCreateEx(void)
|
|||
if (pSafeArraySetIID)
|
||||
{
|
||||
hres = pSafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == S_OK, "Failed to set IID, hres = %8lx\n", hres);
|
||||
ok(hres == S_OK, "Failed to set IID, hres = %8x\n", hres);
|
||||
if (hres == S_OK && pSafeArrayGetIID)
|
||||
{
|
||||
hres = pSafeArrayGetIID(sa, &guid);
|
||||
|
@ -1366,7 +1366,7 @@ static void test_SafeArrayCreateEx(void)
|
|||
if (pSafeArrayGetIID)
|
||||
{
|
||||
hres = pSafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "CreateEx (NULL) no IID hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "CreateEx (NULL) no IID hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(IsEqualGUID(&guid, &IID_IDispatch), "CreateEx (NULL) bad IID\n");
|
||||
|
@ -1384,7 +1384,7 @@ static void test_SafeArrayCreateEx(void)
|
|||
if (pSafeArrayGetIID)
|
||||
{
|
||||
hres = pSafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "CreateEx (NULL-Unk) no IID hres 0x%lx\n", hres);
|
||||
ok(hres == S_OK, "CreateEx (NULL-Unk) no IID hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(IsEqualGUID(&guid, &IID_IUnknown), "CreateEx (NULL-Unk) bad IID\n");
|
||||
|
@ -1403,14 +1403,14 @@ static void test_SafeArrayCreateEx(void)
|
|||
fail_GetSize = TRUE;
|
||||
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, (LPVOID)iRec);
|
||||
ok(sa != NULL, "CreateEx (Fail Size) failed\n");
|
||||
ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %ld\n", iRec->ref);
|
||||
ok(iRec->sizeCalled == 1, "GetSize called %ld times\n", iRec->sizeCalled);
|
||||
ok(iRec->clearCalled == 0, "Clear called %ld times\n", iRec->clearCalled);
|
||||
ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref);
|
||||
ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled);
|
||||
ok(iRec->clearCalled == 0, "Clear called %d times\n", iRec->clearCalled);
|
||||
if (sa)
|
||||
{
|
||||
ok(sa->cbElements == RECORD_SIZE_FAIL, "Altered size to %ld\n", sa->cbElements);
|
||||
ok(sa->cbElements == RECORD_SIZE_FAIL, "Altered size to %d\n", sa->cbElements);
|
||||
SafeArrayDestroy(sa);
|
||||
ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %ld times\n", iRec->clearCalled);
|
||||
ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled);
|
||||
}
|
||||
|
||||
/* Test VT_RECORD array */
|
||||
|
@ -1420,9 +1420,9 @@ static void test_SafeArrayCreateEx(void)
|
|||
iRec->clearCalled = 0;
|
||||
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, (LPVOID)iRec);
|
||||
ok(sa != NULL, "CreateEx (Rec) failed\n");
|
||||
ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %ld\n", iRec->ref);
|
||||
ok(iRec->sizeCalled == 1, "GetSize called %ld times\n", iRec->sizeCalled);
|
||||
ok(iRec->clearCalled == 0, "Clear called %ld times\n", iRec->clearCalled);
|
||||
ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref);
|
||||
ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled);
|
||||
ok(iRec->clearCalled == 0, "Clear called %d times\n", iRec->clearCalled);
|
||||
if (sa && pSafeArrayGetRecordInfo)
|
||||
{
|
||||
IRecordInfo* saRec = NULL;
|
||||
|
@ -1430,16 +1430,16 @@ static void test_SafeArrayCreateEx(void)
|
|||
|
||||
ok(hres == S_OK,"GRI failed\n");
|
||||
ok(saRec == (IRecordInfo*)iRec,"Different saRec\n");
|
||||
ok(iRec->ref == START_REF_COUNT + 2, "Didn't AddRef %ld\n", iRec->ref);
|
||||
ok(iRec->ref == START_REF_COUNT + 2, "Didn't AddRef %d\n", iRec->ref);
|
||||
if (iRec->ref == START_REF_COUNT + 2)
|
||||
IRecordInfo_Release(saRec);
|
||||
|
||||
ok(sa->cbElements == RECORD_SIZE,"Elemsize is %ld\n", sa->cbElements);
|
||||
ok(sa->cbElements == RECORD_SIZE,"Elemsize is %d\n", sa->cbElements);
|
||||
|
||||
SafeArrayDestroy(sa);
|
||||
ok(iRec->sizeCalled == 1, "Destroy->GetSize called %ld times\n", iRec->sizeCalled);
|
||||
ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %ld times\n", iRec->clearCalled);
|
||||
ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %ld\n", iRec->ref);
|
||||
ok(iRec->sizeCalled == 1, "Destroy->GetSize called %d times\n", iRec->sizeCalled);
|
||||
ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled);
|
||||
ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %d\n", iRec->ref);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1461,7 +1461,7 @@ static void test_SafeArrayClear(void)
|
|||
V_VT(&v) = VT_ARRAY|VT_UI1;
|
||||
V_ARRAY(&v) = sa;
|
||||
hres = VariantClear(&v);
|
||||
ok(hres == S_OK && V_VT(&v) == VT_EMPTY, "VariantClear: hres 0x%lx, Type %d\n", hres, V_VT(&v));
|
||||
ok(hres == S_OK && V_VT(&v) == VT_EMPTY, "VariantClear: hres 0x%x, Type %d\n", hres, V_VT(&v));
|
||||
ok(V_ARRAY(&v) == sa, "VariantClear: Overwrote value\n");
|
||||
|
||||
sa = SafeArrayCreate(VT_UI1, 1, &sab);
|
||||
|
@ -1472,12 +1472,12 @@ static void test_SafeArrayClear(void)
|
|||
V_VT(&v) = VT_SAFEARRAY;
|
||||
V_ARRAY(&v) = sa;
|
||||
hres = VariantClear(&v);
|
||||
ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%lx\n", hres);
|
||||
ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%x\n", hres);
|
||||
|
||||
V_VT(&v) = VT_SAFEARRAY|VT_BYREF;
|
||||
V_ARRAYREF(&v) = &sa;
|
||||
hres = VariantClear(&v);
|
||||
ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%lx\n", hres);
|
||||
ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%x\n", hres);
|
||||
|
||||
SafeArrayDestroy(sa);
|
||||
}
|
||||
|
@ -1503,7 +1503,7 @@ static void test_SafeArrayCopy(void)
|
|||
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && V_VT(&vDst) == (VT_ARRAY|VT_BYREF|VT_UI1),
|
||||
"VariantCopy: hres 0x%lx, Type %d\n", hres, V_VT(&vDst));
|
||||
"VariantCopy: hres 0x%x, Type %d\n", hres, V_VT(&vDst));
|
||||
ok(V_ARRAYREF(&vDst) == &sa, "VariantClear: Performed deep copy\n");
|
||||
|
||||
V_VT(&vSrc) = (VT_ARRAY|VT_UI1);
|
||||
|
@ -1512,22 +1512,22 @@ static void test_SafeArrayCopy(void)
|
|||
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && V_VT(&vDst) == (VT_ARRAY|VT_UI1),
|
||||
"VariantCopy: hres 0x%lx, Type %d\n", hres, V_VT(&vDst));
|
||||
"VariantCopy: hres 0x%x, Type %d\n", hres, V_VT(&vDst));
|
||||
ok(V_ARRAY(&vDst) != sa, "VariantClear: Performed shallow copy\n");
|
||||
|
||||
SafeArrayDestroy(V_ARRAY(&vSrc));
|
||||
SafeArrayDestroy(V_ARRAY(&vDst));
|
||||
|
||||
hres = SafeArrayAllocDescriptor(1, &sa);
|
||||
ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08lx\n", hres);
|
||||
ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08x\n", hres);
|
||||
|
||||
hres = SafeArrayCopy(sa, &sa2);
|
||||
ok(hres == E_INVALIDARG,
|
||||
"SafeArrayCopy with empty array should have failed with error E_INVALIDARG instead of 0x%08lx\n",
|
||||
"SafeArrayCopy with empty array should have failed with error E_INVALIDARG instead of 0x%08x\n",
|
||||
hres);
|
||||
sa->cbElements = 16;
|
||||
hres = SafeArrayCopy(sa, &sa2);
|
||||
ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08lx\n", hres);
|
||||
ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08x\n", hres);
|
||||
|
||||
SafeArrayDestroy(sa);
|
||||
}
|
||||
|
@ -1555,7 +1555,7 @@ static void test_SafeArrayChangeTypeEx(void)
|
|||
memcpy(sa->pvData, szHello, strlen(szHello)+1);
|
||||
|
||||
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR);
|
||||
ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\n", hres);
|
||||
ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(V_VT(&v2) == VT_BSTR, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.\n",V_VT(&v2));
|
||||
|
@ -1579,12 +1579,12 @@ static void test_SafeArrayChangeTypeEx(void)
|
|||
VariantInit(&v2);
|
||||
|
||||
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR);
|
||||
ok(hres == DISP_E_BADVARTYPE, "CTE VT_VECTOR|VT_UI1 returned %lx\n", hres);
|
||||
ok(hres == DISP_E_BADVARTYPE, "CTE VT_VECTOR|VT_UI1 returned %x\n", hres);
|
||||
|
||||
/* (vector)VT_ARRAY|VT_UI1 -> VT_BSTR (In place) */
|
||||
V_VT(&v) = VT_ARRAY|VT_UI1;
|
||||
hres = VariantChangeTypeEx(&v, &v, 0, 0, VT_BSTR);
|
||||
ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\n", hres);
|
||||
ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(V_VT(&v) == VT_BSTR, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.\n",V_VT(&v));
|
||||
|
@ -1619,7 +1619,7 @@ static void test_SafeArrayChangeTypeEx(void)
|
|||
V_VT(&v) = VT_ARRAY|VT_UI1;
|
||||
V_ARRAY(&v) = sa;
|
||||
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_ARRAY|VT_I1);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_I1 returned %lx\n", hres);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_I1 returned %x\n", hres);
|
||||
|
||||
/* But can change to the same array type */
|
||||
SafeArrayDestroy(sa);
|
||||
|
@ -1630,16 +1630,16 @@ static void test_SafeArrayChangeTypeEx(void)
|
|||
V_VT(&v) = VT_ARRAY|VT_UI1;
|
||||
V_ARRAY(&v) = sa;
|
||||
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_ARRAY|VT_UI1);
|
||||
ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_UI1 returned %lx\n", hres);
|
||||
ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_UI1 returned %x\n", hres);
|
||||
}
|
||||
|
||||
/* NULL/EMPTY */
|
||||
MKARRAY(0,1,VT_UI1);
|
||||
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_NULL);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %lx\n", hres);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres);
|
||||
MKARRAY(0,1,VT_UI1);
|
||||
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_EMPTY);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %lx\n", hres);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1665,7 +1665,7 @@ static void test_SafeArrayDestroyData (void)
|
|||
sa->fFeatures |= FADF_STATIC;
|
||||
temp_pvData = sa->pvData;
|
||||
hres = SafeArrayDestroyData(sa);
|
||||
ok(hres == S_OK, "SADData FADF_STATIC failed, error code %lx.\n",hres);
|
||||
ok(hres == S_OK, "SADData FADF_STATIC failed, error code %x.\n",hres);
|
||||
ok(sa->pvData == temp_pvData, "SADData FADF_STATIC: pvData=%p, expected %p (fFeatures = %d).\n",
|
||||
sa->pvData, temp_pvData, sa->fFeatures);
|
||||
SafeArrayGetElement (sa, index, &value);
|
||||
|
@ -1674,11 +1674,11 @@ static void test_SafeArrayDestroyData (void)
|
|||
/* Clear FADF_STATIC, now really destroy the data. */
|
||||
sa->fFeatures ^= FADF_STATIC;
|
||||
hres = SafeArrayDestroyData(sa);
|
||||
ok(hres == S_OK, "SADData !FADF_STATIC failed, error code %lx.\n",hres);
|
||||
ok(hres == S_OK, "SADData !FADF_STATIC failed, error code %x.\n",hres);
|
||||
ok(sa->pvData == NULL, "SADData !FADF_STATIC: pvData=%p, expected NULL.\n", sa->pvData);
|
||||
|
||||
hres = SafeArrayDestroy(sa);
|
||||
ok(hres == S_OK, "SAD failed, error code %lx.\n", hres);
|
||||
ok(hres == S_OK, "SAD failed, error code %x.\n", hres);
|
||||
}
|
||||
|
||||
START_TEST(safearray)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "oleauto.h"
|
||||
#include "ocidl.h"
|
||||
|
||||
#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08lx\n", hr)
|
||||
#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr)
|
||||
|
||||
static const WCHAR wszStdOle2[] = {'s','t','d','o','l','e','2','.','t','l','b',0};
|
||||
|
||||
|
@ -129,7 +129,7 @@ static void test_TypeComp(void)
|
|||
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszSavePicture);
|
||||
hr = ITypeComp_Bind(pTypeComp, wszSavePicture, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr);
|
||||
todo_wine ok(hr == TYPE_E_TYPEMISMATCH,
|
||||
"ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08lx\n",
|
||||
"ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n",
|
||||
hr);
|
||||
|
||||
ok(desckind == DESCKIND_NONE,
|
||||
|
@ -238,7 +238,7 @@ static void test_TypeComp(void)
|
|||
|
||||
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszClone);
|
||||
hr = ITypeComp_Bind(pTypeComp, wszClone, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr);
|
||||
ok(hr == TYPE_E_TYPEMISMATCH, "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08lx\n", hr);
|
||||
ok(hr == TYPE_E_TYPEMISMATCH, "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n", hr);
|
||||
|
||||
ok(desckind == DESCKIND_NONE,
|
||||
"desckind should have been DESCKIND_NONE instead of %d\n",
|
||||
|
@ -329,10 +329,10 @@ static void test_CreateDispTypeInfo(void)
|
|||
methdata[3].vtReturn = VT_I4;
|
||||
|
||||
hr = CreateDispTypeInfo(&ifdata, LOCALE_NEUTRAL, &pTypeInfo);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
|
||||
hr = ITypeInfo_GetTypeAttr(pTypeInfo, &pTypeAttr);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
|
||||
ok(pTypeAttr->typekind == TKIND_COCLASS, "typekind %0x\n", pTypeAttr->typekind);
|
||||
ok(pTypeAttr->cImplTypes == 1, "cImplTypes %d\n", pTypeAttr->cImplTypes);
|
||||
|
@ -341,19 +341,19 @@ static void test_CreateDispTypeInfo(void)
|
|||
ITypeInfo_ReleaseTypeAttr(pTypeInfo, pTypeAttr);
|
||||
|
||||
hr = ITypeInfo_GetRefTypeOfImplType(pTypeInfo, 0, &href);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
todo_wine {
|
||||
ok(href == 0, "href = 0x%lx\n", href);
|
||||
ok(href == 0, "href = 0x%x\n", href);
|
||||
}
|
||||
hr = ITypeInfo_GetRefTypeInfo(pTypeInfo, href, &pTI2);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
hr = ITypeInfo_GetTypeAttr(pTI2, &pTypeAttr);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTypeAttr->typekind == TKIND_INTERFACE, "typekind %0x\n", pTypeAttr->typekind);
|
||||
ITypeInfo_ReleaseTypeAttr(pTI2, pTypeAttr);
|
||||
|
||||
hr = ITypeInfo_GetFuncDesc(pTI2, 0, &pFuncDesc);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind);
|
||||
ok(pFuncDesc->invkind == methdata[0].wFlags, "invkind %d\n", pFuncDesc->invkind);
|
||||
ok(pFuncDesc->callconv == methdata[0].cc, "callconv %d\n", pFuncDesc->callconv);
|
||||
|
@ -369,7 +369,7 @@ static void test_CreateDispTypeInfo(void)
|
|||
ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
|
||||
|
||||
hr = ITypeInfo_GetFuncDesc(pTI2, 1, &pFuncDesc);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind);
|
||||
ok(pFuncDesc->invkind == methdata[1].wFlags, "invkind %d\n", pFuncDesc->invkind);
|
||||
ok(pFuncDesc->callconv == methdata[1].cc, "callconv %d\n", pFuncDesc->callconv);
|
||||
|
@ -380,7 +380,7 @@ static void test_CreateDispTypeInfo(void)
|
|||
ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
|
||||
|
||||
hr = ITypeInfo_GetFuncDesc(pTI2, 2, &pFuncDesc);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind);
|
||||
ok(pFuncDesc->invkind == methdata[2].wFlags, "invkind %d\n", pFuncDesc->invkind);
|
||||
ok(pFuncDesc->callconv == methdata[2].cc, "callconv %d\n", pFuncDesc->callconv);
|
||||
|
@ -393,7 +393,7 @@ static void test_CreateDispTypeInfo(void)
|
|||
ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
|
||||
|
||||
hr = ITypeInfo_GetFuncDesc(pTI2, 3, &pFuncDesc);
|
||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind);
|
||||
ok(pFuncDesc->invkind == methdata[3].wFlags, "invkind %d\n", pFuncDesc->invkind);
|
||||
ok(pFuncDesc->callconv == methdata[3].cc, "callconv %d\n", pFuncDesc->callconv);
|
||||
|
@ -405,8 +405,8 @@ static void test_CreateDispTypeInfo(void)
|
|||
|
||||
/* test GetIDsOfNames on a coclass to see if it searches its interfaces */
|
||||
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &name, 1, &memid);
|
||||
ok(hr == S_OK, "hr 0x%08lx\n", hr);
|
||||
ok(memid == 0x123, "memid 0x%08lx\n", memid);
|
||||
ok(hr == S_OK, "hr 0x%08x\n", hr);
|
||||
ok(memid == 0x123, "memid 0x%08x\n", memid);
|
||||
|
||||
ITypeInfo_Release(pTI2);
|
||||
ITypeInfo_Release(pTypeInfo);
|
||||
|
@ -443,7 +443,7 @@ static void test_TypeInfo(void)
|
|||
/* test nonexistent method name */
|
||||
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &bogus, 1, &dispidMember);
|
||||
ok(hr == DISP_E_UNKNOWNNAME,
|
||||
"ITypeInfo_GetIDsOfNames should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n",
|
||||
"ITypeInfo_GetIDsOfNames should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n",
|
||||
hr);
|
||||
|
||||
/* test invalid memberid */
|
||||
|
@ -452,23 +452,23 @@ static void test_TypeInfo(void)
|
|||
dispparams.rgdispidNamedArgs = NULL;
|
||||
dispparams.rgvarg = NULL;
|
||||
hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
|
||||
|
||||
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &pwszClone, 1, &dispidMember);
|
||||
ok_ole_success(hr, ITypeInfo_GetIDsOfNames);
|
||||
|
||||
/* test correct memberid, but wrong flags */
|
||||
hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
|
||||
|
||||
/* test NULL dispparams */
|
||||
hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL);
|
||||
ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
|
||||
ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr);
|
||||
|
||||
/* test dispparams->cNamedArgs being bigger than dispparams->cArgs */
|
||||
dispparams.cNamedArgs = 1;
|
||||
hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
|
||||
ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
|
||||
ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr);
|
||||
|
||||
ITypeInfo_Release(pTypeInfo);
|
||||
|
||||
|
@ -481,7 +481,7 @@ static void test_TypeInfo(void)
|
|||
/* test invoking a method with a [restricted] keyword */
|
||||
hr = ITypeInfo_Invoke(pTypeInfo, NULL, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
|
||||
todo_wine {
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
|
||||
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
|
||||
}
|
||||
|
||||
ITypeInfo_Release(pTypeInfo);
|
||||
|
|
|
@ -107,7 +107,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
|
|||
|
||||
if(!lpsa)
|
||||
{
|
||||
ok(*(void **)wiresa == NULL, "wiresa + 0x0 should be NULL instead of 0x%08lx\n", *(DWORD *)wiresa);
|
||||
ok(*(void **)wiresa == NULL, "wiresa + 0x0 should be NULL instead of 0x%08x\n", *(DWORD *)wiresa);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -115,23 +115,23 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
|
|||
sftype = get_union_type(lpsa);
|
||||
cell_count = get_cell_count(lpsa);
|
||||
|
||||
ok(*(DWORD *)wiresa, "wiresa + 0x0 should be non-NULL instead of 0x%08lx\n", *(DWORD *)wiresa); /* win2k: this is lpsa. winxp: this is 0x00000001 */
|
||||
ok(*(DWORD *)wiresa, "wiresa + 0x0 should be non-NULL instead of 0x%08x\n", *(DWORD *)wiresa); /* win2k: this is lpsa. winxp: this is 0x00000001 */
|
||||
wiresa += sizeof(DWORD);
|
||||
ok(*(DWORD *)wiresa == lpsa->cDims, "wiresa + 0x4 should be lpsa->cDims instead of 0x%08lx\n", *(DWORD *)wiresa);
|
||||
ok(*(DWORD *)wiresa == lpsa->cDims, "wiresa + 0x4 should be lpsa->cDims instead of 0x%08x\n", *(DWORD *)wiresa);
|
||||
wiresa += sizeof(DWORD);
|
||||
ok(*(WORD *)wiresa == lpsa->cDims, "wiresa + 0x8 should be lpsa->cDims instead of 0x%04x\n", *(WORD *)wiresa);
|
||||
wiresa += sizeof(WORD);
|
||||
ok(*(WORD *)wiresa == lpsa->fFeatures, "wiresa + 0xc should be lpsa->fFeatures instead of 0x%08x\n", *(WORD *)wiresa);
|
||||
wiresa += sizeof(WORD);
|
||||
ok(*(DWORD *)wiresa == lpsa->cbElements, "wiresa + 0x10 should be lpsa->cbElements instead of 0x%08lx\n", *(DWORD *)wiresa);
|
||||
ok(*(DWORD *)wiresa == lpsa->cbElements, "wiresa + 0x10 should be lpsa->cbElements instead of 0x%08x\n", *(DWORD *)wiresa);
|
||||
wiresa += sizeof(DWORD);
|
||||
ok(*(WORD *)wiresa == lpsa->cLocks, "wiresa + 0x16 should be lpsa->cLocks instead of 0x%04x\n", *(WORD *)wiresa);
|
||||
wiresa += sizeof(WORD);
|
||||
ok(*(WORD *)wiresa == vt, "wiresa + 0x14 should be %04x instead of 0x%04x\n", vt, *(WORD *)wiresa);
|
||||
wiresa += sizeof(WORD);
|
||||
ok(*(DWORD *)wiresa == sftype, "wiresa + 0x18 should be %08lx instead of 0x%08lx\n", (DWORD)sftype, *(DWORD *)wiresa);
|
||||
ok(*(DWORD *)wiresa == sftype, "wiresa + 0x18 should be %08x instead of 0x%08x\n", (DWORD)sftype, *(DWORD *)wiresa);
|
||||
wiresa += sizeof(DWORD);
|
||||
ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x1c should be %lu instead of %lu\n", cell_count, *(DWORD *)wiresa);
|
||||
ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x1c should be %u instead of %u\n", cell_count, *(DWORD *)wiresa);
|
||||
wiresa += sizeof(DWORD);
|
||||
ok(*(DWORD_PTR *)wiresa == (DWORD_PTR)lpsa->pvData, "wiresa + 0x20 should be lpsa->pvData instead of 0x%08lx\n", *(DWORD_PTR *)wiresa);
|
||||
wiresa += sizeof(DWORD_PTR);
|
||||
|
@ -145,7 +145,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
|
|||
ok(!memcmp(wiresa, lpsa->rgsabound, sizeof(lpsa->rgsabound[0]) * lpsa->cDims), "bounds mismatch\n");
|
||||
wiresa += sizeof(lpsa->rgsabound[0]) * lpsa->cDims;
|
||||
|
||||
ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x2c should be %lu instead of %lu\n", cell_count, *(DWORD*)wiresa);
|
||||
ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x2c should be %u instead of %u\n", cell_count, *(DWORD*)wiresa);
|
||||
wiresa += sizeof(DWORD);
|
||||
/* elements are now pointed to by wiresa */
|
||||
}
|
||||
|
@ -235,14 +235,14 @@ static void check_bstr(void *buffer, BSTR b)
|
|||
DWORD *wireb = buffer;
|
||||
DWORD len = SysStringByteLen(b);
|
||||
|
||||
ok(*wireb == (len + 1) / 2, "wv[0] %08lx\n", *wireb);
|
||||
ok(*wireb == (len + 1) / 2, "wv[0] %08x\n", *wireb);
|
||||
wireb++;
|
||||
if(b)
|
||||
ok(*wireb == len, "wv[1] %08lx\n", *wireb);
|
||||
ok(*wireb == len, "wv[1] %08x\n", *wireb);
|
||||
else
|
||||
ok(*wireb == 0xffffffff, "wv[1] %08lx\n", *wireb);
|
||||
ok(*wireb == 0xffffffff, "wv[1] %08x\n", *wireb);
|
||||
wireb++;
|
||||
ok(*wireb == (len + 1) / 2, "wv[2] %08lx\n", *wireb);
|
||||
ok(*wireb == (len + 1) / 2, "wv[2] %08x\n", *wireb);
|
||||
if(len)
|
||||
{
|
||||
wireb++;
|
||||
|
@ -267,7 +267,7 @@ static void test_marshal_BSTR(void)
|
|||
|
||||
b = SysAllocString(str);
|
||||
len = SysStringLen(b);
|
||||
ok(len == 13, "get %ld\n", len);
|
||||
ok(len == 13, "get %d\n", len);
|
||||
|
||||
/* BSTRs are DWORD aligned */
|
||||
size = BSTR_UserSize(&umcb.Flags, 1, &b);
|
||||
|
@ -316,9 +316,9 @@ static void test_marshal_BSTR(void)
|
|||
b = SysAllocStringByteLen("abc", 3);
|
||||
*(((char*)b) + 3) = 'd';
|
||||
len = SysStringLen(b);
|
||||
ok(len == 1, "get %ld\n", len);
|
||||
ok(len == 1, "get %d\n", len);
|
||||
len = SysStringByteLen(b);
|
||||
ok(len == 3, "get %ld\n", len);
|
||||
ok(len == 3, "get %d\n", len);
|
||||
|
||||
size = BSTR_UserSize(&umcb.Flags, 0, &b);
|
||||
ok(size == 16, "size %ld\n", size);
|
||||
|
@ -344,9 +344,9 @@ static void test_marshal_BSTR(void)
|
|||
|
||||
b = SysAllocStringByteLen("", 0);
|
||||
len = SysStringLen(b);
|
||||
ok(len == 0, "get %ld\n", len);
|
||||
ok(len == 0, "get %d\n", len);
|
||||
len = SysStringByteLen(b);
|
||||
ok(len == 0, "get %ld\n", len);
|
||||
ok(len == 0, "get %d\n", len);
|
||||
|
||||
size = BSTR_UserSize(&umcb.Flags, 0, &b);
|
||||
ok(size == 12, "size %ld\n", size);
|
||||
|
@ -363,7 +363,7 @@ static void test_marshal_BSTR(void)
|
|||
ok(next == buffer + size, "got %p expect %p\n", next, buffer + size);
|
||||
ok(b2 != NULL, "NULL LPSAFEARRAY didn't unmarshal\n");
|
||||
len = SysStringByteLen(b2);
|
||||
ok(len == 0, "byte len %ld\n", len);
|
||||
ok(len == 0, "byte len %d\n", len);
|
||||
BSTR_UserFree(&umcb.Flags, &b2);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
|
@ -375,9 +375,9 @@ static void check_variant_header(DWORD *wirev, VARIANT *v, unsigned long size)
|
|||
WORD *wp;
|
||||
DWORD switch_is;
|
||||
|
||||
ok(*wirev == (size + 7) >> 3, "wv[0] %08lx, expected %08lx\n", *wirev, (size + 7) >> 3);
|
||||
ok(*wirev == (size + 7) >> 3, "wv[0] %08x, expected %08lx\n", *wirev, (size + 7) >> 3);
|
||||
wirev++;
|
||||
ok(*wirev == 0, "wv[1] %08lx\n", *wirev);
|
||||
ok(*wirev == 0, "wv[1] %08x\n", *wirev);
|
||||
wirev++;
|
||||
wp = (WORD*)wirev;
|
||||
ok(*wp == V_VT(v), "vt %04x expected %04x\n", *wp, V_VT(v));
|
||||
|
@ -392,7 +392,7 @@ static void check_variant_header(DWORD *wirev, VARIANT *v, unsigned long size)
|
|||
switch_is = V_VT(v);
|
||||
if(switch_is & VT_ARRAY)
|
||||
switch_is &= ~VT_TYPEMASK;
|
||||
ok(*wirev == switch_is, "switch_is %08lx expected %08lx\n", *wirev, switch_is);
|
||||
ok(*wirev == switch_is, "switch_is %08x expected %08x\n", *wirev, switch_is);
|
||||
}
|
||||
|
||||
static void test_marshal_VARIANT(void)
|
||||
|
@ -435,7 +435,7 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*(char*)wirev == V_I1(&v), "wv[5] %08lx\n", *wirev);
|
||||
ok(*(char*)wirev == V_I1(&v), "wv[5] %08x\n", *wirev);
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VariantInit(&v2);
|
||||
|
@ -463,7 +463,7 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*(short*)wirev == V_I2(&v), "wv[5] %08lx\n", *wirev);
|
||||
ok(*(short*)wirev == V_I2(&v), "wv[5] %08x\n", *wirev);
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VariantInit(&v2);
|
||||
|
@ -492,9 +492,9 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == 0x4, "wv[5] %08x\n", *wirev);
|
||||
wirev++;
|
||||
ok(*(short*)wirev == s, "wv[6] %08lx\n", *wirev);
|
||||
ok(*(short*)wirev == s, "wv[6] %08x\n", *wirev);
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VariantInit(&v2);
|
||||
|
@ -522,7 +522,7 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == V_I4(&v), "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == V_I4(&v), "wv[5] %08x\n", *wirev);
|
||||
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
|
@ -530,7 +530,7 @@ static void test_marshal_VARIANT(void)
|
|||
next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2);
|
||||
ok(next == buffer + size, "got %p expect %p\n", next, buffer + size);
|
||||
ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2));
|
||||
ok(V_I4(&v) == V_I4(&v2), "got i4 %lx expect %lx\n", V_I4(&v), V_I4(&v2));
|
||||
ok(V_I4(&v) == V_I4(&v2), "got i4 %x expect %x\n", V_I4(&v), V_I4(&v2));
|
||||
|
||||
VARIANT_UserFree(&umcb.Flags, &v2);
|
||||
}
|
||||
|
@ -552,14 +552,14 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 0x1234, "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == 0x1234, "wv[5] %08x\n", *wirev);
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VariantInit(&v2);
|
||||
next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2);
|
||||
ok(next == buffer + size, "got %p expect %p\n", next, buffer + size);
|
||||
ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2));
|
||||
ok(V_UI4(&v) == V_UI4(&v2), "got ui4 %lx expect %lx\n", V_UI4(&v), V_UI4(&v2));
|
||||
ok(V_UI4(&v) == V_UI4(&v2), "got ui4 %x expect %x\n", V_UI4(&v), V_UI4(&v2));
|
||||
|
||||
VARIANT_UserFree(&umcb.Flags, &v2);
|
||||
}
|
||||
|
@ -582,9 +582,9 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == 0x4, "wv[5] %08x\n", *wirev);
|
||||
wirev++;
|
||||
ok(*wirev == ul, "wv[6] %08lx\n", *wirev);
|
||||
ok(*wirev == ul, "wv[6] %08x\n", *wirev);
|
||||
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
|
@ -592,7 +592,7 @@ static void test_marshal_VARIANT(void)
|
|||
next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2);
|
||||
ok(next == buffer + size, "got %p expect %p\n", next, buffer + size);
|
||||
ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2));
|
||||
ok(*V_UI4REF(&v) == *V_UI4REF(&v2), "got ui4 ref %lx expect ui4 ref %lx\n", *V_UI4REF(&v), *V_UI4REF(&v2));
|
||||
ok(*V_UI4REF(&v) == *V_UI4REF(&v2), "got ui4 ref %x expect ui4 ref %x\n", *V_UI4REF(&v), *V_UI4REF(&v2));
|
||||
|
||||
VARIANT_UserFree(&umcb.Flags, &v2);
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*(float*)wirev == V_R4(&v), "wv[5] %08lx\n", *wirev);
|
||||
ok(*(float*)wirev == V_R4(&v), "wv[5] %08x\n", *wirev);
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VariantInit(&v2);
|
||||
|
@ -642,9 +642,9 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 0xcccccccc, "wv[5] %08lx\n", *wirev); /* pad */
|
||||
ok(*wirev == 0xcccccccc, "wv[5] %08x\n", *wirev); /* pad */
|
||||
wirev++;
|
||||
ok(*(double*)wirev == V_R8(&v), "wv[6] %08lx, wv[7] %08lx\n", *wirev, *(wirev+1));
|
||||
ok(*(double*)wirev == V_R8(&v), "wv[6] %08x, wv[7] %08x\n", *wirev, *(wirev+1));
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VariantInit(&v2);
|
||||
|
@ -673,9 +673,9 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 8, "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == 8, "wv[5] %08x\n", *wirev);
|
||||
wirev++;
|
||||
ok(*(double*)wirev == d, "wv[6] %08lx wv[7] %08lx\n", *wirev, *(wirev+1));
|
||||
ok(*(double*)wirev == d, "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1));
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VariantInit(&v2);
|
||||
|
@ -733,11 +733,11 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 0xcccccccc, "wirev[5] %08lx\n", *wirev); /* pad */
|
||||
ok(*wirev == 0xcccccccc, "wirev[5] %08x\n", *wirev); /* pad */
|
||||
wirev++;
|
||||
dec2 = dec;
|
||||
dec2.wReserved = VT_DECIMAL;
|
||||
ok(!memcmp(wirev, &dec2, sizeof(dec2)), "wirev[6] %08lx wirev[7] %08lx wirev[8] %08lx wirev[9] %08lx\n",
|
||||
ok(!memcmp(wirev, &dec2, sizeof(dec2)), "wirev[6] %08x wirev[7] %08x wirev[8] %08x wirev[9] %08x\n",
|
||||
*wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3));
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
|
@ -766,9 +766,9 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 16, "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == 16, "wv[5] %08x\n", *wirev);
|
||||
wirev++;
|
||||
ok(!memcmp(wirev, &dec, sizeof(dec)), "wirev[6] %08lx wirev[7] %08lx wirev[8] %08lx wirev[9] %08lx\n", *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3));
|
||||
ok(!memcmp(wirev, &dec, sizeof(dec)), "wirev[6] %08x wirev[7] %08x wirev[8] %08x wirev[9] %08x\n", *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3));
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VariantInit(&v2);
|
||||
|
@ -844,7 +844,7 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev, "wv[5] %08lx\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */
|
||||
ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */
|
||||
wirev++;
|
||||
check_bstr(wirev, V_BSTR(&v));
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
|
@ -874,9 +874,9 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == 0x4, "wv[5] %08x\n", *wirev);
|
||||
wirev++;
|
||||
ok(*wirev, "wv[6] %08lx\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */
|
||||
ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */
|
||||
wirev++;
|
||||
check_bstr(wirev, b);
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
|
@ -915,7 +915,7 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev, "wv[5] %08lx\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */
|
||||
ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */
|
||||
wirev++;
|
||||
check_safearray(wirev, lpsa);
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
|
@ -954,9 +954,9 @@ static void test_marshal_VARIANT(void)
|
|||
|
||||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
ok(*wirev == 4, "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == 4, "wv[5] %08x\n", *wirev);
|
||||
wirev++;
|
||||
ok(*wirev, "wv[6] %08lx\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */
|
||||
ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */
|
||||
wirev++;
|
||||
check_safearray(wirev, lpsa);
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
|
@ -1000,17 +1000,17 @@ static void test_marshal_VARIANT(void)
|
|||
check_variant_header(wirev, &v, size);
|
||||
wirev += 5;
|
||||
|
||||
ok(*wirev == 16, "wv[5] %08lx\n", *wirev);
|
||||
ok(*wirev == 16, "wv[5] %08x\n", *wirev);
|
||||
wirev++;
|
||||
ok(*wirev == ('U' | 's' << 8 | 'e' << 16 | 'r' << 24), "wv[6] %08lx\n", *wirev); /* 'User' */
|
||||
ok(*wirev == ('U' | 's' << 8 | 'e' << 16 | 'r' << 24), "wv[6] %08x\n", *wirev); /* 'User' */
|
||||
wirev++;
|
||||
ok(*wirev == 0xcccccccc, "wv[7] %08lx\n", *wirev); /* pad */
|
||||
ok(*wirev == 0xcccccccc, "wv[7] %08x\n", *wirev); /* pad */
|
||||
wirev++;
|
||||
check_variant_header(wirev, &v2, size - 32);
|
||||
wirev += 5;
|
||||
ok(*wirev == 0xcccccccc, "wv[13] %08lx\n", *wirev); /* pad for VT_R8 */
|
||||
ok(*wirev == 0xcccccccc, "wv[13] %08x\n", *wirev); /* pad for VT_R8 */
|
||||
wirev++;
|
||||
ok(*(double*)wirev == V_R8(&v2), "wv[6] %08lx wv[7] %08lx\n", *wirev, *(wirev+1));
|
||||
ok(*(double*)wirev == V_R8(&v2), "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1));
|
||||
if (VARIANT_UNMARSHAL_WORKS)
|
||||
{
|
||||
VARIANT v3;
|
||||
|
|
|
@ -62,7 +62,7 @@ static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 )
|
|||
#define FMT_NUMBER(vt,val) \
|
||||
VariantInit(&v); V_VT(&v) = vt; val(&v) = 1; \
|
||||
hres = pVarFormatNumber(&v,2,0,0,0,0,&str); \
|
||||
ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8lx\n", vt, hres); \
|
||||
ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8x\n", vt, hres); \
|
||||
if (hres == S_OK) \
|
||||
ok(str && strcmpW(str,szResult1) == 0, \
|
||||
"VarFormatNumber (vt %d): string different\n", vt)
|
||||
|
@ -106,7 +106,7 @@ static void test_VarFormatNumber(void)
|
|||
V_BSTR(&v) = SysAllocString(szSrc1);
|
||||
|
||||
hres = pVarFormatNumber(&v,2,0,0,0,0,&str);
|
||||
ok(hres == S_OK, "VarFormatNumber (bstr): returned %8lx\n", hres);
|
||||
ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres);
|
||||
if (hres == S_OK)
|
||||
ok(str && strcmpW(str, szResult1) == 0, "VarFormatNumber (bstr): string different\n");
|
||||
SysFreeString(V_BSTR(&v));
|
||||
|
@ -114,7 +114,7 @@ static void test_VarFormatNumber(void)
|
|||
|
||||
V_BSTR(&v) = SysAllocString(szSrc2);
|
||||
hres = pVarFormatNumber(&v,2,0,-1,0,0,&str);
|
||||
ok(hres == S_OK, "VarFormatNumber (bstr): returned %8lx\n", hres);
|
||||
ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres);
|
||||
if (hres == S_OK)
|
||||
ok(str && strcmpW(str, szResult2) == 0, "VarFormatNumber (-bstr): string different\n");
|
||||
SysFreeString(V_BSTR(&v));
|
||||
|
@ -123,7 +123,7 @@ static void test_VarFormatNumber(void)
|
|||
|
||||
#define SIGNED_VTBITS (VTBIT_I1|VTBIT_I2|VTBIT_I4|VTBIT_I8|VTBIT_R4|VTBIT_R8)
|
||||
|
||||
static const char *szVarFmtFail = "VT %d|0x%04x Format %s: expected 0x%08lx, '%s', got 0x%08lx, '%s'\n";
|
||||
static const char *szVarFmtFail = "VT %d|0x%04x Format %s: expected 0x%08x, '%s', got 0x%08x, '%s'\n";
|
||||
#define VARFMT(vt,v,val,fmt,ret,str) do { \
|
||||
if (out) SysFreeString(out); out = NULL; \
|
||||
V_VT(&in) = (vt); v(&in) = val; \
|
||||
|
@ -374,14 +374,14 @@ static void test_VarFormat(void)
|
|||
/* VT_NULL */
|
||||
V_VT(&in) = VT_NULL;
|
||||
hres = pVarFormat(&in,NULL,fd,fw,0,&out);
|
||||
ok(hres == S_OK, "VarFormat failed with 0x%08lx\n", hres);
|
||||
ok(hres == S_OK, "VarFormat failed with 0x%08x\n", hres);
|
||||
ok(out == NULL, "expected NULL formatted string\n");
|
||||
|
||||
/* Invalid args */
|
||||
hres = pVarFormat(&in,NULL,fd,fw,flags,NULL);
|
||||
ok(hres == E_INVALIDARG, "Null out: expected E_INVALIDARG, got 0x%08lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Null out: expected E_INVALIDARG, got 0x%08x\n", hres);
|
||||
hres = pVarFormat(NULL,NULL,fd,fw,flags,&out);
|
||||
ok(hres == E_INVALIDARG, "Null in: expected E_INVALIDARG, got 0x%08lx\n", hres);
|
||||
ok(hres == E_INVALIDARG, "Null in: expected E_INVALIDARG, got 0x%08x\n", hres);
|
||||
fd = -1;
|
||||
VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"",E_INVALIDARG,"");
|
||||
fd = 8;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -81,7 +81,7 @@ int val_empty, val_null;
|
|||
|
||||
#define _EXPECTRES(res, x, fs) \
|
||||
ok((hres == S_OK && out == (CONV_TYPE)(x)) || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected " #x ", got " fs "; hres=0x%08lx\n", out, hres)
|
||||
"expected " #x ", got " fs "; hres=0x%08x\n", out, hres)
|
||||
#define EXPECT(x) EXPECTRES(S_OK, (x))
|
||||
#define EXPECT_OVERFLOW EXPECTRES(DISP_E_OVERFLOW, DISP_E_OVERFLOW)
|
||||
#define EXPECT_MISMATCH EXPECTRES(DISP_E_TYPEMISMATCH,DISP_E_TYPEMISMATCH)
|
||||
|
@ -91,7 +91,7 @@ int val_empty, val_null;
|
|||
#define EXPECT_GT EXPECTRES(VARCMP_GT, VARCMP_GT)
|
||||
#define EXPECT_EQ EXPECTRES(VARCMP_EQ, VARCMP_EQ)
|
||||
#define EXPECT_DBL(x) \
|
||||
ok(hres == S_OK && fabs(out-(x))<=1e-14*(x), "expected %16.16g, got %16.16g; hres=0x%08lx\n", (x), out, hres)
|
||||
ok(hres == S_OK && fabs(out-(x))<=1e-14*(x), "expected %16.16g, got %16.16g; hres=0x%08x\n", (x), out, hres)
|
||||
|
||||
#define CONVERT(func, val) in = val; hres = p##func(in, &out)
|
||||
#define CONVERTRANGE(func,start,end) for (i = start; i < end; i+=1) { CONVERT(func, i); EXPECT(i); };
|
||||
|
@ -138,25 +138,25 @@ int val_empty, val_null;
|
|||
V_VT(&vSrc) = vt; srcval = in; \
|
||||
hres = VariantCopy(&vDst, &vSrc); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == vt && dstval == in, \
|
||||
"copy hres 0x%lX, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \
|
||||
"copy hres 0x%X, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \
|
||||
V_VT(&vSrc) = vt|VT_BYREF; srcref = ∈ \
|
||||
hres = VariantCopy(&vDst, &vSrc); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == (vt|VT_BYREF) && dstref == &in, \
|
||||
"ref hres 0x%lX, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, dstref); \
|
||||
"ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, dstref); \
|
||||
hres = VariantCopyInd(&vDst, &vSrc); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == vt && dstval == in, \
|
||||
"ind hres 0x%lX, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \
|
||||
"ind hres 0x%X, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \
|
||||
} while(0)
|
||||
|
||||
#define CHANGETYPEEX(typ) hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, typ)
|
||||
|
||||
#define TYPETEST(typ,res,fs) CHANGETYPEEX(typ); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == typ && (CONV_TYPE)res == in, \
|
||||
"hres=0x%lX, type=%d (should be %d(" #typ ")), value=" fs " (should be " fs ")\n", \
|
||||
"hres=0x%X, type=%d (should be %d(" #typ ")), value=" fs " (should be " fs ")\n", \
|
||||
hres, V_VT(&vDst), typ, (CONV_TYPE)res, in);
|
||||
#define TYPETESTI8(typ,res) CHANGETYPEEX(typ); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == typ && (CONV_TYPE)res == in, \
|
||||
"hres=0x%lX, type=%d (should be %d(" #typ ")), value=%d (should be 1)\n", \
|
||||
"hres=0x%X, type=%d (should be %d(" #typ ")), value=%d (should be 1)\n", \
|
||||
hres, V_VT(&vDst), typ, (int)res);
|
||||
#define BADVAR(typ) CHANGETYPEEX(typ); out = (CONV_TYPE)hres; EXPECT_BADVAR
|
||||
#define MISMATCH(typ) CHANGETYPEEX(typ); out = (CONV_TYPE)hres; EXPECT_MISMATCH
|
||||
|
@ -220,13 +220,13 @@ int val_empty, val_null;
|
|||
hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_BOOL); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_BOOL && \
|
||||
(V_BOOL(&vDst) == VARIANT_TRUE || (V_VT(&vSrc) == VT_BOOL && V_BOOL(&vDst) == 1)), \
|
||||
"->VT_BOOL hres=0x%lX, type=%d (should be VT_BOOL), value %d (should be VARIANT_TRUE)\n", \
|
||||
"->VT_BOOL hres=0x%X, type=%d (should be VT_BOOL), value %d (should be VARIANT_TRUE)\n", \
|
||||
hres, V_VT(&vDst), V_BOOL(&vDst)); \
|
||||
if (HAVE_OLEAUT32_CY) \
|
||||
{ \
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_CY); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == CY_MULTIPLIER, \
|
||||
"->VT_CY hres=0x%lX, type=%d (should be VT_CY), value (%08lx,%08lx) (should be CY_MULTIPLIER)\n", \
|
||||
"->VT_CY hres=0x%X, type=%d (should be VT_CY), value (%08x,%08x) (should be CY_MULTIPLIER)\n", \
|
||||
hres, V_VT(&vDst), S(V_CY(&vDst)).Hi, S(V_CY(&vDst)).Lo); \
|
||||
} \
|
||||
if (V_VT(&vSrc) != VT_DATE) \
|
||||
|
@ -234,7 +234,7 @@ int val_empty, val_null;
|
|||
hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_BSTR); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && \
|
||||
V_BSTR(&vDst) && V_BSTR(&vDst)[0] == '1' && V_BSTR(&vDst)[1] == '\0', \
|
||||
"->VT_BSTR hres=0x%lX, type=%d (should be VT_BSTR), *bstr='%c'\n", \
|
||||
"->VT_BSTR hres=0x%X, type=%d (should be VT_BSTR), *bstr='%c'\n", \
|
||||
hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?'); \
|
||||
} \
|
||||
if (HAVE_OLEAUT32_DECIMAL) \
|
||||
|
@ -243,14 +243,14 @@ int val_empty, val_null;
|
|||
ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && \
|
||||
S(U(V_DECIMAL(&vDst))).sign == 0 && S(U(V_DECIMAL(&vDst))).scale == 0 && \
|
||||
V_DECIMAL(&vDst).Hi32 == 0 && U1(V_DECIMAL(&vDst)).Lo64 == (ULONGLONG)in, \
|
||||
"->VT_DECIMAL hres=0x%lX, type=%d (should be VT_DECIMAL), sign=%d, scale=%d, hi=%lu, lo=(%8lx %8lx),\n", \
|
||||
"->VT_DECIMAL hres=0x%X, type=%d (should be VT_DECIMAL), sign=%d, scale=%d, hi=%u, lo=(%8x %8x),\n", \
|
||||
hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign, S(U(V_DECIMAL(&vDst))).scale, \
|
||||
V_DECIMAL(&vDst).Hi32, S1(U1(V_DECIMAL(&vDst))).Mid32, S1(U1(V_DECIMAL(&vDst))).Lo32); \
|
||||
} \
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_EMPTY); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_EMPTY, "->VT_EMPTY hres=0x%lX, type=%d (should be VT_EMPTY)\n", hres, V_VT(&vDst)); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_EMPTY, "->VT_EMPTY hres=0x%X, type=%d (should be VT_EMPTY)\n", hres, V_VT(&vDst)); \
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_NULL); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_NULL, "->VT_NULL hres=0x%lX, type=%d (should be VT_NULL)\n", hres, V_VT(&vDst)); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_NULL, "->VT_NULL hres=0x%X, type=%d (should be VT_NULL)\n", hres, V_VT(&vDst)); \
|
||||
MISMATCH(VT_DISPATCH); \
|
||||
MISMATCH(VT_ERROR); \
|
||||
MISMATCH(VT_UNKNOWN); \
|
||||
|
@ -1107,18 +1107,18 @@ static void test_VarUI1FromDisp(void)
|
|||
dispatch.bFailInvoke = FALSE;
|
||||
|
||||
hres = VarUI1FromDisp((IDispatch*)&dispatch, in, &out);
|
||||
trace("0x%08lx\n", hres);
|
||||
trace("0x%08x\n", hres);
|
||||
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, in, 0, VT_UI1);
|
||||
trace("0x%08lx\n", hres);
|
||||
trace("0x%08x\n", hres);
|
||||
|
||||
dispatch.bFailInvoke = TRUE;
|
||||
|
||||
hres = VarUI1FromDisp((IDispatch*)&dispatch, in, &out);
|
||||
trace("0x%08lx\n", hres);
|
||||
trace("0x%08x\n", hres);
|
||||
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, in, 0, VT_UI1);
|
||||
trace("0x%08lx\n", hres);
|
||||
trace("0x%08x\n", hres);
|
||||
}
|
||||
|
||||
static void test_VarUI1Copy(void)
|
||||
|
@ -1636,7 +1636,7 @@ static void test_VarUI2ChangeTypeEx(void)
|
|||
#undef CONV_TYPE
|
||||
#define CONV_TYPE LONG
|
||||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) _EXPECTRES(res, x, "%ld")
|
||||
#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d")
|
||||
|
||||
|
||||
static void test_VarI4FromI1(void)
|
||||
|
@ -1866,7 +1866,7 @@ static void test_VarI4FromStr(void)
|
|||
|
||||
static void test_VarI4Copy(void)
|
||||
{
|
||||
COPYTEST(1l, VT_I4, V_I4(&vSrc), V_I4(&vDst), V_I4REF(&vSrc), V_I4REF(&vDst), "%ld");
|
||||
COPYTEST(1, VT_I4, V_I4(&vSrc), V_I4(&vDst), V_I4REF(&vSrc), V_I4REF(&vDst), "%d");
|
||||
}
|
||||
|
||||
static void test_VarI4ChangeTypeEx(void)
|
||||
|
@ -1876,15 +1876,15 @@ static void test_VarI4ChangeTypeEx(void)
|
|||
|
||||
in = 1;
|
||||
|
||||
INITIAL_TYPETEST(VT_I4, V_I4, "%ld");
|
||||
INITIAL_TYPETEST(VT_I4, V_I4, "%d");
|
||||
COMMON_TYPETEST;
|
||||
NEGATIVE_TYPETEST(VT_I4, V_I4, "%ld", VT_UI4, V_UI4);
|
||||
NEGATIVE_TYPETEST(VT_I4, V_I4, "%d", VT_UI4, V_UI4);
|
||||
}
|
||||
|
||||
#undef CONV_TYPE
|
||||
#define CONV_TYPE ULONG
|
||||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) _EXPECTRES(res, x, "%lu")
|
||||
#define EXPECTRES(res, x) _EXPECTRES(res, x, "%u")
|
||||
|
||||
static void test_VarUI4FromI1(void)
|
||||
{
|
||||
|
@ -2099,7 +2099,7 @@ static void test_VarUI4Copy(void)
|
|||
{
|
||||
if (!IS_ANCIENT)
|
||||
{
|
||||
COPYTEST(1ul, VT_UI4, V_UI4(&vSrc), V_UI4(&vDst), V_UI4REF(&vSrc), V_UI4REF(&vDst), "%lu");
|
||||
COPYTEST(1u, VT_UI4, V_UI4(&vSrc), V_UI4(&vDst), V_UI4REF(&vSrc), V_UI4REF(&vDst), "%u");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2112,9 +2112,9 @@ static void test_VarUI4ChangeTypeEx(void)
|
|||
|
||||
if (!IS_ANCIENT)
|
||||
{
|
||||
INITIAL_TYPETEST(VT_UI4, V_UI4, "%lu");
|
||||
INITIAL_TYPETEST(VT_UI4, V_UI4, "%u");
|
||||
COMMON_TYPETEST;
|
||||
NEGATIVE_TYPETEST(VT_UI4, V_UI4, "%lu", VT_I4, V_I4);
|
||||
NEGATIVE_TYPETEST(VT_UI4, V_UI4, "%u", VT_I4, V_I4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2127,17 +2127,17 @@ static void test_VarUI4ChangeTypeEx(void)
|
|||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) \
|
||||
ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected hres " #x ", got hres=0x%08lx\n", hres)
|
||||
"expected hres " #x ", got hres=0x%08x\n", hres)
|
||||
|
||||
#define EXPECTI8(x) \
|
||||
ok((hres == S_OK && out == (CONV_TYPE)(x)), \
|
||||
"expected " #x "(%lu,%lu), got (%lu,%lu); hres=0x%08lx\n", \
|
||||
"expected " #x "(%u,%u), got (%u,%u); hres=0x%08x\n", \
|
||||
(ULONG)((LONG64)(x) >> 32), (ULONG)((x) & 0xffffffff), \
|
||||
(ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres)
|
||||
|
||||
#define EXPECTI864(x,y) \
|
||||
ok(hres == S_OK && (out >> 32) == (CONV_TYPE)(x) && (out & 0xffffffff) == (CONV_TYPE)(y), \
|
||||
"expected " #x "(%lu,%lu), got (%lu,%lu); hres=0x%08lx\n", \
|
||||
"expected " #x "(%u,%u), got (%u,%u); hres=0x%08x\n", \
|
||||
(ULONG)(x), (ULONG)(y), \
|
||||
(ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres)
|
||||
|
||||
|
@ -2364,16 +2364,16 @@ static void test_VarI8Copy(void)
|
|||
V_I8(&vSrc) = in;
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_I8 && V_I8(&vDst) == in,
|
||||
"copy hres 0x%lX, type %d, value (%x%08x) %x%08x\n",
|
||||
"copy hres 0x%X, type %d, value (%x%08x) %x%08x\n",
|
||||
hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_I8(&vDst) >> 32), (UINT)V_I8(&vDst) );
|
||||
V_VT(&vSrc) = VT_I8|VT_BYREF;
|
||||
V_I8REF(&vSrc) = ∈
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && V_VT(&vDst) == (VT_I8|VT_BYREF) && V_I8REF(&vDst) == &in,
|
||||
"ref hres 0x%lX, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_I8REF(&vDst));
|
||||
"ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_I8REF(&vDst));
|
||||
hres = VariantCopyInd(&vDst, &vSrc);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_I8 && V_I8(&vDst) == in,
|
||||
"copy hres 0x%lX, type %d, value (%x%08x) %x%08x\n",
|
||||
"copy hres 0x%X, type %d, value (%x%08x) %x%08x\n",
|
||||
hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_I8(&vDst) >> 32), (UINT)V_I8(&vDst) );
|
||||
}
|
||||
|
||||
|
@ -2618,16 +2618,16 @@ static void test_VarUI8Copy(void)
|
|||
V_UI8(&vSrc) = in;
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_UI8 && V_UI8(&vDst) == in,
|
||||
"copy hres 0x%lX, type %d, value (%x%08x) %x%08x\n",
|
||||
"copy hres 0x%X, type %d, value (%x%08x) %x%08x\n",
|
||||
hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_UI8(&vDst) >> 32), (UINT)V_UI8(&vDst) );
|
||||
V_VT(&vSrc) = VT_UI8|VT_BYREF;
|
||||
V_UI8REF(&vSrc) = ∈
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && V_VT(&vDst) == (VT_UI8|VT_BYREF) && V_UI8REF(&vDst) == &in,
|
||||
"ref hres 0x%lX, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_UI8REF(&vDst));
|
||||
"ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_UI8REF(&vDst));
|
||||
hres = VariantCopyInd(&vDst, &vSrc);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_UI8 && V_UI8(&vDst) == in,
|
||||
"copy hres 0x%lX, type %d, value (%x%08x) %x%08x\n",
|
||||
"copy hres 0x%X, type %d, value (%x%08x) %x%08x\n",
|
||||
hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_UI8(&vDst) >> 32), (UINT)V_UI8(&vDst) );
|
||||
}
|
||||
|
||||
|
@ -3470,7 +3470,7 @@ static void test_VarDateChangeTypeEx(void)
|
|||
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, VARIANT_NOUSEROVERRIDE, VT_BSTR);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && V_BSTR(&vDst) &&
|
||||
(!lstrcmpW(V_BSTR(&vDst), sz25570) || !lstrcmpW(V_BSTR(&vDst), sz25570_2)),
|
||||
"hres=0x%lX, type=%d (should be VT_BSTR), *bstr=%s\n",
|
||||
"hres=0x%X, type=%d (should be VT_BSTR), *bstr=%s\n",
|
||||
hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?");
|
||||
|
||||
lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
|
||||
|
@ -3478,7 +3478,7 @@ static void test_VarDateChangeTypeEx(void)
|
|||
{
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, VARIANT_NOUSEROVERRIDE|VARIANT_USE_NLS, VT_BSTR);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && V_BSTR(&vDst) && !lstrcmpW(V_BSTR(&vDst), sz25570Nls),
|
||||
"hres=0x%lX, type=%d (should be VT_BSTR), *bstr=%s\n",
|
||||
"hres=0x%X, type=%d (should be VT_BSTR), *bstr=%s\n",
|
||||
hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?");
|
||||
}
|
||||
}
|
||||
|
@ -3492,15 +3492,15 @@ static void test_VarDateChangeTypeEx(void)
|
|||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) \
|
||||
ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected hres " #x ", got hres=0x%08lx\n", hres)
|
||||
"expected hres " #x ", got hres=0x%08x\n", hres)
|
||||
|
||||
#define EXPECTCY(x) \
|
||||
ok((hres == S_OK && out.int64 == (LONGLONG)(x*CY_MULTIPLIER)), \
|
||||
"expected " #x "*CY_MULTIPLIER, got (%8lx %8lx); hres=0x%08lx\n", S(out).Hi, S(out).Lo, hres)
|
||||
"expected " #x "*CY_MULTIPLIER, got (%8x %8x); hres=0x%08x\n", S(out).Hi, S(out).Lo, hres)
|
||||
|
||||
#define EXPECTCY64(x,y) \
|
||||
ok(hres == S_OK && S(out).Hi == (LONG)x && S(out).Lo == y, \
|
||||
"expected " #x #y "(%lu,%lu), got (%lu,%lu); hres=0x%08lx\n", \
|
||||
"expected " #x #y "(%u,%u), got (%u,%u); hres=0x%08x\n", \
|
||||
(ULONG)(x), (ULONG)(y), S(out).Hi, S(out).Lo, hres)
|
||||
|
||||
static void test_VarCyFromI1(void)
|
||||
|
@ -3991,12 +3991,12 @@ static void test_VarCyInt(void)
|
|||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) \
|
||||
ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected hres " #x ", got hres=0x%08lx\n", hres)
|
||||
"expected hres " #x ", got hres=0x%08x\n", hres)
|
||||
|
||||
#define EXPECTDEC(scl, sgn, hi, lo) ok(hres == S_OK && \
|
||||
S(U(out)).scale == (BYTE)(scl) && S(U(out)).sign == (BYTE)(sgn) && \
|
||||
out.Hi32 == (ULONG)(hi) && U1(out).Lo64 == (ULONG64)(lo), \
|
||||
"expected (%d,%d,%d,(%lx %lx)), got (%d,%d,%ld,(%lx %lx)) hres 0x%08lx\n", \
|
||||
"expected (%d,%d,%d,(%x %x)), got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \
|
||||
scl, sgn, hi, (LONG)((LONG64)(lo) >> 32), (LONG)((lo) & 0xffffffff), S(U(out)).scale, \
|
||||
S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres)
|
||||
|
||||
|
@ -4004,7 +4004,7 @@ static void test_VarCyInt(void)
|
|||
S(U(out)).scale == (BYTE)(scl) && S(U(out)).sign == (BYTE)(sgn) && \
|
||||
out.Hi32 == (ULONG)(hi) && S1(U1(out)).Mid32 == (ULONG)(mid) && \
|
||||
S1(U1(out)).Lo32 == (ULONG)(lo), \
|
||||
"expected (%d,%d,%d,(%lx %lx)), got (%d,%d,%ld,(%lx %lx)) hres 0x%08lx\n", \
|
||||
"expected (%d,%d,%d,(%x %x)), got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \
|
||||
scl, sgn, hi, (LONG)(mid), (LONG)(lo), S(U(out)).scale, \
|
||||
S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres)
|
||||
|
||||
|
@ -4279,7 +4279,7 @@ static void test_VarDecAdd(void)
|
|||
SETDEC64(l,0,0,0xffffffff,0xffffffff,0xffffffff);SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd);
|
||||
EXPECTDEC64(0,0,0xffffffff,0xffffffff,0xfffffffe);
|
||||
SETDEC64(l,0,0,0xffffffff,0xffffffff,0xffffffff);SETDEC(r,0,0,0,1); MATH2(VarDecAdd);
|
||||
ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n",
|
||||
ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n",
|
||||
S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
|
||||
|
||||
/* Promotes to the highest scale, so here the results are in the scale of 2 */
|
||||
|
@ -4331,7 +4331,7 @@ static void test_VarDecMul(void)
|
|||
SETDEC64(l,0,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC(r,0,0,0,2000000000); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00);
|
||||
/* actual overflow - right operand is 10 times the previous value */
|
||||
SETDEC64(l,0,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC64(r,0,0,0,4,0xA817C800); MATH2(VarDecMul);
|
||||
ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n",
|
||||
ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n",
|
||||
S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
|
||||
/* here, native oleaut32 has an opportunity to avert the overflow, by reducing the scale of the result */
|
||||
SETDEC64(l,1,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC64(r,0,0,0,4,0xA817C800); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00);
|
||||
|
@ -4340,7 +4340,7 @@ static void test_VarDecMul(void)
|
|||
SETDEC64(l,0,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC(r,0,0,0,1000000000); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00);
|
||||
/* actual overflow - right operand is 10 times the previous value */
|
||||
SETDEC64(l,0,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC64(r,0,0,0,2,0x540BE400); MATH2(VarDecMul);
|
||||
ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n",
|
||||
ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n",
|
||||
S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
|
||||
/* here, native oleaut32 has an opportunity to avert the overflow, by reducing the scale of the result */
|
||||
SETDEC64(l,1,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC64(r,0,0,0,2,0x540BE400); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00);
|
||||
|
@ -4389,10 +4389,10 @@ static void test_VarDecDiv(void)
|
|||
|
||||
/* oddballs */
|
||||
SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecDiv);/* indeterminate */
|
||||
ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n",
|
||||
ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n",
|
||||
S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
|
||||
SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,0); MATH2(VarDecDiv);/* division by zero */
|
||||
ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n",
|
||||
ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n",
|
||||
S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
|
||||
|
||||
}
|
||||
|
@ -4416,7 +4416,7 @@ static void test_VarDecCmp(void)
|
|||
#undef _EXPECTRES
|
||||
#define _EXPECTRES(res, x, fs) \
|
||||
ok((hres == S_OK && out == (CONV_TYPE)(x)) || ((HRESULT)res != S_OK && hres == (HRESULT)res), \
|
||||
"expected " #x ", got " fs "; hres=0x%08lx\n", out, hres)
|
||||
"expected " #x ", got " fs "; hres=0x%08x\n", out, hres)
|
||||
#undef EXPECTRES
|
||||
#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d")
|
||||
#undef CONVERTRANGE
|
||||
|
@ -4664,7 +4664,7 @@ static void test_VarBoolCopy(void)
|
|||
#define BOOL_STR(flags, str) hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, flags, VT_BSTR); \
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && \
|
||||
V_BSTR(&vDst) && !memcmp(V_BSTR(&vDst), str, sizeof(str)), \
|
||||
"hres=0x%lX, type=%d (should be VT_BSTR), *bstr='%c'\n", \
|
||||
"hres=0x%X, type=%d (should be VT_BSTR), *bstr='%c'\n", \
|
||||
hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?')
|
||||
|
||||
static void test_VarBoolChangeTypeEx(void)
|
||||
|
@ -4730,7 +4730,7 @@ static void test_VarBstrFromR4(void)
|
|||
lcid_spanish = MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH), SORT_DEFAULT);
|
||||
f = 654322.23456f;
|
||||
hres = pVarBstrFromR4(f, lcid, 0, &bstr);
|
||||
ok(hres == S_OK, "got hres 0x%08lx\n", hres);
|
||||
ok(hres == S_OK, "got hres 0x%08x\n", hres);
|
||||
if (bstr)
|
||||
{
|
||||
todo_wine {
|
||||
|
@ -4744,7 +4744,7 @@ static void test_VarBstrFromR4(void)
|
|||
|
||||
f = -1e-400; /* deliberately cause underflow */
|
||||
hres = pVarBstrFromR4(f, lcid, 0, &bstr);
|
||||
ok(hres == S_OK, "got hres 0x%08lx\n", hres);
|
||||
ok(hres == S_OK, "got hres 0x%08x\n", hres);
|
||||
if (bstr)
|
||||
{
|
||||
ok(memcmp(bstr, szZero, sizeof(szZero)) == 0, "negative zero (got %s)\n", wtoascii(bstr));
|
||||
|
@ -4753,14 +4753,14 @@ static void test_VarBstrFromR4(void)
|
|||
/* The following tests that lcid is used for decimal separator even without LOCALE_USE_NLS */
|
||||
f = 0.5;
|
||||
hres = pVarBstrFromR4(f, lcid, 0, &bstr);
|
||||
ok(hres == S_OK, "got hres 0x%08lx\n", hres);
|
||||
ok(hres == S_OK, "got hres 0x%08x\n", hres);
|
||||
if (bstr)
|
||||
{
|
||||
ok(memcmp(bstr, szOneHalf_English, sizeof(szOneHalf_English)) == 0, "English locale failed (got %s)\n", wtoascii(bstr));
|
||||
}
|
||||
f = 0.5;
|
||||
hres = pVarBstrFromR4(f, lcid_spanish, 0, &bstr);
|
||||
ok(hres == S_OK, "got hres 0x%08lx\n", hres);
|
||||
ok(hres == S_OK, "got hres 0x%08x\n", hres);
|
||||
if (bstr)
|
||||
{
|
||||
ok(memcmp(bstr, szOneHalf_Spanish, sizeof(szOneHalf_Spanish)) == 0, "Spanish locale failed (got %s)\n", wtoascii(bstr));
|
||||
|
@ -4771,7 +4771,7 @@ static void test_VarBstrFromR4(void)
|
|||
hres = pVarBstrFromDate(dt,lcid,LOCALE_NOUSEROVERRIDE,&bstr); \
|
||||
if (bstr) WideCharToMultiByte(CP_ACP, 0, bstr, -1, buff, sizeof(buff), 0, 0); \
|
||||
else buff[0] = 0; \
|
||||
ok(hres == S_OK && !strcmp(str,buff), "Expected '%s', got '%s', hres = 0x%08lx\n", \
|
||||
ok(hres == S_OK && !strcmp(str,buff), "Expected '%s', got '%s', hres = 0x%08x\n", \
|
||||
str, buff, hres)
|
||||
|
||||
static void test_VarBstrFromDate(void)
|
||||
|
@ -4796,7 +4796,7 @@ static void test_VarBstrFromDate(void)
|
|||
#define BSTR_DEC(l, a, b, c, d, e) \
|
||||
SETDEC(l, a,b,c,d);\
|
||||
hres = VarBstrFromDec(&l, lcid, 0, &bstr);\
|
||||
ok(hres == S_OK, "got hres 0x%08lx\n", hres);\
|
||||
ok(hres == S_OK, "got hres 0x%08x\n", hres);\
|
||||
if (hres== S_OK && bstr)\
|
||||
{\
|
||||
ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\
|
||||
|
@ -4805,7 +4805,7 @@ static void test_VarBstrFromDate(void)
|
|||
#define BSTR_DEC64(l, a, b, c, x, d, e) \
|
||||
SETDEC64(l, a,b,c,x,d);\
|
||||
hres = VarBstrFromDec(&l, lcid, 0, &bstr);\
|
||||
ok(hres == S_OK, "got hres 0x%08lx\n", hres);\
|
||||
ok(hres == S_OK, "got hres 0x%08x\n", hres);\
|
||||
if (hres== S_OK && bstr)\
|
||||
{\
|
||||
ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\
|
||||
|
@ -4897,7 +4897,7 @@ static void test_VarBstrFromDec(void)
|
|||
|
||||
#define _VARBSTRCMP(left,right,lcid,flags,result) \
|
||||
hres = pVarBstrCmp(left,right,lcid,flags); \
|
||||
ok(hres == result, "VarBstrCmp: expected " #result ", got hres=0x%lx\n", hres)
|
||||
ok(hres == result, "VarBstrCmp: expected " #result ", got hres=0x%x\n", hres)
|
||||
#define VARBSTRCMP(left,right,flags,result) \
|
||||
_VARBSTRCMP(left,right,lcid,flags,result)
|
||||
|
||||
|
@ -4997,7 +4997,7 @@ static void test_SysAllocString(void)
|
|||
{
|
||||
LPINTERNAL_BSTR bstr = Get(str);
|
||||
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
@ -5022,7 +5022,7 @@ static void test_SysAllocStringLen(void)
|
|||
{
|
||||
LPINTERNAL_BSTR bstr = Get(str);
|
||||
|
||||
ok (bstr->dwLen == 0, "Expected 0, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 0, "Expected 0, got %d\n", bstr->dwLen);
|
||||
ok (!bstr->szString[0], "String not empty\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
@ -5033,7 +5033,7 @@ static void test_SysAllocStringLen(void)
|
|||
{
|
||||
LPINTERNAL_BSTR bstr = Get(str);
|
||||
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
@ -5054,7 +5054,7 @@ static void test_SysAllocStringByteLen(void)
|
|||
{
|
||||
LPINTERNAL_BSTR bstr = Get(str);
|
||||
|
||||
ok (bstr->dwLen == 0, "Expected 0, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 0, "Expected 0, got %d\n", bstr->dwLen);
|
||||
ok (!bstr->szString[0], "String not empty\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
@ -5065,7 +5065,7 @@ static void test_SysAllocStringByteLen(void)
|
|||
{
|
||||
LPINTERNAL_BSTR bstr = Get(str);
|
||||
|
||||
ok (bstr->dwLen == 4, "Expected 4, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 4, "Expected 4, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpA((LPCSTR)bstr->szString, szTestA), "String different\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
@ -5078,7 +5078,7 @@ static void test_SysAllocStringByteLen(void)
|
|||
const CHAR szTestTruncA[4] = { 'T','e','s','\0' };
|
||||
LPINTERNAL_BSTR bstr = Get(str);
|
||||
|
||||
ok (bstr->dwLen == 3, "Expected 3, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 3, "Expected 3, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
@ -5089,7 +5089,7 @@ static void test_SysAllocStringByteLen(void)
|
|||
{
|
||||
LPINTERNAL_BSTR bstr = Get(str);
|
||||
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
@ -5111,14 +5111,14 @@ static void test_SysReAllocString(void)
|
|||
int changed;
|
||||
|
||||
bstr = Get(str);
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
|
||||
|
||||
changed = SysReAllocString(&str, szSmaller);
|
||||
ok (changed == 1, "Expected 1, got %d\n", changed);
|
||||
ok (str == oldstr, "Created new string\n");
|
||||
bstr = Get(str);
|
||||
ok (bstr->dwLen == 2, "Expected 2, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 2, "Expected 2, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szSmaller), "String different\n");
|
||||
|
||||
oldstr = str;
|
||||
|
@ -5127,7 +5127,7 @@ static void test_SysReAllocString(void)
|
|||
/* Early versions always make new strings rather than resizing */
|
||||
/* ok (str == oldstr, "Created new string\n"); */
|
||||
bstr = Get(str);
|
||||
ok (bstr->dwLen == 12, "Expected 12, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 12, "Expected 12, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szLarger), "String different\n");
|
||||
|
||||
SysFreeString(str);
|
||||
|
@ -5150,14 +5150,14 @@ static void test_SysReAllocStringLen(void)
|
|||
int changed;
|
||||
|
||||
bstr = Get(str);
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
|
||||
|
||||
changed = SysReAllocStringLen(&str, szSmaller, 1);
|
||||
ok (changed == 1, "Expected 1, got %d\n", changed);
|
||||
ok (str == oldstr, "Created new string\n");
|
||||
bstr = Get(str);
|
||||
ok (bstr->dwLen == 2, "Expected 2, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 2, "Expected 2, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szSmaller), "String different\n");
|
||||
|
||||
oldstr = str;
|
||||
|
@ -5166,7 +5166,7 @@ static void test_SysReAllocStringLen(void)
|
|||
/* Early versions always make new strings rather than resizing */
|
||||
/* ok (str == oldstr, "Created new string\n"); */
|
||||
bstr = Get(str);
|
||||
ok (bstr->dwLen == 12, "Expected 12, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 12, "Expected 12, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szLarger), "String different\n");
|
||||
|
||||
changed = SysReAllocStringLen(&str, str, 6);
|
||||
|
@ -5193,9 +5193,9 @@ static void test_BstrCopy(void)
|
|||
V_BSTR(&vt1) = str;
|
||||
V_VT(&vt2) = VT_EMPTY;
|
||||
hres = VariantCopy(&vt2, &vt1);
|
||||
ok (hres == S_OK,"Failed to copy binary bstring with hres 0x%08lx\n", hres);
|
||||
ok (hres == S_OK,"Failed to copy binary bstring with hres 0x%08x\n", hres);
|
||||
bstr = Get(V_BSTR(&vt2));
|
||||
ok (bstr->dwLen == 3, "Expected 3, got %ld\n", bstr->dwLen);
|
||||
ok (bstr->dwLen == 3, "Expected 3, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n");
|
||||
}
|
||||
}
|
||||
|
@ -5217,7 +5217,7 @@ static void test_VarBstrCat(void)
|
|||
|
||||
/* Concatenation of two NULL strings works */
|
||||
ret = VarBstrCat(NULL, NULL, &res);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret);
|
||||
ok(res != NULL, "Expected a string\n");
|
||||
ok(SysStringLen(res) == 0, "Expected a 0-length string\n");
|
||||
SysFreeString(res);
|
||||
|
@ -5226,13 +5226,13 @@ static void test_VarBstrCat(void)
|
|||
|
||||
/* Concatenation with one NULL arg */
|
||||
ret = VarBstrCat(NULL, str1, &res);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret);
|
||||
ok(res != NULL, "Expected a string\n");
|
||||
ok(SysStringLen(res) == SysStringLen(str1), "Unexpected length\n");
|
||||
ok(!memcmp(res, sz1, SysStringLen(str1)), "Unexpected value\n");
|
||||
SysFreeString(res);
|
||||
ret = VarBstrCat(str1, NULL, &res);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret);
|
||||
ok(res != NULL, "Expected a string\n");
|
||||
ok(SysStringLen(res) == SysStringLen(str1), "Unexpected length\n");
|
||||
ok(!memcmp(res, sz1, SysStringLen(str1)), "Unexpected value\n");
|
||||
|
@ -5241,7 +5241,7 @@ static void test_VarBstrCat(void)
|
|||
/* Concatenation of two zero-terminated strings */
|
||||
str2 = SysAllocString(sz2);
|
||||
ret = VarBstrCat(str1, str2, &res);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret);
|
||||
ok(res != NULL, "Expected a string\n");
|
||||
ok(SysStringLen(res) == sizeof(sz1sz2) / sizeof(WCHAR) - 1,
|
||||
"Unexpected length\n");
|
||||
|
@ -5256,7 +5256,7 @@ static void test_VarBstrCat(void)
|
|||
str2 = SysAllocStringLen(s2, sizeof(s2) / sizeof(WCHAR));
|
||||
|
||||
ret = VarBstrCat(str1, str2, &res);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret);
|
||||
ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret);
|
||||
ok(res != NULL, "Expected a string\n");
|
||||
ok(SysStringLen(res) == sizeof(s1s2) / sizeof(WCHAR),
|
||||
"Unexpected length\n");
|
||||
|
@ -5281,7 +5281,7 @@ static void test_IUnknownClear(void)
|
|||
V_UNKNOWN(&v) = (IUnknown*)&u;
|
||||
hres = VariantClear(&v);
|
||||
ok(hres == S_OK && u.ref == 0 && V_VT(&v) == VT_EMPTY,
|
||||
"clear unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"clear unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 0, VT_EMPTY, hres, u.ref, V_VT(&v));
|
||||
|
||||
/* But not when clearing a by-reference*/
|
||||
|
@ -5290,7 +5290,7 @@ static void test_IUnknownClear(void)
|
|||
V_UNKNOWNREF(&v) = &pu;
|
||||
hres = VariantClear(&v);
|
||||
ok(hres == S_OK && u.ref == 1 && V_VT(&v) == VT_EMPTY,
|
||||
"clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 1, VT_EMPTY, hres, u.ref, V_VT(&v));
|
||||
}
|
||||
|
||||
|
@ -5307,7 +5307,7 @@ static void test_IUnknownCopy(void)
|
|||
V_UNKNOWN(&vSrc) = pu;
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && u.ref == 2 && V_VT(&vDst) == VT_UNKNOWN,
|
||||
"copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 2, VT_EMPTY, hres, u.ref, V_VT(&vDst));
|
||||
|
||||
/* AddRef is skipped on copy of by-reference IDispatch */
|
||||
|
@ -5317,7 +5317,7 @@ static void test_IUnknownCopy(void)
|
|||
V_UNKNOWNREF(&vSrc) = &pu;
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && u.ref == 1 && V_VT(&vDst) == (VT_UNKNOWN|VT_BYREF),
|
||||
"copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 1, VT_DISPATCH, hres, u.ref, V_VT(&vDst));
|
||||
|
||||
/* AddRef is called copying by-reference IDispatch with indirection */
|
||||
|
@ -5327,7 +5327,7 @@ static void test_IUnknownCopy(void)
|
|||
V_UNKNOWNREF(&vSrc) = &pu;
|
||||
hres = VariantCopyInd(&vDst, &vSrc);
|
||||
ok(hres == S_OK && u.ref == 2 && V_VT(&vDst) == VT_UNKNOWN,
|
||||
"copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 2, VT_DISPATCH, hres, u.ref, V_VT(&vDst));
|
||||
|
||||
/* Indirection in place also calls AddRef */
|
||||
|
@ -5336,7 +5336,7 @@ static void test_IUnknownCopy(void)
|
|||
V_UNKNOWNREF(&vSrc) = &pu;
|
||||
hres = VariantCopyInd(&vSrc, &vSrc);
|
||||
ok(hres == S_OK && u.ref == 2 && V_VT(&vSrc) == VT_UNKNOWN,
|
||||
"copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 2, VT_DISPATCH, hres, u.ref, V_VT(&vSrc));
|
||||
}
|
||||
|
||||
|
@ -5358,7 +5358,7 @@ static void test_IUnknownChangeTypeEx(void)
|
|||
hres = VariantChangeTypeEx(&vSrc, &vSrc, lcid, 0, VT_DISPATCH);
|
||||
ok(hres == S_OK && u.ref == 1 &&
|
||||
V_VT(&vSrc) == VT_DISPATCH && V_DISPATCH(&vSrc) == (IDispatch*)pu,
|
||||
"change unk(src=src): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n",
|
||||
"change unk(src=src): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n",
|
||||
S_OK, 1, VT_DISPATCH, pu, hres, u.ref, V_VT(&vSrc), V_DISPATCH(&vSrc));
|
||||
|
||||
/* =>IDispatch */
|
||||
|
@ -5370,7 +5370,7 @@ static void test_IUnknownChangeTypeEx(void)
|
|||
/* Note vSrc is not cleared, as final refcount is 2 */
|
||||
ok(hres == S_OK && u.ref == 2 &&
|
||||
V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == (IUnknown*)pu,
|
||||
"change unk(src,dst): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n",
|
||||
"change unk(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n",
|
||||
S_OK, 2, VT_UNKNOWN, pu, hres, u.ref, V_VT(&vDst), V_UNKNOWN(&vDst));
|
||||
|
||||
/* Can't change unknown to anything else */
|
||||
|
@ -5404,7 +5404,7 @@ static void test_IUnknownChangeTypeEx(void)
|
|||
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt);
|
||||
ok(hres == hExpected,
|
||||
"change unk(badvar): vt %d expected 0x%08lx, got 0x%08lx\n",
|
||||
"change unk(badvar): vt %d expected 0x%08x, got 0x%08x\n",
|
||||
vt, hExpected, hres);
|
||||
}
|
||||
}
|
||||
|
@ -5423,7 +5423,7 @@ static void test_IDispatchClear(void)
|
|||
V_DISPATCH(&v) = pd;
|
||||
hres = VariantClear(&v);
|
||||
ok(hres == S_OK && d.ref == 0 && V_VT(&v) == VT_EMPTY,
|
||||
"clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 0, VT_EMPTY, hres, d.ref, V_VT(&v));
|
||||
|
||||
d.ref = 1;
|
||||
|
@ -5431,7 +5431,7 @@ static void test_IDispatchClear(void)
|
|||
V_DISPATCHREF(&v) = &pd;
|
||||
hres = VariantClear(&v);
|
||||
ok(hres == S_OK && d.ref == 1 && V_VT(&v) == VT_EMPTY,
|
||||
"clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 1, VT_EMPTY, hres, d.ref, V_VT(&v));
|
||||
}
|
||||
|
||||
|
@ -5449,7 +5449,7 @@ static void test_IDispatchCopy(void)
|
|||
V_DISPATCH(&vSrc) = pd;
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && d.ref == 2 && V_VT(&vDst) == VT_DISPATCH,
|
||||
"copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 2, VT_EMPTY, hres, d.ref, V_VT(&vDst));
|
||||
|
||||
VariantInit(&vDst);
|
||||
|
@ -5458,7 +5458,7 @@ static void test_IDispatchCopy(void)
|
|||
V_DISPATCHREF(&vSrc) = &pd;
|
||||
hres = VariantCopy(&vDst, &vSrc);
|
||||
ok(hres == S_OK && d.ref == 1 && V_VT(&vDst) == (VT_DISPATCH|VT_BYREF),
|
||||
"copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 1, VT_DISPATCH, hres, d.ref, V_VT(&vDst));
|
||||
|
||||
VariantInit(&vDst);
|
||||
|
@ -5467,7 +5467,7 @@ static void test_IDispatchCopy(void)
|
|||
V_DISPATCHREF(&vSrc) = &pd;
|
||||
hres = VariantCopyInd(&vDst, &vSrc);
|
||||
ok(hres == S_OK && d.ref == 2 && V_VT(&vDst) == VT_DISPATCH,
|
||||
"copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 2, VT_DISPATCH, hres, d.ref, V_VT(&vDst));
|
||||
|
||||
d.ref = 1;
|
||||
|
@ -5475,7 +5475,7 @@ static void test_IDispatchCopy(void)
|
|||
V_DISPATCHREF(&vSrc) = &pd;
|
||||
hres = VariantCopyInd(&vSrc, &vSrc);
|
||||
ok(hres == S_OK && d.ref == 2 && V_VT(&vSrc) == VT_DISPATCH,
|
||||
"copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n",
|
||||
"copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n",
|
||||
S_OK, 2, VT_DISPATCH, hres, d.ref, V_VT(&vSrc));
|
||||
}
|
||||
|
||||
|
@ -5496,7 +5496,7 @@ static void test_IDispatchChangeTypeEx(void)
|
|||
hres = VariantChangeTypeEx(&vSrc, &vSrc, lcid, 0, VT_UNKNOWN);
|
||||
ok(hres == S_OK && d.ref == 1 &&
|
||||
V_VT(&vSrc) == VT_UNKNOWN && V_UNKNOWN(&vSrc) == (IUnknown*)pd,
|
||||
"change disp(src=src): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n",
|
||||
"change disp(src=src): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n",
|
||||
S_OK, 1, VT_UNKNOWN, pd, hres, d.ref, V_VT(&vSrc), V_UNKNOWN(&vSrc));
|
||||
|
||||
/* =>IUnknown */
|
||||
|
@ -5508,7 +5508,7 @@ static void test_IDispatchChangeTypeEx(void)
|
|||
/* Note vSrc is not cleared, as final refcount is 2 */
|
||||
ok(hres == S_OK && d.ref == 2 &&
|
||||
V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == (IUnknown*)pd,
|
||||
"change disp(src,dst): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n",
|
||||
"change disp(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n",
|
||||
S_OK, 2, VT_UNKNOWN, pd, hres, d.ref, V_VT(&vDst), V_UNKNOWN(&vDst));
|
||||
|
||||
/* FIXME: Verify that VARIANT_NOVALUEPROP prevents conversion to integral
|
||||
|
@ -5556,7 +5556,7 @@ static void test_ErrorChangeTypeEx(void)
|
|||
hExpected = DISP_E_BADVARTYPE;
|
||||
|
||||
ok(hres == hExpected,
|
||||
"change err: vt %d expected 0x%08lx, got 0x%08lx\n", vt, hExpected, hres);
|
||||
"change err: vt %d expected 0x%08x, got 0x%08x\n", vt, hExpected, hres);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5602,7 +5602,7 @@ static void test_EmptyChangeTypeEx(void)
|
|||
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt);
|
||||
|
||||
ok(hres == hExpected && (hres != S_OK || V_VT(&vDst) == vt),
|
||||
"change empty: vt %d expected 0x%08lx, got 0x%08lx, vt %d\n",
|
||||
"change empty: vt %d expected 0x%08x, got 0x%08x, vt %d\n",
|
||||
vt, hExpected, hres, V_VT(&vDst));
|
||||
}
|
||||
}
|
||||
|
@ -5651,7 +5651,7 @@ static void test_NullChangeTypeEx(void)
|
|||
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt);
|
||||
|
||||
ok(hres == hExpected && (hres != S_OK || V_VT(&vDst) == vt),
|
||||
"change null: vt %d expected 0x%08lx, got 0x%08lx, vt %d\n",
|
||||
"change null: vt %d expected 0x%08x, got 0x%08x, vt %d\n",
|
||||
vt, hExpected, hres, V_VT(&vDst));
|
||||
}
|
||||
}
|
||||
|
@ -5672,7 +5672,7 @@ static void test_UintChangeTypeEx(void)
|
|||
V_UI4(&vSrc) = -1;
|
||||
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_I4);
|
||||
ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == -1,
|
||||
"change uint: Expected %d,0x%08lx,%d got %d,0x%08lx,%ld\n",
|
||||
"change uint: Expected %d,0x%08x,%d got %d,0x%08x,%d\n",
|
||||
VT_I4, S_OK, -1, V_VT(&vDst), hres, V_I4(&vDst));
|
||||
}
|
||||
|
||||
|
@ -5745,12 +5745,12 @@ static void test_ChangeType_keep_dst(void)
|
|||
V_VT(&v1) = VT_BSTR;
|
||||
V_BSTR(&v1) = bstr;
|
||||
hres = VariantChangeTypeEx(&v1, &v1, 0, 0, VT_INT);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08lx\n", hres);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08x\n", hres);
|
||||
ok(V_VT(&v1) == VT_BSTR && V_BSTR(&v1) == bstr, "VariantChangeTypeEx changed dst variant\n");
|
||||
V_VT(&v2) = VT_INT;
|
||||
V_INT(&v2) = 4;
|
||||
hres = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_INT);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08lx\n", hres);
|
||||
ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08x\n", hres);
|
||||
ok(V_VT(&v2) == VT_INT && V_INT(&v2) == 4, "VariantChangeTypeEx changed dst variant\n");
|
||||
SysFreeString(bstr);
|
||||
}
|
||||
|
@ -5762,7 +5762,7 @@ START_TEST(vartype)
|
|||
if (!hOleaut32)
|
||||
return;
|
||||
|
||||
trace("LCID's: System=0x%08lx, User=0x%08lx\n", GetSystemDefaultLCID(),
|
||||
trace("LCID's: System=0x%08x, User=0x%08x\n", GetSystemDefaultLCID(),
|
||||
GetUserDefaultLCID());
|
||||
|
||||
test_VarI1FromI2();
|
||||
|
|
Loading…
Reference in New Issue