- (U)I4 is a (U)LONG - so migrate all helper functions and .idl to use LONG instead of ints - renamed accordingly the variables (i => l, ui => ul) - renamed accordingly method names s/Widget_int_ptr/Widget_long_ptr/
Note: we cannot use long yet as LONG isn't yet defined as a long.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/tmarshal.c | 85 +++++++++++++++++++------------------- dlls/oleaut32/tests/tmarshal.idl | 12 +++-- 2 files changed, 49 insertions(+), 48 deletions(-)
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 80ed7bed525..3c9d9a98a84 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -1104,17 +1104,17 @@ static HRESULT WINAPI Widget_VarArg_Ref_Run( return S_OK; }
-static HRESULT WINAPI Widget_basetypes_in(IWidget *iface, signed char c, short s, int i, hyper h, - unsigned char uc, unsigned short us, unsigned int ui, MIDL_uhyper uh, +static HRESULT WINAPI Widget_basetypes_in(IWidget *iface, signed char c, short s, LONG l, hyper h, + unsigned char uc, unsigned short us, ULONG ul, MIDL_uhyper uh, float f, double d, STATE st) { ok(c == 5, "Got char %d.\n", c); ok(s == -123, "Got short %d.\n", s); - ok(i == -100000, "Got int %d.\n", i); + ok(l == -100000, "Got int %d.\n", l); ok(h == (LONGLONG)-100000 * 1000000, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 0, "Got unsigned char %u.\n", uc); ok(us == 456, "Got unsigned short %u.\n", us); - ok(ui == 0xdeadbeef, "Got unsigned int %i.\n", ui); + ok(ul == 0xdeadbeef, "Got unsigned int %u.\n", ul); ok(uh == (ULONGLONG)1234567890 * 9876543210, "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_PI, "Got float %f.\n", f); ok(d == M_E, "Got double %f.\n", d); @@ -1123,17 +1123,17 @@ static HRESULT WINAPI Widget_basetypes_in(IWidget *iface, signed char c, short s return S_OK; }
-static HRESULT WINAPI Widget_basetypes_out(IWidget *iface, signed char *c, short *s, int *i, hyper *h, - unsigned char *uc, unsigned short *us, unsigned int *ui, MIDL_uhyper *uh, +static HRESULT WINAPI Widget_basetypes_out(IWidget *iface, signed char *c, short *s, LONG *l, hyper *h, + unsigned char *uc, unsigned short *us, ULONG *ul, MIDL_uhyper *uh, float *f, double *d, STATE *st) { *c = 10; *s = -321; - *i = -200000; + *l = -200000; *h = (LONGLONG)-200000 * 1000000; *uc = 254; *us = 256; - *ui = 0xf00dfade; + *ul = 0xf00dfade; *uh = (((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789; *f = M_LN2; *d = M_LN10; @@ -1153,7 +1153,7 @@ static HRESULT WINAPI Widget_float_abi(IWidget *iface, float f, double d, int i, return S_OK; }
-static HRESULT WINAPI Widget_int_ptr(IWidget *iface, int *in, int *out, int *in_out) +static HRESULT WINAPI Widget_long_ptr(IWidget *iface, LONG *in, LONG *out, LONG *in_out) { ok(*in == 123, "Got [in] %d.\n", *in); if (testmode == 0) /* Invoke() */ @@ -1169,7 +1169,7 @@ static HRESULT WINAPI Widget_int_ptr(IWidget *iface, int *in, int *out, int *in_ return S_OK; }
-static HRESULT WINAPI Widget_int_ptr_ptr(IWidget *iface, int **in, int **out, int **in_out) +static HRESULT WINAPI Widget_long_ptr_ptr(IWidget *iface, LONG **in, LONG **out, LONG **in_out) { ok(!*out, "Got [out] %p.\n", *out); if (testmode == 0) @@ -1637,8 +1637,8 @@ static const struct IWidgetVtbl Widget_VTable = Widget_basetypes_in, Widget_basetypes_out, Widget_float_abi, - Widget_int_ptr, - Widget_int_ptr_ptr, + Widget_long_ptr, + Widget_long_ptr_ptr, Widget_iface_in, Widget_iface_out, Widget_iface_ptr, @@ -1980,11 +1980,12 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp)
signed char c; short s; + LONG l; int i, i2, *pi; hyper h; unsigned char uc; unsigned short us; - unsigned int ui; + ULONG ul; MIDL_uhyper uh; float f; double d; @@ -2009,46 +2010,46 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) 0xdeadbeef, (ULONGLONG)1234567890 * 9876543210, M_PI, M_E, STATE_WIDGETIFIED); ok(hr == S_OK, "Got hr %#x.\n", hr);
- c = s = i = h = uc = us = ui = uh = f = d = st = 0; + c = s = l = h = uc = us = ul = uh = f = d = st = 0;
V_VT(&arg[10]) = VT_BYREF|VT_I1; V_I1REF(&arg[10]) = &c; V_VT(&arg[9]) = VT_BYREF|VT_I2; V_I2REF(&arg[9]) = &s; - V_VT(&arg[8]) = VT_BYREF|VT_I4; V_I4REF(&arg[8]) = &i; + V_VT(&arg[8]) = VT_BYREF|VT_I4; V_I4REF(&arg[8]) = &l; V_VT(&arg[7]) = VT_BYREF|VT_I8; V_I8REF(&arg[7]) = &h; V_VT(&arg[6]) = VT_BYREF|VT_UI1; V_UI1REF(&arg[6]) = &uc; V_VT(&arg[5]) = VT_BYREF|VT_UI2; V_UI2REF(&arg[5]) = &us; - V_VT(&arg[4]) = VT_BYREF|VT_UI4; V_UI4REF(&arg[4]) = &ui; + V_VT(&arg[4]) = VT_BYREF|VT_UI4; V_UI4REF(&arg[4]) = &ul; V_VT(&arg[3]) = VT_BYREF|VT_UI8; V_UI8REF(&arg[3]) = &uh; V_VT(&arg[2]) = VT_BYREF|VT_R4; V_R4REF(&arg[2]) = &f; V_VT(&arg[1]) = VT_BYREF|VT_R8; V_R8REF(&arg[1]) = &d; - V_VT(&arg[0]) = VT_BYREF|VT_I4; V_I4REF(&arg[0]) = (int *)&st; + V_VT(&arg[0]) = VT_BYREF|VT_I4; V_I4REF(&arg[0]) = (LONG *)&st; hr = IDispatch_Invoke(disp, DISPID_TM_BASETYPES_OUT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(c == 10, "Got char %d.\n", c); ok(s == -321, "Got short %d.\n", s); - ok(i == -200000, "Got int %d.\n", i); + ok(l == -200000, "Got int %d.\n", l); ok(h == (LONGLONG)-200000 * 1000000L, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 254, "Got unsigned char %u.\n", uc); ok(us == 256, "Got unsigned short %u.\n", us); - ok(ui == 0xf00dfade, "Got unsigned int %i.\n", ui); + ok(ul == 0xf00dfade, "Got unsigned int %i.\n", ul); ok(uh == ((((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789), "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_LN2, "Got float %f.\n", f); ok(d == M_LN10, "Got double %f.\n", d); ok(st == STATE_UNWIDGETIFIED, "Got state %u.\n", st);
- c = s = i = h = uc = us = ui = uh = f = d = st = 0; + c = s = l = h = uc = us = ul = uh = f = d = st = 0;
- hr = IWidget_basetypes_out(widget, &c, &s, &i, &h, &uc, &us, &ui, &uh, &f, &d, &st); + hr = IWidget_basetypes_out(widget, &c, &s, &l, &h, &uc, &us, &ul, &uh, &f, &d, &st); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(c == 10, "Got char %d.\n", c); ok(s == -321, "Got short %d.\n", s); - ok(i == -200000, "Got int %d.\n", i); + ok(l == -200000, "Got int %d.\n", l); ok(h == (LONGLONG)-200000 * 1000000L, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 254, "Got unsigned char %u.\n", uc); ok(us == 256, "Got unsigned short %u.\n", us); - ok(ui == 0xf00dfade, "Got unsigned int %i.\n", ui); + ok(ul == 0xf00dfade, "Got unsigned int %i.\n", ul); ok(uh == ((((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789), "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_LN2, "Got float %f.\n", f); @@ -2073,7 +2074,7 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) { VARIANTARG arg[3]; DISPPARAMS dispparams = {arg, NULL, ARRAY_SIZE(arg), 0}; - int in, out, in_out, *in_ptr, *out_ptr, *in_out_ptr; + LONG in, out, in_out, *in_ptr, *out_ptr, *in_out_ptr; HRESULT hr;
testmode = 0; @@ -2096,26 +2097,26 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) in = 123; out = 456; in_out = 789; - hr = IWidget_int_ptr(widget, &in, &out, &in_out); + hr = IWidget_long_ptr(widget, &in, &out, &in_out); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(in == 123, "Got [in] %d.\n", in); ok(out == 654, "Got [out] %d.\n", out); ok(in_out == 321, "Got [in, out] %d.\n", in_out);
out = in_out = -1; - hr = IWidget_int_ptr(widget, NULL, &out, &in_out); + hr = IWidget_long_ptr(widget, NULL, &out, &in_out); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(!out, "[out] parameter should have been cleared.\n"); ok(in_out == -1, "[in, out] parameter should not have been cleared.\n");
in = in_out = -1; - hr = IWidget_int_ptr(widget, &in, NULL, &in_out); + hr = IWidget_long_ptr(widget, &in, NULL, &in_out); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(in == -1, "[in] parameter should not have been cleared.\n"); ok(in_out == -1, "[in, out] parameter should not have been cleared.\n");
in = out = -1; - hr = IWidget_int_ptr(widget, &in, &out, NULL); + hr = IWidget_long_ptr(widget, &in, &out, NULL); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(in == -1, "[in] parameter should not have been cleared.\n"); ok(!out, "[out] parameter should have been cleared.\n"); @@ -2125,14 +2126,14 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp)
testmode = 0; in_ptr = out_ptr = in_out_ptr = NULL; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); ok(hr == S_OK, "Got hr %#x\n", hr); ok(!in_ptr, "Got [in] %p.\n", in_ptr); ok(!out_ptr, "Got [out] %p.\n", out_ptr); ok(!in_out_ptr, "Got [in, out] %p.\n", in_out_ptr);
testmode = 1; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); ok(hr == S_OK, "Got hr %#x\n", hr); ok(*out_ptr == 654, "Got [out] %d.\n", *out_ptr); ok(*in_out_ptr == 321, "Got [in, out] %d.\n", *in_out_ptr); @@ -2146,7 +2147,7 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) in_ptr = ∈ out_ptr = &out; in_out_ptr = &in_out; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(out_ptr != &out, "[out] ptr should have changed.\n"); ok(in_out_ptr == &in_out, "[in, out] ptr should not have changed.\n"); @@ -2157,27 +2158,27 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) in_ptr = out_ptr = NULL; in_out = 789; in_out_ptr = &in_out; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(!in_out_ptr, "Got [in, out] %p.\n", in_out_ptr);
out_ptr = &out; in_out_ptr = &in_out; - hr = IWidget_int_ptr_ptr(widget, NULL, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, NULL, &out_ptr, &in_out_ptr); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(!out_ptr, "[out] parameter should have been cleared.\n"); ok(in_out_ptr == &in_out, "[in, out] parameter should not have been cleared.\n");
in_ptr = ∈ in_out_ptr = &in_out; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, NULL, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, NULL, &in_out_ptr); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(in_ptr == &in, "[in] parameter should not have been cleared.\n"); ok(in_out_ptr == &in_out, "[in, out] parameter should not have been cleared.\n");
in_ptr = ∈ out_ptr = &out; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, NULL); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, NULL); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(in_ptr == &in, "[in] parameter should not have been cleared.\n"); ok(!out_ptr, "[out] parameter should have been cleared.\n"); @@ -2634,7 +2635,7 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) array_t in, out, in_out; MYSTRUCT struct_in[2]; HRESULT hr; - int i = 2; + LONG l = 2;
memcpy(in, test_array1, sizeof(array_t)); memcpy(out, test_array2, sizeof(array_t)); @@ -2646,7 +2647,7 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) ok(!memcmp(&in_out, &test_array6, sizeof(array_t)), "Arrays didn't match.\n");
V_VT(&var_in[0]) = VT_I4; V_I4(&var_in[0]) = 1; - V_VT(&var_in[1]) = VT_BYREF|VT_I4; V_I4REF(&var_in[1]) = &i; + V_VT(&var_in[1]) = VT_BYREF|VT_I4; V_I4REF(&var_in[1]) = &l; V_VT(&var_out[0]) = VT_I4; V_I4(&var_out[0]) = 3; V_VT(&var_out[1]) = VT_I4; V_I4(&var_out[1]) = 4; V_VT(&var_in_out[0]) = VT_I4; V_I4(&var_in_out[0]) = 5; @@ -2656,8 +2657,8 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) ok(V_VT(&var_in[0]) == VT_I4, "Got wrong type %u.\n", V_VT(&var_in[0])); ok(V_I4(&var_in[0]) == 1, "Got wrong value %d.\n", V_I4(&var_in[0])); ok(V_VT(&var_in[1]) == (VT_BYREF|VT_I4), "Got wrong type %u.\n", V_VT(&var_in[1])); - ok(V_I4REF(&var_in[1]) == &i, "Got wrong value %p.\n", V_I4REF(&var_in[1])); - ok(i == 2, "Got wrong value %d.\n", i); + ok(V_I4REF(&var_in[1]) == &l, "Got wrong value %p.\n", V_I4REF(&var_in[1])); + ok(l == 2, "Got wrong value %d.\n", l); ok(V_VT(&var_out[0]) == VT_I1, "Got wrong type %u.\n", V_VT(&var_out[0])); ok(V_I1(&var_out[0]) == 9, "Got wrong value %u.\n", V_VT(&var_out[0])); ok(V_VT(&var_out[1]) == VT_BSTR, "Got wrong type %u.\n", V_VT(&var_out[1])); @@ -3054,7 +3055,7 @@ static void test_typelibmarshal(void) the_state = STATE_WIDGETIFIED; VariantInit(&vararg[0]); V_VT(&vararg[0]) = VT_BYREF|VT_I4; - V_I4REF(&vararg[0]) = (int *)&the_state; + V_I4REF(&vararg[0]) = (LONG *)&the_state; dispparams.cNamedArgs = 1; dispparams.cArgs = 1; dispparams.rgdispidNamedArgs = &dispidNamed; @@ -3416,7 +3417,7 @@ static void test_typelibmarshal(void) uval = 666; VariantInit(&vararg[0]); V_VT(&vararg[0]) = VT_UI4|VT_BYREF; - V_UI4REF(&vararg[0]) = &uval; + V_UI4REF(&vararg[0]) = (ULONG *)&uval; dispparams.cNamedArgs = 0; dispparams.cArgs = 1; dispparams.rgvarg = vararg; @@ -3425,7 +3426,7 @@ static void test_typelibmarshal(void) ok_ole_success(hr, ITypeInfo_Invoke); ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); ok(V_VT(&vararg[0]) == (VT_UI4|VT_BYREF), "arg VT not unmarshalled correctly: %x\n", V_VT(&vararg[0])); - ok(V_UI4REF(&vararg[0]) == &uval, "Byref pointer not preserved: %p/%p\n", &uval, V_UI4REF(&vararg[0])); + ok(V_UI4REF(&vararg[0]) == (ULONG *)&uval, "Byref pointer not preserved: %p/%p\n", &uval, V_UI4REF(&vararg[0])); ok(*V_UI4REF(&vararg[0]) == 42, "Expected 42 to be returned instead of %u\n", *V_UI4REF(&vararg[0])); VariantClear(&varresult); VariantClear(&vararg[0]); diff --git a/dlls/oleaut32/tests/tmarshal.idl b/dlls/oleaut32/tests/tmarshal.idl index a594f9137d8..e1c5a8557b7 100644 --- a/dlls/oleaut32/tests/tmarshal.idl +++ b/dlls/oleaut32/tests/tmarshal.idl @@ -291,23 +291,23 @@ cpp_quote("struct Coclass3 { ICoclass1 *iface; };") HRESULT VarArg_Ref_Run([in] BSTR name, [in] SAFEARRAY(VARIANT) *params, [out, retval] VARIANT *result);
[id(DISPID_TM_BASETYPES_IN)] - HRESULT basetypes_in([in] signed char c, [in] short s, [in] int i, [in] hyper h, - [in] unsigned char uc, [in] unsigned short us, [in] unsigned int ui, + HRESULT basetypes_in([in] signed char c, [in] short s, [in] long l, [in] hyper h, + [in] unsigned char uc, [in] unsigned short us, [in] unsigned long ul, [in] unsigned hyper uh, [in] float f, [in] double d, [in] STATE st);
[id(DISPID_TM_BASETYPES_OUT)] - HRESULT basetypes_out([out] signed char *c, [out] short *s, [out] int *i, [out] hyper *h, - [out] unsigned char *uc, [out] unsigned short *us, [out] unsigned int *ui, + HRESULT basetypes_out([out] signed char *c, [out] short *s, [out] long *l, [out] hyper *h, + [out] unsigned char *uc, [out] unsigned short *us, [out] unsigned long *ul, [out] unsigned hyper *uh, [out] float *f, [out] double *d, [out] STATE *st);
[id(DISPID_TM_FLOAT_ABI)] HRESULT float_abi([in] float f, [in] double d, [in] int i, [in] float f2, [in] double d2);
[id(DISPID_TM_INT_PTR)] - HRESULT int_ptr([in] int *in, [out] int *out, [in, out] int *in_out); + HRESULT long_ptr([in] long *in, [out] long *out, [in, out] long *in_out);
[id(DISPID_TM_INT_PTR_PTR)] - HRESULT int_ptr_ptr([in] int **in, [out] int **out, [in, out] int **in_out); + HRESULT long_ptr_ptr([in] long **in, [out] long **out, [in, out] long **in_out);
[id(DISPID_TM_IFACE_IN)] HRESULT iface_in([in] IUnknown *unk, [in] IDispatch *disp, [in] ISomethingFromDispatch *sfd);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/Makefile.in | 1 dlls/oleaut32/tests/dispatch.c | 52 + dlls/oleaut32/tests/olefont.c | 124 +-- dlls/oleaut32/tests/olepicture.c | 268 +++--- dlls/oleaut32/tests/safearray.c | 426 +++++----- dlls/oleaut32/tests/tmarshal.c | 432 +++++----- dlls/oleaut32/tests/typelib.c | 1596 +++++++++++++++++++------------------- dlls/oleaut32/tests/usrmarshal.c | 324 ++++---- dlls/oleaut32/tests/varformat.c | 60 + dlls/oleaut32/tests/vartest.c | 336 ++++---- dlls/oleaut32/tests/vartype.c | 260 +++--- 11 files changed, 1939 insertions(+), 1940 deletions(-)
diff --git a/dlls/oleaut32/tests/Makefile.in b/dlls/oleaut32/tests/Makefile.in index 780a068ede4..098ea9deef7 100644 --- a/dlls/oleaut32/tests/Makefile.in +++ b/dlls/oleaut32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = oleaut32.dll IMPORTS = oleaut32 ole32 rpcrt4 user32 gdi32 advapi32
diff --git a/dlls/oleaut32/tests/dispatch.c b/dlls/oleaut32/tests/dispatch.c index ff63a7d592a..022eb4b7e67 100644 --- a/dlls/oleaut32/tests/dispatch.c +++ b/dlls/oleaut32/tests/dispatch.c @@ -84,7 +84,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0xdeadbeef, @@ -96,7 +96,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 1, VT_I2, &result, &err_index); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0xdeadbeef, @@ -107,7 +107,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_I2, NULL, &err_index); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(err_index == 0xdeadbeef, "Expected err_index to be unchanged, got %d\n", err_index);
@@ -116,7 +116,7 @@ static void test_DispGetParam(void) VariantInit(&result); hr = DispGetParam(&dispparams, 0, VT_I2, &result, NULL); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result));
@@ -125,7 +125,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0, "Expected 0, got %d\n", err_index); @@ -145,7 +145,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_I2, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_I2, "Expected VT_I2, got %08x\n", V_VT(&result)); ok(V_I2(&result) == 42, "Expected 42, got %d\n", V_I2(&result)); ok(err_index == 0xdeadbeef, @@ -156,10 +156,10 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 1, VT_I4, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_I4, "Expected VT_I4, got %08x\n", V_VT(&result)); ok(V_I4(&result) == 1234567890, - "Expected 1234567890, got %d\n", V_I4(&result)); + "Expected 1234567890, got %ld\n", V_I4(&result)); ok(err_index == 0xdeadbeef, "Expected err_index to be unchanged, got %d\n", err_index);
@@ -168,7 +168,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); ok_bstr(V_BSTR(&result), "Sunshine", "Expected %s, got %s\n"); ok(err_index == 0xdeadbeef, @@ -181,7 +181,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 3, VT_I2, &result, &err_index); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0xdeadbeef, @@ -191,14 +191,14 @@ static void test_DispGetParam(void) INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_I2, NULL, &err_index); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(err_index == 0, "Expected 0, got %d\n", err_index);
/* puArgErr is NULL. */ INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); VariantInit(&result); hr = DispGetParam(&dispparams, 2, VT_I2, &result, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_I2, "Expected VT_I2, got %08x\n", V_VT(&result)); ok(V_I2(&result) == 42, "Expected 42, got %d\n", V_I2(&result));
@@ -207,9 +207,9 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_I4, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_I4, "Expected VT_I4, got %08x\n", V_VT(&result)); - ok(V_I4(&result) == 42, "Expected 42, got %d\n", V_I4(&result)); + ok(V_I4(&result) == 42, "Expected 42, got %ld\n", V_I4(&result)); ok(err_index == 0xdeadbeef, "Expected err_index to be unchanged, got %d\n", err_index);
@@ -218,7 +218,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); ok_bstr(V_BSTR(&result), "42", "Expected %s, got %s\n"); ok(err_index == 0xdeadbeef, @@ -230,7 +230,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 1, VT_I2, &result, &err_index); - ok(hr == DISP_E_OVERFLOW, "Expected DISP_E_OVERFLOW, got %08x\n", hr); + ok(hr == DISP_E_OVERFLOW, "Expected DISP_E_OVERFLOW, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 1, "Expected 1, got %d\n", err_index); @@ -241,7 +241,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); ok(hr == DISP_E_TYPEMISMATCH, - "Expected DISP_E_TYPEMISMATCH, got %08x\n", hr); + "Expected DISP_E_TYPEMISMATCH, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 2, "Expected 2, got %d\n", err_index); @@ -251,7 +251,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_ILLEGAL, &result, &err_index); - ok(hr == DISP_E_BADVARTYPE, "Expected DISP_E_BADVARTYPE, got %08x\n", hr); + ok(hr == DISP_E_BADVARTYPE, "Expected DISP_E_BADVARTYPE, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0, "Expected 0, got %d\n", err_index); @@ -264,7 +264,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); ok(err_index == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", err_index); VariantClear(&result); @@ -312,25 +312,25 @@ static void test_CreateStdDispatch(void) HRESULT hr;
hr = CreateStdDispatch(NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = CreateStdDispatch(NULL, NULL, NULL, &unk); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = LoadTypeLib(stdole2W, &tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = ITypeLib_GetTypeInfoOfGuid(tl, &IID_IUnknown, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ITypeLib_Release(tl);
hr = CreateStdDispatch(NULL, &test_unk, NULL, &unk); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = CreateStdDispatch(NULL, NULL, ti, &unk); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = CreateStdDispatch(NULL, &test_unk, ti, &unk); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); IUnknown_Release(unk);
ITypeInfo_Release(ti); diff --git a/dlls/oleaut32/tests/olefont.c b/dlls/oleaut32/tests/olefont.c index d7ae64d81e3..cf5b9ab34af 100644 --- a/dlls/oleaut32/tests/olefont.c +++ b/dlls/oleaut32/tests/olefont.c @@ -61,13 +61,13 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(unk); }
#define EXPECT_HR(hr,hr_exp) \ - ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) + ok(hr == hr_exp, "got 0x%08lx, expected 0x%08lx\n", hr, hr_exp)
/* Create a font with cySize given by lo_size, hi_size, */ /* SetRatio to ratio_logical, ratio_himetric, */ @@ -97,35 +97,35 @@ static void test_ifont_size(LONGLONG size, LONG ratio_logical, LONG ratio_himetr /* Create font, test that it worked. */ hres = pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj); ifnt = pvObj; - ok(hres == S_OK,"%s: OCFI returns 0x%08x instead of S_OK.\n", + ok(hres == S_OK,"%s: OCFI returns 0x%08lx instead of S_OK.\n", test_name, hres); ok(pvObj != NULL,"%s: OCFI returns NULL.\n", test_name);
/* Change the scaling ratio */ hres = IFont_SetRatio(ifnt, ratio_logical, ratio_himetric); ok((ratio_logical && ratio_himetric) ? hres == S_OK : hres == E_FAIL, - "%s: IFont_SetRatio unexpectedly returned 0x%08x.\n", test_name, hres); + "%s: IFont_SetRatio unexpectedly returned 0x%08lx.\n", test_name, hres);
/* Read back size. */ hres = IFont_get_Size(ifnt, &psize); - ok(hres == S_OK,"%s: IFont_get_size returns 0x%08x instead of S_OK.\n", + ok(hres == S_OK,"%s: IFont_get_size returns 0x%08lx instead of S_OK.\n", test_name, hres);
/* Check returned size - allow for errors due to rounding & font realization. */ ok((psize.int64 - size) < 10000 && (psize.int64 - size) > -10000, - "%s: IFont_get_Size: Lo=%d, Hi=%d; expected Lo=%d, Hi=%d.\n", + "%s: IFont_get_Size: Lo=%ld, Hi=%ld; expected Lo=%ld, Hi=%ld.\n", test_name, S(psize).Lo, S(psize).Hi, fd.cySize.Lo, fd.cySize.Hi);
/* Check hFont size. */ hres = IFont_get_hFont (ifnt, &hfont); - ok(hres == S_OK, "%s: IFont_get_hFont returns 0x%08x instead of S_OK.\n", + ok(hres == S_OK, "%s: IFont_get_hFont returns 0x%08lx instead of S_OK.\n", test_name, hres); rtnval = GetObjectA(hfont, sizeof(LOGFONTA), &lf); ok(rtnval > 0, "GetObject(hfont) failed\n");
/* Since font scaling may encounter rounding errors, allow 1 pixel deviation. */ ok(abs(lf.lfHeight - hfont_height) <= 1, - "%s: hFont has lf.lfHeight=%d, expected %d.\n", + "%s: hFont has lf.lfHeight=%ld, expected %ld.\n", test_name, lf.lfHeight, hfont_height);
/* Free IFont. */ @@ -154,7 +154,7 @@ static void test_ifont_sizes(void) test_ifont_size(180000, 0, 0, -30, "default"); /* normal font */ test_ifont_size(186000, 0, 0, -31, "rounding"); /* test rounding */ } else - skip("Skipping resolution dependent font size tests - display resolution is %d\n", dpi); + skip("Skipping resolution dependent font size tests - display resolution is %ld\n", dpi);
/* Next 4 tests specify a scaling ratio, so display resolution is not a factor. */ test_ifont_size(180000, 72, 2540, -18, "ratio1"); /* change ratio */ @@ -240,11 +240,11 @@ static void test_type_info(void) fontdisp = pvObj;
hres = IFontDisp_GetTypeInfo(fontdisp, 0, en_us, &pTInfo); - ok(hres == S_OK, "GTI returned 0x%08x instead of S_OK.\n", hres); + ok(hres == S_OK, "GTI returned 0x%08lx 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%08x instead of S_OK.\n", hres); + ok(hres == S_OK, "GetNames returned 0x%08lx 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"); SysFreeString(names[0]); @@ -259,7 +259,7 @@ static 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%08x instead of S_OK.\n", hres); + ok(hres == S_OK, "IFontDisp_Invoke return 0x%08lx instead of S_OK.\n", hres); VariantClear(&varresult);
IFontDisp_Release(fontdisp); @@ -327,7 +327,7 @@ static HRESULT WINAPI FontEventsDisp_Invoke( { VARIANTARG *arg0 = &pDispParams->rgvarg[0];
- ok(dispid == DISPID_FONT_CHANGED, "expected DISPID_FONT_CHANGED instead of 0x%x\n", dispid); + ok(dispid == DISPID_FONT_CHANGED, "expected DISPID_FONT_CHANGED instead of 0x%lx\n", dispid); ok(IsEqualGUID(riid, &GUID_NULL), "got riid %s\n", wine_dbgstr_guid(riid)); ok(wFlags == INVOKE_FUNC, "expected INVOKE_FUNC instead of 0x%x\n", wFlags); ok(pDispParams->cArgs == 1, "expected arg count 1, got %d\n", pDispParams->cArgs); @@ -470,12 +470,12 @@ static void test_font_events_disp(void) dispparams.rgvarg = &vararg; fonteventsdisp_invoke_called = 0; hr = IFontDisp_Invoke(pFontDisp, font_dispids[i].dispid, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "dispid=%d, got 0x%08x\n", font_dispids[i].dispid, hr); - ok(fonteventsdisp_invoke_called == 1, "dispid=%d, DISPID_FONT_CHANGED not called, got %d\n", font_dispids[i].dispid, + ok(hr == S_OK, "dispid=%ld, got 0x%08lx\n", font_dispids[i].dispid, hr); + ok(fonteventsdisp_invoke_called == 1, "dispid=%ld, DISPID_FONT_CHANGED not called, got %d\n", font_dispids[i].dispid, fonteventsdisp_invoke_called); if (hr == S_OK) { - ok(!lstrcmpW(font_dispids[i].name, fonteventsdisp_invoke_arg0), "dispid=%d, got %s, expected %s\n", + ok(!lstrcmpW(font_dispids[i].name, fonteventsdisp_invoke_arg0), "dispid=%ld, got %s, expected %s\n", font_dispids[i].dispid, wine_dbgstr_w(fonteventsdisp_invoke_arg0), wine_dbgstr_w(font_dispids[i].name)); SysFreeString(fonteventsdisp_invoke_arg0); } @@ -516,19 +516,19 @@ static void test_names_ids(WCHAR* w_name_1, const char* a_name_1,
/* test hres */ ok(hres == hres_expect, - "GetIDsOfNames: "%s", "%s" returns 0x%08x, expected 0x%08x.\n", + "GetIDsOfNames: "%s", "%s" returns 0x%08lx, expected 0x%08lx.\n", a_name_1, a_name_2, hres, hres_expect);
/* test first DISPID */ ok(rgDispId[0]==id_1, - "GetIDsOfNames: "%s" gets DISPID 0x%08x, expected 0x%08x.\n", + "GetIDsOfNames: "%s" gets DISPID 0x%08lx, expected 0x%08lx.\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%08x, expected 0x%08x.\n", + "GetIDsOfNames: ..., "%s" gets DISPID 0x%08lx, expected 0x%08lx.\n", a_name_2, rgDispId[1], id_2); }
@@ -679,20 +679,20 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_OK, - "IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08x\n",hres); + "IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08lx\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%08x\n",hres); + "IFont_IsEqual: (NULL) Expected 0x80004003 but got 0x%08lx\n",hres);
/* Test strName */ fd.lpstrName = arial_font; pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08lx\n",hres); fd.lpstrName = system_font; IFont_Release(ifnt2);
@@ -701,7 +701,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08lx\n",hres); S(fd.cySize).Lo = 100; IFont_Release(ifnt2);
@@ -710,7 +710,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08lx\n",hres); S(fd.cySize).Hi = 100; IFont_Release(ifnt2);
@@ -719,7 +719,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08lx\n",hres); fd.sWeight = 0; IFont_Release(ifnt2);
@@ -728,7 +728,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08lx\n",hres); fd.sCharset = 0; IFont_Release(ifnt2);
@@ -737,7 +737,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08lx\n",hres); fd.fItalic = FALSE; IFont_Release(ifnt2);
@@ -746,7 +746,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08lx\n",hres); fd.fUnderline = FALSE; IFont_Release(ifnt2);
@@ -755,7 +755,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08lx\n",hres); fd.fStrikethrough = FALSE; IFont_Release(ifnt2);
@@ -797,36 +797,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%08x\n", + "IFont_ReleaseHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08lx\n", hres);
/* Try to add a bad HFONT */ hres = IFont_ReleaseHfont(ifnt1,(HFONT)32); ok(hres == S_FALSE, - "IFont_ReleaseHfont: (Bad HFONT) Expected S_FALSE but got 0x%08x\n", + "IFont_ReleaseHfont: (Bad HFONT) Expected S_FALSE but got 0x%08lx\n", hres);
/* Release all refs */ hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
hres = IFont_ReleaseHfont(ifnt2,hfnt2); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
/* Check that both lists are empty */ hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n", hres);
/* The list should be empty */ hres = IFont_ReleaseHfont(ifnt2,hfnt2); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n", hres);
IFont_Release(ifnt1); @@ -865,59 +865,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%08x\n", + "IFont_AddRefHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08lx\n", hres);
/* Try to add a bad HFONT */ hres = IFont_AddRefHfont(ifnt1,(HFONT)32); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Bad HFONT) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Bad HFONT) Expected S_FALSE but got 0x%08lx\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%08x\n", + "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n", hres);
/* IFONT and HFONT do not have to be the same (always looks at HFONT) */ hres = IFont_AddRefHfont(ifnt2,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\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%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
/* Check if hfnt1 is empty */ hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\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%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
/* Check if hfnt2 is empty */ hres = IFont_ReleaseHfont(ifnt2,hfnt2); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n", hres);
/* Show that releasing an IFONT does not always release it from the HFONT cache. */ @@ -927,14 +927,14 @@ static void test_AddRefHfont(void) /* Add a reference for destroyed hfnt1 */ hres = IFont_AddRefHfont(ifnt2,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n", hres);
/* Decrement reference for destroyed hfnt1 */ hres = IFont_ReleaseHfont(ifnt2,hfnt1); ok(hres == S_OK || hres == S_FALSE, /* <= win2k */ - "IFont_AddRefHfont: (Release ref) Expected S_OK or S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK or S_FALSE but got 0x%08lx\n", hres);
/* Shows that releasing all IFONT's does clear the HFONT cache. */ @@ -949,13 +949,13 @@ static void test_AddRefHfont(void) /* Add a reference for destroyed hfnt1 */ hres = IFont_AddRefHfont(ifnt3,hfnt1); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n", hres);
/* Decrement reference for destroyed hfnt1 */ hres = IFont_ReleaseHfont(ifnt3,hfnt1); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
IFont_Release(ifnt3); @@ -1028,14 +1028,14 @@ static void test_hfont_lifetime(void) size.int64 = (i + 10) * 20000;
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_put_Size(font, size); EXPECT_HR(hr, S_OK);
/* put_Size doesn't cause the new font to be realized */ obj_type = GetObjectType(last_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_get_hFont(font, &hfont); EXPECT_HR(hr, S_OK); @@ -1048,7 +1048,7 @@ static void test_hfont_lifetime(void) size.int64 = (i + 10) * 20000;
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_put_Size(font, size); EXPECT_HR(hr, S_OK); @@ -1061,7 +1061,7 @@ static void test_hfont_lifetime(void)
if(i == 0) first_hfont = hfont; obj_type = GetObjectType(first_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type); }
IFont_Release(font); @@ -1082,14 +1082,14 @@ static void test_hfont_lifetime(void) size.int64 = (i + 10) * 20000;
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_put_Size(font, size); EXPECT_HR(hr, S_OK);
/* put_Size doesn't cause the new font to be realized */ obj_type = GetObjectType(last_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_get_hFont(font, &hfont); EXPECT_HR(hr, S_OK); @@ -1109,7 +1109,7 @@ static void test_hfont_lifetime(void) size.int64 = (i + 10) * 20000;
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_put_Size(font, size); EXPECT_HR(hr, S_OK); @@ -1122,7 +1122,7 @@ static void test_hfont_lifetime(void)
if(i == 0) first_hfont = hfont; obj_type = GetObjectType(first_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type); }
IFont_Release(font); @@ -1151,12 +1151,12 @@ static void test_hfont_lifetime(void) EXPECT_HR(hr, S_FALSE);
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
IFont_Release(font);
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
IFont_Release(font2); } @@ -1255,13 +1255,13 @@ static void test_OleCreateFontIndirect(void) IFont_Release(font);
hr = OleInitialize(NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoGetClassObject(&CLSID_StdFont, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&unk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void**)&unk2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IUnknown_Release(unk); IUnknown_Release(unk2); diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index 4d8d0ec24c5..a40901cb6f4 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -46,7 +46,7 @@
#define ole_expect(expr, expect) { \ HRESULT r = expr; \ - ok(r == (expect), #expr " returned %x, expected %s (%x)\n", r, #expect, expect); \ + ok(r == (expect), #expr " returned %lx, expected %s (%lx)\n", r, #expect, expect); \ }
#define ole_check(expr) ole_expect(expr, S_OK); @@ -56,7 +56,7 @@ static HMODULE hOleaut32; static HRESULT (WINAPI *pOleLoadPicture)(LPSTREAM,LONG,BOOL,REFIID,LPVOID*); static HRESULT (WINAPI *pOleLoadPictureEx)(LPSTREAM,LONG,BOOL,REFIID,DWORD,DWORD,DWORD,LPVOID*);
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
/* 1x1 pixel gif */ static const unsigned char gifimage[35] = { @@ -218,7 +218,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%08x\n",hres); + ok(hres == S_OK,"OLP (NULL,..) does not return 0, but 0x%08lx\n",hres); ok(pic != NULL,"OLP (NULL,..) returns NULL, instead of !NULL\n"); if (pic == NULL) return; @@ -226,14 +226,14 @@ 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%08x\n", hres); + ok(hres == S_OK,"IPicture_QI does not return S_OK, but 0x%08lx\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%08x\n", hres); + ok(hres == S_OK,"IPicture_get_Handle does not return S_OK, but 0x%08lx\n", hres); ok(handle != 0, "IPicture_get_Handle returns a NULL handle, but it should be non NULL\n");
if (handle) @@ -245,32 +245,32 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)
width = 0; hres = IPicture_get_Width (pic, &width); - ok(hres == S_OK,"IPicture_get_Width does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK,"IPicture_get_Width does not return S_OK, but 0x%08lx\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%08x\n", hres); + ok(hres == S_OK,"IPicture_get_Height does not return S_OK, but 0x%08lx\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%08x\n", hres); + ok(hres == S_OK,"IPicture_get_Type does not return S_OK, but 0x%08lx\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%08x\n", hres); - ok(attr == 0, "IPicture_get_Attributes returns %d, but it should be 0.\n", 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);
hPal = 0; hres = IPicture_get_hPal (pic, &hPal); - ok(hres == S_OK,"IPicture_get_hPal does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK,"IPicture_get_hPal does not return S_OK, but 0x%08lx\n", hres); /* a single pixel b/w image has no palette */ 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 %d, but should be 0?\n", res); + ok (res == 0, "refcount after release is %ld, but should be 0?\n", res); }
static void @@ -292,11 +292,11 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize) GlobalUnlock(hglob); data = NULL;
hres = CreateStreamOnHGlobal (hglob, FALSE, &stream); - ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08lx\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%08x\n", hres); + ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres); test_pic_with_stream(stream, imgsize); IStream_Release(stream); @@ -323,11 +323,11 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize) GlobalUnlock(hglob); data = NULL;
hres = CreateStreamOnHGlobal (hglob, FALSE, &stream); - ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08lx\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%08x\n", hres); + ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres); test_pic_with_stream(stream, imgsize); IStream_Release(stream); @@ -360,29 +360,29 @@ 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%08x\n", hres); + ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\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%08x\n", hres); + ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
pvObj = NULL; hres = pOleLoadPicture(stream, 8, TRUE, &IID_IPicture, &pvObj); pic = pvObj; - ok(hres == S_OK,"empty picture not loaded, hres 0x%08x\n", hres); + ok(hres == S_OK,"empty picture not loaded, hres 0x%08lx\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%08x\n", hres); + ok (hres == S_OK,"empty picture get type failed with hres 0x%08lx\n", hres); ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type);
attr = 0xdeadbeef; hres = IPicture_get_Attributes (pic, &attr); - ok (hres == S_OK,"empty picture get attributes failed with hres 0x%08x\n", hres); - ok (attr == 0,"attr is %d, but should be 0\n", attr); + ok (hres == S_OK,"empty picture get attributes failed with hres 0x%08lx\n", hres); + ok (attr == 0,"attr is %ld, but should be 0\n", attr);
hres = IPicture_get_Handle (pic, &handle); - ok (hres == S_OK,"empty picture get handle failed with hres 0x%08x\n", hres); + ok (hres == S_OK,"empty picture get handle failed with hres 0x%08lx\n", hres); ok (handle == 0, "empty picture get handle did not return 0, but 0x%08x\n", handle); IPicture_Release (pic); IStream_Release (stream); @@ -406,21 +406,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%08x\n", hres); + ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\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%08x\n", hres); + ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
pvObj = NULL; hres = pOleLoadPicture(stream, 8, TRUE, &IID_IPicture, &pvObj); pic = pvObj; - ok(hres == S_OK,"empty picture not loaded, hres 0x%08x\n", hres); + ok(hres == S_OK,"empty picture not loaded, hres 0x%08lx\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%08x\n", hres); + ok (hres == S_OK,"empty picture get type failed with hres 0x%08lx\n", hres); ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type);
IPicture_Release (pic); @@ -460,43 +460,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%08x\n", hr); + ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\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%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
/* DISPID_PICT_RENDER */ hdc = create_render_dc(); @@ -522,18 +522,18 @@ static void test_Invoke(void)
V_VT(&varresult) = VT_EMPTY; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Try with one argument set to VT_I2, it'd still work if coerced. */ V_VT(&args[3]) = VT_I2; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "got 0x%08lx\n", hr); V_VT(&args[3]) = VT_I4;
/* Wrong argument count */ dispparams.cArgs = 9; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "got 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "got 0x%08lx\n", hr);
delete_render_dc(hdc); IPictureDisp_Release(picdisp); @@ -605,22 +605,22 @@ if (0) desc.picType = PICTYPE_UNINITIALIZED; pict = (void *)0xdeadbeef; hr = OleCreatePictureIndirect(&desc, &IID_IPicture, TRUE, (void **)&pict); - ok(hr == E_UNEXPECTED, "got %#x\n", hr); + ok(hr == E_UNEXPECTED, "got %#lx\n", hr); ok(pict == NULL, "got %p\n", pict);
for (i = PICTYPE_UNINITIALIZED; i <= PICTYPE_ENHMETAFILE; i++) { hr = create_picture(i, &pict); - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr);
type = 0xdead; hr = IPicture_get_Type(pict, &type); - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr); ok(type == i, "%d: got %d\n", i, type);
handle = 0xdeadbeef; hr = IPicture_get_Handle(pict, &handle); - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr); if (type == PICTYPE_UNINITIALIZED || type == PICTYPE_NONE) ok(handle == 0, "%d: got %#x\n", i, handle); else @@ -630,20 +630,20 @@ if (0) hr = IPicture_get_hPal(pict, &handle); if (type == PICTYPE_BITMAP) { - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr); ok(handle == 0xbeefdead, "%d: got %#x\n", i, handle); } else { - ok(hr == E_FAIL, "%d: got %#x\n", i, hr); + ok(hr == E_FAIL, "%d: got %#lx\n", i, hr); ok(handle == 0xdeadbeef || handle == 0 /* win64 */, "%d: got %#x\n", i, handle); }
hr = IPicture_set_hPal(pict, HandleToUlong(GetStockObject(DEFAULT_PALETTE))); if (type == PICTYPE_BITMAP) - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr); else - ok(hr == E_FAIL, "%d: got %#x\n", i, hr); + ok(hr == E_FAIL, "%d: got %#lx\n", i, hr);
IPicture_Release(pict); } @@ -674,13 +674,13 @@ static void test_apm(void) expect_eq(type, PICTYPE_METAFILE, short, "%d");
ole_check(IPicture_get_Height(pict, &cxy)); - expect_eq(cxy, 1667, LONG, "%d"); + expect_eq(cxy, 1667l, LONG, "%ld");
ole_check(IPicture_get_Width(pict, &cxy)); - expect_eq(cxy, 1323, LONG, "%d"); + expect_eq(cxy, 1323l, LONG, "%ld");
ole_check(IPicture_get_KeepOriginalFormat(pict, &keep)); - todo_wine expect_eq(keep, FALSE, LONG, "%d"); + todo_wine expect_eq(keep, (LONG)FALSE, LONG, "%ld");
ole_expect(IPicture_get_hPal(pict, &handle), E_FAIL); IPicture_Release(pict); @@ -730,13 +730,13 @@ static void test_enhmetafile(void) expect_eq(type, PICTYPE_ENHMETAFILE, short, "%d");
ole_check(IPicture_get_Height(pict, &cxy)); - expect_eq(cxy, -23, LONG, "%d"); + expect_eq(cxy, -23l, LONG, "%ld");
ole_check(IPicture_get_Width(pict, &cxy)); - expect_eq(cxy, -25, LONG, "%d"); + expect_eq(cxy, -25l, LONG, "%ld");
ole_check(IPicture_get_KeepOriginalFormat(pict, &keep)); - todo_wine expect_eq(keep, FALSE, LONG, "%d"); + todo_wine expect_eq(keep, (LONG)FALSE, LONG, "%ld");
IPicture_Release(pict); IStream_Release(stream); @@ -783,7 +783,7 @@ static HRESULT picture_render(IPicture *iface, HDC hdc, LONG x, LONG y, LONG cx, V_VT(&ret) = VT_EMPTY; hr_disp = IDispatch_Invoke(disp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, ¶ms, &ret, NULL, NULL); - ok(hr == hr_disp, "DISPID_PICT_RENDER returned wrong code, 0x%08x, expected 0x%08x\n", + ok(hr == hr_disp, "DISPID_PICT_RENDER returned wrong code, 0x%08lx, expected 0x%08lx\n", hr_disp, hr);
IDispatch_Release(disp); @@ -804,9 +804,9 @@ static void test_Render(void)
/* test IPicture::Render return code on uninitialized picture */ hres = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres); hres = IPicture_get_Type(pic, &type); - ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08lx\n", hres); ok(type == PICTYPE_UNINITIALIZED, "Expected type = PICTYPE_UNINITIALIZED, got = %d\n", type); /* zero dimensions */ hres = picture_render(pic, hdc, 0, 0, 0, 0, 0, 0, 0, 0, NULL); @@ -838,7 +838,7 @@ static void test_Render(void) }
hres = OleCreatePictureIndirect(&desc, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres); /* zero dimensions, PICTYPE_ICON */ hres = picture_render(pic, hdc, 0, 0, 0, 0, 0, 0, 0, 0, NULL); ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); @@ -872,13 +872,13 @@ static void test_Render(void) /* Evaluate the rendered Icon */ result = GetPixel(hdc, 0, 0); ok(result == expected, - "Color at 0,0 should be unchanged 0x%06X, but was 0x%06X\n", expected, result); + "Color at 0,0 should be unchanged 0x%06lX, but was 0x%06lX\n", expected, result); result = GetPixel(hdc, 5, 5); ok(result != expected, - "Color at 5,5 should have changed, but still was 0x%06X\n", expected); + "Color at 5,5 should have changed, but still was 0x%06lX\n", expected); result = GetPixel(hdc, 10, 10); ok(result == expected, - "Color at 10,10 should be unchanged 0x%06X, but was 0x%06X\n", expected, result); + "Color at 10,10 should be unchanged 0x%06lX, but was 0x%06lX\n", expected, result);
done: IPicture_Release(pic); @@ -893,9 +893,9 @@ static void test_get_Attributes(void) DWORD attr;
hres = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres); hres = IPicture_get_Type(pic, &type); - ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08lx\n", hres); ok(type == PICTYPE_UNINITIALIZED, "Expected type = PICTYPE_UNINITIALIZED, got = %d\n", type);
hres = IPicture_get_Attributes(pic, NULL); @@ -904,7 +904,7 @@ static void test_get_Attributes(void) attr = 0xdeadbeef; hres = IPicture_get_Attributes(pic, &attr); ole_expect(hres, S_OK); - ok(attr == 0, "IPicture_get_Attributes does not reset attr to zero, got %d\n", attr); + ok(attr == 0, "IPicture_get_Attributes does not reset attr to zero, got %ld\n", attr);
IPicture_Release(pic); } @@ -915,7 +915,7 @@ static void test_get_Handle(void) HRESULT hres;
hres = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres); hres = IPicture_get_Handle(pic, NULL); ole_expect(hres, E_POINTER);
@@ -928,7 +928,7 @@ static void test_get_Type(void) HRESULT hres;
hres = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres);
hres = IPicture_get_Type(pic, NULL); ole_expect(hres, E_POINTER); @@ -972,7 +972,7 @@ static void test_OleLoadPicturePath(void) invalid_parameters[i].riid, (void **)invalid_parameters[i].pic); ok(hres == E_INVALIDARG, - "[%d] Expected OleLoadPicturePath to return E_INVALIDARG, got 0x%08x\n", i, hres); + "[%d] Expected OleLoadPicturePath to return E_INVALIDARG, got 0x%08lx\n", i, hres); ok(pic == (IPicture *)0xdeadbeef, "[%d] Expected output pointer to be 0xdeadbeef, got %p\n", i, pic); } @@ -983,7 +983,7 @@ static void test_OleLoadPicturePath(void) ok(hres == INET_E_UNKNOWN_PROTOCOL || /* XP/Vista+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_OUTOFMEMORY), /* Win2k/Win2k3 */ - "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08lx\n", hres); ok(pic == NULL, "Expected the output interface pointer to be NULL, got %p\n", pic);
@@ -993,7 +993,7 @@ static void test_OleLoadPicturePath(void) ok(hres == INET_E_UNKNOWN_PROTOCOL || /* XP/Vista+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_OUTOFMEMORY), /* Win2k/Win2k3 */ - "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08lx\n", hres); ok(pic == NULL, "Expected the output interface pointer to be NULL, got %p\n", pic);
@@ -1011,7 +1011,7 @@ static void test_OleLoadPicturePath(void) hres = OleLoadPicturePath(temp_fileW + 8, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == S_OK || broken(hres == E_UNEXPECTED), /* NT4 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n", hres); if (pic) IPicture_Release(pic);
@@ -1019,7 +1019,7 @@ static void test_OleLoadPicturePath(void) hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == S_OK || broken(hres == E_UNEXPECTED), /* NT4 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n", hres); if (pic) IPicture_Release(pic);
@@ -1030,13 +1030,13 @@ static void test_OleLoadPicturePath(void) ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_FAIL), /*Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_FAIL), /* Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); @@ -1055,7 +1055,7 @@ static void test_OleLoadPicturePath(void) hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == S_OK || broken(hres == E_UNEXPECTED), /* NT4 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n", hres); if (pic) IPicture_Release(pic);
@@ -1066,7 +1066,7 @@ static void test_OleLoadPicturePath(void) ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_FAIL), /* Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres); }
static void test_himetric(void) @@ -1095,19 +1095,19 @@ static void test_himetric(void)
/* size in himetric units reported rounded up to next integer value */ hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
cx = 0; d = MulDiv((INT)(1.9 * GetDeviceCaps(hdc, LOGPIXELSX)), 2540, GetDeviceCaps(hdc, LOGPIXELSX)); hr = IPicture_get_Width(pic, &cx); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cx == d, "got %d, expected %d\n", cx, d); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cx == d, "got %ld, expected %d\n", cx, d);
cy = 0; d = MulDiv((INT)(1.9 * GetDeviceCaps(hdc, LOGPIXELSY)), 2540, GetDeviceCaps(hdc, LOGPIXELSY)); hr = IPicture_get_Height(pic, &cy); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cy == d, "got %d, expected %d\n", cy, d); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cy == d, "got %ld, expected %d\n", cy, d);
DeleteObject(bmp); IPicture_Release(pic); @@ -1121,19 +1121,19 @@ static void test_himetric(void) desc.u.icon.hicon = icon;
hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
cx = 0; d = MulDiv(GetSystemMetrics(SM_CXICON), 2540, GetDeviceCaps(hdc, LOGPIXELSX)); hr = IPicture_get_Width(pic, &cx); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cx == d, "got %d, expected %d\n", cx, d); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cx == d, "got %ld, expected %d\n", cx, d);
cy = 0; d = MulDiv(GetSystemMetrics(SM_CYICON), 2540, GetDeviceCaps(hdc, LOGPIXELSY)); hr = IPicture_get_Height(pic, &cy); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cy == d, "got %d, expected %d\n", cy, d); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cy == d, "got %ld, expected %d\n", cy, d);
IPicture_Release(pic); DestroyIcon(icon); @@ -1160,55 +1160,55 @@ static void test_load_save_bmp(void) desc.u.bmp.hpal = 0; desc.u.bmp.hbitmap = CreateBitmap(1, 1, 1, 1, NULL); hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); - ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr); + ok(hr == S_OK, "OleCreatePictureIndirect error %#lx\n", hr);
type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(hr == S_OK,"get_Type error %#8lx\n", hr); ok(type == PICTYPE_BITMAP,"expected picture type PICTYPE_BITMAP, got %d\n", type);
hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(IntToPtr(handle) == desc.u.bmp.hbitmap, "get_Handle returned wrong handle %#x\n", handle);
hmem = GlobalAlloc(GMEM_ZEROINIT, 4096); hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream); - ok(hr == S_OK, "createstreamonhglobal error %#x\n", hr); + ok(hr == S_OK, "createstreamonhglobal error %#lx\n", hr);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); - ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr); todo_wine - ok(size == 66, "expected 66, got %d\n", size); + ok(size == 66, "expected 66, got %ld\n", size); mem = GlobalLock(hmem); todo_wine - ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04x\n", mem[0]); + ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04lx\n", mem[0]); GlobalUnlock(hmem);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); todo_wine - ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr); + ok(hr == E_FAIL, "expected E_FAIL, got %#lx\n", hr); todo_wine - ok(size == -1, "expected -1, got %d\n", size); + ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0; hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek %#x\n", hr); + ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr);
hr = IPersistStream_Save(src_stream, dst_stream, TRUE); - ok(hr == S_OK, "Save error %#x\n", hr); + ok(hr == S_OK, "Save error %#lx\n", hr);
IPersistStream_Release(src_stream); IStream_Release(dst_stream);
mem = GlobalLock(hmem); - ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n", mem[0]); - ok(mem[1] == 66, "expected stream size 66, got %u\n", mem[1]); - ok(!memcmp(&mem[2], "BM", 2), "got wrong bmp header %04x\n", mem[2]); + ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04lx\n", mem[0]); + ok(mem[1] == 66, "expected stream size 66, got %lu\n", mem[1]); + ok(!memcmp(&mem[2], "BM", 2), "got wrong bmp header %04lx\n", mem[2]);
GlobalUnlock(hmem); GlobalFree(hmem); @@ -1235,56 +1235,56 @@ static void test_load_save_icon(void) desc.picType = PICTYPE_ICON; desc.u.icon.hicon = LoadIconA(NULL, (LPCSTR)IDI_APPLICATION); hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); - ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr); + ok(hr == S_OK, "OleCreatePictureIndirect error %#lx\n", hr);
type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(hr == S_OK,"get_Type error %#8lx\n", hr); ok(type == PICTYPE_ICON,"expected picture type PICTYPE_ICON, got %d\n", type);
hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(IntToPtr(handle) == desc.u.icon.hicon, "get_Handle returned wrong handle %#x\n", handle);
hmem = GlobalAlloc(GMEM_ZEROINIT, 8192); hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream); - ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr); + ok(hr == S_OK, "CreateStreamOnHGlobal error %#lx\n", hr);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); - ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr); todo_wine - ok(size == 766, "expected 766, got %d\n", size); + ok(size == 766, "expected 766, got %ld\n", size); mem = GlobalLock(hmem); todo_wine - ok(mem[0] == 0x00010000, "got wrong icon header %04x\n", mem[0]); + ok(mem[0] == 0x00010000, "got wrong icon header %04lx\n", mem[0]); GlobalUnlock(hmem);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); todo_wine - ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr); + ok(hr == E_FAIL, "expected E_FAIL, got %#lx\n", hr); todo_wine - ok(size == -1, "expected -1, got %d\n", size); + ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0; hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek %#x\n", hr); + ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr);
hr = IPersistStream_Save(src_stream, dst_stream, TRUE); - ok(hr == S_OK, "Saveerror %#x\n", hr); + ok(hr == S_OK, "Saveerror %#lx\n", hr);
IPersistStream_Release(src_stream); IStream_Release(dst_stream);
mem = GlobalLock(hmem); - ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n", mem[0]); + ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04lx\n", mem[0]); todo_wine - ok(mem[1] == 766, "expected stream size 766, got %u\n", mem[1]); - ok(mem[2] == 0x00010000, "got wrong icon header %04x\n", mem[2]); + ok(mem[1] == 766, "expected stream size 766, got %lu\n", mem[1]); + ok(mem[2] == 0x00010000, "got wrong icon header %04lx\n", mem[2]);
GlobalUnlock(hmem); GlobalFree(hmem); @@ -1311,43 +1311,43 @@ static void test_load_save_empty_picture(void) desc.cbSizeofstruct = sizeof(desc); desc.picType = PICTYPE_NONE; hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void **)&pic); - ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr); + ok(hr == S_OK, "OleCreatePictureIndirect error %#lx\n", hr);
type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK, "get_Type error %#x\n", hr); + ok(hr == S_OK, "get_Type error %#lx\n", hr); ok(type == PICTYPE_NONE,"expected picture type PICTYPE_NONE, got %d\n", type);
handle = (OLE_HANDLE)0xdeadbeef; hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(!handle, "get_Handle returned wrong handle %#x\n", handle);
hmem = GlobalAlloc(GMEM_ZEROINIT, 4096); hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream); - ok(hr == S_OK, "createstreamonhglobal error %#x\n", hr); + ok(hr == S_OK, "createstreamonhglobal error %#lx\n", hr);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); - ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr); todo_wine - ok(size == -1, "expected -1, got %d\n", size); + ok(size == -1, "expected -1, got %ld\n", size);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); - ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr); todo_wine - ok(size == -1, "expected -1, got %d\n", size); + ok(size == -1, "expected -1, got %ld\n", size);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr);
hr = IPersistStream_Save(src_stream, dst_stream, TRUE); - ok(hr == S_OK, "Save error %#x\n", hr); + ok(hr == S_OK, "Save error %#lx\n", hr);
mem = GlobalLock(hmem); - ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n", mem[0]); - ok(mem[1] == 0, "expected stream size 0, got %u\n", mem[1]); + ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04lx\n", mem[0]); + ok(mem[1] == 0, "expected stream size 0, got %lu\n", mem[1]); GlobalUnlock(hmem);
IPersistStream_Release(src_stream); @@ -1356,22 +1356,22 @@ static void test_load_save_empty_picture(void) /* first with statable and seekable stream */ offset.QuadPart = 0; hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek %#x\n", hr); + ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
pic = NULL; hr = pOleLoadPicture(dst_stream, 0, FALSE, &IID_IPicture, (void **)&pic); - ok(hr == S_OK, "OleLoadPicture error %#x\n", hr); + ok(hr == S_OK, "OleLoadPicture error %#lx\n", hr); ok(pic != NULL,"picture should not be not NULL\n"); if (pic != NULL) { type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(hr == S_OK,"get_Type error %#8lx\n", hr); ok(type == PICTYPE_NONE,"expected picture type PICTYPE_NONE, got %d\n", type);
handle = (OLE_HANDLE)0xdeadbeef; hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(!handle, "get_Handle returned wrong handle %#x\n", handle);
IPicture_Release(pic); @@ -1384,18 +1384,18 @@ static void test_load_save_empty_picture(void)
pic = NULL; hr = pOleLoadPicture(stream, 0, FALSE, &IID_IPicture, (void **)&pic); - ok(hr == S_OK, "OleLoadPicture error %#x\n", hr); + ok(hr == S_OK, "OleLoadPicture error %#lx\n", hr); ok(pic != NULL,"picture should not be not NULL\n"); if (pic != NULL) { type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(hr == S_OK,"get_Type error %#8lx\n", hr); ok(type == PICTYPE_NONE,"expected picture type PICTYPE_NONE, got %d\n", type);
handle = (OLE_HANDLE)0xdeadbeef; hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(!handle, "get_Handle returned wrong handle %#x\n", handle);
IPicture_Release(pic); diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index a5ddeb82d88..dbbe86994f5 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -316,7 +316,7 @@ static void check_for_VT_INT_PTR(void) trace("VT_INT_PTR is supported\n"); has_int_ptr = TRUE; hres = SafeArrayDestroy(a); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); } else { trace("VT_INT_PTR is not supported\n"); @@ -390,7 +390,7 @@ static void test_safearray(void) unsigned char *ptr1, *ptr2;
hres = SafeArrayDestroy( NULL); - ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%x\n", hres); + ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%lx\n", hres);
bound.cElements = 1; bound.lLbound = 0; @@ -403,25 +403,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 %x\n",hres); - ok(l == 42, "SAGLB of 0 size dimensioned array failed to return 42, but returned %d\n",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); hres = SafeArrayGetUBound(a, 1, &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); + 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);
hres = SafeArrayAccessData(a, &data); - ok(hres == S_OK, "SafeArrayAccessData of 0 size dimensioned array failed with %x\n", hres); + ok(hres == S_OK, "SafeArrayAccessData of 0 size dimensioned array failed with %lx\n", hres); SafeArrayUnaccessData(a);
bound.cElements = 2; hres = SafeArrayRedim(a, &bound); - ok(hres == S_OK,"SAR of a 0 elements dimension failed with hres %x\n", hres); + ok(hres == S_OK,"SAR of a 0 elements dimension failed with hres %lx\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 %x\n", hres); + "SAR to a 0 elements dimension failed with hres %lx\n", hres); hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD of 0 dim array failed with hres %x\n", hres); + ok(hres == S_OK,"SAD of 0 dim array failed with hres %lx\n", hres);
SafeArrayAllocDescriptor(2, &a); a->rgsabound[0].cElements = 2; @@ -430,12 +430,12 @@ static void test_safearray(void) a->rgsabound[1].lLbound = 1; a->cbElements = 2; hres = SafeArrayAllocData(a); - ok(hres == S_OK, "SafeArrayAllocData failed with hres %x\n", hres); + ok(hres == S_OK, "SafeArrayAllocData failed with hres %lx\n", hres);
indices[0] = 4; indices[1] = 2; hres = SafeArrayPtrOfIndex(a, indices, (void **)&ptr1); - ok(hres == S_OK, "SAPOI failed with hres %x\n", hres); + ok(hres == S_OK, "SAPOI failed with hres %lx\n", hres); SafeArrayAccessData(a, (void **)&ptr2); ok(ptr1 - ptr2 == 14, "SAPOI got wrong ptr\n"); *(WORD *)ptr1 = 0x55aa; @@ -463,7 +463,7 @@ static void test_safearray(void) "Data not preserved when resizing array\n");
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres);
bounds[0].cElements = 0; bounds[0].lLbound = 1; bounds[1].cElements = 2; bounds[1].lLbound = 23; @@ -471,14 +471,14 @@ static void test_safearray(void) ok(a != NULL,"SAC(VT_INT32,2,...) with 0 element dim failed.\n");
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres); bounds[0].cElements = 1; bounds[0].lLbound = 1; bounds[1].cElements = 0; bounds[1].lLbound = 23; a = SafeArrayCreate(VT_I4,2,bounds); ok(a != NULL,"SAC(VT_INT32,2,...) with 0 element dim failed.\n");
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres);
bounds[0].cElements = 42; bounds[0].lLbound = 1; bounds[1].cElements = 2; bounds[1].lLbound = 23; @@ -486,26 +486,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 %x\n", hres); + ok (hres == DISP_E_BADINDEX, "SAGLB 0 failed with %lx\n", hres); hres = SafeArrayGetLBound (a, 1, &l); - ok (hres == S_OK, "SAGLB 1 failed with %x\n", hres); - ok (l == 1, "SAGLB 1 returned %d instead of 1\n", l); + ok (hres == S_OK, "SAGLB 1 failed with %lx\n", hres); + ok (l == 1, "SAGLB 1 returned %ld instead of 1\n", l); hres = SafeArrayGetLBound (a, 2, &l); - ok (hres == S_OK, "SAGLB 2 failed with %x\n", hres); - ok (l == 23, "SAGLB 2 returned %d instead of 23\n", l); + ok (hres == S_OK, "SAGLB 2 failed with %lx\n", hres); + ok (l == 23, "SAGLB 2 returned %ld instead of 23\n", l); hres = SafeArrayGetLBound (a, 3, &l); - ok (hres == DISP_E_BADINDEX, "SAGLB 3 failed with %x\n", hres); + ok (hres == DISP_E_BADINDEX, "SAGLB 3 failed with %lx\n", hres);
hres = SafeArrayGetUBound (a, 0, &l); - ok (hres == DISP_E_BADINDEX, "SAGUB 0 failed with %x\n", hres); + ok (hres == DISP_E_BADINDEX, "SAGUB 0 failed with %lx\n", hres); hres = SafeArrayGetUBound (a, 1, &l); - ok (hres == S_OK, "SAGUB 1 failed with %x\n", hres); - ok (l == 42, "SAGUB 1 returned %d instead of 42\n", l); + ok (hres == S_OK, "SAGUB 1 failed with %lx\n", hres); + ok (l == 42, "SAGUB 1 returned %ld instead of 42\n", l); hres = SafeArrayGetUBound (a, 2, &l); - ok (hres == S_OK, "SAGUB 2 failed with %x\n", hres); - ok (l == 24, "SAGUB 2 returned %d instead of 24\n", l); + ok (hres == S_OK, "SAGUB 2 failed with %lx\n", hres); + ok (l == 24, "SAGUB 2 returned %ld instead of 24\n", l); hres = SafeArrayGetUBound (a, 3, &l); - ok (hres == DISP_E_BADINDEX, "SAGUB 3 failed with %x\n", hres); + ok (hres == DISP_E_BADINDEX, "SAGUB 3 failed with %lx\n", hres);
i = SafeArrayGetDim(a); ok(i == 2, "getdims of 2 din array returned %d\n",i); @@ -513,57 +513,57 @@ 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%x\n",hres); + ok(DISP_E_BADINDEX == hres,"SAGE failed [0,23], hres 0x%lx\n",hres);
indices[0] = 1; indices[1] = 22; hres = SafeArrayGetElement(a, indices, &i); - ok(DISP_E_BADINDEX == hres,"SAGE failed [1,22], hres 0x%x\n",hres); + ok(DISP_E_BADINDEX == hres,"SAGE failed [1,22], hres 0x%lx\n",hres);
indices[0] = 1; indices[1] = 23; hres = SafeArrayGetElement(a, indices, &i); - ok(S_OK == hres,"SAGE failed [1,23], hres 0x%x\n",hres); + ok(S_OK == hres,"SAGE failed [1,23], hres 0x%lx\n",hres);
indices[0] = 1; indices[1] = 25; hres = SafeArrayGetElement(a, indices, &i); - ok(DISP_E_BADINDEX == hres,"SAGE failed [1,24], hres 0x%x\n",hres); + ok(DISP_E_BADINDEX == hres,"SAGE failed [1,24], hres 0x%lx\n",hres);
indices[0] = 3; indices[1] = 23; hres = SafeArrayGetElement(a, indices, &i); - ok(S_OK == hres,"SAGE failed [42,23], hres 0x%x\n",hres); + ok(S_OK == hres,"SAGE failed [42,23], hres 0x%lx\n",hres);
hres = SafeArrayAccessData(a, (void**)&ptr1); - ok(S_OK == hres, "SAAD failed with 0x%x\n", hres); + ok(S_OK == hres, "SAAD failed with 0x%lx\n", hres);
indices[0] = 3; indices[1] = 23; hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [1,23], hres 0x%x\n",hres); + ok(S_OK == hres,"SAPOI failed [1,23], hres 0x%lx\n",hres); diff = ptr2 - ptr1; ok(diff == 8,"ptr difference is not 8, but %d (%p vs %p)\n", diff, ptr2, ptr1);
indices[0] = 3; indices[1] = 24; hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [5,24], hres 0x%x\n",hres); + ok(S_OK == hres,"SAPOI failed [5,24], hres 0x%lx\n",hres); diff = ptr2 - ptr1; ok(diff == 176,"ptr difference is not 176, but %d (%p vs %p)\n", diff, ptr2, ptr1);
indices[0] = 20; indices[1] = 23; hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [20,23], hres 0x%x\n",hres); + ok(S_OK == hres,"SAPOI failed [20,23], hres 0x%lx\n",hres); diff = ptr2 - ptr1; ok(diff == 76,"ptr difference is not 76, but %d (%p vs %p)\n", diff, ptr2, ptr1);
hres = SafeArrayUnaccessData(a); - ok(S_OK == hres, "SAUAD failed with 0x%x\n", hres); + ok(S_OK == hres, "SAUAD failed with 0x%lx\n", hres);
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres);
for (i = 0; i < ARRAY_SIZE(vttypes); i++) { if ((i == VT_I8 || i == VT_UI8) && has_i8) @@ -575,7 +575,7 @@ static void test_safearray(void)
ok((!a && !vttypes[i].elemsize) || (a && vttypes[i].elemsize == a->cbElements), - "SAC(%d,1,[1,0]), %p result %d, expected %d\n", + "SAC(%d,1,[1,0]), %p result %ld, expected %d\n", vttypes[i].vt,a,(a?a->cbElements:0),vttypes[i].elemsize);
if (a) @@ -594,37 +594,37 @@ static void test_safearray(void) if (pSafeArrayGetVartype) { hres = pSafeArrayGetVartype(a, &vt); - ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %lx\n", vttypes[i].vt, hres); /* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */ ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt); }
hres = SafeArrayCopy(a, &c); - ok(hres == S_OK, "failed to copy safearray of vt %d with hres %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "failed to copy safearray of vt %d with hres %lx\n", vttypes[i].vt, hres);
- 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(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(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 %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "SAGVT of array with vt %d failed with %lx\n", vttypes[i].vt, hres); /* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */ ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt); }
hres = SafeArrayCopyData(a, c); - ok(hres == S_OK, "failed to copy safearray data of vt %d with hres %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "failed to copy safearray data of vt %d with hres %lx\n", vttypes[i].vt, hres);
hres = SafeArrayDestroyData(c); - ok(hres == S_OK,"SADD of copy of array with vt %d failed with hres %x\n", vttypes[i].vt, hres); + ok(hres == S_OK,"SADD of copy of array with vt %d failed with hres %lx\n", vttypes[i].vt, hres);
hres = SafeArrayDestroy(c); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres);
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD of array with vt %d failed with hres %x\n", vttypes[i].vt, hres); + ok(hres == S_OK,"SAD of array with vt %d failed with hres %lx\n", vttypes[i].vt, hres); }
/* Test conversion of type|VT_ARRAY <-> VT_BSTR */ @@ -638,7 +638,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 %x\n",hres); + ok(hres==S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\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]); VariantClear(&v); @@ -647,7 +647,7 @@ static void test_safearray(void) V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocStringLen(NULL, 0); hres = VariantChangeTypeEx(&d, &v, 0, 0, VT_UI1|VT_ARRAY); - ok(hres==S_OK, "CTE VT_BSTR -> VT_UI1|VT_ARRAY failed with %x\n",hres); + ok(hres==S_OK, "CTE VT_BSTR -> VT_UI1|VT_ARRAY failed with %lx\n",hres); ok(V_VT(&d) == (VT_UI1|VT_ARRAY),"CTE BSTR -> VT_UI1|VT_ARRAY did not return VT_UI1|VT_ARRAY, but %d.v\n",V_VT(&v)); VariantClear(&v); VariantClear(&d); @@ -657,16 +657,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 %x\n",hres); + ok(hres == S_OK,"SAAD failed with hres %lx\n",hres);
hres = SafeArrayDestroy(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
hres = SafeArrayDestroyData(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy data not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy data not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
hres = SafeArrayDestroyDescriptor(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy descriptor not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy descriptor not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
hres = SafeArrayUnaccessData(a); ok(hres == S_OK,"SAUD failed after lock/destroy test\n"); @@ -678,7 +678,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 %x\n",hres); + ok(hres == S_OK,"SADD with data in array failed with hres %lx\n",hres);
/* IID functions */ /* init a small stack safearray */ @@ -686,16 +686,16 @@ static void test_safearray(void) b.cDims = 1; memset(&iid, 0x42, sizeof(IID)); hres = SafeArraySetIID(&b, &iid); - ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); + ok(hres == E_INVALIDARG, "Unexpected ret value %#lx.\n", hres);
hres = SafeArrayAllocDescriptor(1, &a); - ok(hres == S_OK, "Failed to allocate array descriptor, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to allocate array descriptor, hr %#lx.\n", hres); ok((a->fFeatures & FADF_HAVEIID) == 0, "Unexpected features mask %#x.\n", a->fFeatures); hres = SafeArraySetIID(a, &iid); - ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); + ok(hres == E_INVALIDARG, "Unexpected ret value %#lx.\n", hres);
hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD failed with hres %x\n",hres); + ok(hres == S_OK,"SADD failed with hres %lx\n",hres);
if (!pSafeArrayAllocDescriptorEx) return; @@ -703,11 +703,11 @@ static void test_safearray(void) for (i = 0; i < ARRAY_SIZE(vttypes); i++) { a = NULL; hres = pSafeArrayAllocDescriptorEx(vttypes[i].vt,1,&a); - ok(hres == S_OK, "SafeArrayAllocDescriptorEx gave hres 0x%x\n", hres); + ok(hres == S_OK, "SafeArrayAllocDescriptorEx gave hres 0x%lx\n", hres); 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 = SafeArrayGetIID(a, &iid); - ok(hres == S_OK,"SAGIID failed for vt %d with hres %x\n", vttypes[i].vt,hres); + ok(hres == S_OK,"SAGIID failed for vt %d with hres %lx\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"); @@ -723,17 +723,17 @@ static void test_safearray(void) } } else { hres = SafeArrayGetIID(a, &iid); - ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %x\n", vttypes[i].vt,hres); + ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %lx\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 %d\n",vttypes[i].vt,((DWORD*)a)[-1]); + ok(vttypes[i].vt == ((DWORD*)a)[-1], "FADF_HAVEVARTYPE set, but vt %d mismatch stored %ld\n",vttypes[i].vt,((DWORD*)a)[-1]); }
hres = pSafeArrayGetVartype(a, &vt); - ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "SAGVT of array with vt %d failed with %lx\n", vttypes[i].vt, hres);
if (vttypes[i].vt == VT_DISPATCH) { /* Special case. Checked against Windows. */ @@ -744,16 +744,16 @@ static void test_safearray(void)
if (a->fFeatures & FADF_HAVEIID) { hres = SafeArraySetIID(a, &IID_IStorage); /* random IID */ - ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres); hres = SafeArrayGetIID(a, &iid); - ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres); ok(IsEqualGUID(&iid, &IID_IStorage),"returned iid is not IID_IStorage\n"); } else { hres = SafeArraySetIID(a, &IID_IStorage); /* random IID */ - ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); + ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres); } hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD failed with hres %x\n",hres); + ok(hres == S_OK,"SADD failed with hres %lx\n",hres); } }
@@ -765,23 +765,23 @@ static void test_SafeArrayAllocDestroyDescriptor(void)
/* Failure cases */ hres = SafeArrayAllocDescriptor(0, &sa); - ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%lx\n", hres);
hres = SafeArrayAllocDescriptor(65536, &sa); - ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%lx\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%x\n", hres); + ok(hres == E_POINTER,"NULL parm gave hres 0x%lx\n", hres); }
/* 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%x\n", i, hres); + ok(hres == S_OK, "%d dimensions failed; hres 0x%lx\n", i, hres);
if (hres == S_OK) { @@ -789,7 +789,7 @@ static void test_SafeArrayAllocDestroyDescriptor(void) SafeArrayGetDim(sa), i);
hres = SafeArrayDestroyDescriptor(sa); - ok(hres == S_OK, "destroy failed; hres 0x%x\n", hres); + ok(hres == S_OK, "destroy failed; hres 0x%lx\n", hres); } }
@@ -797,25 +797,25 @@ static void test_SafeArrayAllocDestroyDescriptor(void) return;
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 0, &sa); - ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%lx\n", hres);
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 65536, &sa); - ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%lx\n", hres);
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 1, NULL); - ok(hres == E_POINTER,"NULL parm gave hres 0x%x\n", hres); + ok(hres == E_POINTER,"NULL parm gave hres 0x%lx\n", hres);
hres = pSafeArrayAllocDescriptorEx(-1, 1, &sa); - ok(hres == S_OK, "VT = -1 gave hres 0x%x\n", hres); + ok(hres == S_OK, "VT = -1 gave hres 0x%lx\n", hres);
sa->rgsabound[0].cElements = 0; sa->rgsabound[0].lLbound = 1;
hres = SafeArrayAllocData(sa); - ok(hres == S_OK, "SafeArrayAllocData gave hres 0x%x\n", hres); + ok(hres == S_OK, "SafeArrayAllocData gave hres 0x%lx\n", hres);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK,"SafeArrayDestroy failed with hres %x\n",hres); + ok(hres == S_OK,"SafeArrayDestroy failed with hres %lx\n",hres); }
static void test_SafeArrayCreateLockDestroy(void) @@ -868,7 +868,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 %d\n", + "VARTYPE %d (@%d dimensions) cbElements is %d, expected %ld\n", vt, dimension, SafeArrayGetElemsize(sa), dwLen);
if (vt != VT_UNKNOWN && vt != VT_DISPATCH) @@ -876,7 +876,7 @@ static void test_SafeArrayCreateLockDestroy(void) ok((sa->fFeatures & FADF_HAVEIID) == 0, "Non interface type should not have FADF_HAVEIID\n"); hres = SafeArraySetIID(sa, &IID_IUnknown); - ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); + ok(hres == E_INVALIDARG, "Unexpected ret value %#lx.\n", hres); if (vt != VT_RECORD) { VARTYPE aVt; @@ -887,7 +887,7 @@ static void test_SafeArrayCreateLockDestroy(void) { hres = pSafeArrayGetVartype(sa, &aVt); ok(hres == S_OK && aVt == vt, - "Non interface type %d: bad type %d, hres %x\n", vt, aVt, hres); + "Non interface type %d: bad type %d, hres %lx\n", vt, aVt, hres); } } } @@ -895,32 +895,32 @@ static void test_SafeArrayCreateLockDestroy(void) { ok(sa->fFeatures & FADF_HAVEIID, "Interface type should have FADF_HAVEIID\n"); hres = SafeArraySetIID(sa, &IID_IUnknown); - ok(hres == S_OK, "Failed to set array IID, hres %#x.\n", hres); + ok(hres == S_OK, "Failed to set array IID, hres %#lx.\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%x\n", + ok(hres == S_OK, "Lock VARTYPE %d (@%d dimensions) failed; hres 0x%lx\n", vt, dimension, hres);
if (hres == S_OK) { hres = SafeArrayDestroy(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"Destroy() got hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"Destroy() got hres %lx\n", hres);
hres = SafeArrayDestroyData(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"DestroyData() got hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"DestroyData() got hres %lx\n", hres);
hres = SafeArrayDestroyDescriptor(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"DestroyDescriptor() got hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"DestroyDescriptor() got hres %lx\n", hres);
hres = SafeArrayUnlock(sa); - ok(hres == S_OK, "Unlock VARTYPE %d (@%d dims) hres 0x%x\n", + ok(hres == S_OK, "Unlock VARTYPE %d (@%d dims) hres 0x%lx\n", vt, dimension, hres);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "destroy VARTYPE %d (@%d dims) hres 0x%x\n", + ok(hres == S_OK, "destroy VARTYPE %d (@%d dims) hres 0x%lx\n", vt, dimension, hres); } } @@ -939,7 +939,7 @@ static void test_VectorCreateLockDestroy(void) ok(sa != NULL, "SACV with 0 elements failed.\n");
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "SafeArrayDestroy failed with hres %x\n",hres); + ok(hres == S_OK, "SafeArrayDestroy failed with hres %lx\n",hres);
/* Test all VARTYPES in different lengths */ for (element = 1; element <= 101; element += 10) @@ -960,21 +960,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 %d\n", + "VARTYPE %d (@%d elements) cbElements is %d, expected %ld\n", vt, element, SafeArrayGetElemsize(sa), dwLen);
hres = SafeArrayLock(sa); - ok(hres == S_OK, "Lock VARTYPE %d (@%d elements) failed; hres 0x%x\n", + ok(hres == S_OK, "Lock VARTYPE %d (@%d elements) failed; hres 0x%lx\n", vt, element, hres);
if (hres == S_OK) { hres = SafeArrayUnlock(sa); - ok(hres == S_OK, "Unlock VARTYPE %d (@%d elements) failed; hres 0x%x\n", + ok(hres == S_OK, "Unlock VARTYPE %d (@%d elements) failed; hres 0x%lx\n", vt, element, hres);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "destroy VARTYPE %d (@%d elements) failed; hres 0x%x\n", + ok(hres == S_OK, "destroy VARTYPE %d (@%d elements) failed; hres 0x%lx\n", vt, element, hres); } } @@ -992,9 +992,9 @@ static void test_LockUnlock(void)
/* Failure cases */ hres = SafeArrayLock(NULL); - ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%lx\n", hres); hres = SafeArrayUnlock(NULL); - ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%lx\n", hres);
for (dimension = 0; dimension < ARRAY_SIZE(sab); dimension++) { @@ -1011,24 +1011,24 @@ test_LockUnlock_Vector: int count = 0;
hres = SafeArrayUnlock(sa); - ok (hres == E_UNEXPECTED, "Bad %sUnlock gave hres 0x%x\n", + ok (hres == E_UNEXPECTED, "Bad %sUnlock gave hres 0x%lx\n", bVector ? "vector " : "\n", hres);
while ((hres = SafeArrayLock(sa)) == S_OK) count++; - ok (count == 65535 && hres == E_UNEXPECTED, "Lock %sfailed at %d; hres 0x%x\n", + ok (count == 65535 && hres == E_UNEXPECTED, "Lock %sfailed at %d; hres 0x%lx\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%x\n", + ok (count == 0 && hres == E_UNEXPECTED, "Unlock %sfailed at %d; hres 0x%lx\n", bVector ? "vector " : "\n", count, hres); }
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
if (bVector == FALSE) @@ -1089,14 +1089,14 @@ static void test_SafeArrayGetPutElement(void) indices[3] = sab[3].lLbound;
hres = SafeArrayPutElement(NULL, indices, &value); - ok(hres == E_INVALIDARG, "Put NULL array hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Put NULL array hres 0x%lx\n", hres); hres = SafeArrayGetElement(NULL, indices, &value); - ok(hres == E_INVALIDARG, "Get NULL array hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Get NULL array hres 0x%lx\n", hres);
hres = SafeArrayPutElement(sa, NULL, &value); - ok(hres == E_INVALIDARG, "Put NULL indices hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Put NULL indices hres 0x%lx\n", hres); hres = SafeArrayGetElement(sa, NULL, &value); - ok(hres == E_INVALIDARG, "Get NULL indices hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Get NULL indices hres 0x%lx\n", hres);
if (0) { @@ -1104,11 +1104,11 @@ static void test_SafeArrayGetPutElement(void) * except the following, which crashes. We ERR this in Wine. */ hres = SafeArrayPutElement(sa, indices, NULL); - ok(hres == E_INVALIDARG, "Put NULL value hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Put NULL value hres 0x%lx\n", hres); }
hres = SafeArrayGetElement(sa, indices, NULL); - ok(hres == E_INVALIDARG, "Get NULL value hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Get NULL value hres 0x%lx\n", hres);
value = 0;
@@ -1128,7 +1128,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%x\n", + ok(hres == S_OK, "Failed to put element at (%d,%d,%d,%d) hres 0x%lx\n", x, y, z, a, hres); value++; } @@ -1152,7 +1152,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%x\n", + ok(hres == S_OK, "Failed to get element at (%d,%d,%d,%d) hres 0x%lx\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", @@ -1163,7 +1163,7 @@ static void test_SafeArrayGetPutElement(void) } } hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* VT_RECORD array */ irec = IRecordInfoImpl_Construct(); @@ -1174,23 +1174,23 @@ static void test_SafeArrayGetPutElement(void)
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, &irec->IRecordInfo_iface); ok(sa != NULL, "failed to create array\n"); - ok(irec->ref == 2, "got %d\n", irec->ref); + ok(irec->ref == 2, "got %ld\n", irec->ref);
index = 0; irec->recordcopy = 0; hres = SafeArrayPutElement(sa, &index, (void*)0xdeadbeef); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(irec->recordcopy == 1, "got %d\n", irec->recordcopy);
index = 0; irec->recordcopy = 0; hres = SafeArrayGetElement(sa, &index, (void*)0xdeadbeef); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(irec->recordcopy == 1, "got %d\n", irec->recordcopy);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(irec->ref == 1, "got %d\n", irec->ref); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(irec->ref == 1, "got %ld\n", irec->ref); IRecordInfo_Release(&irec->IRecordInfo_iface); }
@@ -1217,14 +1217,14 @@ 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%x\n", hres); + ok(hres == S_OK, "Failed to put bstr element hres 0x%lx\n", hres); gotvalue = NULL; hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get bstr element at hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to get bstr element at hres 0x%lx\n", hres); if (hres == S_OK) ok(SysStringLen(value) == SysStringLen(gotvalue), "Got len %d instead of %d\n", SysStringLen(gotvalue), SysStringLen(value)); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); SysFreeString(value); SysFreeString(gotvalue); } @@ -1278,16 +1278,16 @@ static void test_SafeArrayGetPutElement_IUnknown(void) indices[0] = sab.lLbound; xtunk.ref = 1; hres = SafeArrayPutElement(sa, indices, &xtunk.IUnknown_iface); - ok(hres == S_OK, "Failed to put bstr element hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to put bstr element hres 0x%lx\n", hres); ok(xtunk.ref == 2,"Failed to increment refcount of iface.\n"); gotvalue = NULL; hres = SafeArrayGetElement(sa, indices, &gotvalue); ok(xtunk.ref == 3,"Failed to increment refcount of iface.\n"); - ok(hres == S_OK, "Failed to get bstr element at hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to get bstr element at hres 0x%lx\n", hres); if (hres == S_OK) ok(gotvalue == &xtunk.IUnknown_iface, "Got %p instead of %p\n", gotvalue, &xtunk.IUnknown_iface); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(xtunk.ref == 2,"Failed to decrement refcount of iface.\n"); }
@@ -1310,14 +1310,14 @@ static void test_SafeArrayRedim_IUnknown(void) indices[0] = 2; xtunk.ref = 1; hres = SafeArrayPutElement(sa, indices, &xtunk.IUnknown_iface); - ok(hres == S_OK, "Failed to put IUnknown element hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to put IUnknown element hres 0x%lx\n", hres); ok(xtunk.ref == 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%x\n", hres); + ok(hres == S_OK, "Failed to shrink array hres 0x%lx\n", hres); ok(xtunk.ref == 1, "Failed to decrement refcount\n"); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
static void test_SafeArrayGetPutElement_VARIANT(void) @@ -1341,22 +1341,22 @@ 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%x\n", hres); + ok(hres == S_OK, "Failed to put Variant I4 element hres 0x%lx\n", hres);
V_VT(&gotvalue) = 0xdead; hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get variant element at hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to get variant element at hres 0x%lx\n", hres);
V_VT(&gotvalue) = VT_EMPTY; hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get variant element at hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to get variant element at hres 0x%lx\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 %d instead of %d\n", V_I4(&value), V_VT(&gotvalue)); + ok(V_I4(&value) == V_I4(&gotvalue), "Got %ld instead of %d\n", V_I4(&value), V_VT(&gotvalue)); } hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
static void test_SafeArrayCopyData(void) @@ -1392,7 +1392,7 @@ static void test_SafeArrayCopyData(void) }
hres = SafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "copy data failed hres 0x%x\n", hres); + ok(hres == S_OK, "copy data failed hres 0x%lx\n", hres); if (hres == S_OK) { ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n"); @@ -1400,41 +1400,41 @@ static void test_SafeArrayCopyData(void)
/* Failure cases */ hres = SafeArrayCopyData(NULL, sacopy); - ok(hres == E_INVALIDARG, "Null copy source hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Null copy source hres 0x%lx\n", hres); hres = SafeArrayCopyData(sa, NULL); - ok(hres == E_INVALIDARG, "Null copy hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Null copy hres 0x%lx\n", hres);
sacopy->rgsabound[0].cElements += 1; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Bigger copy first dimension hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Bigger copy first dimension hres 0x%lx\n", hres);
sacopy->rgsabound[0].cElements -= 2; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Smaller copy first dimension hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Smaller copy first dimension hres 0x%lx\n", hres); sacopy->rgsabound[0].cElements += 1;
sacopy->rgsabound[3].cElements += 1; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Bigger copy last dimension hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Bigger copy last dimension hres 0x%lx\n", hres);
sacopy->rgsabound[3].cElements -= 2; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Smaller copy last dimension hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Smaller copy last dimension hres 0x%lx\n", hres); sacopy->rgsabound[3].cElements += 1;
hres = SafeArrayDestroy(sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); sacopy = NULL; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "->Null copy hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "->Null copy hres 0x%lx\n", hres);
hres = SafeArrayCopy(sa, &sacopy); - ok(hres == S_OK, "copy failed hres 0x%x\n", hres); + ok(hres == S_OK, "copy failed hres 0x%lx\n", hres); ok(SafeArrayGetElemsize(sa) == SafeArrayGetElemsize(sacopy),"elemsize wrong\n"); ok(SafeArrayGetDim(sa) == SafeArrayGetDim(sacopy),"dimensions wrong\n"); ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n"); hres = SafeArrayDestroy(sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
sacopy = SafeArrayCreate(VT_INT, ARRAY_SIZE(sab), sab); ok(sacopy != NULL, "Copy test couldn't create copy array\n"); @@ -1447,15 +1447,15 @@ static void test_SafeArrayCopyData(void)
sa->fFeatures |= feature; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sacopy->fFeatures == orig && orig == FADF_HAVEVARTYPE, "got features 0x%04x\n", sacopy->fFeatures); sa->fFeatures &= ~feature; }
hres = SafeArrayDestroy(sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* copy data from a vector */ sa = SafeArrayCreateVector(VT_UI1, 0, 2); @@ -1468,7 +1468,7 @@ static void test_SafeArrayCopyData(void) broken(sacopy->fFeatures == FADF_CREATEVECTOR /* W2k */), "got 0x%08x\n", sacopy->fFeatures); hres = SafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sacopy->fFeatures == (FADF_HAVEVARTYPE|FADF_CREATEVECTOR) || broken(sacopy->fFeatures == FADF_CREATEVECTOR /* W2k */), "got 0x%04x\n", sacopy->fFeatures); @@ -1478,7 +1478,7 @@ static void test_SafeArrayCopyData(void) ok(sacopy != NULL, "Copy test couldn't create copy array\n"); ok(sacopy->fFeatures == FADF_HAVEVARTYPE, "0x%04x\n", sacopy->fFeatures); hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres); SafeArrayDestroy(sacopy);
SafeArrayDestroy(sa); @@ -1517,14 +1517,14 @@ static void test_SafeArrayCreateEx(void) GUID guid;
hres = SafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(hres == S_OK, "Failed to get array IID, hres %#lx.\n", hres); ok(IsEqualGUID(&guid, &IID_ITypeInfo), "CreateEx (ITypeInfo) bad IID\n"); hres = SafeArraySetIID(sa, &IID_IUnknown); - ok(hres == S_OK, "Failed to set IID, hres = %8x\n", hres); + ok(hres == S_OK, "Failed to set IID, hres = %8lx\n", hres); hres = SafeArrayGetIID(sa, &guid); ok(hres == S_OK && IsEqualGUID(&guid, &IID_IUnknown), "Set bad IID\n"); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
sa = pSafeArrayCreateEx(VT_DISPATCH, 1, sab, NULL); @@ -1535,10 +1535,10 @@ static void test_SafeArrayCreateEx(void) GUID guid;
hres = SafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(hres == S_OK, "Failed to get array IID, hres %#lx.\n", hres); ok(IsEqualGUID(&guid, &IID_IDispatch), "CreateEx (NULL) bad IID\n"); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
sa = pSafeArrayCreateEx(VT_UNKNOWN, 1, sab, NULL); @@ -1549,10 +1549,10 @@ static void test_SafeArrayCreateEx(void) GUID guid;
hres = SafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(hres == S_OK, "Failed to get array IID, hres %#lx.\n", hres); ok(IsEqualGUID(&guid, &IID_IUnknown), "CreateEx (NULL-Unk) bad IID\n"); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
/* VT_RECORD failure case */ @@ -1565,16 +1565,16 @@ static void test_SafeArrayCreateEx(void) fail_GetSize = TRUE; sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, &iRec->IRecordInfo_iface); ok(sa != NULL, "CreateEx (Fail Size) failed\n"); - ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref); + ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %ld\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 %d\n", sa->cbElements); + ok(sa->cbElements == RECORD_SIZE_FAIL, "Altered size to %ld\n", sa->cbElements); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled); - ok(iRec->ref == START_REF_COUNT, "got %d, expected %d\n", iRec->ref, START_REF_COUNT); + ok(iRec->ref == START_REF_COUNT, "got %ld, expected %d\n", iRec->ref, START_REF_COUNT); }
/* Test VT_RECORD array */ @@ -1584,7 +1584,7 @@ static void test_SafeArrayCreateEx(void) iRec->clearCalled = 0; sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, &iRec->IRecordInfo_iface); ok(sa != NULL, "CreateEx (Rec) failed\n"); - ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref); + ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %ld\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) @@ -1595,10 +1595,10 @@ static void test_SafeArrayCreateEx(void) hres = pSafeArrayGetRecordInfo(sa, &saRec); ok(hres == S_OK,"GRI failed\n"); ok(saRec == &iRec->IRecordInfo_iface, "Different saRec\n"); - ok(iRec->ref == START_REF_COUNT + 2, "Didn't AddRef %d\n", iRec->ref); + ok(iRec->ref == START_REF_COUNT + 2, "Didn't AddRef %ld\n", iRec->ref); IRecordInfo_Release(saRec);
- ok(sa->cbElements == RECORD_SIZE,"Elemsize is %d\n", sa->cbElements); + ok(sa->cbElements == RECORD_SIZE,"Elemsize is %ld\n", sa->cbElements);
/* try to copy record based arrays */ sacopy = pSafeArrayCreateEx(VT_RECORD, 1, sab, &iRec->IRecordInfo_iface); @@ -1606,25 +1606,25 @@ static void test_SafeArrayCreateEx(void) iRec->clearCalled = 0; /* array copy code doesn't explicitly clear a record */ hres = SafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(iRec->recordcopy == sab[0].cElements, "got %d\n", iRec->recordcopy); ok(iRec->clearCalled == 0, "got %d\n", iRec->clearCalled);
hres = SafeArrayDestroy(sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
iRec->clearCalled = 0; iRec->sizeCalled = 0; hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(iRec->sizeCalled == 0, "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); + ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %ld\n", iRec->ref); } else { hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
IRecordInfo_Release(&iRec->IRecordInfo_iface); @@ -1648,7 +1648,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%x, Type %d\n", hres, V_VT(&v)); + ok(hres == S_OK && V_VT(&v) == VT_EMPTY, "VariantClear: hres 0x%lx, Type %d\n", hres, V_VT(&v)); ok(V_ARRAY(&v) == sa, "VariantClear: Overwrote value\n");
sa = SafeArrayCreate(VT_UI1, 1, &sab); @@ -1659,15 +1659,15 @@ 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%x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%lx\n", hres);
V_VT(&v) = VT_SAFEARRAY|VT_BYREF; V_ARRAYREF(&v) = &sa; hres = VariantClear(&v); - ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%lx\n", hres);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
static void test_SafeArrayCopy(void) @@ -1692,7 +1692,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%x, Type %d\n", hres, V_VT(&vDst)); + "VariantCopy: hres 0x%lx, Type %d\n", hres, V_VT(&vDst)); ok(V_ARRAYREF(&vDst) == &sa, "VariantClear: Performed deep copy\n");
V_VT(&vSrc) = (VT_ARRAY|VT_UI1); @@ -1701,50 +1701,50 @@ static void test_SafeArrayCopy(void)
hres = VariantCopy(&vDst, &vSrc); ok(hres == S_OK && V_VT(&vDst) == (VT_ARRAY|VT_UI1), - "VariantCopy: hres 0x%x, Type %d\n", hres, V_VT(&vDst)); + "VariantCopy: hres 0x%lx, Type %d\n", hres, V_VT(&vDst)); ok(V_ARRAY(&vDst) != sa, "VariantClear: Performed shallow copy\n");
hres = SafeArrayDestroy(V_ARRAY(&vSrc)); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = SafeArrayDestroy(V_ARRAY(&vDst)); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08lx\n", hres);
sa->cbElements = 16; hres = SafeArrayCopy(sa, &sa2); - ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08lx\n", hres); ok(sa != sa2, "SafeArrayCopy performed shallow copy\n");
hres = SafeArrayDestroy(sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
sa2 = (void*)0xdeadbeef; hres = SafeArrayCopy(NULL, &sa2); - ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08lx\n", hres); ok(!sa2, "SafeArrayCopy didn't return NULL for output array\n");
hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08lx\n", hres);
sa2 = (void*)0xdeadbeef; hres = SafeArrayCopy(sa, &sa2); ok(hres == E_INVALIDARG, - "SafeArrayCopy with empty array should have failed with error E_INVALIDARG instead of 0x%08x\n", + "SafeArrayCopy with empty array should have failed with error E_INVALIDARG instead of 0x%08lx\n", hres); ok(!sa2, "SafeArrayCopy didn't return NULL for output array\n");
hres = SafeArrayDestroy(sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* test feature copy */ hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got src features 0x%04x\n", sa->fFeatures); sa->cbElements = 16;
@@ -1754,10 +1754,10 @@ static void test_SafeArrayCopy(void)
sa->fFeatures |= feature; hres = SafeArrayCopy(sa, &sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa2->fFeatures == 0, "got features 0x%04x\n", sa2->fFeatures); hres = SafeArrayDestroy(sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); sa->fFeatures &= ~feature; }
@@ -1769,7 +1769,7 @@ static void test_SafeArrayCopy(void) broken(sa->fFeatures == FADF_CREATEVECTOR /* W2k */), "got 0x%08x\n", sa->fFeatures); hres = SafeArrayCopy(sa, &sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa2->fFeatures == FADF_HAVEVARTYPE || broken(!sa2->fFeatures /* W2k */), "got 0x%04x\n", sa2->fFeatures); @@ -1801,7 +1801,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 %x\n", hres); + ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\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)); @@ -1812,7 +1812,7 @@ static void test_SafeArrayChangeTypeEx(void)
/* VT_VECTOR|VT_UI1 -> VT_BSTR */ hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
sa = SafeArrayCreateVector(VT_UI1, 0, strlen(szHello)+1); ok(sa != NULL, "CreateVector() failed.\n"); @@ -1825,12 +1825,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 %x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "CTE VT_VECTOR|VT_UI1 returned %lx\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 %x\n", hres); + ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\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)); @@ -1857,14 +1857,14 @@ static void test_SafeArrayChangeTypeEx(void) hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR); if (vt == VT_INT_PTR || vt == VT_UINT_PTR) { - ok(hres == DISP_E_BADVARTYPE, "expected DISP_E_BADVARTYPE, got 0x%08x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "expected DISP_E_BADVARTYPE, got 0x%08lx\n", hres); SafeArrayDestroy(sa); } else { - ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08x for vt=%d, instead of DISP_E_TYPEMISMATCH\n", hres, vt); + ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08lx for vt=%d, instead of DISP_E_TYPEMISMATCH\n", hres, vt); hres = VariantClear(&v); - ok(hres == S_OK, "expected S_OK, got 0x%08x\n", hres); + ok(hres == S_OK, "expected S_OK, got 0x%08lx\n", hres); } VariantClear(&v2); } @@ -1880,11 +1880,11 @@ 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 %x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_I1 returned %lx\n", hres);
/* But can change to the same array type */ hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); sa = SafeArrayCreateVector(VT_UI1, 0, 1); ok(sa != NULL, "CreateVector() failed.\n"); if (!sa) @@ -1892,19 +1892,19 @@ 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 %x\n", hres); + ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_UI1 returned %lx\n", hres); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); VariantClear(&v2);
/* 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 %x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %lx\n", hres); VariantClear(&v); MKARRAY(0,1,VT_UI1); hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_EMPTY); - ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %lx\n", hres); VariantClear(&v); }
@@ -1931,7 +1931,7 @@ static void test_SafeArrayDestroyData (void) features = (sa->fFeatures |= FADF_STATIC); temp_pvData = sa->pvData; hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "SADData FADF_STATIC failed, error code %x.\n",hres); + ok(hres == S_OK, "SADData FADF_STATIC failed, error code %lx.\n",hres); ok(features == sa->fFeatures, "got 0x%x\n", sa->fFeatures); ok(sa->pvData == temp_pvData, "SADData FADF_STATIC: pvData=%p, expected %p (fFeatures = %d).\n", sa->pvData, temp_pvData, sa->fFeatures); @@ -1941,12 +1941,12 @@ static void test_SafeArrayDestroyData (void) /* Clear FADF_STATIC, now really destroy the data. */ features = (sa->fFeatures ^= FADF_STATIC); hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "SADData !FADF_STATIC failed, error code %x.\n",hres); + ok(hres == S_OK, "SADData !FADF_STATIC failed, error code %lx.\n",hres); ok(features == sa->fFeatures, "got 0x%x\n", sa->fFeatures); 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 %x.\n", hres); + ok(hres == S_OK, "SAD failed, error code %lx.\n", hres);
/* two dimensions */ sab[0].lLbound = 0; @@ -1960,33 +1960,33 @@ static void test_SafeArrayDestroyData (void)
features = sa->fFeatures; hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "got 0x%08x\n",hres); + ok(hres == S_OK, "got 0x%08lx\n",hres); ok(features == sa->fFeatures, "got 0x%x\n", sa->fFeatures);
SafeArrayDestroy(sa);
/* try to destroy data from descriptor */ hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got 0x%x\n", sa->fFeatures);
hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got 0x%x\n", sa->fFeatures);
hres = SafeArrayDestroyDescriptor(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = SafeArrayAllocDescriptor(2, &sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got 0x%x\n", sa->fFeatures);
hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got 0x%x\n", sa->fFeatures);
hres = SafeArrayDestroyDescriptor(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* vector case */ sa = SafeArrayCreateVector(VT_I4, 0, 10); @@ -1995,7 +1995,7 @@ static void test_SafeArrayDestroyData (void)
ok(sa->pvData != NULL, "got %p\n", sa->pvData); hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); todo_wine ok(sa->fFeatures == FADF_HAVEVARTYPE, "got 0x%x\n", sa->fFeatures); todo_wine @@ -2027,26 +2027,26 @@ static void test_safearray_layout(void) ok(IsEqualIID(guidptr, &IID_IUnknown), "got %s\n", wine_dbgstr_guid(guidptr));
hr = SafeArraySetIID(sa, &IID_IDispatch); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualIID(guidptr, &IID_IDispatch), "got %s\n", wine_dbgstr_guid(guidptr));
memcpy(guidptr, &IID_IUnknown, sizeof(GUID)); hr = SafeArrayGetIID(sa, &guid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualIID(&guid, &IID_IUnknown), "got %s\n", wine_dbgstr_guid(&guid));
hr = SafeArrayDestroy(sa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* VARTYPE field */ sa = SafeArrayCreate(VT_UI1, 1, &sab); ok(sa != NULL, "got %p\n", sa);
dwptr = (DWORD*)sa - 1; - ok(*dwptr == VT_UI1, "got %d\n", *dwptr); + ok(*dwptr == VT_UI1, "got %ld\n", *dwptr);
hr = SafeArrayDestroy(sa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* IRecordInfo pointer */ irec = IRecordInfoImpl_Construct(); @@ -2059,7 +2059,7 @@ static void test_safearray_layout(void) ok(record == &irec->IRecordInfo_iface, "got %p\n", record);
hr = SafeArrayDestroy(sa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IRecordInfo_Release(&irec->IRecordInfo_iface); }
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 3c9d9a98a84..a61b1637c5e 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -30,11 +30,11 @@
#include "tmarshal.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr) static inline void release_iface_(unsigned int line, void *iface) { ULONG ref = IUnknown_Release((IUnknown *)iface); - ok_(__FILE__, line)(!ref, "Got outstanding refcount %d.\n", ref); + ok_(__FILE__, line)(!ref, "Got outstanding refcount %ld.\n", ref); if (ref == 1) IUnknown_Release((IUnknown *)iface); } #define release_iface(a) release_iface_(__LINE__, a) @@ -169,7 +169,7 @@ static void release_host_object(DWORD tid) static void end_host_object(DWORD tid, HANDLE thread) { BOOL ret = PostThreadMessageA(tid, WM_QUIT, 0, 0); - ok(ret, "PostThreadMessage failed with error %d\n", GetLastError()); + ok(ret, "PostThreadMessage failed with error %ld\n", GetLastError()); /* be careful of races - don't return until hosting thread has terminated */ WaitForSingleObject(thread, INFINITE); CloseHandle(thread); @@ -199,8 +199,8 @@ static DWORD WINAPI ExternalConnection_AddConnection(IExternalConnection *iface, { trace("add connection\n");
- ok(extconn == EXTCONN_STRONG, "extconn = %d\n", extconn); - ok(!reserved, "reserved = %x\n", reserved); + ok(extconn == EXTCONN_STRONG, "extconn = %ld\n", extconn); + ok(!reserved, "reserved = %lx\n", reserved); return ++external_connections; }
@@ -209,8 +209,8 @@ static DWORD WINAPI ExternalConnection_ReleaseConnection(IExternalConnection *if { trace("release connection\n");
- ok(extconn == EXTCONN_STRONG, "extconn = %d\n", extconn); - ok(!reserved, "reserved = %x\n", reserved); + ok(extconn == EXTCONN_STRONG, "extconn = %ld\n", extconn); + ok(!reserved, "reserved = %lx\n", reserved);
ok(fLastReleaseCloses == expect_last_release_closes, "fLastReleaseCloses = %x, expected %x\n", fLastReleaseCloses, expect_last_release_closes); @@ -816,7 +816,7 @@ static HRESULT WINAPI Widget_DoSomething( ok(number == 3.141, "number(%f) != 3.141\n", number); ok(*str2 == '\0', "str2(%s) != ""\n", wine_dbgstr_w(str2)); ok(V_VT(opt) == VT_ERROR, "V_VT(opt) should be VT_ERROR instead of 0x%x\n", V_VT(opt)); - ok(V_ERROR(opt) == DISP_E_PARAMNOTFOUND, "V_ERROR(opt) should be DISP_E_PARAMNOTFOUND instead of 0x%08x\n", V_ERROR(opt)); + ok(V_ERROR(opt) == DISP_E_PARAMNOTFOUND, "V_ERROR(opt) should be DISP_E_PARAMNOTFOUND instead of 0x%08lx\n", V_ERROR(opt)); *str1 = SysAllocString(szString);
return S_FALSE; @@ -853,7 +853,7 @@ static HRESULT WINAPI Widget_SetOleColor( IWidget * iface, OLE_COLOR val) { - trace("SetOleColor(0x%x)\n", val); + trace("SetOleColor(0x%lx)\n", val); return S_OK; }
@@ -923,24 +923,24 @@ static HRESULT WINAPI Widget_VarArg( trace("VarArg(%p)\n", values);
hr = SafeArrayGetLBound(values, 1, &lbound); - ok(hr == S_OK, "SafeArrayGetLBound failed with %x\n", hr); - ok(lbound == 0, "SafeArrayGetLBound returned %d\n", lbound); + ok(hr == S_OK, "SafeArrayGetLBound failed with %lx\n", hr); + ok(lbound == 0, "SafeArrayGetLBound returned %ld\n", lbound);
hr = SafeArrayGetUBound(values, 1, &ubound); - ok(hr == S_OK, "SafeArrayGetUBound failed with %x\n", hr); - ok(ubound == numexpect-1, "SafeArrayGetUBound returned %d, but expected %d\n", ubound, numexpect-1); + ok(hr == S_OK, "SafeArrayGetUBound failed with %lx\n", hr); + ok(ubound == numexpect-1, "SafeArrayGetUBound returned %ld, but expected %d\n", ubound, numexpect-1);
hr = SafeArrayAccessData(values, (LPVOID)&data); - ok(hr == S_OK, "SafeArrayAccessData failed with %x\n", hr); + ok(hr == S_OK, "SafeArrayAccessData failed with %lx\n", hr);
for (i=0; i<=ubound-lbound; i++) { - ok(V_VT(&data[i]) == VT_I4, "V_VT(&data[%d]) was %d\n", i, V_VT(&data[i])); - ok(V_I4(&data[i]) == i, "V_I4(&data[%d]) was %d\n", i, V_I4(&data[i])); + ok(V_VT(&data[i]) == VT_I4, "V_VT(&data[%ld]) was %d\n", i, V_VT(&data[i])); + ok(V_I4(&data[i]) == i, "V_I4(&data[%ld]) was %ld\n", i, V_I4(&data[i])); }
hr = SafeArrayUnaccessData(values); - ok(hr == S_OK, "SafeArrayUnaccessData failed with %x\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData failed with %lx\n", hr);
return S_OK; } @@ -964,8 +964,8 @@ static HRESULT WINAPI Widget_CloneInterface( static HRESULT WINAPI Widget_put_prop_with_lcid( IWidget* iface, LONG lcid, INT i) { - trace("put_prop_with_lcid(%08x, %x)\n", lcid, i); - ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08x\n", lcid); + trace("put_prop_with_lcid(%08lx, %x)\n", lcid, i); + ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08lx\n", lcid); ok(i == 0xcafe, "got %08x\n", i); return S_OK; } @@ -973,8 +973,8 @@ static HRESULT WINAPI Widget_put_prop_with_lcid( static HRESULT WINAPI Widget_get_prop_with_lcid( IWidget* iface, LONG lcid, INT *i) { - trace("get_prop_with_lcid(%08x, %p)\n", lcid, i); - ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08x\n", lcid); + trace("get_prop_with_lcid(%08lx, %p)\n", lcid, i); + ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08lx\n", lcid); *i = lcid; return S_OK; } @@ -1049,22 +1049,22 @@ static HRESULT WINAPI Widget_VarArg_Run( ok(!lstrcmpW(name, catW), "got %s\n", wine_dbgstr_w(name));
hr = SafeArrayGetLBound(params, 1, &bound); - ok(hr == S_OK, "SafeArrayGetLBound error %#x\n", hr); - ok(bound == 0, "expected 0, got %d\n", bound); + ok(hr == S_OK, "SafeArrayGetLBound error %#lx\n", hr); + ok(bound == 0, "expected 0, got %ld\n", bound);
hr = SafeArrayGetUBound(params, 1, &bound); - ok(hr == S_OK, "SafeArrayGetUBound error %#x\n", hr); - ok(bound == 0, "expected 0, got %d\n", bound); + ok(hr == S_OK, "SafeArrayGetUBound error %#lx\n", hr); + ok(bound == 0, "expected 0, got %ld\n", bound);
hr = SafeArrayAccessData(params, (void **)&var); - ok(hr == S_OK, "SafeArrayAccessData failed with %x\n", hr); + ok(hr == S_OK, "SafeArrayAccessData failed with %lx\n", hr);
ok(V_VT(&var[0]) == VT_BSTR, "expected VT_BSTR, got %d\n", V_VT(&var[0])); bstr = V_BSTR(&var[0]); ok(!lstrcmpW(bstr, supermanW), "got %s\n", wine_dbgstr_w(bstr));
hr = SafeArrayUnaccessData(params); - ok(hr == S_OK, "SafeArrayUnaccessData error %#x\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData error %#lx\n", hr);
return S_OK; } @@ -1084,22 +1084,22 @@ static HRESULT WINAPI Widget_VarArg_Ref_Run( ok(!lstrcmpW(name, catW), "got %s\n", wine_dbgstr_w(name));
hr = SafeArrayGetLBound(*params, 1, &bound); - ok(hr == S_OK, "SafeArrayGetLBound error %#x\n", hr); - ok(bound == 0, "expected 0, got %d\n", bound); + ok(hr == S_OK, "SafeArrayGetLBound error %#lx\n", hr); + ok(bound == 0, "expected 0, got %ld\n", bound);
hr = SafeArrayGetUBound(*params, 1, &bound); - ok(hr == S_OK, "SafeArrayGetUBound error %#x\n", hr); - ok(bound == 0, "expected 0, got %d\n", bound); + ok(hr == S_OK, "SafeArrayGetUBound error %#lx\n", hr); + ok(bound == 0, "expected 0, got %ld\n", bound);
hr = SafeArrayAccessData(*params, (void **)&var); - ok(hr == S_OK, "SafeArrayAccessData error %#x\n", hr); + ok(hr == S_OK, "SafeArrayAccessData error %#lx\n", hr);
ok(V_VT(&var[0]) == VT_BSTR, "expected VT_BSTR, got %d\n", V_VT(&var[0])); bstr = V_BSTR(&var[0]); ok(!lstrcmpW(bstr, supermanW), "got %s\n", wine_dbgstr_w(bstr));
hr = SafeArrayUnaccessData(*params); - ok(hr == S_OK, "SafeArrayUnaccessData error %#x\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData error %#lx\n", hr);
return S_OK; } @@ -1110,11 +1110,11 @@ static HRESULT WINAPI Widget_basetypes_in(IWidget *iface, signed char c, short s { ok(c == 5, "Got char %d.\n", c); ok(s == -123, "Got short %d.\n", s); - ok(l == -100000, "Got int %d.\n", l); + ok(l == -100000, "Got int %ld.\n", l); ok(h == (LONGLONG)-100000 * 1000000, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 0, "Got unsigned char %u.\n", uc); ok(us == 456, "Got unsigned short %u.\n", us); - ok(ul == 0xdeadbeef, "Got unsigned int %u.\n", ul); + ok(ul == 0xdeadbeef, "Got unsigned int %lu.\n", ul); ok(uh == (ULONGLONG)1234567890 * 9876543210, "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_PI, "Got float %f.\n", f); ok(d == M_E, "Got double %f.\n", d); @@ -1155,12 +1155,12 @@ static HRESULT WINAPI Widget_float_abi(IWidget *iface, float f, double d, int i,
static HRESULT WINAPI Widget_long_ptr(IWidget *iface, LONG *in, LONG *out, LONG *in_out) { - ok(*in == 123, "Got [in] %d.\n", *in); + ok(*in == 123, "Got [in] %ld.\n", *in); if (testmode == 0) /* Invoke() */ - ok(*out == 456, "Got [out] %d.\n", *out); + ok(*out == 456, "Got [out] %ld.\n", *out); else if (testmode == 1) - ok(!*out, "Got [out] %d.\n", *out); - ok(*in_out == 789, "Got [in, out] %d.\n", *in_out); + ok(!*out, "Got [out] %ld.\n", *out); + ok(*in_out == 789, "Got [in, out] %ld.\n", *in_out);
*in = 987; *out = 654; @@ -1189,8 +1189,8 @@ static HRESULT WINAPI Widget_long_ptr_ptr(IWidget *iface, LONG **in, LONG **out, } else if (testmode == 2) { - ok(**in == 123, "Got [in] %d.\n", **in); - ok(**in_out == 789, "Got [in, out] %d.\n", **in_out); + ok(**in == 123, "Got [in] %ld.\n", **in); + ok(**in_out == 789, "Got [in, out] %ld.\n", **in_out);
*out = CoTaskMemAlloc(sizeof(int)); **out = 654; @@ -1198,7 +1198,7 @@ static HRESULT WINAPI Widget_long_ptr_ptr(IWidget *iface, LONG **in, LONG **out, } else if (testmode == 3) { - ok(**in_out == 789, "Got [in, out] %d.\n", **in_out); + ok(**in_out == 789, "Got [in, out] %ld.\n", **in_out); *in_out = NULL; }
@@ -1213,14 +1213,14 @@ static void check_iface_marshal(IUnknown *unk, IDispatch *disp, ISomethingFromDi HRESULT hr;
hr = IUnknown_QueryInterface(unk, &IID_ISomethingFromDispatch, (void **)&sfd2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(sfd2);
hr = IDispatch_GetTypeInfo(disp, 0xdeadbeef, 0, &typeinfo); - ok(hr == 0xbeefdead, "Got hr %#x.\n", hr); + ok(hr == 0xbeefdead, "Got hr %#lx.\n", hr);
hr = ISomethingFromDispatch_anotherfn(sfd); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); }
static HRESULT WINAPI Widget_iface_in(IWidget *iface, IUnknown *unk, IDispatch *disp, ISomethingFromDispatch *sfd) @@ -1260,9 +1260,9 @@ static HRESULT WINAPI Widget_iface_ptr(IWidget *iface, ISomethingFromDispatch ** if (testmode == 0 || testmode == 1) { hr = ISomethingFromDispatch_anotherfn(*in); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(*in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); }
if (testmode == 1) @@ -1280,7 +1280,7 @@ static HRESULT WINAPI Widget_iface_ptr(IWidget *iface, ISomethingFromDispatch ** else if (testmode == 3) { hr = ISomethingFromDispatch_anotherfn(*in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(*in_out); *in_out = NULL; } @@ -1332,12 +1332,12 @@ static HRESULT WINAPI Widget_variant(IWidget *iface, VARIANT in, VARIANT *out, V if (testmode == 0) { ok(V_VT(out) == VT_I4, "Got wrong type %u.\n", V_VT(out)); - ok(V_I4(out) == 1, "Got wrong value %d.\n", V_I4(out)); + ok(V_I4(out) == 1, "Got wrong value %ld.\n", V_I4(out)); } else ok(V_VT(out) == VT_EMPTY, "Got wrong type %u.\n", V_VT(out)); ok(V_VT(in_ptr) == VT_I4, "Got wrong type %u.\n", V_VT(in_ptr)); - ok(V_I4(in_ptr) == -1, "Got wrong value %d.\n", V_I4(in_ptr)); + ok(V_I4(in_ptr) == -1, "Got wrong value %ld.\n", V_I4(in_ptr)); ok(V_VT(in_out) == VT_BSTR, "Got wrong type %u.\n", V_VT(in_out)); ok(!lstrcmpW(V_BSTR(in_out), test_bstr2), "Got wrong value %s.\n", wine_dbgstr_w(V_BSTR(in_out))); @@ -1374,14 +1374,14 @@ static void check_safearray(SAFEARRAY *sa, LONG expect)
hr = SafeArrayGetUBound(sa, 1, &len); len++; - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(len == expect, "Expected len %d, got %d.\n", expect, len); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(len == expect, "Expected len %ld, got %ld.\n", expect, len);
hr = SafeArrayAccessData(sa, (void **)&data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < len; ++i) - ok(data[i] == len + i, "Expected data %d at %d, got %d.\n", len + i, i, data[i]); + ok(data[i] == len + i, "Expected data %ld at %ld, got %ld.\n", len + i, i, data[i]);
SafeArrayUnaccessData(sa); } @@ -1396,7 +1396,7 @@ static HRESULT WINAPI Widget_safearray(IWidget *iface, SAFEARRAY *in, SAFEARRAY check_safearray(*in_out, 9);
hr = SafeArrayDestroy(*in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
*out = make_safearray(4); *in_out = make_safearray(6); @@ -1453,12 +1453,12 @@ static HRESULT WINAPI Widget_complex_struct(IWidget *iface, struct complex in) ok(*in.pi == 2, "Got int pointer %d.\n", *in.pi); ok(**in.ppi == 10, "Got int double pointer %d.\n", **in.ppi); hr = ISomethingFromDispatch_anotherfn(in.iface); - ok(hr == 0x01234567, "Got wrong hr %#x.\n", hr); + ok(hr == 0x01234567, "Got wrong hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(*in.iface_ptr); - ok(hr == 0x01234567, "Got wrong hr %#x.\n", hr); + ok(hr == 0x01234567, "Got wrong hr %#lx.\n", hr); ok(!lstrcmpW(in.bstr, test_bstr2), "Got string %s.\n", wine_dbgstr_w(in.bstr)); ok(V_VT(&in.var) == VT_I4, "Got wrong type %u.\n", V_VT(&in.var)); - ok(V_I4(&in.var) == 123, "Got wrong value %d.\n", V_I4(&in.var)); + ok(V_I4(&in.var) == 123, "Got wrong value %ld.\n", V_I4(&in.var)); ok(!memcmp(&in.mystruct, &test_mystruct1, sizeof(MYSTRUCT)), "Structs didn't match.\n"); ok(!memcmp(in.arr, test_array1, sizeof(array_t)), "Arrays didn't match.\n"); ok(in.myint == 456, "Got int %d.\n", in.myint); @@ -1483,9 +1483,9 @@ static HRESULT WINAPI Widget_array(IWidget *iface, array_t in, array_t out, arra static HRESULT WINAPI Widget_variant_array(IWidget *iface, VARIANT in[2], VARIANT out[2], VARIANT in_out[2]) { ok(V_VT(&in[0]) == VT_I4, "Got wrong type %u.\n", V_VT(&in[0])); - ok(V_I4(&in[0]) == 1, "Got wrong value %d.\n", V_I4(&in[0])); + ok(V_I4(&in[0]) == 1, "Got wrong value %ld.\n", V_I4(&in[0])); ok(V_VT(&in[1]) == (VT_BYREF|VT_I4), "Got wrong type %u.\n", V_VT(&in[1])); - ok(*V_I4REF(&in[1]) == 2, "Got wrong value %d.\n", *V_I4REF(&in[1])); + ok(*V_I4REF(&in[1]) == 2, "Got wrong value %ld.\n", *V_I4REF(&in[1])); ok(V_VT(&out[0]) == VT_EMPTY, "Got wrong type %u.\n", V_VT(&out[0])); ok(V_VT(&out[1]) == VT_EMPTY, "Got wrong type %u.\n", V_VT(&out[1])); ok(V_VT(&in_out[0]) == VT_I4, "Got wrong type %u.\n", V_VT(&in_out[0])); @@ -1523,13 +1523,13 @@ static HRESULT WINAPI Widget_Coclass(IWidget *iface, Coclass1 *class1, Coclass2 HRESULT hr;
hr = ICoclass1_test((ICoclass1 *)class1); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr);
hr = ICoclass2_test((ICoclass2 *)class2); - ok(hr == 2, "Got hr %#x.\n", hr); + ok(hr == 2, "Got hr %#lx.\n", hr);
hr = ICoclass1_test((ICoclass1 *)class3); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr);
return S_OK; } @@ -1543,9 +1543,9 @@ static HRESULT WINAPI Widget_Coclass_ptr(IWidget *iface, Coclass1 **in, Coclass1 if (testmode == 0 || testmode == 1) { hr = ICoclass1_test((ICoclass1 *)*in); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); hr = ICoclass1_test((ICoclass1 *)*in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); }
if (testmode == 1) @@ -1566,7 +1566,7 @@ static HRESULT WINAPI Widget_Coclass_ptr(IWidget *iface, Coclass1 **in, Coclass1 else if (testmode == 3) { hr = ICoclass1_test((ICoclass1 *)*in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ICoclass1_Release((ICoclass1 *)*in_out); *in_out = NULL; } @@ -1579,13 +1579,13 @@ static HRESULT WINAPI Widget_Coclass_noptr(IWidget *iface, Coclass1 class1, Cocl HRESULT hr;
hr = ICoclass1_test(class1.iface); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr);
hr = ICoclass2_test(class2.iface); - ok(hr == 2, "Got hr %#x.\n", hr); + ok(hr == 2, "Got hr %#lx.\n", hr);
hr = ICoclass1_test(class3.iface); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr);
return S_OK; } @@ -2004,11 +2004,11 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_I4; V_I4(&arg[0]) = STATE_WIDGETIFIED; hr = IDispatch_Invoke(disp, DISPID_TM_BASETYPES_IN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWidget_basetypes_in(widget, 5, -123, -100000, (LONGLONG)-100000 * 1000000, 0, 456, 0xdeadbeef, (ULONGLONG)1234567890 * 9876543210, M_PI, M_E, STATE_WIDGETIFIED); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
c = s = l = h = uc = us = ul = uh = f = d = st = 0;
@@ -2025,14 +2025,14 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_BYREF|VT_I4; V_I4REF(&arg[0]) = (LONG *)&st; hr = IDispatch_Invoke(disp, DISPID_TM_BASETYPES_OUT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(c == 10, "Got char %d.\n", c); ok(s == -321, "Got short %d.\n", s); - ok(l == -200000, "Got int %d.\n", l); + ok(l == -200000, "Got int %ld.\n", l); ok(h == (LONGLONG)-200000 * 1000000L, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 254, "Got unsigned char %u.\n", uc); ok(us == 256, "Got unsigned short %u.\n", us); - ok(ul == 0xf00dfade, "Got unsigned int %i.\n", ul); + ok(ul == 0xf00dfade, "Got unsigned int %li.\n", ul); ok(uh == ((((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789), "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_LN2, "Got float %f.\n", f); @@ -2042,14 +2042,14 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) c = s = l = h = uc = us = ul = uh = f = d = st = 0;
hr = IWidget_basetypes_out(widget, &c, &s, &l, &h, &uc, &us, &ul, &uh, &f, &d, &st); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(c == 10, "Got char %d.\n", c); ok(s == -321, "Got short %d.\n", s); - ok(l == -200000, "Got int %d.\n", l); + ok(l == -200000, "Got int %ld.\n", l); ok(h == (LONGLONG)-200000 * 1000000L, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 254, "Got unsigned char %u.\n", uc); ok(us == 256, "Got unsigned short %u.\n", us); - ok(ul == 0xf00dfade, "Got unsigned int %i.\n", ul); + ok(ul == 0xf00dfade, "Got unsigned int %li.\n", ul); ok(uh == ((((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789), "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_LN2, "Got float %f.\n", f); @@ -2062,12 +2062,12 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) i2 = 789; pi = &i2; hr = IWidget_myint(widget, 123, &i, &pi); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test that different float ABIs are correctly handled. */
hr = IWidget_float_abi(widget, 1.0f, 2.0, 3, 4.0f, 5.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_marshal_pointer(IWidget *widget, IDispatch *disp) @@ -2087,10 +2087,10 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_BYREF|VT_I4; V_I4REF(&arg[0]) = &in_out; hr = IDispatch_Invoke(disp, DISPID_TM_INT_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(in == 987, "Got [in] %d.\n", in); - ok(out == 654, "Got [out] %d.\n", out); - ok(in_out == 321, "Got [in, out] %d.\n", in_out); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(in == 987, "Got [in] %ld.\n", in); + ok(out == 654, "Got [out] %ld.\n", out); + ok(in_out == 321, "Got [in, out] %ld.\n", in_out);
testmode = 1;
@@ -2098,26 +2098,26 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) out = 456; in_out = 789; hr = IWidget_long_ptr(widget, &in, &out, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(in == 123, "Got [in] %d.\n", in); - ok(out == 654, "Got [out] %d.\n", out); - ok(in_out == 321, "Got [in, out] %d.\n", in_out); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(in == 123, "Got [in] %ld.\n", in); + ok(out == 654, "Got [out] %ld.\n", out); + ok(in_out == 321, "Got [in, out] %ld.\n", in_out);
out = in_out = -1; hr = IWidget_long_ptr(widget, NULL, &out, &in_out); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(!out, "[out] parameter should have been cleared.\n"); ok(in_out == -1, "[in, out] parameter should not have been cleared.\n");
in = in_out = -1; hr = IWidget_long_ptr(widget, &in, NULL, &in_out); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(in == -1, "[in] parameter should not have been cleared.\n"); ok(in_out == -1, "[in, out] parameter should not have been cleared.\n");
in = out = -1; hr = IWidget_long_ptr(widget, &in, &out, NULL); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(in == -1, "[in] parameter should not have been cleared.\n"); ok(!out, "[out] parameter should have been cleared.\n");
@@ -2127,16 +2127,16 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) testmode = 0; in_ptr = out_ptr = in_out_ptr = NULL; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); - ok(hr == S_OK, "Got hr %#x\n", hr); + ok(hr == S_OK, "Got hr %#lx\n", hr); ok(!in_ptr, "Got [in] %p.\n", in_ptr); ok(!out_ptr, "Got [out] %p.\n", out_ptr); ok(!in_out_ptr, "Got [in, out] %p.\n", in_out_ptr);
testmode = 1; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); - ok(hr == S_OK, "Got hr %#x\n", hr); - ok(*out_ptr == 654, "Got [out] %d.\n", *out_ptr); - ok(*in_out_ptr == 321, "Got [in, out] %d.\n", *in_out_ptr); + ok(hr == S_OK, "Got hr %#lx\n", hr); + ok(*out_ptr == 654, "Got [out] %ld.\n", *out_ptr); + ok(*in_out_ptr == 321, "Got [in, out] %ld.\n", *in_out_ptr); CoTaskMemFree(out_ptr); CoTaskMemFree(in_out_ptr);
@@ -2148,38 +2148,38 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) out_ptr = &out; in_out_ptr = &in_out; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(out_ptr != &out, "[out] ptr should have changed.\n"); ok(in_out_ptr == &in_out, "[in, out] ptr should not have changed.\n"); - ok(*out_ptr == 654, "Got [out] %d.\n", *out_ptr); - ok(*in_out_ptr == 321, "Got [in, out] %d.\n", *in_out_ptr); + ok(*out_ptr == 654, "Got [out] %ld.\n", *out_ptr); + ok(*in_out_ptr == 321, "Got [in, out] %ld.\n", *in_out_ptr);
testmode = 3; in_ptr = out_ptr = NULL; in_out = 789; in_out_ptr = &in_out; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!in_out_ptr, "Got [in, out] %p.\n", in_out_ptr);
out_ptr = &out; in_out_ptr = &in_out; hr = IWidget_long_ptr_ptr(widget, NULL, &out_ptr, &in_out_ptr); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(!out_ptr, "[out] parameter should have been cleared.\n"); ok(in_out_ptr == &in_out, "[in, out] parameter should not have been cleared.\n");
in_ptr = ∈ in_out_ptr = &in_out; hr = IWidget_long_ptr_ptr(widget, &in_ptr, NULL, &in_out_ptr); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(in_ptr == &in, "[in] parameter should not have been cleared.\n"); ok(in_out_ptr == &in_out, "[in, out] parameter should not have been cleared.\n");
in_ptr = ∈ out_ptr = &out; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, NULL); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(in_ptr == &in, "[in] parameter should not have been cleared.\n"); ok(!out_ptr, "[out] parameter should have been cleared.\n"); } @@ -2202,21 +2202,21 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) sfd3 = create_disp_obj(); hr = IWidget_iface_in(widget, (IUnknown *)sfd1, (IDispatch *)sfd2, sfd3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); release_iface(sfd1); release_iface(sfd2); release_iface(sfd3);
testmode = 1; hr = IWidget_iface_in(widget, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 0; proxy_unk = (IUnknown *)0xdeadbeef; proxy_disp = (IDispatch *)0xdeadbeef; proxy_sfd = (ISomethingFromDispatch *)0xdeadbeef; hr = IWidget_iface_out(widget, &proxy_unk, &proxy_disp, &proxy_sfd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_iface_marshal(proxy_unk, proxy_disp, proxy_sfd); release_iface(proxy_unk); release_iface(proxy_disp); @@ -2224,7 +2224,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp)
testmode = 1; hr = IWidget_iface_out(widget, &proxy_unk, &proxy_disp, &proxy_sfd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!proxy_unk, "Got unexpected proxy %p.\n", proxy_unk); ok(!proxy_disp, "Got unexpected proxy %p.\n", proxy_disp); ok(!proxy_sfd, "Got unexpected proxy %p.\n", proxy_sfd); @@ -2234,7 +2234,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) sfd_out = sfd2 = create_disp_obj(); sfd_in_out = sfd3 = create_disp_obj(); hr = IWidget_iface_ptr(widget, &sfd_in, &sfd_out, &sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(sfd_in == sfd1, "[in] parameter should not have changed.\n"); ok(!sfd_out, "[out] parameter should have been cleared.\n"); ok(sfd_in_out == sfd3, "[in, out] parameter should not have changed.\n"); @@ -2247,12 +2247,12 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) sfd_in_out = sfd3 = create_disp_obj(); ISomethingFromDispatch_AddRef(sfd_in_out); hr = IWidget_iface_ptr(widget, &sfd_in, &sfd_out, &sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(sfd_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ok(sfd_in_out != sfd3, "[in, out] parameter should have changed.\n"); hr = ISomethingFromDispatch_anotherfn(sfd_in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); release_iface(sfd_out); release_iface(sfd_in_out); release_iface(sfd1); @@ -2261,10 +2261,10 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) testmode = 2; sfd_in = sfd_out = sfd_in_out = NULL; hr = IWidget_iface_ptr(widget, &sfd_in, &sfd_out, &sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!sfd_out, "[out] parameter should not have been set.\n"); hr = ISomethingFromDispatch_anotherfn(sfd_in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); release_iface(sfd_in_out);
testmode = 3; @@ -2272,7 +2272,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) sfd_in_out = sfd3 = create_disp_obj(); ISomethingFromDispatch_AddRef(sfd_in_out); hr = IWidget_iface_ptr(widget, &sfd_in, &sfd_out, &sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!sfd_in_out, "Got [in, out] %p.\n", sfd_in_out); release_iface(sfd3);
@@ -2283,7 +2283,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) disp_noptr.lpVtbl = (IDispatchVtbl *)sfd2; sfd_noptr.lpVtbl = (ISomethingFromDispatchVtbl *)sfd3; hr = IWidget_iface_noptr(widget, unk_noptr, disp_noptr, sfd_noptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); release_iface(sfd1); release_iface(sfd2); release_iface(sfd3); @@ -2301,14 +2301,14 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_UNKNOWN; V_UNKNOWN(&arg[0]) = (IUnknown *)sfd3; hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_IN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
V_VT(&arg[2]) = VT_DISPATCH; V_DISPATCH(&arg[2]) = (IDispatch *)sfd1; V_VT(&arg[1]) = VT_DISPATCH; V_DISPATCH(&arg[1]) = (IDispatch *)sfd2; V_VT(&arg[0]) = VT_DISPATCH; V_DISPATCH(&arg[0]) = (IDispatch *)sfd3; hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_IN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
release_iface(sfd1); release_iface(sfd2); @@ -2320,7 +2320,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_UNKNOWN; V_UNKNOWN(&arg[0]) = NULL; hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_IN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 0; proxy_unk = proxy_unk2 = NULL; @@ -2331,10 +2331,10 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_OUT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IUnknown_QueryInterface(proxy_unk2, &IID_ISomethingFromDispatch, (void **)&proxy_sfd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_iface_marshal(proxy_unk, proxy_disp, proxy_sfd); ISomethingFromDispatch_Release(proxy_sfd); release_iface(proxy_unk); @@ -2348,7 +2348,7 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_OUT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!proxy_unk, "Got unexpected proxy %p.\n", proxy_unk); ok(!proxy_disp, "Got unexpected proxy %p.\n", proxy_disp); ok(!proxy_unk2, "Got unexpected proxy %p.\n", proxy_unk2); @@ -2365,7 +2365,7 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk_in == (IUnknown *)sfd1, "[in] parameter should not have changed.\n"); ok(!unk_out, "[out] parameter should have been cleared.\n"); ok(unk_in_out == (IUnknown *)sfd3, "[in, out] parameter should not have changed.\n"); @@ -2382,20 +2382,20 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IUnknown_QueryInterface(unk_out, &IID_ISomethingFromDispatch, (void **)&sfd_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(sfd_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(sfd_out);
ok(unk_in_out != (IUnknown *)sfd3, "[in, out] parameter should have changed.\n"); hr = IUnknown_QueryInterface(unk_in_out, &IID_ISomethingFromDispatch, (void **)&sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(sfd_in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(sfd_in_out);
release_iface(unk_out); @@ -2410,14 +2410,14 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!unk_out, "[out] parameter should not have been set.\n"); if (hr == S_OK) { hr = IUnknown_QueryInterface(unk_in_out, &IID_ISomethingFromDispatch, (void **)&sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(sfd_in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(sfd_in_out);
release_iface(unk_in_out); @@ -2431,7 +2431,7 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine { - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!unk_in_out, "[in, out] parameter should have been cleared.\n"); release_iface(sfd3); } @@ -2457,7 +2457,7 @@ static void test_marshal_bstr(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_BSTR|VT_BYREF; V_BSTRREF(&arg[0]) = &in_out; hr = IDispatch_Invoke(disp, DISPID_TM_BSTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(in[1] == test_bstr1[1], "[in] parameter should not be changed.\n"); ok(in_ptr[1] == 'X', "[in] pointer should be changed.\n"); ok(in_out[1] == 'X', "[in, out] parameter should be changed.\n"); @@ -2471,7 +2471,7 @@ static void test_marshal_bstr(IWidget *widget, IDispatch *disp) SysFreeString(out); out = (BSTR)0xdeadbeef; hr = IWidget_bstr(widget, in, &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(in[1] == test_bstr1[1], "[in] parameter should not be changed.\n"); ok(in_ptr[1] == test_bstr2[1], "[in] pointer should not be changed.\n"); ok(in_out[1] == 'X', "[in, out] parameter should be changed.\n"); @@ -2486,11 +2486,11 @@ static void test_marshal_bstr(IWidget *widget, IDispatch *disp) testmode = 1; out = in_ptr = in_out = NULL; hr = IWidget_bstr(widget, NULL, &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
in = SysAllocString(L"test"); hr = IWidget_no_in_out(widget, in, 5); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_marshal_variant(IWidget *widget, IDispatch *disp) @@ -2517,7 +2517,7 @@ static void test_marshal_variant(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_VARIANT|VT_BYREF; V_VARIANTREF(&arg[0]) = &in_out; hr = IDispatch_Invoke(disp, DISPID_TM_VARIANT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&arg[3]) == VT_CY, "Got wrong type %u.\n", V_VT(&arg[3])); ok(V_VT(&out) == VT_UI1, "Got wrong type %u.\n", V_VT(&out)); ok(V_UI1(&out) == 3, "Got wrong value %d.\n", V_UI1(&out)); @@ -2535,7 +2535,7 @@ static void test_marshal_variant(IWidget *widget, IDispatch *disp) V_VT(&in_out) = VT_BSTR; V_BSTR(&in_out) = bstr = SysAllocString(test_bstr2); hr = IWidget_variant(widget, arg[3], &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&arg[3]) == VT_CY, "Got wrong type %u.\n", V_VT(&arg[3])); ok(V_VT(&out) == VT_UI1, "Got wrong type %u.\n", V_VT(&out)); ok(V_UI1(&out) == 3, "Got wrong value %d.\n", V_UI1(&out)); @@ -2555,7 +2555,7 @@ static void test_marshal_safearray(IWidget *widget, IDispatch *disp) in_ptr = make_safearray(7); in_out = make_safearray(9); hr = IWidget_safearray(widget, in, &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_safearray(in, 3); check_safearray(out, 4); check_safearray(out2, 5); @@ -2582,7 +2582,7 @@ static void test_marshal_struct(IWidget *widget, IDispatch *disp) memcpy(&in_ptr, &test_mystruct3, sizeof(MYSTRUCT)); memcpy(&in_out, &test_mystruct4, sizeof(MYSTRUCT)); hr = IWidget_mystruct(widget, test_mystruct1, &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&out, &test_mystruct5, sizeof(MYSTRUCT)), "Structs didn't match.\n"); ok(!memcmp(&in_ptr, &test_mystruct3, sizeof(MYSTRUCT)), "Structs didn't match.\n"); ok(!memcmp(&in_out, &test_mystruct7, sizeof(MYSTRUCT)), "Structs didn't match.\n"); @@ -2590,12 +2590,12 @@ static void test_marshal_struct(IWidget *widget, IDispatch *disp) memcpy(&in_ptr, &test_mystruct1, sizeof(MYSTRUCT)); in_ptr_ptr = &in_ptr; hr = IWidget_mystruct_ptr_ptr(widget, &in_ptr_ptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Make sure that "thin" structs (<=8 bytes) are handled correctly in x86-64. */
hr = IWidget_thin_struct(widget, test_thin_struct); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Make sure we can handle an imported type. */
@@ -2603,7 +2603,7 @@ static void test_marshal_struct(IWidget *widget, IDispatch *disp) rect_in_ptr = test_rect3; rect_in_out = test_rect4; hr = IWidget_rect(widget, test_rect1, &rect_out, &rect_in_ptr, &rect_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(EqualRect(&rect_out, &test_rect5), "Rects didn't match.\n"); ok(EqualRect(&rect_in_ptr, &test_rect3), "Rects didn't match.\n"); ok(EqualRect(&rect_in_out, &test_rect7), "Rects didn't match.\n"); @@ -2625,7 +2625,7 @@ static void test_marshal_struct(IWidget *widget, IDispatch *disp) memcpy(complex.arr, test_array1, sizeof(array_t)); complex.myint = 456; hr = IWidget_complex_struct(widget, complex); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_marshal_array(IWidget *widget, IDispatch *disp) @@ -2641,7 +2641,7 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) memcpy(out, test_array2, sizeof(array_t)); memcpy(in_out, test_array3, sizeof(array_t)); hr = IWidget_array(widget, in, out, in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&in, &test_array1, sizeof(array_t)), "Arrays didn't match.\n"); ok(!memcmp(&out, &test_array5, sizeof(array_t)), "Arrays didn't match.\n"); ok(!memcmp(&in_out, &test_array6, sizeof(array_t)), "Arrays didn't match.\n"); @@ -2653,12 +2653,12 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) V_VT(&var_in_out[0]) = VT_I4; V_I4(&var_in_out[0]) = 5; V_VT(&var_in_out[1]) = VT_BSTR; V_BSTR(&var_in_out[1]) = SysAllocString(test_bstr1); hr = IWidget_variant_array(widget, var_in, var_out, var_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var_in[0]) == VT_I4, "Got wrong type %u.\n", V_VT(&var_in[0])); - ok(V_I4(&var_in[0]) == 1, "Got wrong value %d.\n", V_I4(&var_in[0])); + ok(V_I4(&var_in[0]) == 1, "Got wrong value %ld.\n", V_I4(&var_in[0])); ok(V_VT(&var_in[1]) == (VT_BYREF|VT_I4), "Got wrong type %u.\n", V_VT(&var_in[1])); ok(V_I4REF(&var_in[1]) == &l, "Got wrong value %p.\n", V_I4REF(&var_in[1])); - ok(l == 2, "Got wrong value %d.\n", l); + ok(l == 2, "Got wrong value %ld.\n", l); ok(V_VT(&var_out[0]) == VT_I1, "Got wrong type %u.\n", V_VT(&var_out[0])); ok(V_I1(&var_out[0]) == 9, "Got wrong value %u.\n", V_VT(&var_out[0])); ok(V_VT(&var_out[1]) == VT_BSTR, "Got wrong type %u.\n", V_VT(&var_out[1])); @@ -2667,16 +2667,16 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) ok(V_I1(&var_in_out[0]) == 11, "Got wrong value %u.\n", V_VT(&var_in_out[0])); ok(V_VT(&var_in_out[1]) == VT_UNKNOWN, "Got wrong type %u.\n", V_VT(&var_in_out[1])); hr = IUnknown_QueryInterface(V_UNKNOWN(&var_in_out[1]), &IID_ISomethingFromDispatch, (void **)&proxy_sfd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(proxy_sfd); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(proxy_sfd); release_iface(V_UNKNOWN(&var_in_out[1]));
memcpy(&struct_in[0], &test_mystruct1, sizeof(MYSTRUCT)); memcpy(&struct_in[1], &test_mystruct2, sizeof(MYSTRUCT)); hr = IWidget_mystruct_array(widget, struct_in); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_marshal_coclass(IWidget *widget, IDispatch *disp) @@ -2697,11 +2697,11 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp)
hr = IWidget_Coclass(widget, (Coclass1 *)&class1->ICoclass1_iface, (Coclass2 *)&class2->ICoclass1_iface, (Coclass3 *)&class3->ICoclass1_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWidget_Coclass(widget, (Coclass1 *)&class1->ICoclass2_iface, (Coclass2 *)&class2->ICoclass2_iface, (Coclass3 *)&class3->ICoclass2_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
release_iface(&class1->ICoclass1_iface); release_iface(&class2->ICoclass1_iface); @@ -2715,7 +2715,7 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) out = &class2->ICoclass1_iface; in_out = &class3->ICoclass1_iface; hr = IWidget_Coclass_ptr(widget, (Coclass1 **)&in, (Coclass1 **)&out, (Coclass1 **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(in == &class1->ICoclass1_iface, "[in] parameter should not have changed.\n"); ok(!out, "[out] parameter should have been cleared.\n"); ok(in_out == &class3->ICoclass1_iface, "[in, out] parameter should not have changed.\n"); @@ -2731,12 +2731,12 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) ICoclass1_AddRef(in_out); hr = IWidget_Coclass_ptr(widget, (Coclass1 **)&in, (Coclass1 **)&out, (Coclass1 **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ok(in_out != &class3->ICoclass1_iface, "[in, out] parameter should have changed.\n"); hr = ICoclass1_test(in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); release_iface(out); release_iface(in_out); release_iface(&class1->ICoclass1_iface); @@ -2746,9 +2746,9 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) in = out = in_out = NULL; hr = IWidget_Coclass_ptr(widget, (Coclass1 **)&in, (Coclass1 **)&out, (Coclass1 **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); release_iface(in_out);
testmode = 3; @@ -2757,7 +2757,7 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) in_out = &class3->ICoclass1_iface; hr = IWidget_Coclass_ptr(widget, (Coclass1 **)&in, (Coclass1 **)&out, (Coclass1 **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!in_out, "Got [in, out] %p.\n", in_out);
class1 = create_coclass_obj(); @@ -2767,7 +2767,7 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) class2_noptr.iface = &class2->ICoclass2_iface; class3_noptr.iface = &class3->ICoclass1_iface; hr = IWidget_Coclass_noptr(widget, class1_noptr, class2_noptr, class3_noptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); release_iface(&class1->ICoclass1_iface); release_iface(&class2->ICoclass1_iface); release_iface(&class3->ICoclass1_iface); @@ -2784,21 +2784,21 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_UNKNOWN; V_UNKNOWN(&arg[0]) = (IUnknown *)&class3->ICoclass1_iface; hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
V_VT(&arg[2]) = VT_UNKNOWN; V_UNKNOWN(&arg[2]) = (IUnknown *)&class1->ICoclass2_iface; V_VT(&arg[1]) = VT_UNKNOWN; V_UNKNOWN(&arg[1]) = (IUnknown *)&class2->ICoclass2_iface; V_VT(&arg[0]) = VT_UNKNOWN; V_UNKNOWN(&arg[0]) = (IUnknown *)&class3->ICoclass2_iface; hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
V_VT(&arg[2]) = VT_DISPATCH; V_DISPATCH(&arg[2]) = (IDispatch *)&class1->ICoclass1_iface; V_VT(&arg[1]) = VT_DISPATCH; V_DISPATCH(&arg[1]) = (IDispatch *)&class2->ICoclass1_iface; V_VT(&arg[0]) = VT_DISPATCH; V_DISPATCH(&arg[0]) = (IDispatch *)&class3->ICoclass1_iface; hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
release_iface(&class1->ICoclass1_iface); release_iface(&class2->ICoclass1_iface); @@ -2816,7 +2816,7 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk_in == (IUnknown *)&class1->ICoclass1_iface, "[in] parameter should not have changed.\n"); ok(!unk_out, "[out] parameter should have been cleared.\n"); ok(unk_in_out == (IUnknown *)&class3->ICoclass1_iface, "[in, out] parameter should not have changed.\n"); @@ -2833,20 +2833,20 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IUnknown_QueryInterface(unk_out, &IID_ICoclass1, (void **)&out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ICoclass1_Release(out);
ok(unk_in_out != (IUnknown *)&class3->ICoclass1_iface, "[in, out] parameter should have changed.\n"); hr = IUnknown_QueryInterface(unk_in_out, &IID_ICoclass1, (void **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ICoclass1_Release(in_out);
release_iface(unk_out); @@ -2861,14 +2861,14 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!unk_out, "[out] parameter should not have been set.\n"); if (hr == S_OK) { hr = IUnknown_QueryInterface(unk_in_out, &IID_ICoclass1, (void **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ICoclass1_Release(in_out);
release_iface(unk_in_out); @@ -2882,7 +2882,7 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!unk_in_out, "[in, out] parameter should have been cleared.\n");
@@ -2954,7 +2954,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode); VariantClear(&varresult);
@@ -2973,7 +2973,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode); trace("Name = %s\n", wine_dbgstr_w(V_BSTR(&varresult))); VariantClear(&varresult); @@ -3135,7 +3135,7 @@ static void test_typelibmarshal(void) ok_ole_success(hr, IDispatch_Invoke);
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode);
ok(V_VT(&varresult) == VT_I2, "V_VT(&varresult) was %d instead of VT_I2\n", V_VT(&varresult)); @@ -3152,7 +3152,7 @@ static void test_typelibmarshal(void) ok_ole_success(hr, IDispatch_Invoke);
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode);
ok(V_VT(&varresult) == VT_DISPATCH, "V_VT(&varresult) was %d instead of VT_DISPATCH\n", V_VT(&varresult)); @@ -3172,7 +3172,7 @@ static void test_typelibmarshal(void) ok_ole_success(hr, IDispatch_Invoke);
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode);
ok(V_VT(&varresult) == VT_I2, "V_VT(&varresult) was %d instead of VT_I2\n", V_VT(&varresult)); @@ -3188,7 +3188,7 @@ static void test_typelibmarshal(void) dispparams.rgdispidNamedArgs = NULL; dispparams.rgvarg = vararg; hr = IDispatch_Invoke(pDispatch, DISPID_TM_ARRAY, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_TYPEMISMATCH || hr == DISP_E_BADVARTYPE, "expected DISP_E_TYPEMISMATCH, got %#x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH || hr == DISP_E_BADVARTYPE, "expected DISP_E_TYPEMISMATCH, got %#lx\n", hr); SysFreeString(V_BSTR(&vararg[0]));
/* call ArrayPtr with BSTR argument - type mismatch */ @@ -3200,7 +3200,7 @@ static void test_typelibmarshal(void) dispparams.rgdispidNamedArgs = NULL; dispparams.rgvarg = vararg; hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARARRAYPTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_TYPEMISMATCH || hr == DISP_E_BADVARTYPE, "expected DISP_E_TYPEMISMATCH, got %#x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH || hr == DISP_E_BADVARTYPE, "expected DISP_E_TYPEMISMATCH, got %#lx\n", hr); SysFreeString(V_BSTR(&vararg[0]));
/* call VarArg */ @@ -3228,7 +3228,7 @@ static void test_typelibmarshal(void) dispparams.cNamedArgs = 1; dispparams.rgdispidNamedArgs = &dispidNamed; hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARARG, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_NONAMEDARGS, "IDispatch_Invoke should have returned DISP_E_NONAMEDARGS instead of 0x%08x\n", hr); + ok(hr == DISP_E_NONAMEDARGS, "IDispatch_Invoke should have returned DISP_E_NONAMEDARGS instead of 0x%08lx\n", hr); dispidNamed = DISPID_PROPERTYPUT;
/* call VarArg_Run */ @@ -3270,9 +3270,9 @@ static void test_typelibmarshal(void) dispparams.rgvarg = NULL; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_ERROR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "IDispatch_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08lx\n", hr); ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode); VariantClear(&varresult);
@@ -3295,10 +3295,10 @@ static void test_typelibmarshal(void) dispparams.rgdispidNamedArgs = NULL; dispparams.rgvarg = NULL; hr = ITypeInfo_Invoke(pTypeInfo, &NonOleAutomation, DISPID_NOA_ERROR, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "ITypeInfo_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "ITypeInfo_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08lx\n", hr); ok(V_VT(&varresult) == VT_EMPTY, "V_VT(&varresult) should be VT_EMPTY instead of %d\n", V_VT(&varresult)); ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode); VariantClear(&varresult);
@@ -3312,7 +3312,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = vararg; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_PARAMNOTFOUND, "IDispatch_Invoke should have returned DISP_E_PARAMNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_PARAMNOTFOUND, "IDispatch_Invoke should have returned DISP_E_PARAMNOTFOUND instead of 0x%08lx\n", hr); VariantClear(&varresult);
/* tests param type that cannot be coerced */ @@ -3325,7 +3325,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = vararg; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch_Invoke should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "IDispatch_Invoke should have returned DISP_E_TYPEMISMATCH instead of 0x%08lx\n", hr); VariantClear(&varresult);
/* tests bad param type */ @@ -3338,7 +3338,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = vararg; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_BADVARTYPE, "IDispatch_Invoke should have returned DISP_E_BADVARTYPE instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADVARTYPE, "IDispatch_Invoke should have returned DISP_E_BADVARTYPE instead of 0x%08lx\n", hr); VariantClear(&varresult);
/* tests too small param count */ @@ -3348,7 +3348,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = NULL; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_DOSOMETHING, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IDispatch_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "IDispatch_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr); VariantClear(&varresult);
/* tests propget function with large param count */ @@ -3362,7 +3362,7 @@ static void test_typelibmarshal(void) dispparams.rgdispidNamedArgs = NULL; dispparams.rgvarg = vararg; hr = IDispatch_Invoke(pDispatch, DISPID_TM_STATE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_NOTACOLLECTION, "IDispatch_Invoke should have returned DISP_E_NOTACOLLECTION instead of 0x%08x\n", hr); + ok(hr == DISP_E_NOTACOLLECTION, "IDispatch_Invoke should have returned DISP_E_NOTACOLLECTION instead of 0x%08lx\n", hr);
/* test propput with lcid */
@@ -3388,7 +3388,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_WITH_LCID, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, ITypeInfo_Invoke); ok(V_VT(&varresult) == VT_I4, "got %x\n", V_VT(&varresult)); - ok(V_I4(&varresult) == 0x409, "got %x\n", V_I4(&varresult)); + ok(V_I4(&varresult) == 0x409, "got %lx\n", V_I4(&varresult)); VariantClear(&varresult);
/* test propget of INT value */ @@ -3399,7 +3399,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_INT, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, ITypeInfo_Invoke); ok(V_VT(&varresult) == VT_I4, "got %x\n", V_VT(&varresult)); - ok(V_I4(&varresult) == -13, "got %x\n", V_I4(&varresult)); + ok(V_I4(&varresult) == -13, "got %lx\n", V_I4(&varresult)); VariantClear(&varresult);
/* test propget of INT value */ @@ -3410,7 +3410,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_UINT, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, ITypeInfo_Invoke); ok(V_VT(&varresult) == VT_UI4, "got %x\n", V_VT(&varresult)); - ok(V_UI4(&varresult) == 42, "got %x\n", V_UI4(&varresult)); + ok(V_UI4(&varresult) == 42, "got %lx\n", V_UI4(&varresult)); VariantClear(&varresult);
/* test byref marshalling */ @@ -3427,7 +3427,7 @@ static void test_typelibmarshal(void) ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); ok(V_VT(&vararg[0]) == (VT_UI4|VT_BYREF), "arg VT not unmarshalled correctly: %x\n", V_VT(&vararg[0])); ok(V_UI4REF(&vararg[0]) == (ULONG *)&uval, "Byref pointer not preserved: %p/%p\n", &uval, V_UI4REF(&vararg[0])); - ok(*V_UI4REF(&vararg[0]) == 42, "Expected 42 to be returned instead of %u\n", *V_UI4REF(&vararg[0])); + ok(*V_UI4REF(&vararg[0]) == 42, "Expected 42 to be returned instead of %lu\n", *V_UI4REF(&vararg[0])); VariantClear(&varresult); VariantClear(&vararg[0]);
@@ -3467,7 +3467,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = NULL; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_RESTRICTED, &IID_NULL, 0x40c, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok( hr == DISP_E_MEMBERNOTFOUND, "got %08x\n", hr ); + ok( hr == DISP_E_MEMBERNOTFOUND, "got %08lx\n", hr ); VariantClear(&varresult);
/* restricted member with -ve memid (not restricted) */ @@ -3477,9 +3477,9 @@ static void test_typelibmarshal(void) dispparams.rgvarg = NULL; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NEG_RESTRICTED, &IID_NULL, 0x40c, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok(V_VT(&varresult) == VT_I4, "got %x\n", V_VT(&varresult)); - ok(V_I4(&varresult) == DISPID_TM_NEG_RESTRICTED, "got %x\n", V_I4(&varresult)); + ok(V_I4(&varresult) == DISPID_TM_NEG_RESTRICTED, "got %lx\n", V_I4(&varresult)); VariantClear(&varresult);
test_marshal_basetypes(pWidget, pDispatch); @@ -3586,7 +3586,7 @@ static void test_libattr(void) ok_ole_success(hr, GetLibAttr); if (SUCCEEDED(hr)) { - ok(pattr->lcid == MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), "lcid %x\n", pattr->lcid); + ok(pattr->lcid == MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), "lcid %lx\n", pattr->lcid);
ITypeLib_ReleaseTLibAttr(pTypeLib, pattr); } @@ -3612,13 +3612,13 @@ static void test_external_connection(void) /* Marshaling an interface increases external connection count. */ expect_last_release_closes = FALSE; hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres); tid = start_host_object(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHLFLAGS_NORMAL, &thread); ok(external_connections == 1, "external_connections = %d\n", external_connections);
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoUnmarshalInterface(stream, &IID_ItestDual, (void**)&iface); - ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoUnmarshalInterface failed: %08lx\n", hres); if (FAILED(hres)) { end_host_object(tid, thread); @@ -3632,7 +3632,7 @@ static void test_external_connection(void)
/* Creating a stub for new iface causes new external connection. */ hres = ItestDual_QueryInterface(iface, &IID_ITestSecondDisp, (void**)&second); - ok(hres == S_OK, "Could not get ITestSecondDisp iface: %08x\n", hres); + ok(hres == S_OK, "Could not get ITestSecondDisp iface: %08lx\n", hres); todo_wine ok(external_connections == 2, "external_connections = %d\n", external_connections);
@@ -3648,42 +3648,42 @@ static void test_external_connection(void)
/* A test with direct CoMarshalInterface call. */ hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres);
expect_last_release_closes = FALSE; hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections);
expect_last_release_closes = TRUE; IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); - ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + ok(hres == S_OK, "CoReleaseMarshalData failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections);
/* Two separated marshal data are still one external connection. */ hres = CreateStreamOnHGlobal(NULL, TRUE, &stream2); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres);
expect_last_release_closes = FALSE; IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections);
hres = CoMarshalInterface(stream2, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections);
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); - ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + ok(hres == S_OK, "CoReleaseMarshalData failed: %08lx\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections);
expect_last_release_closes = TRUE; IStream_Seek(stream2, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream2); - ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + ok(hres == S_OK, "CoReleaseMarshalData failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections);
IStream_Release(stream); @@ -3691,21 +3691,21 @@ static void test_external_connection(void)
/* Weak table marshaling does not increment external connections */ hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres);
hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLEWEAK); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections);
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoUnmarshalInterface(stream, &IID_ItestDual, (void**)&iface); - ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoUnmarshalInterface failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections); ItestDual_Release(iface);
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); - ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + ok(hres == S_OK, "CoReleaseMarshalData failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections);
IStream_Release(stream); @@ -3728,18 +3728,18 @@ static void test_marshal_dispinterface(void) tid = start_host_object(stream, &DIID_ItestIF4, (IUnknown *)disp_obj, MSHLFLAGS_NORMAL, &thread); IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hr = CoUnmarshalInterface(stream, &DIID_ItestIF4, (void **)&proxy_disp); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDispatch_GetTypeInfo(proxy_disp, 0xdeadbeef, 0, &typeinfo); - ok(hr == 0xbeefdead, "Got hr %#x.\n", hr); + ok(hr == 0xbeefdead, "Got hr %#lx.\n", hr);
ref = IDispatch_Release(proxy_disp); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); end_host_object(tid, thread); ref = ISomethingFromDispatch_Release(disp_obj); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(tmarshal) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 6bfc50642a4..44d5b26cbc4 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -58,12 +58,12 @@
#define ole_expect(expr, expect) { \ HRESULT r = expr; \ - ok(r == (expect), #expr " returned %x, expected %s (%x)\n", r, #expect, expect); \ + ok(r == (expect), #expr " returned %lx, expected %s (%lx)\n", r, #expect, expect); \ }
#define ole_check(expr) ole_expect(expr, S_OK);
-#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr)
#ifdef __i386__ #define ARCH "x86" @@ -83,7 +83,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__,line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
static HRESULT (WINAPI *pRegisterTypeLibForUser)(ITypeLib*,OLECHAR*,OLECHAR*); @@ -161,7 +161,7 @@ static HRESULT WINAPI collection_Invoke(ICollection *iface, DISPID dispid, REFII ok(dispparams->cArgs == 1, "dispparams->cArgs = %d\n", dispparams->cArgs); ok(!dispparams->cNamedArgs, "dispparams->cNamedArgs = %d\n", dispparams->cNamedArgs); ok(V_VT(dispparams->rgvarg) == VT_I4, "V_VT(dispparams->rgvarg) = %d\n", V_VT(dispparams->rgvarg)); - ok(V_I4(dispparams->rgvarg) == 7, "V_I4(dispparams->rgvarg) = %d\n", V_I4(dispparams->rgvarg)); + ok(V_I4(dispparams->rgvarg) == 7, "V_I4(dispparams->rgvarg) = %ld\n", V_I4(dispparams->rgvarg)); ok(res != NULL, "res == NULL\n"); ok(V_VT(res) == VT_EMPTY, "V_VT(res) = %d\n", V_VT(res));
@@ -393,7 +393,7 @@ static void test_TypeComp(void) ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszSavePicture); hr = ITypeComp_Bind(pTypeComp, wszSavePicture, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr); ok(hr == TYPE_E_TYPEMISMATCH, - "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n", + "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08lx\n", hr);
ok(desckind == DESCKIND_NONE, @@ -483,25 +483,25 @@ static void test_TypeComp(void) /* test basic BindType argument handling */ ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); hr = ITypeComp_BindType(pTypeComp, wszGUID, ulHash, NULL, NULL); - ok(hr == E_INVALIDARG, "Got %08x\n", hr); + ok(hr == E_INVALIDARG, "Got %08lx\n", hr);
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); pTypeInfo = (void*)0xdeadbeef; hr = ITypeComp_BindType(pTypeComp, wszGUID, ulHash, &pTypeInfo, NULL); - ok(hr == E_INVALIDARG, "Got %08x\n", hr); + ok(hr == E_INVALIDARG, "Got %08lx\n", hr); ok(pTypeInfo == (void*)0xdeadbeef, "Got %p\n", pTypeInfo);
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); pTypeComp_tmp = (void*)0xdeadbeef; hr = ITypeComp_BindType(pTypeComp, wszGUID, ulHash, NULL, &pTypeComp_tmp); - ok(hr == E_INVALIDARG, "Got %08x\n", hr); + ok(hr == E_INVALIDARG, "Got %08lx\n", hr); ok(pTypeComp_tmp == (void*)0xdeadbeef, "Got %p\n", pTypeComp_tmp);
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); pTypeComp_tmp = (void*)0xdeadbeef; pTypeInfo = (void*)0xdeadbeef; hr = ITypeComp_BindType(pTypeComp, NULL, ulHash, &pTypeInfo, &pTypeComp_tmp); - ok(hr == E_INVALIDARG, "Got %08x\n", hr); + ok(hr == E_INVALIDARG, "Got %08lx\n", hr); ok(pTypeInfo == (void*)0xdeadbeef, "Got %p\n", pTypeInfo); ok(pTypeComp_tmp == (void*)0xdeadbeef, "Got %p\n", pTypeComp_tmp);
@@ -536,11 +536,11 @@ static void test_TypeComp(void) ok_ole_success(hr, ITypeLib_GetTypeComp);
hr = ITypeInfo_QueryInterface(pFontTypeInfo, &IID_ITypeComp, (void**)&tcomp); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(tcomp == pTypeComp, "got %p, was %p\n", tcomp, pTypeComp);
hr = ITypeComp_QueryInterface(tcomp, &IID_ITypeInfo, (void**)&ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(ti == pFontTypeInfo, "got %p, was %p\n", ti, pFontTypeInfo); ITypeInfo_Release(ti);
@@ -559,7 +559,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%08x\n", hr); + ok(hr == TYPE_E_TYPEMISMATCH, "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08lx\n", hr);
ok(desckind == DESCKIND_NONE, "desckind should have been DESCKIND_NONE instead of %d\n", @@ -674,10 +674,10 @@ static void test_CreateDispTypeInfo(void) methdata[3].vtReturn = VT_I4;
hr = CreateDispTypeInfo(&ifdata, LOCALE_NEUTRAL, &pTypeInfo); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTypeInfo, &pTypeAttr); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
ok(pTypeAttr->typekind == TKIND_COCLASS, "typekind %0x\n", pTypeAttr->typekind); ok(pTypeAttr->cImplTypes == 1, "cImplTypes %d\n", pTypeAttr->cImplTypes); @@ -686,12 +686,12 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseTypeAttr(pTypeInfo, pTypeAttr);
hr = ITypeInfo_GetRefTypeOfImplType(pTypeInfo, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - ok(href == 0, "href = 0x%x\n", href); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(href == 0, "href = 0x%lx\n", href); hr = ITypeInfo_GetRefTypeInfo(pTypeInfo, href, &pTI2); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI2, &pTypeAttr); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTypeAttr->typekind == TKIND_INTERFACE, "typekind %0x\n", pTypeAttr->typekind); ok(pTypeAttr->cFuncs == 4, "cFuncs %d\n", pTypeAttr->cFuncs); ok(IsEqualGUID(&pTypeAttr->guid, &GUID_NULL), "guid %s\n", debugstr_guid(&pTypeAttr->guid)); @@ -700,8 +700,8 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseTypeAttr(pTI2, pTypeAttr);
hr = ITypeInfo_GetFuncDesc(pTI2, 0, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFuncDesc->memid == 0x123, "memid %x\n", pFuncDesc->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFuncDesc->memid == 0x123, "memid %lx\n", pFuncDesc->memid); 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); @@ -717,7 +717,7 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
hr = ITypeInfo_GetFuncDesc(pTI2, 1, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\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); @@ -728,7 +728,7 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
hr = ITypeInfo_GetFuncDesc(pTI2, 2, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\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); @@ -741,7 +741,7 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
hr = ITypeInfo_GetFuncDesc(pTI2, 3, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\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); @@ -753,8 +753,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%08x\n", hr); - ok(memid == 0x123, "memid 0x%08x\n", memid); + ok(hr == S_OK, "hr 0x%08lx\n", hr); + ok(memid == 0x123, "memid 0x%08lx\n", memid);
ITypeInfo_Release(pTI2); ITypeInfo_Release(pTypeInfo); @@ -798,9 +798,9 @@ static void test_invoke_func(ITypeInfo *typeinfo) V_INT(args) = 3; V_VT(&res) = VT_ERROR; hres = ITypeInfo_Invoke(typeinfo, &invoketest, 3, DISPATCH_METHOD, &dp, &res, NULL, &i); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 4, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 4, "got %ld\n", V_I4(&res));
V_VT(args) = VT_DISPATCH; V_DISPATCH(args) = (IDispatch*)&invoketest; @@ -810,7 +810,7 @@ static void test_invoke_func(ITypeInfo *typeinfo) dp.cNamedArgs = 1; dp.cArgs = 2; hres = ITypeInfo_Invoke(typeinfo, &invoketest, 3, DISPATCH_METHOD, &dp, &res, NULL, &i); - ok(hres == DISP_E_BADPARAMCOUNT, "got 0x%08x\n", hres); + ok(hres == DISP_E_BADPARAMCOUNT, "got 0x%08lx\n", hres); }
static WCHAR *create_test_typelib(int res_no) @@ -856,22 +856,22 @@ static void test_TypeInfo(void)
/* invalid index */ hr = ITypeLib_GetTypeInfo(pTypeLib, count, &pTypeInfo); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfo(pTypeLib, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITypeLib_GetLibAttr(pTypeLib, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfoType(pTypeLib, count, &kind); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfoType(pTypeLib, count, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfoType(pTypeLib, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IFont, &pTypeInfo); ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid); @@ -879,7 +879,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%08x\n", + "ITypeInfo_GetIDsOfNames should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n", hr);
dispparams.cArgs = 0; @@ -891,18 +891,18 @@ static void test_TypeInfo(void) /* invalid member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* invalid member id -- correct flags -- cNamedArgs not bigger than cArgs */ 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%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
/* invalid member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); /* invalid member id -- correct flags -- cNamedArgs bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &pwszClone, 1, &dispidMember); @@ -911,36 +911,36 @@ static void test_TypeInfo(void) /* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; 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%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "ITypeInfo_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "ITypeInfo_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
/* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ 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%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
/* test NULL dispparams */
/* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ 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%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
/* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ 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%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
ITypeInfo_Release(pTypeInfo);
@@ -972,17 +972,17 @@ static void test_TypeInfo(void) /* Check instance size for IDispatch, typelib is loaded using system SYS_WIN* kind so it always matches system bitness. */ hr = ITypeInfo_GetTypeAttr(pTypeInfo, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(attr->cbSizeInstance == sizeof(void*), "got size %d\n", attr->cbSizeInstance); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(attr->cbSizeInstance == sizeof(void*), "got size %ld\n", attr->cbSizeInstance); ok(attr->typekind == TKIND_INTERFACE, "got typekind %d\n", attr->typekind); ITypeInfo_ReleaseTypeAttr(pTypeInfo, attr);
/* same size check with some general interface */ hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IEnumVARIANT, &ti); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = ITypeInfo_GetTypeAttr(ti, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(attr->cbSizeInstance == sizeof(void*), "got size %d\n", attr->cbSizeInstance); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(attr->cbSizeInstance == sizeof(void*), "got size %ld\n", attr->cbSizeInstance); ITypeInfo_ReleaseTypeAttr(ti, attr); ITypeInfo_Release(ti);
@@ -991,43 +991,43 @@ static void test_TypeInfo(void) /* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; 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%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
/* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; 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%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
/* test NULL dispparams */
/* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
/* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
ITypeInfo_Release(pTypeInfo); ITypeLib_Release(pTypeLib);
filename = create_test_typelib(3); hr = LoadTypeLib(filename, &pTypeLib); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* test GetDllEntry */ hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &moduleTestGetDllEntryGuid, &pTypeInfo); @@ -1036,24 +1036,24 @@ static void test_TypeInfo(void)
/* wrong memberid -- wrong invkind */ hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x6000000d, INVOKE_FUNC, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x6000000d, INVOKE_PROPERTYPUTREF, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
/* wrong memberid -- correct invkind */ hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x6000000d, INVOKE_PROPERTYGET, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x6000000d, INVOKE_PROPERTYPUT, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
/* correct memberid -- wrong invkind */ hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x60000000, INVOKE_FUNC, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x60000000, INVOKE_PROPERTYPUTREF, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
/* correct memberid -- correct invkind */ hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x60000000, INVOKE_PROPERTYGET, &bstrDllName, &bstrName, &ordinal); @@ -1073,7 +1073,7 @@ static void test_TypeInfo(void) ITypeInfo_Release(pTypeInfo);
hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IInvokeTest, &pTypeInfo); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
dispparams.cArgs = 1; dispparams.cNamedArgs = 0; @@ -1089,24 +1089,24 @@ static void test_TypeInfo(void) /* call propget with DISPATCH_METHOD|DISPATCH_PROPERTYGET flags */ hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, DISPID_VALUE, DISPATCH_METHOD|DISPATCH_PROPERTYGET, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 1, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 1, "got %ld\n", V_I4(&res));
i = 0; /* call propget with DISPATCH_METHOD flags */ hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, DISPID_VALUE, DISPATCH_METHOD, &dispparams, &res, NULL, &i); - ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08x, %d\n", hr, i); + ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08lx, %d\n", hr, i);
i = 0; V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, DISPID_VALUE, DISPATCH_PROPERTYGET, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x, %d\n", hr, i); + ok(hr == S_OK, "got 0x%08lx, %d\n", hr, i); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 1, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 1, "got %ld\n", V_I4(&res));
/* call propget with DISPATCH_METHOD|DISPATCH_PROPERTYGET flags */ V_VT(&args[0]) = VT_I4; @@ -1119,9 +1119,9 @@ static void test_TypeInfo(void) V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 4, DISPATCH_METHOD|DISPATCH_PROPERTYGET, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x, %d\n", hr, i); + ok(hr == S_OK, "got 0x%08lx, %d\n", hr, i); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 15, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 15, "got %ld\n", V_I4(&res));
/* DISPATCH_PROPERTYPUTREF */ @@ -1139,15 +1139,15 @@ static void test_TypeInfo(void) V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 1, DISPATCH_PROPERTYPUTREF, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x, %d\n", hr, i); + ok(hr == S_OK, "got 0x%08lx, %d\n", hr, i); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 3, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 3, "got %ld\n", V_I4(&res));
i = 0; V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 1, DISPATCH_PROPERTYPUT, &dispparams, &res, NULL, &i); - ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08x, %d\n", hr, i); + ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08lx, %d\n", hr, i);
i = 0; V_VT(&args[0]) = VT_UNKNOWN; @@ -1156,15 +1156,15 @@ static void test_TypeInfo(void) V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 2, DISPATCH_PROPERTYPUTREF, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x, %d\n", hr, i); + ok(hr == S_OK, "got 0x%08lx, %d\n", hr, i); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 6, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 6, "got %ld\n", V_I4(&res));
i = 0; V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 2, DISPATCH_PROPERTYPUT, &dispparams, &res, NULL, &i); - ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08x, %d\n", hr, i); + ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08lx, %d\n", hr, i);
test_invoke_func(pTypeInfo);
@@ -1194,8 +1194,8 @@ static double WINAPI double_func( double a0, float a1, double a2, int a3 )
static LONGLONG WINAPI longlong_func( LONGLONG a0, CY a1 ) { - ok( a0 == (((ULONGLONG)0xdead << 32) | 0xbeef), "wrong arg0 %08x%08x\n", (DWORD)(a0 >> 32), (DWORD)a0); - ok( a1.int64 == ((ULONGLONG)10000 * 12345678), "wrong arg1 %08x%08x\n", + ok( a0 == (((ULONGLONG)0xdead << 32) | 0xbeef), "wrong arg0 %08lx%08lx\n", (DWORD)(a0 >> 32), (DWORD)a0); + ok( a1.int64 == ((ULONGLONG)10000 * 12345678), "wrong arg1 %08lx%08lx\n", (DWORD)(a1.int64 >> 32), (DWORD)a1.int64 ); return ((ULONGLONG)4321 << 32) | 8765; } @@ -1207,10 +1207,10 @@ static VARIANT WINAPI variant_func( int a0, BOOL a1, DECIMAL a2, VARIANT a3 ) ok( a1 == 1 || broken(a1 == 0x55550001), "wrong arg1 %x\n", a1 ); V_VT(&var) = VT_LPWSTR; V_UI4(&var) = 0xbabe; - ok( a2.Hi32 == 1122, "wrong arg2.Hi32 %x\n", a2.Hi32 ); - ok( U1(a2).Lo64 == 3344, "wrong arg2.Lo64 %08x%08x\n", (DWORD)(U1(a2).Lo64 >> 32), (DWORD)U1(a2).Lo64 ); + ok( a2.Hi32 == 1122, "wrong arg2.Hi32 %lx\n", a2.Hi32 ); + ok( U1(a2).Lo64 == 3344, "wrong arg2.Lo64 %08lx%08lx\n", (DWORD)(U1(a2).Lo64 >> 32), (DWORD)U1(a2).Lo64 ); ok( V_VT(&a3) == VT_EMPTY, "wrong arg3 type %x\n", V_VT(&a3) ); - ok( V_UI4(&a3) == 0xdeadbeef, "wrong arg3 value %x\n", V_UI4(&a3) ); + ok( V_UI4(&a3) == 0xdeadbeef, "wrong arg3 value %lx\n", V_UI4(&a3) ); return var; }
@@ -1253,7 +1253,7 @@ static VARIANT WINAPI variant_func2(VARIANT v1, VARIANT v2) VARIANT ret;
ok(V_VT(&v1) == VT_I4, "unexpected %d\n", V_VT(&v1)); - ok(V_I4(&v1) == 2, "unexpected %d\n", V_I4(&v1)); + ok(V_I4(&v1) == 2, "unexpected %ld\n", V_I4(&v1)); ok(V_VT(&v2) == VT_BSTR, "unexpected %d\n", V_VT(&v2)); ok(lstrcmpW(V_BSTR(&v2), testW) == 0, "unexpected %s\n", wine_dbgstr_w(V_BSTR(&v2)));
@@ -1284,10 +1284,10 @@ static void WINAPI inst_func2(void *inst, VARIANT *ret, VARIANT v1, VARIANT v2) ok( (*(void ***)inst)[3] == inst_func2, "wrong ptr %p\n", inst );
ok(V_VT(ret) == VT_I4 || broken(V_VT(ret) == VT_VARIANT) /* win64 */, "unexpected %d\n", V_VT(ret)); - ok(V_I4(ret) == 1234, "unexpected %d\n", V_I4(ret)); + ok(V_I4(ret) == 1234, "unexpected %ld\n", V_I4(ret));
ok(V_VT(&v1) == VT_I4, "unexpected %d\n", V_VT(&v1)); - ok(V_I4(&v1) == 2, "unexpected %d\n", V_I4(&v1)); + ok(V_I4(&v1) == 2, "unexpected %ld\n", V_I4(&v1)); ok(V_VT(&v2) == VT_BSTR, "unexpected %d\n", V_VT(&v2)); ok(lstrcmpW(V_BSTR(&v2), testW) == 0, "unexpected %s\n", wine_dbgstr_w(V_BSTR(&v2)));
@@ -1320,17 +1320,17 @@ static void test_DispCallFunc(void) V_BSTR(&args[1]) = SysAllocString(testW); memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc(NULL, (ULONG_PTR)variant_func2, CC_STDCALL, VT_VARIANT, 2, types, pargs, &result); - ok(res == S_OK, "DispCallFunc error %#x\n", res); + ok(res == S_OK, "DispCallFunc error %#lx\n", res); ok(V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result)); - ok(V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result)); + ok(V_UI4(&result) == 4321, "wrong result %lu\n", V_UI4(&result));
V_VT(&result) = VT_I4; V_UI4(&result) = 1234; inst = vtable2; res = DispCallFunc(&inst, 3 * sizeof(void *), CC_STDCALL, VT_VARIANT, 2, types, pargs, &result); - ok(res == S_OK, "DispCallFunc error %#x\n", res); + ok(res == S_OK, "DispCallFunc error %#lx\n", res); ok(V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result)); - ok(V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result)); + ok(V_UI4(&result) == 4321, "wrong result %lu\n", V_UI4(&result));
VariantClear(&args[1]);
@@ -1347,19 +1347,19 @@ static void test_DispCallFunc(void) V_I1(&args[4]) = -3; memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)int_func, CC_STDCALL, VT_UI4, 5, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result) ); - ok( V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result) ); + ok( V_UI4(&result) == 4321, "wrong result %lu\n", V_UI4(&result) );
/* the function checks the argument sizes for stdcall */ if (abi_supports_stdcall) { res = DispCallFunc( NULL, (ULONG_PTR)stdcall_func, CC_STDCALL, VT_UI4, 0, types, pargs, &result ); - ok( res == DISP_E_BADCALLEE, "DispCallFunc wrong error %x\n", res ); + ok( res == DISP_E_BADCALLEE, "DispCallFunc wrong error %lx\n", res ); res = DispCallFunc( NULL, (ULONG_PTR)stdcall_func, CC_STDCALL, VT_UI4, 1, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); res = DispCallFunc( NULL, (ULONG_PTR)stdcall_func, CC_STDCALL, VT_UI4, 2, types, pargs, &result ); - ok( res == DISP_E_BADCALLEE, "DispCallFunc wrong error %x\n", res ); + ok( res == DISP_E_BADCALLEE, "DispCallFunc wrong error %lx\n", res ); }
memset( args, 0x55, sizeof(args) ); @@ -1373,7 +1373,7 @@ static void test_DispCallFunc(void) V_I4(&args[3]) = -4433; memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)double_func, CC_STDCALL, VT_R8, 4, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_R8, "wrong result type %d\n", V_VT(&result) ); ok( V_R8(&result) == 4321, "wrong result %f\n", V_R8(&result) );
@@ -1385,11 +1385,11 @@ static void test_DispCallFunc(void) memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)longlong_func, CC_STDCALL, VT_I8, 2, types, pargs, &result ); ok( res == S_OK || broken(res == E_INVALIDARG), /* longlong not supported on <= win2k */ - "DispCallFunc failed %x\n", res ); + "DispCallFunc failed %lx\n", res ); if (res == S_OK) { ok( V_VT(&result) == VT_I8, "wrong result type %d\n", V_VT(&result) ); - ok( V_I8(&result) == (((ULONGLONG)4321 << 32) | 8765), "wrong result %08x%08x\n", + ok( V_I8(&result) == (((ULONGLONG)4321 << 32) | 8765), "wrong result %08lx%08lx\n", (DWORD)(V_I8(&result) >> 32), (DWORD)V_I8(&result) ); }
@@ -1407,9 +1407,9 @@ static void test_DispCallFunc(void) types[4] = VT_EMPTY; memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)variant_func, CC_STDCALL, VT_VARIANT, 5, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_LPWSTR, "wrong result type %d\n", V_VT(&result) ); - ok( V_UI4(&result) == 0xbabe, "wrong result %08x\n", V_UI4(&result) ); + ok( V_UI4(&result) == 0xbabe, "wrong result %08lx\n", V_UI4(&result) );
memset( args, 0x55, sizeof(args) ); types[0] = VT_EMPTY; @@ -1421,12 +1421,12 @@ static void test_DispCallFunc(void) types[4] = VT_EMPTY; memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)void_func, CC_CDECL, VT_EMPTY, 5, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_EMPTY, "wrong result type %d\n", V_VT(&result) ); if (is_win64) - ok( V_UI4(&result) == 12, "wrong result %08x\n", V_UI4(&result) ); + ok( V_UI4(&result) == 12, "wrong result %08lx\n", V_UI4(&result) ); else - ok( V_UI4(&result) == 0xcccccccc, "wrong result %08x\n", V_UI4(&result) ); + ok( V_UI4(&result) == 0xcccccccc, "wrong result %08lx\n", V_UI4(&result) );
memset( args, 0x55, sizeof(args) ); types[0] = VT_I4; @@ -1434,19 +1434,19 @@ static void test_DispCallFunc(void) memset( &result, 0xcc, sizeof(result) ); inst = vtable; res = DispCallFunc( &inst, 3 * sizeof(void*), CC_STDCALL, VT_I4, 1, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_I4, "wrong result type %d\n", V_VT(&result) ); - ok( V_I4(&result) == 6, "wrong result %08x\n", V_I4(&result) ); + ok( V_I4(&result) == 6, "wrong result %08lx\n", V_I4(&result) );
memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc(NULL, (ULONG_PTR)ret_false_func, CC_STDCALL, VT_ERROR, 0, NULL, NULL, &result); - ok(res == S_OK, "DispCallFunc failed: %08x\n", res); + ok(res == S_OK, "DispCallFunc failed: %08lx\n", res); ok(V_VT(&result) == VT_ERROR, "V_VT(result) = %u\n", V_VT(&result)); - ok(V_ERROR(&result) == S_FALSE, "V_ERROR(result) = %08x\n", V_ERROR(&result)); + ok(V_ERROR(&result) == S_FALSE, "V_ERROR(result) = %08lx\n", V_ERROR(&result));
memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc(NULL, (ULONG_PTR)ret_false_func, CC_STDCALL, VT_HRESULT, 0, NULL, NULL, &result); - ok(res == E_INVALIDARG, "DispCallFunc failed: %08x\n", res); + ok(res == E_INVALIDARG, "DispCallFunc failed: %08lx\n", res); ok(V_VT(&result) == 0xcccc, "V_VT(result) = %u\n", V_VT(&result)); }
@@ -1550,7 +1550,7 @@ static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, DWORD arch, LPCWST
if (res != ERROR_SUCCESS) { - trace("RegCreateKeyExW failed: %u\n", res); + trace("RegCreateKeyExW failed: %lu\n", res); return FALSE; }
@@ -1595,7 +1595,7 @@ static void test_QueryPathOfRegTypeLib(DWORD arch) BSTR path;
status = UuidCreate(&uid); - ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08x\n", status); + ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08lx\n", status);
StringFromGUID2(&uid, uid_str, 40); /*trace("GUID: %s\n", wine_dbgstr_w(uid_str));*/ @@ -1609,7 +1609,7 @@ static void test_QueryPathOfRegTypeLib(DWORD arch) for (i = 0; i < ARRAY_SIZE(td); i++) { ret = QueryPathOfRegTypeLib(&uid, td[i].maj, td[i].min, LOCALE_NEUTRAL, &path); - ok(ret == td[i].ret, "QueryPathOfRegTypeLib(%u.%u) returned %08x\n", td[i].maj, td[i].min, ret); + ok(ret == td[i].ret, "QueryPathOfRegTypeLib(%u.%u) returned %08lx\n", td[i].maj, td[i].min, ret); if (ret == S_OK) { ok(!lstrcmpW(td[i].path, path), "typelib %u.%u path doesn't match\n", td[i].maj, td[i].min); @@ -1640,10 +1640,10 @@ static void test_inheritance(void)
/* ItestIF3 is a syntax 2 dispinterface */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF3, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); @@ -1652,21 +1652,21 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p);
/* Should have six methods */ hr = ITypeInfo_GetFuncDesc(pTI, 6, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 5, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60020000, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x60020000, "memid %08lx\n", pFD->memid); ok(pFD->oVft == 5 * sizeof(void *), "oVft %d\n", pFD->oVft); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI); @@ -1674,10 +1674,10 @@ static void test_inheritance(void)
/* ItestIF4 is a syntax 1 dispinterface */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF4, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); @@ -1686,29 +1686,29 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p); hr = ITypeInfo_GetFuncDesc(pTI, 1, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 0, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1c, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1c, "memid %08lx\n", pFD->memid); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF5 is dual with inherited ifaces which derive from IUnknown but not IDispatch */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF5, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDUAL, "typeflags %x\n", pTA->wTypeFlags); @@ -1717,26 +1717,26 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p); hr = ITypeInfo_GetFuncDesc(pTI, 6, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1234, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1234, "memid %08lx\n", pFD->memid); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF7 is dual with inherited ifaces which derive from Dispatch */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF7, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "typeflags %x\n", pTA->wTypeFlags); @@ -1745,27 +1745,27 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p);
hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1236, "memid %08lx\n", pFD->memid); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF10 is a syntax 2 dispinterface which doesn't derive from IUnknown */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF10, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == sizeof(IDispatchVtbl), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); @@ -1774,33 +1774,33 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, -1, &href); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p);
/* Should have three methods */ hr = ITypeInfo_GetFuncDesc(pTI, 3, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 2, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60010000, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x60010000, "memid %08lx\n", pFD->memid); ok(pFD->oVft == 2 * sizeof(void *), "oVft %d\n", pFD->oVft); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF11 is a syntax 2 dispinterface which derives from IDispatch */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF11, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); @@ -1809,21 +1809,21 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p);
/* Should have ten methods */ hr = ITypeInfo_GetFuncDesc(pTI, 10, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1236, "memid %08lx\n", pFD->memid); ok(pFD->oVft == 9 * sizeof(void *), "oVft %d\n", pFD->oVft);
/* first argument to 10th function is an HREFTYPE from the impl type */ @@ -1831,9 +1831,9 @@ static void test_inheritance(void) ok(pFD->lprgelemdescParam[0].tdesc.vt == VT_USERDEFINED, "vt 0x%x\n", pFD->lprgelemdescParam[0].tdesc.vt); href = U(pFD->lprgelemdescParam[0].tdesc).hreftype; - ok((href & 0xff000000) == 0x04000000, "href 0x%08x\n", href); + ok((href & 0xff000000) == 0x04000000, "href 0x%08lx\n", href); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); if (SUCCEEDED(hr)) ITypeInfo_Release(pTI_p); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI); @@ -1841,10 +1841,10 @@ static void test_inheritance(void)
/* ItestIF2 is an interface which derives from IUnknown */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF2, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_INTERFACE, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 6 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == 0, "typeflags %x\n", pTA->wTypeFlags); @@ -1854,20 +1854,20 @@ static void test_inheritance(void)
/* Should have one method */ hr = ITypeInfo_GetFuncDesc(pTI, 1, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 0, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60020000, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x60020000, "memid %08lx\n", pFD->memid); ok(pFD->oVft == 5 * sizeof(void *), "oVft %d\n", pFD->oVft); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF13 is dual with inherited dual ifaces */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF13, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "typeflags %x\n", pTA->wTypeFlags); @@ -1876,24 +1876,24 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", wine_dbgstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1236, "memid %08lx\n", pFD->memid); ITypeInfo_ReleaseFuncDesc(pTI, pFD);
hr = ITypeInfo_GetRefTypeInfo(pTI, -2, &dual_ti); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(dual_ti, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_INTERFACE, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == sizeof(ItestIF13Vtbl), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FOLEAUTOMATION|TYPEFLAG_FDUAL), "typeflags %x\n", pTA->wTypeFlags); @@ -1902,11 +1902,11 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(dual_ti, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(dual_ti, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(dual_ti, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(pTA->typekind == TKIND_INTERFACE, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == sizeof(ItestIF12Vtbl), "sizevft %d\n", pTA->cbSizeVft); ok(IsEqualGUID(&pTA->guid, &IID_ItestIF12), "guid %s\n", wine_dbgstr_guid(&pTA->guid)); @@ -1997,45 +1997,45 @@ static void test_CreateTypeLib(SYSKIND sys) { trace("CreateTypeLib tests\n");
hres = LoadTypeLib(wszStdOle2, &stdole); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IUnknown, &unknown); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(unknown, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(typeattr->cbSizeVft == 3 * sizeof(void*), "Got wrong cbSizeVft: %u\n", typeattr->cbSizeVft); ITypeInfo_ReleaseTypeAttr(unknown, typeattr);
hres = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IDispatch, &dispatch); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
GetTempFileNameA(".", "tlb", 0, filename); MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH);
hres = CreateTypeLib2(sys, filenameW, &createtl); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeLib2_QueryInterface(createtl, &IID_ITypeLib, (void**)&tl); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetTypeInfo(tl, 0, NULL); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres);
hres = ITypeLib_GetTypeInfoType(tl, 0, &kind); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got 0x%08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got 0x%08lx\n", hres);
hres = ITypeLib_GetTypeInfoType(tl, 0, NULL); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres);
hres = ITypeLib_GetTypeInfoType(tl, 0, NULL); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres);
hres = ITypeLib_GetLibAttr(tl, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeLib_GetLibAttr(tl, &libattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(libattr->syskind == sys, "syskind = %d\n", libattr->syskind); ok(libattr->wMajorVerNum == 0, "wMajorVer = %d\n", libattr->wMajorVerNum); @@ -2046,26 +2046,26 @@ static void test_CreateTypeLib(SYSKIND sys) {
name = (BSTR)0xdeadbeef; hres = ITypeLib_GetDocumentation(tl, -1, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(name == NULL, "name != NULL\n"); ok(docstring == NULL, "docstring != NULL\n"); ok(helpcontext == 0, "helpcontext != 0\n"); ok(helpfile == NULL, "helpfile != NULL\n");
hres = ITypeLib_GetDocumentation(tl, 0, &name, NULL, NULL, NULL); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeLib2_SetName(createtl, typelibW); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeLib2_SetHelpFileName(createtl, helpfileW); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetDocumentation(tl, -1, NULL, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetDocumentation(tl, -1, &name, NULL, NULL, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(!memcmp(name, typelibW, sizeof(typelibW)), "name = %s\n", wine_dbgstr_w(name)); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "helpfile = %s\n", wine_dbgstr_w(helpfile));
@@ -2075,38 +2075,38 @@ static void test_CreateTypeLib(SYSKIND sys) { V_VT(&cust_data) = VT_I4; V_I4(&cust_data) = 1; hres = ICreateTypeLib2_SetCustData(createtl, &tlcustguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_QueryInterface(tl, &IID_ITypeLib2, (void**)&tl2); - ok(hres == S_OK, "no ITypeLib2 interface (%x)\n", hres); + ok(hres == S_OK, "no ITypeLib2 interface (%lx)\n", hres);
V_VT(&cust_data) = VT_EMPTY; V_I4(&cust_data) = 0; hres = ITypeLib2_GetCustData(tl2, &tlcustguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(V_VT(&cust_data) == VT_I4, "V_VT(&cust_data) = %d\n", V_VT(&cust_data)); - ok(V_I4(&cust_data) == 1, "V_I4(&cust_data) = %d\n", V_I4(&cust_data)); + ok(V_I4(&cust_data) == 1, "V_I4(&cust_data) = %ld\n", V_I4(&cust_data));
ITypeLib2_Release(tl2);
/* invalid parameters */ hres = ICreateTypeLib2_CreateTypeInfo(createtl, NULL, TKIND_INTERFACE, &createti); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, NULL, TKIND_INTERFACE, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetDocumentation(tl, 0, &name, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(!memcmp(name, interface1W, sizeof(interface1W)), "name = %s\n", wine_dbgstr_w(name));
SysFreeString(name); @@ -2116,7 +2116,7 @@ static void test_CreateTypeLib(SYSKIND sys) { name = (BSTR)0xdeadbeef; helpfile = (BSTR)0xdeadbeef; hres = ITypeInfo_GetDocumentation(interface1, -1, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(!memcmp(name, interface1W, sizeof(interface1W)), "name = %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "docstring != NULL\n"); ok(helpcontext == 0, "helpcontext != 0\n"); @@ -2126,53 +2126,53 @@ static void test_CreateTypeLib(SYSKIND sys) { SysFreeString(helpfile);
hres = ITypeInfo_GetDocumentation(interface1, 0, &name, NULL, NULL, NULL); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeInfo(interface1, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_LayOut(createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetGuid(createti, &interfaceguid); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, NULL, &hreftype); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); if(hres != S_OK) { skip("Skipping some tests\n"); return; }
hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeOfImplType(interface1, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 3, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 3, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeInfo(interface1, hreftype, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(typeattr->cbSizeVft == 3 * ptr_size, "retrieved IUnknown gave wrong cbSizeVft: %u\n", typeattr->cbSizeVft); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
ITypeInfo_Release(ti);
hres = ITypeInfo_GetRefTypeOfImplType(interface1, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo2, (void**)&ti2);
@@ -2184,24 +2184,24 @@ static void test_CreateTypeLib(SYSKIND sys) { U(funcdesc.elemdescFunc).idldesc.wIDLFlags = IDLFLAG_NONE;
hres = ICreateTypeInfo_AddFuncDesc(createti, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 0, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2217,15 +2217,15 @@ static void test_CreateTypeLib(SYSKIND sys) { ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
funcdesc.invkind = INVOKE_PROPERTYPUT; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08x\n", hres); + ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08lx\n", hres);
funcdesc.invkind = INVOKE_PROPERTYPUTREF; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08x\n", hres); + ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08lx\n", hres);
elemdesc[0].tdesc.vt = VT_BSTR; U(elemdesc[0]).idldesc.dwReserved = 0; @@ -2237,30 +2237,30 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.elemdescFunc.tdesc.vt = VT_VOID;
hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncHelpContext(createti, 1, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, propname, 0); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, NULL, 1); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, propname, 1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 2); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2282,13 +2282,13 @@ static void test_CreateTypeLib(SYSKIND sys) {
funcdesc.invkind = INVOKE_PROPERTYPUTREF; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0x201); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
funcdesc.memid = 1; funcdesc.lprgelemdescParam = NULL; @@ -2297,12 +2297,12 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.cScodes = 1; funcdesc.lprgscode = NULL; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 1, "got %d\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 1, "got %ld\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2319,7 +2319,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
funcdesc.memid = MEMBERID_NIL; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
elemdesc[0].tdesc.vt = VT_PTR; U(elemdesc[0].tdesc).lptdesc = &typedesc1; @@ -2327,12 +2327,12 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.cParams = 1; funcdesc.lprgelemdescParam = elemdesc; hres = ICreateTypeInfo_AddFuncDesc(createti, 4, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 4, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010004, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010004, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2358,12 +2358,12 @@ static void test_CreateTypeLib(SYSKIND sys) { typedesc2.vt = VT_PTR; U(typedesc2).lptdesc = &typedesc1; hres = ICreateTypeInfo_AddFuncDesc(createti, 4, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 4, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010007, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010007, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2393,12 +2393,12 @@ static void test_CreateTypeLib(SYSKIND sys) { V_VT(¶mdescex.varDefaultValue) = VT_INT; V_INT(¶mdescex.varDefaultValue) = 0x123; hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010003, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010003, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2415,11 +2415,11 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(edesc->tdesc.vt == VT_INT, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_I4, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); - ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123, "got: 0x%x\n", + ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123, "got: 0x%lx\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc); @@ -2433,12 +2433,12 @@ static void test_CreateTypeLib(SYSKIND sys) { V_UI2(¶mdescex.varDefaultValue) = 0xffff; funcdesc.cParams = 2; hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010009, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010009, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2460,7 +2460,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(edesc->tdesc.vt == VT_UI2, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_UI2, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -2475,23 +2475,23 @@ static void test_CreateTypeLib(SYSKIND sys) { V_VT(¶mdescex.varDefaultValue) = VT_INT; V_INT(¶mdescex.varDefaultValue) = 0xffffffff; hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
elemdesc[0].tdesc.vt = VT_BSTR; elemdesc[1].tdesc.vt = VT_BSTR; V_VT(¶mdescex.varDefaultValue) = VT_BSTR; V_BSTR(¶mdescex.varDefaultValue) = SysAllocString(defaultW); hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); SysFreeString(V_BSTR(¶mdescex.varDefaultValue));
WideCharToMultiByte(CP_ACP, 0, defaultW, -1, nameA, sizeof(nameA), NULL, NULL); MultiByteToWideChar(CP_ACP, 0, nameA, -1, nameW, ARRAY_SIZE(nameW));
hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x6001000b, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x6001000b, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2508,7 +2508,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(edesc->tdesc.vt == VT_BSTR, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_BSTR, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -2520,7 +2520,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(edesc->tdesc.vt == VT_BSTR, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_BSTR, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -2543,12 +2543,12 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.elemdescFunc.tdesc.vt = VT_VOID;
hres = ICreateTypeInfo_AddFuncDesc(createti, 5, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 5, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010005, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010005, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2566,7 +2566,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(edesc->tdesc.vt == VT_USERDEFINED, "got: %d\n", edesc->tdesc.vt); - ok(U(edesc->tdesc).hreftype == hreftype, "got: 0x%x\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == hreftype, "got: 0x%lx\n", U(edesc->tdesc).hreftype); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); ok(V_INT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x789, "got: %d\n", @@ -2586,12 +2586,12 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.elemdescFunc.tdesc.vt = VT_VARIANT;
hres = ICreateTypeInfo_AddFuncDesc(createti, 6, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 6, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010006, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010006, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2617,7 +2617,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
hres = ITypeInfo_GetDocumentation(interface1, 0, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(name == NULL, "name != NULL\n"); ok(docstring == NULL, "docstring != NULL\n"); ok(helpcontext == 0x201, "helpcontext != 0x201\n"); @@ -2626,99 +2626,99 @@ static void test_CreateTypeLib(SYSKIND sys) { SysFreeString(helpfile);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000, NULL, 1); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000, names1, 1); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 2); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names2, 1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetDocumentation(interface1, 0, &name, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(!memcmp(name, func1W, sizeof(func1W)), "name = %s\n", wine_dbgstr_w(name));
SysFreeString(name);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names2, 3); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names1, 3); - ok(hres == TYPE_E_AMBIGUOUSNAME, "got %08x\n", hres); + ok(hres == TYPE_E_AMBIGUOUSNAME, "got %08lx\n", hres);
ITypeInfo2_Release(ti2); ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hres == TYPE_E_NAMECONFLICT, "got %08x\n", hres); + ok(hres == TYPE_E_NAMECONFLICT, "got %08lx\n", hres);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface2W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetGuid(createti, &interface2guid); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeOfImplType(interface2, 0, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, interface1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeInfo(interface2, 0, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(ti == interface1, "Received and added interfaces are different\n");
ITypeInfo_Release(ti);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeOfImplType(interface2, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 2, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 2, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeOfImplType(interface2, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT); - ok(hres == TYPE_E_BADMODULEKIND, "got %08x\n", hres); + ok(hres == TYPE_E_BADMODULEKIND, "got %08lx\n", hres);
hres = ITypeInfo_GetImplTypeFlags(interface2, 0, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == 0, "impltypeflags = %x\n", impltypeflags);
hres = ITypeInfo_GetImplTypeFlags(interface2, 1, &impltypeflags); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
funcdesc.elemdescFunc.tdesc.vt = VT_VOID; funcdesc.oVft = 0xaaac; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); if(sys == SYS_WIN64){ - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres); funcdesc.oVft = 0xaab0; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); } - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); funcdesc.oVft = 0xaaa8; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&ti2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 0, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60020000, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60020000, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2741,74 +2741,74 @@ static void test_CreateTypeLib(SYSKIND sys) { VariantInit(&cust_data);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface3W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ICreateTypeInfo2, (void**)&createti2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo2_QueryInterface(createti2, &IID_ITypeInfo2, (void**)&ti2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetCustData(ti2, NULL, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeInfo2_GetCustData(ti2, &custguid, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo2_SetCustData(createti2, NULL, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == DISP_E_BADVARTYPE, "got %08x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "got %08lx\n", hres);
V_VT(&cust_data) = VT_UI4; V_I4(&cust_data) = 0xdeadbeef;
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
V_I4(&cust_data) = 0; V_VT(&cust_data) = VT_EMPTY;
hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(V_VT(&cust_data) == VT_UI4, "got %d\n", V_VT(&cust_data)); - ok(V_I4(&cust_data) == 0xdeadbeef, "got 0x%08x\n", V_I4(&cust_data)); + ok(V_I4(&cust_data) == 0xdeadbeef, "got 0x%08lx\n", V_I4(&cust_data));
V_VT(&cust_data) = VT_UI4; V_I4(&cust_data) = 12345678;
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
V_I4(&cust_data) = 0; V_VT(&cust_data) = VT_EMPTY;
hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(V_VT(&cust_data) == VT_UI4, "got %d\n", V_VT(&cust_data)); - ok(V_I4(&cust_data) == 12345678, "got 0x%08x\n", V_I4(&cust_data)); + ok(V_I4(&cust_data) == 12345678, "got 0x%08lx\n", V_I4(&cust_data));
V_VT(&cust_data) = VT_BSTR; V_BSTR(&cust_data) = SysAllocString(asdfW);
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
SysFreeString(V_BSTR(&cust_data)); V_I4(&cust_data) = 0; V_VT(&cust_data) = VT_EMPTY;
hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(V_VT(&cust_data) == VT_BSTR, "got %d\n", V_VT(&cust_data)); ok(!lstrcmpW(V_BSTR(&cust_data), asdfW), "got %s\n", wine_dbgstr_w(V_BSTR(&cust_data))); @@ -2818,7 +2818,7 @@ static void test_CreateTypeLib(SYSKIND sys) { V_UI4(&cust_data) = 17;
hres = ITypeInfo2_GetCustData(ti2, &bogusguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(V_VT(&cust_data) == VT_EMPTY, "got: %d\n", V_VT(&cust_data));
@@ -2827,93 +2827,93 @@ static void test_CreateTypeLib(SYSKIND sys) { ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, coclassW, TKIND_COCLASS, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, interface1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 2, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetImplTypeFlags(createti, 1, IMPLTYPEFLAG_FRESTRICTED); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetImplTypeFlags(ti, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeInfo_GetImplTypeFlags(ti, 0, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == IMPLTYPEFLAG_FDEFAULT, "impltypeflags = %x\n", impltypeflags);
hres = ITypeInfo_GetImplTypeFlags(ti, 1, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == IMPLTYPEFLAG_FRESTRICTED, "impltypeflags = %x\n", impltypeflags);
hres = ITypeInfo_GetImplTypeFlags(ti, 2, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == 0, "impltypeflags = %x\n", impltypeflags);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 0, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 0, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 1, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 2, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 1, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeOfImplType(ti, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
ITypeInfo_Release(ti);
ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, dualW, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetTypeFlags(createti, TYPEFLAG_FDUAL); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, dispatch, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&dual); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(dual, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -2927,18 +2927,18 @@ static void test_CreateTypeLib(SYSKIND sys) { ITypeInfo_ReleaseTypeAttr(dual, typeattr);
hres = ITypeInfo_GetRefTypeOfImplType(dual, -1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == -2, "got %08x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == -2, "got %08lx\n", hreftype);
EXPECT_REF(dual, 2); hres = ITypeInfo_GetRefTypeInfo(dual, -2, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); todo_wine EXPECT_REF(dual, 3);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_DISPATCH, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 8, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -2952,7 +2952,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetRefTypeInfo(dual, -2, &ti_2); - ok(hres == S_OK, "Failed to get reference typeinfo, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to get reference typeinfo, hr %#lx.\n", hres); todo_wine { ok(ti == ti_2, "Unexpected typeinfo instance.\n"); EXPECT_REF(dual, 4); @@ -2966,13 +2966,13 @@ todo_wine { ITypeInfo_Release(ti);
hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1); - ok(hres == TYPE_E_BADMODULEKIND, "got %08x\n", hres); + ok(hres == TYPE_E_BADMODULEKIND, "got %08lx\n", hres);
ICreateTypeInfo_Release(createti);
hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 13, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -2986,8 +2986,8 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(interface1, typeattr);
hres = ITypeInfo_GetTypeAttr(interface2, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 2, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3007,17 +3007,17 @@ todo_wine { ok(ITypeInfo_Release(dual)==0, "Object should be freed\n");
hres = ICreateTypeLib2_CreateTypeInfo(createtl, aliasW, TKIND_ALIAS, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
if(0){ /* windows gives invalid values here, and even breaks the typeinfo permanently * on winxp. only call GetTypeAttr() on a TKIND_ALIAS after SetTypeDescAlias. */ hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 0xffffffb4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == 0xffffffb4, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_ALIAS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3032,15 +3032,15 @@ todo_wine { }
hres = ICreateTypeInfo_SetTypeDescAlias(createti, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
typedesc1.vt = VT_I1; hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 1, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == 1, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_ALIAS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3055,11 +3055,11 @@ todo_wine {
typedesc1.vt = VT_R8; hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 8, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == 8, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_ALIAS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3076,7 +3076,7 @@ todo_wine { ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(ICreateTypeLib2_Release(createtl)==0, "Object should be freed\n");
@@ -3085,10 +3085,10 @@ todo_wine { ok(ITypeLib_Release(stdole)==0, "Object should be freed\n");
hres = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetLibAttr(tl, &libattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(libattr->syskind == sys, "syskind = %d\n", libattr->syskind); ok(libattr->wMajorVerNum == 0, "wMajorVer = %d\n", libattr->wMajorVerNum); ok(libattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", libattr->wMinorVerNum); @@ -3100,7 +3100,7 @@ todo_wine { memids[0] = 0xdeadbeef; memids[1] = 0xdeadbeef; hres = ITypeLib_FindName(tl, param1W, 0, tinfos, memids, &found); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(found == 0, "got wrong count: %u\n", found); ok(tinfos[0] == NULL, "got invalid typeinfo[0]\n"); ok(tinfos[1] == NULL, "got invalid typeinfo[1]\n"); @@ -3112,7 +3112,7 @@ todo_wine { memids[0] = 0xdeadbeef; memids[1] = 0xdeadbeef; hres = ITypeLib_FindName(tl, func1W, 0, tinfos, memids, &found); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(found == 1, "got wrong count: %u\n", found); ok(tinfos[0] != NULL, "got invalid typeinfo[0]\n"); ok(tinfos[1] == NULL, "got invalid typeinfo[1]\n"); @@ -3126,53 +3126,53 @@ todo_wine { memids[0] = 0xdeadbeef; memids[1] = 0xdeadbeef; hres = ITypeLib_FindName(tl, interface1W, 0, tinfos, memids, &found); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(found == 1, "got wrong count: %u\n", found); ok(tinfos[0] != NULL, "got invalid typeinfo[0]\n"); ok(tinfos[1] == NULL, "got invalid typeinfo[1]\n"); - ok(memids[0] == MEMBERID_NIL, "got invalid memid[0]: %x\n", memids[0]); + ok(memids[0] == MEMBERID_NIL, "got invalid memid[0]: %lx\n", memids[0]); ok(memids[1] == 0xdeadbeef, "got invalid memid[1]\n"); if(tinfos[0]) ITypeInfo_Release(tinfos[0]);
hres = ITypeLib_GetDocumentation(tl, -1, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(memcmp(typelibW, name, sizeof(typelibW)) == 0, "got wrong typelib name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got wrong docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got wrong helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got wrong helpcontext: 0x%lx\n", helpcontext); ok(memcmp(helpfileW, helpfile, sizeof(helpfileW)) == 0, "got wrong helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeLib_GetDocumentation(tl, 0, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(memcmp(interface1W, name, sizeof(interface1W)) == 0, "got wrong typeinfo name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got wrong docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got wrong helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got wrong helpcontext: 0x%lx\n", helpcontext); ok(memcmp(helpfileW, helpfile, sizeof(helpfileW)) == 0, "got wrong helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeLib_QueryInterface(tl, &IID_ITypeLib2, (void**)&tl2); - ok(hres == S_OK, "no ITypeLib2 interface (%x)\n", hres); + ok(hres == S_OK, "no ITypeLib2 interface (%lx)\n", hres); V_VT(&cust_data) = VT_EMPTY; V_I4(&cust_data) = 0; hres = ITypeLib2_GetCustData(tl2, &tlcustguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(V_VT(&cust_data) == VT_I4, "V_VT(&cust_data) = %d\n", V_VT(&cust_data)); - ok(V_I4(&cust_data) == 1, "V_I4(&cust_data) = %d\n", V_I4(&cust_data)); + ok(V_I4(&cust_data) == 1, "V_I4(&cust_data) = %ld\n", V_I4(&cust_data)); ITypeLib2_Release(tl2);
hres = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 13, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3186,22 +3186,22 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 3, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 3, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeInfo(ti, hreftype, &unknown); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(unknown, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(IsEqualGUID(&typeattr->guid, &IID_IUnknown), "got wrong reftypeinfo\n"); ITypeInfo_ReleaseTypeAttr(unknown, typeattr);
ITypeInfo_Release(unknown);
hres = ITypeInfo_GetFuncDesc(ti, 0, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3217,24 +3217,24 @@ todo_wine { ok(U(*edesc).idldesc.wIDLFlags == IDLFLAG_FIN, "got: %x\n", U(*edesc).idldesc.wIDLFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(!memcmp(name, func1W, sizeof(func1W)), "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0x201, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0x201, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, NULL, 0, &cnames); - ok(hres == E_INVALIDARG, "got: %08x\n", hres); + ok(hres == E_INVALIDARG, "got: %08lx\n", hres);
cnames = 8; hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, 0, &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 0, "got: %u\n", cnames);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, ARRAY_SIZE(names), &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 1, "got: %u\n", cnames); ok(!memcmp(names[0], func1W, sizeof(func1W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); SysFreeString(names[0]); @@ -3242,8 +3242,8 @@ todo_wine { ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 1, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010001, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010001, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3257,17 +3257,17 @@ todo_wine { ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 2, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x1, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x1, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3281,17 +3281,17 @@ todo_wine { ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 3, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x6001000b, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x6001000b, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3308,7 +3308,7 @@ todo_wine { ok(edesc->tdesc.vt == VT_BSTR, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_BSTR, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3320,7 +3320,7 @@ todo_wine { ok(edesc->tdesc.vt == VT_BSTR, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_BSTR, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3329,16 +3329,16 @@ todo_wine { wine_dbgstr_w(V_BSTR(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)));
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(!memcmp(name, func2W, sizeof(func2W)), "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, ARRAY_SIZE(names), &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 3, "got: %u\n", cnames); ok(!memcmp(names[0], func2W, sizeof(func2W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); ok(!memcmp(names[1], param1W, sizeof(func2W)), "got names[1]: %s\n", wine_dbgstr_w(names[1])); @@ -3349,8 +3349,8 @@ todo_wine { ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 4, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x6001000c, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x6001000c, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3367,36 +3367,36 @@ todo_wine { ok(edesc->tdesc.vt == VT_INT, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_I4, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0xFFFFFFFF, - "got: 0x%x\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); + "got: 0x%lx\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
edesc = pfuncdesc->lprgelemdescParam + 1; ok(edesc->tdesc.vt == VT_INT, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_I4, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0xFFFFFFFF, - "got: 0x%x\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); + "got: 0x%lx\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 5, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010005, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010005, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3411,7 +3411,7 @@ todo_wine {
edesc = pfuncdesc->lprgelemdescParam; ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3420,20 +3420,20 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(edesc->tdesc.vt == VT_USERDEFINED, "got: %d\n", edesc->tdesc.vt); - ok(U(edesc->tdesc).hreftype == hreftype, "got: 0x%x\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == hreftype, "got: 0x%lx\n", U(edesc->tdesc).hreftype);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 6, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010006, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010006, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3448,7 +3448,7 @@ todo_wine {
edesc = pfuncdesc->lprgelemdescParam; ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3457,20 +3457,20 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(edesc->tdesc.vt == VT_VARIANT, "got: %d\n", edesc->tdesc.vt); - ok(U(edesc->tdesc).hreftype == 0, "got: 0x%x\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == 0, "got: 0x%lx\n", U(edesc->tdesc).hreftype);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 7, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010009, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010009, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3492,7 +3492,7 @@ todo_wine { ok(edesc->tdesc.vt == VT_UI2, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_UI2, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3500,17 +3500,17 @@ todo_wine { V_UI2(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 8, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010003, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010003, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3527,25 +3527,25 @@ todo_wine { ok(edesc->tdesc.vt == VT_INT, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_I4, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); - ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123, "got: 0x%x\n", + ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123, "got: 0x%lx\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 9, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3559,24 +3559,24 @@ todo_wine { ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(!memcmp(name, func1W, sizeof(func1W)), "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0x201, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0x201, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, ARRAY_SIZE(names), &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 1, "got: %u\n", cnames); ok(!memcmp(names[0], func1W, sizeof(func1W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); SysFreeString(names[0]); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 10, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010007, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010007, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3599,17 +3599,17 @@ todo_wine { ok(U(*U(edesc->tdesc).lptdesc).lptdesc->vt == VT_BSTR, "got: %d\n", U(*U(edesc->tdesc).lptdesc).lptdesc->vt);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 11, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010004, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010004, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3630,17 +3630,17 @@ todo_wine { ok(U(edesc->tdesc).lptdesc->vt == VT_BSTR, "got: %d\n", U(edesc->tdesc).lptdesc->vt);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 12, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3658,32 +3658,32 @@ todo_wine { ok(U(*edesc).idldesc.wIDLFlags == IDLFLAG_FIN, "got: %x\n", U(*edesc).idldesc.wIDLFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(!memcmp(name, func1W, sizeof(func1W)), "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0x201, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0x201, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, ARRAY_SIZE(names), &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 1, "got: %u\n", cnames); ok(!memcmp(names[0], func1W, sizeof(func1W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); SysFreeString(names[0]); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 13, &pfuncdesc); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 1, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 2, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3697,11 +3697,11 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetFuncDesc(ti, 0, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60020000, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60020000, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3719,7 +3719,7 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3728,12 +3728,12 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(edesc->tdesc).lptdesc == NULL, "got: %p\n", U(edesc->tdesc).lptdesc); - ok(U(edesc->tdesc).hreftype == 0, "got: %d\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == 0, "got: %ld\n", U(edesc->tdesc).hreftype); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 1, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60020001, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60020001, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3751,7 +3751,7 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3760,20 +3760,20 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(edesc->tdesc).lptdesc == NULL, "got: %p\n", U(edesc->tdesc).lptdesc); - ok(U(edesc->tdesc).hreftype == 0, "got: %d\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == 0, "got: %ld\n", U(edesc->tdesc).hreftype); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 2, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_QueryInterface(ti, &IID_ITypeInfo2, (void**)&ti2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3787,7 +3787,7 @@ todo_wine {
VariantClear(&cust_data); hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(V_VT(&cust_data) == VT_BSTR, "got wrong custdata type: %u\n", V_VT(&cust_data)); ok(!lstrcmpW(V_BSTR(&cust_data), asdfW), "got wrong custdata value: %s\n", wine_dbgstr_w(V_BSTR(&cust_data))); SysFreeString(V_BSTR(&cust_data)); @@ -3796,11 +3796,11 @@ todo_wine { ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 3, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_COCLASS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3813,40 +3813,40 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 0, "got wrong hreftype: %x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 0, "got wrong hreftype: %lx\n", hreftype);
hres = ITypeInfo_GetImplTypeFlags(ti, 0, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == IMPLTYPEFLAG_FDEFAULT, "got wrong flag: %x\n", impltypeflags);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "got wrong hreftype: %x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 1, "got wrong hreftype: %lx\n", hreftype);
hres = ITypeInfo_GetImplTypeFlags(ti, 1, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == IMPLTYPEFLAG_FRESTRICTED, "got wrong flag: %x\n", impltypeflags);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 2, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "got wrong hreftype: %x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 1, "got wrong hreftype: %lx\n", hreftype);
hres = ITypeInfo_GetImplTypeFlags(ti, 2, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == 0, "got wrong flag: %x\n", impltypeflags);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 3, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 4, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_DISPATCH, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 8, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3859,17 +3859,17 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetTypeComp(ti, &tcomp); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_QueryInterface(ti, &IID_ITypeComp, (void**)&tcomp2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(tcomp == tcomp2, "got %p, was %p\n", tcomp2, tcomp); ITypeComp_Release(tcomp2);
hres = ITypeComp_Bind(tcomp, invokeW, 0, INVOKE_FUNC, &interface1, &desckind, &bindptr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(desckind == DESCKIND_FUNCDESC, "got wrong desckind: 0x%x\n", desckind); - ok(bindptr.lpfuncdesc->memid == 0x60010003, "got %x\n", bindptr.lpfuncdesc->memid); + ok(bindptr.lpfuncdesc->memid == 0x60010003, "got %lx\n", bindptr.lpfuncdesc->memid); ok(bindptr.lpfuncdesc->lprgscode == NULL, "got %p\n", bindptr.lpfuncdesc->lprgscode); ok(bindptr.lpfuncdesc->lprgelemdescParam != NULL, "got %p\n", bindptr.lpfuncdesc->lprgelemdescParam); ok(bindptr.lpfuncdesc->funckind == FUNC_DISPATCH, "got 0x%x\n", bindptr.lpfuncdesc->funckind); @@ -3887,15 +3887,15 @@ todo_wine { ITypeComp_Release(tcomp);
hres = ITypeInfo_GetRefTypeOfImplType(ti, -1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == -2, "got wrong hreftype: %x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == -2, "got wrong hreftype: %lx\n", hreftype);
hres = ITypeInfo_GetRefTypeInfo(ti, hreftype, &interface1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3913,11 +3913,11 @@ todo_wine { ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 5, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 8, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == 8, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_ALIAS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -6375,14 +6375,14 @@ static void test_dump_typelib(const WCHAR *name) /* check that it's possible to search using this uuid */ typeinfo2 = NULL; hr = ITypeLib_GetTypeInfoOfGuid(typelib, &guid, &typeinfo2); - ok(hr == S_OK || (IsEqualGUID(&guid, &IID_NULL) && hr == TYPE_E_ELEMENTNOTFOUND), "got 0x%08x\n", hr); + ok(hr == S_OK || (IsEqualGUID(&guid, &IID_NULL) && hr == TYPE_E_ELEMENTNOTFOUND), "got 0x%08lx\n", hr); if (hr == S_OK) ITypeInfo_Release(typeinfo2); }
ole_check(ITypeInfo_GetTypeAttr(typeinfo, &typeattr));
hr = ITypeInfo_QueryInterface(typeinfo, &IID_ITypeInfo2, (void**)&typeinfo2); - ok(hr == S_OK, "Could not get ITypeInfo2: %08x\n", hr); + ok(hr == S_OK, "Could not get ITypeInfo2: %08lx\n", hr);
memset(&cust_data, 0, sizeof(cust_data)); ole_check(ITypeInfo2_GetAllCustData(typeinfo2,&cust_data)); @@ -6394,7 +6394,7 @@ static void test_dump_typelib(const WCHAR *name) parse_guid(ti->custdata[cust].uuid,&guid); /* check that it's possible to search using this uuid */ hr = ITypeInfo2_GetCustData(typeinfo2,&guid,&v); - ok(hr == S_OK, "GetCustDatafailed: %08x\n", hr); + ok(hr == S_OK, "GetCustDatafailed: %08lx\n", hr); check_variant_info(&v,&ti->custdata[cust].value); VariantClear(&v); } @@ -6429,7 +6429,7 @@ static void test_dump_typelib(const WCHAR *name) parse_guid(fn_info->custdata[cust].uuid,&guid); /* check that it's possible to search using this uuid */ hr = ITypeInfo2_GetFuncCustData(typeinfo2,func,&guid,&v); - ok(hr == S_OK, "GetCustDatafailed: %08x\n", hr); + ok(hr == S_OK, "GetCustDatafailed: %08lx\n", hr); check_variant_info(&v,&fn_info->custdata[cust].value); VariantClear(&v); } @@ -6457,7 +6457,7 @@ static void test_dump_typelib(const WCHAR *name) parse_guid(fn_info->params[i].custdata[cust].uuid,&guid); /* check that it's possible to search using this uuid */ hr = ITypeInfo2_GetParamCustData(typeinfo2,func,i,&guid,&v); - ok(hr == S_OK, "GetParamCustDatafailed: %08x\n", hr); + ok(hr == S_OK, "GetParamCustDatafailed: %08lx\n", hr); check_variant_info(&v,&fn_info->params[i].custdata[cust].value); VariantClear(&v); } @@ -6480,13 +6480,13 @@ static void test_dump_typelib(const WCHAR *name)
V_VT(&v) = VT_ERROR; hr = ITypeInfo2_GetFuncCustData(typeinfo2, func, &IID_NULL, &v); - ok(hr == S_OK, "GetFuncCustData failed: %08x\n", hr); + ok(hr == S_OK, "GetFuncCustData failed: %08lx\n", hr); ok(V_VT(&v) == VT_EMPTY, "V_VT(&v) = %d\n", V_VT(&v)); VariantClear(&v);
V_VT(&v) = VT_ERROR; hr = ITypeInfo2_GetFuncCustData(typeinfo2, func, &IID_IBaseIface, &v); - ok(hr == S_OK, "GetFuncCustData failed: %08x\n", hr); + ok(hr == S_OK, "GetFuncCustData failed: %08lx\n", hr); ok(V_VT(&v) == VT_EMPTY, "V_VT(&v) = %d\n", V_VT(&v)); VariantClear(&v);
@@ -6535,7 +6535,7 @@ static void test_dump_typelib(const WCHAR *name) parse_guid(var_info->custdata[cust].uuid,&guid); /* check that it's possible to search using this uuid */ hr = ITypeInfo2_GetVarCustData(typeinfo2,var,&guid,&v); - ok(hr == S_OK, "GetVarCustData failed: %08x\n", hr); + ok(hr == S_OK, "GetVarCustData failed: %08lx\n", hr); check_variant_info(&v,&var_info->custdata[cust].value); VariantClear(&v); } @@ -6584,27 +6584,27 @@ static void test_create_typelib_lcid(LCID lcid) MultiByteToWideChar(CP_ACP, 0, filename, -1, name, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, name, &tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_QueryInterface(tl, &IID_ITypeLib, (void**)&typelib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetLibAttr(typelib, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(attr->wLibFlags == 0, "flags 0x%x\n", attr->wLibFlags); ITypeLib_ReleaseTLibAttr(typelib, attr);
hr = ICreateTypeLib2_SetLcid(tl, lcid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetVersion(tl, 3, 4); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SaveAllChanges(tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetLibAttr(typelib, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(attr->wLibFlags == 0, "flags 0x%x\n", attr->wLibFlags); ITypeLib_ReleaseTLibAttr(typelib, attr);
@@ -6615,23 +6615,23 @@ static void test_create_typelib_lcid(LCID lcid) ok( file != INVALID_HANDLE_VALUE, "file creation failed\n" );
ReadFile( file, msft_header, sizeof(msft_header), &read, NULL ); - ok(read == sizeof(msft_header), "read %d\n", read); + ok(read == sizeof(msft_header), "read %ld\n", read); CloseHandle( file );
- ok(msft_header[0] == 0x5446534d, "got %08x\n", msft_header[0]); - ok(msft_header[1] == 0x00010002, "got %08x\n", msft_header[1]); - ok(msft_header[2] == 0xffffffff, "got %08x\n", msft_header[2]); - ok(msft_header[3] == (lcid ? lcid : 0x409), "got %08x (lcid %08x)\n", msft_header[3], lcid); - ok(msft_header[4] == lcid, "got %08x (lcid %08x)\n", msft_header[4], lcid); - ok(msft_header[6] == 0x00040003, "got %08x\n", msft_header[6]); - ok(msft_header[7] == 0, "got %08x\n", msft_header[7]); + ok(msft_header[0] == 0x5446534d, "got %08lx\n", msft_header[0]); + ok(msft_header[1] == 0x00010002, "got %08lx\n", msft_header[1]); + ok(msft_header[2] == 0xffffffff, "got %08lx\n", msft_header[2]); + ok(msft_header[3] == (lcid ? lcid : 0x409), "got %08lx (lcid %08lx)\n", msft_header[3], lcid); + ok(msft_header[4] == lcid, "got %08lx (lcid %08lx)\n", msft_header[4], lcid); + ok(msft_header[6] == 0x00040003, "got %08lx\n", msft_header[6]); + ok(msft_header[7] == 0, "got %08lx\n", msft_header[7]);
/* check flags after loading */ hr = LoadTypeLib(name, &typelib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetLibAttr(typelib, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "flags 0x%x\n", attr->wLibFlags); ITypeLib_ReleaseTLibAttr(typelib, attr); ITypeLib_Release(typelib); @@ -6705,7 +6705,7 @@ static void test_register_typelib(BOOL system_registration) filename = create_test_typelib(3);
hr = LoadTypeLibEx(filename, REGKIND_NONE, &typelib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if (system_registration) hr = RegisterTypeLib(typelib, filename, NULL); @@ -6718,7 +6718,7 @@ static void test_register_typelib(BOOL system_registration) DeleteFileW(filename); return; } - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
count = ITypeLib_GetTypeInfoCount(typelib); ok(count == 15, "got %d\n", count); @@ -6729,10 +6729,10 @@ static void test_register_typelib(BOOL system_registration) TYPEATTR *attr;
hr = ITypeLib_GetTypeInfo(typelib, i, &typeinfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(attr->typekind == attrs[i].kind, "%d: got kind %d\n", i, attr->typekind); ok(attr->wTypeFlags == attrs[i].flags, "%d: got flags %04x\n", i, attr->wTypeFlags); @@ -6744,13 +6744,13 @@ static void test_register_typelib(BOOL system_registration) TYPEATTR *dual_attr;
hr = ITypeInfo_GetRefTypeOfImplType(typeinfo, -1, &reftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetRefTypeInfo(typeinfo, reftype, &dual_info); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(dual_info, &dual_attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(dual_attr->typekind == TKIND_INTERFACE, "%d: got kind %d\n", i, dual_attr->typekind); ok(dual_attr->wTypeFlags == (attrs[i].flags | TYPEFLAG_FOLEAUTOMATION), @@ -6774,12 +6774,12 @@ static void test_register_typelib(BOOL system_registration) expect_ret = ERROR_FILE_NOT_FOUND;
ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ, &hkey); - ok(ret == expect_ret, "%d: got %d\n", i, ret); + ok(ret == expect_ret, "%d: got %ld\n", i, ret); if (ret == ERROR_SUCCESS) { size = sizeof(uuid); ret = RegQueryValueA(hkey, "ProxyStubClsid32", uuid, &size); - ok(!ret, "Failed to get proxy GUID, error %u.\n", ret); + ok(!ret, "Failed to get proxy GUID, error %lu.\n", ret);
if (attrs[i].kind == TKIND_INTERFACE || (attrs[i].flags & TYPEFLAG_FDUAL)) { @@ -6800,7 +6800,7 @@ static void test_register_typelib(BOOL system_registration) if (is_win64 || is_wow64) { ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ | opposite, &hkey); - ok(ret == expect_ret, "%d: got %d\n", i, ret); + ok(ret == expect_ret, "%d: got %ld\n", i, ret); if(ret == ERROR_SUCCESS) RegCloseKey(hkey); }
@@ -6812,7 +6812,7 @@ static void test_register_typelib(BOOL system_registration) hr = UnRegisterTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, is_win64 ? SYS_WIN64 : SYS_WIN32); else hr = pUnRegisterTypeLibForUser(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, is_win64 ? SYS_WIN64 : SYS_WIN32); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
for(i = 0; i < count; i++) { @@ -6820,10 +6820,10 @@ static void test_register_typelib(BOOL system_registration) TYPEATTR *attr;
hr = ITypeLib_GetTypeInfo(typelib, i, &typeinfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if((attr->typekind == TKIND_INTERFACE && (attr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)) || attr->typekind == TKIND_DISPATCH) @@ -6885,51 +6885,51 @@ static void test_register_typelib_64(void) pIsWow64Process(GetCurrentProcess(), &is_wow64);
hr = LoadTypeLib(wszStdOle2, &stdole); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IDispatch, &unknown); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
GetTempFileNameW(L".", L"tlb", 0, filename);
hr = CreateTypeLib2(sys, filename, &createtl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetName(createtl, typelibW); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetHelpFileName(createtl, helpfileW); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetHelpStringDll(createtl, dllfileW); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetGuid(createtl, &tlcustguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetVersion(createtl, 1, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(createtl, coclassW, TKIND_COCLASS, &createti_co); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_LayOut(createti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(createti, &interfaceguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVersion(createti, 1, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
elemdesc[0].tdesc.vt = VT_UINT; U(elemdesc[0]).idldesc.dwReserved = 0; @@ -6949,7 +6949,7 @@ static void test_register_typelib_64(void) funcdesc.lprgelemdescParam = elemdesc;
hr = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
elemdesc2[0].tdesc.vt = VT_UINT; U(elemdesc2[0]).idldesc.dwReserved = 0; @@ -6965,54 +6965,54 @@ static void test_register_typelib_64(void) funcdesc2.lprgelemdescParam = elemdesc2;
hr = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncHelpContext(createti, 1, 0xabcdefab); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 3); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, names2, 2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetTypeFlags(createti, TYPEFLAG_FOLEAUTOMATION | TYPEFLAG_FNONEXTENSIBLE | TYPEFLAG_FDUAL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&tinfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetRefTypeOfImplType(tinfo, 0, &hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(createti_co, &coclassguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(createti_co, tinfo, &hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(createti_co, 0, hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetImplTypeFlags(createti_co, 0, IMPLTYPEFLAG_FDEFAULT); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_Release(createti_co); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(createti);
hr = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeLib2_Release(createtl);
trace("TypeLib to load: %ls\n", filename); hr = LoadTypeLibEx(filename, REGKIND_NONE, &typelib); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
if(typelib) { @@ -7029,7 +7029,7 @@ static void test_register_typelib_64(void) DeleteFileW(filename); return; } - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
ITypeLib_Release(typelib);
@@ -7037,23 +7037,23 @@ static void test_register_typelib_64(void) swprintf(key_name, sizeof(key_name), L"TypeLib\%ls\1.0", uuid);
hr = RegOpenKeyExW(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ, &hkey); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
size = sizeof(tlb_name); hr = RegQueryValueW(hkey, L"", tlb_name, &size); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* The typelib should be registered in WoW64_32 and WoW64_64 mode */ if(is_win64 || is_wow64) { hr = RegOpenKeyExW(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ | opposite, &hkey); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if(hkey) { size = sizeof(tlb_name); hr = RegQueryValueW(hkey, L"", tlb_name, &size); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
RegCloseKey(hkey); } @@ -7074,22 +7074,22 @@ static void test_LoadTypeLib(void) static const WCHAR kernel32_dllW[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
hres = LoadTypeLib(kernel32_dllW, &tl); - ok(hres == TYPE_E_CANTLOADLIBRARY, "LoadTypeLib returned: %08x, expected TYPE_E_CANTLOADLIBRARY\n", hres); + ok(hres == TYPE_E_CANTLOADLIBRARY, "LoadTypeLib returned: %08lx, expected TYPE_E_CANTLOADLIBRARY\n", hres);
hres = LoadTypeLib(NULL, NULL); - ok(hres == E_INVALIDARG, "Got %#x.\n", hres); + ok(hres == E_INVALIDARG, "Got %#lx.\n", hres);
tl = (void *)0xdeadbeef; hres = LoadTypeLib(NULL, &tl); - ok(hres == E_INVALIDARG, "Got %#x.\n", hres); + ok(hres == E_INVALIDARG, "Got %#lx.\n", hres); ok(tl == (void *)0xdeadbeef, "Got %p.\n", tl);
hres = LoadTypeLibEx(NULL, REGKIND_NONE, NULL); - ok(hres == E_INVALIDARG, "Got %#x.\n", hres); + ok(hres == E_INVALIDARG, "Got %#lx.\n", hres);
tl = (void *)0xdeadbeef; hres = LoadTypeLibEx(NULL, REGKIND_NONE, &tl); - ok(hres == E_INVALIDARG, "Got %#x.\n", hres); + ok(hres == E_INVALIDARG, "Got %#lx.\n", hres); ok(tl == (void *)0xdeadbeef, "Got %p.\n", tl); }
@@ -7111,13 +7111,13 @@ static void test_SetVarHelpContext(void) MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, nameW, TKIND_ENUM, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarHelpContext(cti, 0, 0); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
memset(&desc, 0, sizeof(desc)); desc.memid = MEMBERID_NIL; @@ -7128,43 +7128,43 @@ static void test_SetVarHelpContext(void) V_INT(&v) = 1; U(desc).lpvarValue = &v; hr = ICreateTypeInfo_AddVarDesc(cti, 0, &desc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarHelpContext(cti, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* another time */ hr = ICreateTypeInfo_SetVarHelpContext(cti, 0, 1); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* wrong index now */ hr = ICreateTypeInfo_SetVarHelpContext(cti, 1, 0); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_SaveAllChanges(ctl); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
ICreateTypeLib2_Release(ctl);
hr = LoadTypeLib(filenameW, &tl); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetVarDesc(ti, 0, &pdesc); - ok(hr == S_OK, "got %08x\n", hr); - ok(pdesc->memid == 0x40000000, "got wrong memid: %x\n", pdesc->memid); + ok(hr == S_OK, "got %08lx\n", hr); + ok(pdesc->memid == 0x40000000, "got wrong memid: %lx\n", pdesc->memid); ok(pdesc->elemdescVar.tdesc.vt == VT_INT, "got wrong vardesc type: %u\n", pdesc->elemdescVar.tdesc.vt); ok(pdesc->varkind == VAR_CONST, "got wrong varkind: %u\n", pdesc->varkind); ok(V_VT(U(*pdesc).lpvarValue) == VT_INT, "got wrong value type: %u\n", V_VT(U(*pdesc).lpvarValue)); ok(V_INT(U(*pdesc).lpvarValue) == 1, "got wrong value: 0x%x\n", V_INT(U(*pdesc).lpvarValue));
hr = ITypeInfo_GetDocumentation(ti, pdesc->memid, NULL, NULL, &ctx, NULL); - ok(hr == S_OK, "got %08x\n", hr); - ok(ctx == 1, "got wrong help context: 0x%x\n", ctx); + ok(hr == S_OK, "got %08lx\n", hr); + ok(ctx == 1, "got wrong help context: 0x%lx\n", ctx);
ITypeInfo_ReleaseVarDesc(ti, pdesc); ITypeInfo_Release(ti); @@ -7197,10 +7197,10 @@ static void test_SetFuncAndParamNames(void) MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, nameW, TKIND_DISPATCH, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* get method */ memset(&funcdesc, 0, sizeof(FUNCDESC)); @@ -7220,65 +7220,65 @@ static void test_SetFuncAndParamNames(void) funcdesc.cParams = 1;
hr = ICreateTypeInfo_AddFuncDesc(cti, 0, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* setter name */ hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 0, propW, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* putref method */ funcdesc.invkind = INVOKE_PROPERTYPUTREF; hr = ICreateTypeInfo_AddFuncDesc(cti, 1, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* putref name */ hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 1, propW, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
funcdesc.invkind = INVOKE_PROPERTYGET; funcdesc.cParams = 0; hr = ICreateTypeInfo_AddFuncDesc(cti, 2, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* getter name */ hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 2, propW, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ICreateTypeInfo_AddFuncDesc(cti, 3, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* getter name again */ hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 3, propW, 1); - ok(hr == TYPE_E_AMBIGUOUSNAME, "got 0x%08x\n", hr); + ok(hr == TYPE_E_AMBIGUOUSNAME, "got 0x%08lx\n", hr);
/* regular function */ funcdesc.invkind = INVOKE_FUNC; funcdesc.cParams = 1; hr = ICreateTypeInfo_AddFuncDesc(cti, 4, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 4, funcW, 2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, name2W, TKIND_INTERFACE, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
funcdesc.funckind = FUNC_PUREVIRTUAL; funcdesc.invkind = INVOKE_FUNC; funcdesc.cParams = 0; funcdesc.lprgelemdescParam = NULL; hr = ICreateTypeInfo_AddFuncDesc(cti, 0, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 0, funcW, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_QueryInterface(ctl, &IID_ITypeLib, (void**)&tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
found = 1; memset(infos, 0, sizeof(infos)); @@ -7286,7 +7286,7 @@ static void test_SetFuncAndParamNames(void) memids[1] = 0xdeadbeef; memids[2] = 0xdeadbeef; hr = ITypeLib_FindName(tl, func, 0, infos, memids, &found); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(found == 1, "got wrong count: %u\n", found); ok(infos[0] && !infos[1] && !infos[2], "got wrong typeinfo\n"); ok(memids[0] == 0, "got wrong memid[0]\n"); @@ -7299,7 +7299,7 @@ static void test_SetFuncAndParamNames(void) memids[1] = 0xdeadbeef; memids[2] = 0xdeadbeef; hr = ITypeLib_FindName(tl, func, 0, infos, memids, &found); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(found == 2, "got wrong count: %u\n", found); ok(infos[0] && infos[1] && infos[0] != infos[1], "got same typeinfo\n"); ok(memids[0] == 0, "got wrong memid[0]\n"); @@ -7335,16 +7335,16 @@ static void test_SetDocString(void) MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, nameW, TKIND_ENUM, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarDocString(cti, 0, doc1W); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarDocString(cti, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
memset(&desc, 0, sizeof(desc)); desc.memid = MEMBERID_NIL; @@ -7355,41 +7355,41 @@ static void test_SetDocString(void) V_INT(&v) = 1; U(desc).lpvarValue = &v; hr = ICreateTypeInfo_AddVarDesc(cti, 0, &desc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarName(cti, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarName(cti, 1, var_nameW); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarName(cti, 0, var_nameW); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarDocString(cti, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarDocString(cti, 0, doc1W); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* already set */ hr = ICreateTypeInfo_SetVarDocString(cti, 0, doc2W); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* wrong index now */ hr = ICreateTypeInfo_SetVarDocString(cti, 1, doc1W); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, name2W, TKIND_INTERFACE, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncDocString(cti, 0, doc1W); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncDocString(cti, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
memset(&funcdesc, 0, sizeof(funcdesc)); funcdesc.memid = MEMBERID_NIL; @@ -7398,34 +7398,34 @@ static void test_SetDocString(void) funcdesc.callconv = CC_STDCALL;
hr = ICreateTypeInfo_AddFuncDesc(cti, 0, &funcdesc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncDocString(cti, 0, doc1W); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_SaveAllChanges(ctl); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
ICreateTypeLib2_Release(ctl);
hr = LoadTypeLib(filenameW, &tl); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetVarDesc(ti, 0, &pdesc); - ok(hr == S_OK, "got %08x\n", hr); - ok(pdesc->memid == 0x40000000, "got wrong memid: %x\n", pdesc->memid); + ok(hr == S_OK, "got %08lx\n", hr); + ok(pdesc->memid == 0x40000000, "got wrong memid: %lx\n", pdesc->memid); ok(pdesc->elemdescVar.tdesc.vt == VT_INT, "got wrong vardesc type: %u\n", pdesc->elemdescVar.tdesc.vt); ok(pdesc->varkind == VAR_CONST, "got wrong varkind: %u\n", pdesc->varkind); ok(V_VT(U(*pdesc).lpvarValue) == VT_INT, "got wrong value type: %u\n", V_VT(U(*pdesc).lpvarValue)); ok(V_INT(U(*pdesc).lpvarValue) == 1, "got wrong value: 0x%x\n", V_INT(U(*pdesc).lpvarValue));
hr = ITypeInfo_GetDocumentation(ti, pdesc->memid, &namestr, &docstr, NULL, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(memcmp(namestr, var_nameW, sizeof(var_nameW)) == 0, "got wrong name: %s\n", wine_dbgstr_w(namestr)); ok(memcmp(docstr, doc2W, sizeof(doc2W)) == 0, "got wrong docstring: %s\n", wine_dbgstr_w(docstr));
@@ -7436,17 +7436,17 @@ static void test_SetDocString(void) ITypeInfo_Release(ti);
hr = ITypeLib_GetTypeInfo(tl, 1, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetFuncDesc(ti, 0, &pfuncdesc); - ok(hr == S_OK, "got %08x\n", hr); - ok(pfuncdesc->memid == 0x60000000, "got wrong memid: %x\n", pfuncdesc->memid); + ok(hr == S_OK, "got %08lx\n", hr); + ok(pfuncdesc->memid == 0x60000000, "got wrong memid: %lx\n", pfuncdesc->memid); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got wrong funckind: %x\n", pfuncdesc->funckind); ok(pfuncdesc->invkind == INVOKE_FUNC, "got wrong invkind: %x\n", pfuncdesc->invkind); ok(pfuncdesc->callconv == CC_STDCALL, "got wrong callconv: %x\n", pfuncdesc->callconv);
hr = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &namestr, &docstr, NULL, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(namestr == NULL, "got wrong name: %s\n", wine_dbgstr_w(namestr)); ok(memcmp(docstr, doc1W, sizeof(doc1W)) == 0, "got wrong docstring: %s\n", wine_dbgstr_w(docstr));
@@ -7471,26 +7471,26 @@ static void test_FindName(void) UINT16 c;
hr = LoadTypeLib(wszStdOle2, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITypeLib_FindName(tl, NULL, 0, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
lstrcpyW(buffW, wszGUID); hr = ITypeLib_FindName(tl, buffW, 0, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
c = 0; ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, NULL, &c); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(c == 0, "got %d\n", c); ok(ti == (void*)0xdeadbeef, "got %p\n", ti);
c = 1; ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, NULL, &c); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(c == 1, "got %d\n", c); ok(ti == (void*)0xdeadbeef, "got %p\n", ti);
@@ -7498,8 +7498,8 @@ static void test_FindName(void) memid = 0; ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, &memid, &c); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(memid == MEMBERID_NIL, "got %d\n", memid); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(memid == MEMBERID_NIL, "got %ld\n", memid); ok(!lstrcmpW(buffW, wszGUID), "got %s\n", wine_dbgstr_w(buffW)); ok(c == 1, "got %d\n", c); ITypeInfo_Release(ti); @@ -7509,9 +7509,9 @@ static void test_FindName(void) lstrcpyW(buffW, wszguid); ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, &memid, &c); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine { - ok(memid == MEMBERID_NIL, "got %d\n", memid); + ok(memid == MEMBERID_NIL, "got %ld\n", memid); ok(!lstrcmpW(buffW, wszGUID), "got %s\n", wine_dbgstr_w(buffW)); ok(c == 1, "got %d\n", c); } @@ -7523,8 +7523,8 @@ todo_wine { lstrcpyW(buffW, invalidW); ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, &memid, &c); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(memid == MEMBERID_NIL, "got %d\n", memid); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(memid == MEMBERID_NIL, "got %ld\n", memid); ok(!lstrcmpW(buffW, invalidW), "got %s\n", wine_dbgstr_w(buffW)); ok(c == 0, "got %d\n", c); ok(ti == (void*)0xdeadbeef, "got %p\n", ti); @@ -7587,7 +7587,7 @@ static void create_manifest_file(const char *filename, const char *manifest)
file = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError()); WriteFile(file, manifest, strlen(manifest), &size, NULL); CloseHandle(file); } @@ -7604,10 +7604,10 @@ static HANDLE create_actctx(const char *file) actctx.lpSource = path;
handle = CreateActCtxW(&actctx); - ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
- ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%d\n", actctx.cbSize); - ok(actctx.dwFlags == 0, "actctx.dwFlags=%d\n", actctx.dwFlags); + ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%ld\n", actctx.cbSize); + ok(actctx.dwFlags == 0, "actctx.dwFlags=%ld\n", actctx.dwFlags); ok(actctx.lpSource == path, "actctx.lpSource=%p\n", actctx.lpSource); ok(actctx.wProcessorArchitecture == 0, "actctx.wProcessorArchitecture=%d\n", actctx.wProcessorArchitecture); ok(actctx.wLangId == 0, "actctx.wLangId=%d\n", actctx.wLangId); @@ -7669,85 +7669,85 @@ static void test_LoadRegTypeLib(void) write_typelib(3, L"test_actctx_tlb2.tlb");
hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
ret = ActivateActCtx(handle, &cookie); - ok(ret, "ActivateActCtx failed: %u\n", GetLastError()); + ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_en, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_ru, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 8, LOCALE_NEUTRAL, &path); - ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08lx\n", hr);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 7, LOCALE_NEUTRAL, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &path); - ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08lx\n", hr); SysFreeString(path);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 0xffff, 0xffff, LOCALE_NEUTRAL, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
/* manifest version is 2.0, actual is 1.0 */ hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_register_test, 2, 0, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
/* manifest version is 2.7, actual is 2.5 */ hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 1, LOCALE_NEUTRAL, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_en, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_ru, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 7, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 5, LOCALE_NEUTRAL, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITypeLib_GetLibAttr(tl, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
- ok(attr->lcid == 0, "got %x\n", attr->lcid); + ok(attr->lcid == 0, "got %lx\n", attr->lcid); ok(attr->wMajorVerNum == 2, "got %d\n", attr->wMajorVerNum); ok(attr->wMinorVerNum == 5, "got %d\n", attr->wMinorVerNum); ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "got %x\n", attr->wLibFlags); @@ -7756,18 +7756,18 @@ static void test_LoadRegTypeLib(void) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 7, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
tl = NULL; hr = LoadRegTypeLib(&LIBID_TestTypelib, 0xffff, 0xffff, LOCALE_NEUTRAL, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (tl) { hr = ITypeLib_GetLibAttr(tl, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
- ok(attr->lcid == 0, "got %x\n", attr->lcid); + ok(attr->lcid == 0, "got %lx\n", attr->lcid); ok(attr->wMajorVerNum == 2, "got %d\n", attr->wMajorVerNum); ok(attr->wMinorVerNum == 5, "got %d\n", attr->wMinorVerNum); ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "got %x\n", attr->wLibFlags); @@ -7780,7 +7780,7 @@ static void test_LoadRegTypeLib(void) DeleteFileA("test_actctx_tlb2.tlb");
ret = DeactivateActCtx(0, cookie); - ok(ret, "DeactivateActCtx failed: %u\n", GetLastError()); + ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle); } @@ -7849,10 +7849,10 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest,
if(create){ hr = ITypeLib_QueryInterface(tl, &IID_ICreateTypeLib2, (void**)&ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, nameW, TKIND_ALIAS, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
tdesc.vt = TDATest->vt; if(TDATest->aux == AUX_TDESC) @@ -7863,10 +7863,10 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, U(tdesc).hreftype = hreftype;
hr = ICreateTypeInfo_SetTypeDescAlias(cti, &tdesc); - ok(hr == S_OK, "for VT %u, got %08x\n", TDATest->vt, hr); + ok(hr == S_OK, "for VT %u, got %08lx\n", TDATest->vt, hr);
hr = ICreateTypeInfo_QueryInterface(cti, &IID_ITypeInfo, (void**)&ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti); ICreateTypeLib2_Release(ctl); @@ -7875,11 +7875,11 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, MEMBERID memid;
hr = ITypeLib_FindName(tl, nameW, 0, &ti, &memid, &found); - ok(hr == S_OK, "for VT %u, got %08x\n", TDATest->vt, hr); + ok(hr == S_OK, "for VT %u, got %08lx\n", TDATest->vt, hr); }
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if(TDATest->aux == AUX_HREF){ size = href_cbSizeInstance; @@ -7908,13 +7908,13 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, #endif }
- ok(typeattr->cbSizeInstance == size, "got wrong size for VT %u: 0x%x\n", TDATest->vt, typeattr->cbSizeInstance); + ok(typeattr->cbSizeInstance == size, "got wrong size for VT %u: 0x%lx\n", TDATest->vt, typeattr->cbSizeInstance); ok(typeattr->cbAlignment == alignment, "got wrong alignment for VT %u: 0x%x\n", TDATest->vt, typeattr->cbAlignment); ok(typeattr->tdescAlias.vt == TDATest->vt, "got wrong VT for VT %u: 0x%x\n", TDATest->vt, typeattr->tdescAlias.vt);
switch(TDATest->aux){ case AUX_HREF: - ok(U(typeattr->tdescAlias).hreftype == hreftype, "got wrong hreftype for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).hreftype); + ok(U(typeattr->tdescAlias).hreftype == hreftype, "got wrong hreftype for VT %u: 0x%lx\n", TDATest->vt, U(typeattr->tdescAlias).hreftype); break; case AUX_TDESC: ok(U(typeattr->tdescAlias).lptdesc->vt == TDATest->tdesc.vt, "got wrong typedesc VT for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lptdesc->vt); @@ -7922,8 +7922,8 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, case AUX_ADESC: ok(U(typeattr->tdescAlias).lpadesc->tdescElem.vt == TDATest->adesc.tdescElem.vt, "got wrong arraydesc element VT for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->tdescElem.vt); ok(U(typeattr->tdescAlias).lpadesc->cDims == TDATest->adesc.cDims, "got wrong arraydesc dimension count for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->cDims); - ok(U(typeattr->tdescAlias).lpadesc->rgbounds[0].cElements == TDATest->adesc.rgbounds[0].cElements, "got wrong arraydesc element count for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->rgbounds[0].cElements); - ok(U(typeattr->tdescAlias).lpadesc->rgbounds[0].lLbound == TDATest->adesc.rgbounds[0].lLbound, "got wrong arraydesc lower bound for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->rgbounds[0].lLbound); + ok(U(typeattr->tdescAlias).lpadesc->rgbounds[0].cElements == TDATest->adesc.rgbounds[0].cElements, "got wrong arraydesc element count for VT %u: 0x%lx\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->rgbounds[0].cElements); + ok(U(typeattr->tdescAlias).lpadesc->rgbounds[0].lLbound == TDATest->adesc.rgbounds[0].lLbound, "got wrong arraydesc lower bound for VT %u: 0x%lx\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->rgbounds[0].lLbound); break; }
@@ -7964,19 +7964,19 @@ static void test_SetTypeDescAlias(SYSKIND kind) MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(kind, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, interfaceW, TKIND_INTERFACE, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_QueryInterface(cti, &IID_ITypeInfo, (void**)&ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(cti, ti, &hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
href_cbSizeInstance = typeattr->cbSizeInstance; href_cbAlignment = typeattr->cbAlignment; @@ -7987,13 +7987,13 @@ static void test_SetTypeDescAlias(SYSKIND kind) ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_QueryInterface(ctl, &IID_ITypeLib, (void**)&tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
for(i = 0; TDATests[i].vt; ++i) testTDA(tl, &TDATests[i], ptr_size, hreftype, href_cbSizeInstance, href_cbAlignment, TRUE);
hr = ICreateTypeLib2_SaveAllChanges(ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ITypeLib_Release(tl); ok(0 == ICreateTypeLib2_Release(ctl), "typelib should have been released\n"); @@ -8001,13 +8001,13 @@ static void test_SetTypeDescAlias(SYSKIND kind) trace("after save...\n");
hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
href_cbSizeInstance = typeattr->cbSizeInstance; href_cbAlignment = typeattr->cbAlignment; @@ -8031,17 +8031,17 @@ static void test_GetLibAttr(void) HRESULT hr;
hr = LoadTypeLib(wszStdOle2, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ref1 = ITypeLib_AddRef(tl); ITypeLib_Release(tl);
hr = ITypeLib_GetLibAttr(tl, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ref2 = ITypeLib_AddRef(tl); ITypeLib_Release(tl); - ok(ref2 == ref1, "got %d, %d\n", ref2, ref1); + ok(ref2 == ref1, "got %ld, %ld\n", ref2, ref1);
ITypeLib_ReleaseTLibAttr(tl, attr); ITypeLib_Release(tl); @@ -8103,65 +8103,65 @@ static void test_stub(void) CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = LoadTypeLib(wszStdOle2, &stdole); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IUnknown, &unk); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
GetTempFileNameA(".", "tlb", 0, filenameA); MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetGuid(ctl, &libguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetLcid(ctl, LOCALE_NEUTRAL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, interfaceW, TKIND_INTERFACE, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(cti, &interfaceguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetTypeFlags(cti, TYPEFLAG_FOLEAUTOMATION); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(cti, unk, &href); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(cti, 0, href); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_QueryInterface(cti, &IID_ITypeInfo, (void**)&ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti); ITypeInfo_Release(unk); ITypeLib_Release(stdole);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, classW, TKIND_COCLASS, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(cti, &coclassguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(cti, ti, &href); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(cti, 0, href); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ITypeInfo_Release(ti); ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_SaveAllChanges(ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_QueryInterface(ctl, &IID_ITypeLib, (void**)&tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
for (i = 0; sam_list[i] != ~0; i++) { @@ -8178,14 +8178,14 @@ static void test_stub(void) win_skip("Insufficient privileges to register typelib in the registry\n"); break; } - ok(hr == S_OK, "got %08x, side: %04x\n", hr, side); + ok(hr == S_OK, "got %08lx, side: %04lx\n", hr, side);
/* SYS_WIN32 typelibs should be registered only as 32-bit */ lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "TypeLib\{3b9ff02e-9675-4861-b781-ceaea4782acc}\0.0\0\win64", 0, KEY_READ | side, &hkey); - ok(lr == ERROR_FILE_NOT_FOUND, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_FILE_NOT_FOUND, "got wrong return code: %lu, side: %04lx\n", lr, side);
lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "TypeLib\{3b9ff02e-9675-4861-b781-ceaea4782acc}\0.0\0\win32", 0, KEY_READ | side, &hkey); - ok(lr == ERROR_SUCCESS, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS, "got wrong return code: %lu, side: %04lx\n", lr, side); RegCloseKey(hkey);
/* Simulate pre-win7 installers that create interface key on one side */ @@ -8198,14 +8198,14 @@ static void test_stub(void)
/* Delete the opposite interface key */ lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "Interface", 0, KEY_READ | opposite, &hkey); - ok(lr == ERROR_SUCCESS, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS, "got wrong return code: %lu, side: %04lx\n", lr, side); lr = myRegDeleteTreeW(hkey, guidW, opposite); - ok(lr == ERROR_SUCCESS, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS, "got wrong return code: %lu, side: %04lx\n", lr, side); RegCloseKey(hkey);
/* Is our side interface key affected by above operation? */ lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "Interface\{3b9ff02f-9675-4861-b781-ceaea4782acc}", 0, KEY_READ | side, &hkey); - ok(lr == ERROR_SUCCESS || broken(lr == ERROR_FILE_NOT_FOUND), "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS || broken(lr == ERROR_FILE_NOT_FOUND), "got wrong return code: %lu, side: %04lx\n", lr, side); if (lr == ERROR_FILE_NOT_FOUND) { /* win2k3, vista, 2008 */ @@ -8216,25 +8216,25 @@ static void test_stub(void)
/* Opposite side typelib key still exists */ lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "TypeLib\{3b9ff02e-9675-4861-b781-ceaea4782acc}\0.0\0\win32", 0, KEY_READ | opposite, &hkey); - ok(lr == ERROR_SUCCESS, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS, "got wrong return code: %lu, side: %04lx\n", lr, side); RegCloseKey(hkey); }
hr = CoGetPSClsid(&interfaceguid, &clsid); - ok(hr == S_OK, "got: %x, side: %04x\n", hr, side); + ok(hr == S_OK, "got: %lx, side: %04lx\n", hr, side);
hr = CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IPSFactoryBuffer, (void **)&factory); - ok(hr == S_OK, "got: %x, side: %04x\n", hr, side); + ok(hr == S_OK, "got: %lx, side: %04lx\n", hr, side);
hr = IPSFactoryBuffer_CreateStub(factory, &interfaceguid, &uk, &base_stub); - ok(hr == S_OK, "got: %x, side: %04x\n", hr, side); + ok(hr == S_OK, "got: %lx, side: %04lx\n", hr, side); IRpcStubBuffer_Release(base_stub);
IPSFactoryBuffer_Release(factory); next: hr = UnRegisterTypeLib(&libguid, 0, 0, 0, SYS_WIN32); - ok(hr == S_OK, "got: %x, side: %04x\n", hr, side); + ok(hr == S_OK, "got: %lx, side: %04lx\n", hr, side); }
ITypeLib_Release(tl); @@ -8268,47 +8268,47 @@ static void test_dep(void) {
refFilename = create_test_typelib(4); hr = LoadTypeLibEx(refFilename, REGKIND_NONE, &preftLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(preftLib, &IID_IBaseIface, &preftInfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
GetTempFileNameA(".", "tlb", 0, filename); MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH);
if(sizeof(void*) == 8) { hr = CreateTypeLib2(SYS_WIN64, filenameW, &pctLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); } else { hr = CreateTypeLib2(SYS_WIN32, filenameW, &pctLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); }
hr = ICreateTypeLib2_SetGuid(pctLib, &libguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetLcid(pctLib, LOCALE_NEUTRAL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(pctLib, ifacenameW, TKIND_INTERFACE, &pctInfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(pctInfo, &ifaceguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetTypeFlags(pctInfo, TYPEFLAG_FOLEAUTOMATION); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(pctInfo, preftInfo, &refType); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(pctInfo, 0, refType); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(pctInfo);
hr = ICreateTypeLib2_SaveAllChanges(pctLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeLib2_Release(pctLib);
@@ -8317,16 +8317,16 @@ static void test_dep(void) { DeleteFileW(refFilename);
hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &ptLib); - ok(hr == S_OK, "got: %x\n", hr); + ok(hr == S_OK, "got: %lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(ptLib, &ifaceguid, &ptInfo); - ok(hr == S_OK, "got: %x\n", hr); + ok(hr == S_OK, "got: %lx\n", hr);
hr = ITypeInfo_GetRefTypeOfImplType(ptInfo, 0, &refType); - ok(hr == S_OK, "got: %x\n", hr); + ok(hr == S_OK, "got: %lx\n", hr);
hr = ITypeInfo_GetRefTypeInfo(ptInfo, refType, &ptInfoExt); - ok(hr == TYPE_E_CANTLOADLIBRARY, "got: %x\n", hr); + ok(hr == TYPE_E_CANTLOADLIBRARY, "got: %lx\n", hr);
ITypeInfo_Release(ptInfo); if(ptInfoExt) @@ -8334,23 +8334,23 @@ static void test_dep(void) { ITypeLib_Release(ptLib);
hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &ptLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfo(ptLib, 0, &ptInfo); - ok(hr == S_OK, "GetTypeInfo failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeInfo failed: %08lx\n", hr);
hr = ITypeInfo_GetRefTypeOfImplType(ptInfo, 0, &refType); - ok(hr == S_OK, "GetRefTypeOfImplType failed: %08x\n", hr); + ok(hr == S_OK, "GetRefTypeOfImplType failed: %08lx\n", hr);
hr = ITypeInfo_GetRefTypeInfo(ptInfo, refType, &ptInfoExt); - ok(hr == TYPE_E_CANTLOADLIBRARY, "got: %x\n", hr); + ok(hr == TYPE_E_CANTLOADLIBRARY, "got: %lx\n", hr);
refFilename = create_test_typelib(4); hr = LoadTypeLibEx(refFilename, REGKIND_NONE, &preftLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetRefTypeInfo(ptInfo, refType, &ptInfoExt); - ok(hr == S_OK, "got: %x\n", hr); + ok(hr == S_OK, "got: %lx\n", hr); ITypeInfo_Release(ptInfoExt);
ITypeLib_Release(preftLib); @@ -8377,75 +8377,75 @@ static void test_DeleteImplType(void) int flags;
hr = LoadTypeLib(L"stdole2.tlb", &stdole); - ok(hr == S_OK, "Failed to load stdole2, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to load stdole2, hr %#lx.\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IDispatch, &dispti); - ok(hr == S_OK, "Failed to get IDispatch typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IDispatch typeinfo, hr %#lx.\n", hr);
GetTempFileNameW(L".", L"tlb", 0, filenameW);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &createtl); - ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create instance, hr %#lx.\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create instance, hr %#lx.\n", hr); hr = ICreateTypeInfo_QueryInterface(createti, &IID_ICreateTypeInfo2, (void **)&createti2); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); ICreateTypeInfo_Release(createti);
hr = ICreateTypeInfo2_AddRefTypeInfo(createti2, dispti, &hreftype); - ok(hr == S_OK, "Failed to add referenced typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add referenced typeinfo, hr %#lx.\n", hr);
hr = ICreateTypeInfo2_QueryInterface(createti2, &IID_ITypeInfo, (void **)&ti); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(!(typeattr->wTypeFlags & TYPEFLAG_FDISPATCHABLE), "Unexpected type flags %#x.\n", typeattr->wTypeFlags); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hr = ICreateTypeInfo2_AddImplType(createti2, 0, hreftype); - ok(hr == S_OK, "Failed to add impl type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add impl type, hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(typeattr->wTypeFlags & TYPEFLAG_FDISPATCHABLE, "Unexpected type flags %#x.\n", typeattr->wTypeFlags); ok(typeattr->cImplTypes == 1, "Unexpected cImplTypes value.\n"); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
/* Delete impltype, check flags. */ hr = ICreateTypeInfo2_DeleteImplType(createti2, 0); - ok(hr == S_OK, "Failed to delete impl type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to delete impl type, hr %#lx.\n", hr);
hr = ICreateTypeInfo2_DeleteImplType(createti2, 0); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(typeattr->wTypeFlags & TYPEFLAG_FDISPATCHABLE, "Unexpected type flags %#x.\n", typeattr->wTypeFlags); ok(!typeattr->cImplTypes, "Unexpected cImplTypes value.\n"); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hr = ITypeInfo_GetImplTypeFlags(ti, 0, &flags); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype2); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hr == S_OK, "Failed to save changes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to save changes, hr %#lx.\n", hr); ICreateTypeLib2_Release(createtl); ITypeInfo_Release(ti); ICreateTypeInfo2_Release(createti2);
/* Load and check typeinfo. */ hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hr == S_OK, "Failed to load typelib, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to load typelib, hr %#lx.\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "Failed to get typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get typeinfo, hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(typeattr->wTypeFlags & TYPEFLAG_FDISPATCHABLE, "Unexpected type flags %#x.\n", typeattr->wTypeFlags); ok(!typeattr->cImplTypes, "Unexpected cImplTypes value.\n"); ITypeInfo_ReleaseTypeAttr(ti, typeattr); @@ -8476,16 +8476,16 @@ static void test_DeleteFuncDesc(void) GetTempFileNameW(temp_path, L"tlb", 0, filenameW);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &createtl); - ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create instance, hr %#lx.\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create instance, hr %#lx.\n", hr); hr = ICreateTypeInfo_QueryInterface(createti, &IID_ICreateTypeInfo2, (void **)&createti2); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); ICreateTypeInfo_Release(createti);
hr = ICreateTypeInfo2_QueryInterface(createti2, &IID_ITypeInfo, (void **)&ti); - ok(hr == S_OK, "Failed to get typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get typeinfo, hr %#lx.\n", hr);
memset(&funcdesc, 0, sizeof(FUNCDESC)); funcdesc.funckind = FUNC_PUREVIRTUAL; @@ -8495,38 +8495,38 @@ static void test_DeleteFuncDesc(void) U(funcdesc.elemdescFunc).idldesc.wIDLFlags = IDLFLAG_NONE;
hr = ICreateTypeInfo2_AddFuncDesc(createti2, 0, &funcdesc); - ok(hr == S_OK, "Failed to add a funcdesc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a funcdesc, hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(typeattr->cFuncs == 1, "Unexpected cFuncs %u.\n", typeattr->cFuncs); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hr = ICreateTypeInfo2_DeleteFuncDesc(createti2, 1); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = ICreateTypeInfo2_DeleteFuncDesc(createti2, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(!typeattr->cFuncs, "Unexpected cFuncs %u.\n", typeattr->cFuncs); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hr = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hr == S_OK, "Failed to save changes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to save changes, hr %#lx.\n", hr); ICreateTypeLib2_Release(createtl); ITypeInfo_Release(ti); ICreateTypeInfo2_Release(createti2);
/* Load and check typeinfo. */ hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hr == S_OK, "Failed to load typelib, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to load typelib, hr %#lx.\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "Failed to get typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get typeinfo, hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(!typeattr->cFuncs, "Unexpected cFuncs value.\n"); ITypeInfo_ReleaseTypeAttr(ti, typeattr); ITypeInfo_Release(ti); diff --git a/dlls/oleaut32/tests/usrmarshal.c b/dlls/oleaut32/tests/usrmarshal.c index bb458dec309..c4f4381b47f 100644 --- a/dlls/oleaut32/tests/usrmarshal.c +++ b/dlls/oleaut32/tests/usrmarshal.c @@ -140,7 +140,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
if(!lpsa) { - ok(*(DWORD *)wiresa == 0, "wiresa + 0x0 should be NULL instead of 0x%08x\n", *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == 0, "wiresa + 0x0 should be NULL instead of 0x%08lx\n", *(DWORD *)wiresa); return; }
@@ -151,25 +151,25 @@ 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%08x\n", *(DWORD *)wiresa); /* win2k: this is lpsa. winxp: this is 0x00000001 */ + ok(*(DWORD *)wiresa, "wiresa + 0x0 should be non-NULL instead of 0x%08lx\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%08x\n", *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == lpsa->cDims, "wiresa + 0x4 should be lpsa->cDims instead of 0x%08lx\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 + 0xa should be lpsa->fFeatures instead of 0x%08x\n", *(WORD *)wiresa); wiresa += sizeof(WORD); - ok(*(DWORD *)wiresa == elem_wire_size(lpsa, sftype), "wiresa + 0xc should be 0x%08x instead of 0x%08x\n", elem_wire_size(lpsa, sftype), *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == elem_wire_size(lpsa, sftype), "wiresa + 0xc should be 0x%08lx instead of 0x%08lx\n", elem_wire_size(lpsa, sftype), *(DWORD *)wiresa); wiresa += sizeof(DWORD); ok(*(WORD *)wiresa == lpsa->cLocks, "wiresa + 0x10 should be lpsa->cLocks instead of 0x%04x\n", *(WORD *)wiresa); wiresa += sizeof(WORD); ok(*(WORD *)wiresa == vt, "wiresa + 0x12 should be %04x instead of 0x%04x\n", vt, *(WORD *)wiresa); wiresa += sizeof(WORD); - ok(*(DWORD *)wiresa == sftype, "wiresa + 0x14 should be %08x instead of 0x%08x\n", (DWORD)sftype, *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == sftype, "wiresa + 0x14 should be %08lx instead of 0x%08lx\n", (DWORD)sftype, *(DWORD *)wiresa); wiresa += sizeof(DWORD); - ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x18 should be %u instead of %u\n", cell_count, *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x18 should be %lu instead of %lu\n", cell_count, *(DWORD *)wiresa); wiresa += sizeof(DWORD); - ok(*(DWORD *)wiresa, "wiresa + 0x1c should be non-zero instead of 0x%08x\n", *(DWORD *)wiresa); + ok(*(DWORD *)wiresa, "wiresa + 0x1c should be non-zero instead of 0x%08lx\n", *(DWORD *)wiresa); wiresa += sizeof(DWORD); if(sftype == SF_HAVEIID) { @@ -184,7 +184,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa) for(i=0; i<lpsa->cDims; i++) { ok(memcmp(bounds, &lpsa->rgsabound[lpsa->cDims-i-1], sizeof(SAFEARRAYBOUND)) == 0, - "bounds mismatch for dimension %d, got (%d,%d), expected (%d,%d)\n", i, + "bounds mismatch for dimension %d, got (%ld,%ld), expected (%ld,%ld)\n", i, bounds->lLbound, bounds->cElements, lpsa->rgsabound[lpsa->cDims-i-1].lLbound, lpsa->rgsabound[lpsa->cDims-i-1].cElements); bounds++; @@ -192,7 +192,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
wiresa += sizeof(lpsa->rgsabound[0]) * lpsa->cDims;
- ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x28 should be %u instead of %u\n", cell_count, *(DWORD*)wiresa); + ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x28 should be %lu instead of %lu\n", cell_count, *(DWORD*)wiresa); wiresa += sizeof(DWORD); /* elements are now pointed to by wiresa */ } @@ -261,17 +261,17 @@ static void test_marshal_LPSAFEARRAY(void) expected = (44 + 1 + sizeof(ULONG) - 1) & ~(sizeof(ULONG) - 1); expected += sab[0].cElements * sizeof(USHORT); ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = 44 + sab[0].cElements * sizeof(USHORT); ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - ok(lpsa->cLocks == 7, "got lock count %u\n", lpsa->cLocks); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); + ok(lpsa->cLocks == 7, "got lock count %lu\n", lpsa->cLocks);
check_safearray(buffer, lpsa);
@@ -281,14 +281,14 @@ static void test_marshal_LPSAFEARRAY(void) SafeArrayGetVartype(lpsa, &vt); SafeArrayGetVartype(lpsa2, &vt2); ok(vt == vt2, "vts differ %x %x\n", vt, vt2); - ok(lpsa2->cLocks == 0, "got lock count %u, expected 0\n", lpsa2->cLocks); + ok(lpsa2->cLocks == 0, "got lock count %lu, expected 0\n", lpsa2->cLocks); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); ok(!lpsa2, "lpsa2 was not set to 0 by LPSAFEARRAY_UserFree\n"); HeapFree(GetProcessHeap(), 0, buffer); lpsa->cLocks = 0; hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* use two dimensions */ sab[0].lLbound = 5; @@ -305,17 +305,17 @@ static void test_marshal_LPSAFEARRAY(void) expected = (44 + 1 + +sizeof(SAFEARRAYBOUND) + sizeof(ULONG) - 1) & ~(sizeof(ULONG) - 1); expected += max(sab[0].cElements, sab[1].cElements) * lpsa->cDims * sizeof(USHORT); ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = 52 + max(sab[0].cElements, sab[1].cElements) * lpsa->cDims * sizeof(USHORT); ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - ok(lpsa->cLocks == 7, "got lock count %u\n", lpsa->cLocks); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); + ok(lpsa->cLocks == 7, "got lock count %lu\n", lpsa->cLocks);
check_safearray(buffer, lpsa);
@@ -325,13 +325,13 @@ static void test_marshal_LPSAFEARRAY(void) SafeArrayGetVartype(lpsa, &vt); SafeArrayGetVartype(lpsa2, &vt2); ok(vt == vt2, "vts differ %x %x\n", vt, vt2); - ok(lpsa2->cLocks == 0, "got lock count %u, expected 0\n", lpsa2->cLocks); + ok(lpsa2->cLocks == 0, "got lock count %lu, expected 0\n", lpsa2->cLocks); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); HeapFree(GetProcessHeap(), 0, buffer); lpsa->cLocks = 0; hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* test NULL safe array */ lpsa = NULL; @@ -339,11 +339,11 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = 4; - ok(size == expected, "size should be 4 bytes, not %d\n", size); + ok(size == expected, "size should be 4 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); check_safearray(buffer, lpsa);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -365,54 +365,54 @@ static void test_marshal_LPSAFEARRAY(void) expected = (44 + 1 + (sizeof(double) - 1)) & ~(sizeof(double) - 1); expected += sab[0].cElements * sizeof(double); ok(size == expected || size == expected + 16, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); expected = (44 + (sizeof(double) - 1)) & ~(sizeof(double) - 1); expected += sab[0].cElements * sizeof(double); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected);
check_safearray(buffer, lpsa);
HeapFree(GetProcessHeap(), 0, buffer); lpsa->cLocks = 0; hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* VARTYPE-less arrays can be marshaled if cbElements is 1,2,4 or 8 as type SF_In */ hr = SafeArrayAllocDescriptor(1, &lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); + ok(hr == S_OK, "saad failed %08lx\n", hr); lpsa->cbElements = 8; lpsa->rgsabound[0].lLbound = 2; lpsa->rgsabound[0].cElements = 48; hr = SafeArrayAllocData(lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); + ok(hr == S_OK, "saad failed %08lx\n", hr); hr = SafeArrayGetVartype(lpsa, &vt); - ok(hr == E_INVALIDARG, "ret %08x\n", hr); + ok(hr == E_INVALIDARG, "ret %08lx\n", hr);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = (44 + lpsa->cbElements - 1) & ~(lpsa->cbElements - 1); expected += lpsa->cbElements * lpsa->rgsabound[0].cElements; ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); check_safearray(buffer, lpsa); HeapFree(GetProcessHeap(), 0, buffer); hr = SafeArrayDestroyData(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = SafeArrayDestroyDescriptor(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Test an array of VT_BSTR */ sab[0].lLbound = 3; @@ -430,7 +430,7 @@ static void test_marshal_LPSAFEARRAY(void) indices[0] = i + sab[0].lLbound; values[i] = SysAllocString(buf); hr = SafeArrayPutElement(lpsa, indices, values[i]); - ok(hr == S_OK, "Failed to put bstr element hr 0x%x\n", hr); + ok(hr == S_OK, "Failed to put bstr element hr 0x%lx\n", hr); expected_bstr_size += (j * sizeof(WCHAR)) + (3 * sizeof(DWORD)); if (i % 2 == 0) /* Account for DWORD padding. Works so long as cElements is even */ expected_bstr_size += sizeof(WCHAR); @@ -441,18 +441,18 @@ static void test_marshal_LPSAFEARRAY(void) expected = 44 + (sab[0].cElements * sizeof(DWORD)) + expected_bstr_size; todo_wine ok(size == expected + sizeof(DWORD) || size == (expected + sizeof(DWORD) + 12 /* win64 */), - "size should be %u bytes, not %u\n", expected + (ULONG) sizeof(DWORD), size); + "size should be %lu bytes, not %lu\n", expected + (ULONG) sizeof(DWORD), size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); todo_wine ok(size == expected || size == (expected + 12 /* win64 */), - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); todo_wine - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected);
check_safearray(buffer, lpsa);
@@ -460,7 +460,7 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); todo_wine - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal, result %p\n", next);
for (i = 0; i < ARRAY_SIZE(values); i++) @@ -471,7 +471,7 @@ static void test_marshal_LPSAFEARRAY(void) { indices[0] = i + sab[0].lLbound; hr = SafeArrayGetElement(lpsa2, indices, &gotvalue); - ok(hr == S_OK, "Failed to get bstr element at hres 0x%x\n", hr); + ok(hr == S_OK, "Failed to get bstr element at hres 0x%lx\n", hr); if (hr == S_OK) { ok(VarBstrCmp(values[i], gotvalue, 0, 0) == VARCMP_EQ, "String %d does not match\n", i); @@ -487,39 +487,39 @@ static void test_marshal_LPSAFEARRAY(void)
HeapFree(GetProcessHeap(), 0, buffer); hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* VARTYPE-less arrays with FADF_VARIANT */ hr = SafeArrayAllocDescriptor(1, &lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); + ok(hr == S_OK, "saad failed %08lx\n", hr); lpsa->cbElements = sizeof(VARIANT); lpsa->fFeatures = FADF_VARIANT; lpsa->rgsabound[0].lLbound = 2; lpsa->rgsabound[0].cElements = 48; hr = SafeArrayAllocData(lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); + ok(hr == S_OK, "saad failed %08lx\n", hr); hr = SafeArrayGetVartype(lpsa, &vt); - ok(hr == E_INVALIDARG, "ret %08x\n", hr); + ok(hr == E_INVALIDARG, "ret %08lx\n", hr);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = 44 + 28 * lpsa->rgsabound[0].cElements; todo_wine ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); todo_wine ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); lpsa->cbElements = 16; /* VARIANT wire size */ check_safearray(buffer, lpsa); HeapFree(GetProcessHeap(), 0, buffer); hr = SafeArrayDestroyData(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = SafeArrayDestroyDescriptor(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Test an array of VT_UNKNOWN */ sab[0].lLbound = 3; @@ -544,8 +544,8 @@ static void test_marshal_LPSAFEARRAY(void) indices[0] = i + sab[0].lLbound; heap_unknown[i] = unk; hr = SafeArrayPutElement(lpsa, indices, &heap_unknown[i]->IUnknown_iface); - ok(hr == S_OK, "Failed to put unknown element hr 0x%x\n", hr); - ok(unk->refs == 2, "VT_UNKNOWN safearray elem %d, refcount %d\n", i, unk->refs); + ok(hr == S_OK, "Failed to put unknown element hr 0x%lx\n", hr); + ok(unk->refs == 2, "VT_UNKNOWN safearray elem %d, refcount %ld\n", i, unk->refs);
V_VT(&v) = VT_UNKNOWN; V_UNKNOWN(&v) = &unk->IUnknown_iface; @@ -555,26 +555,26 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size >= expected || size >= (expected + 12 ), - "size should be at least %u bytes, not %u\n", expected, size); + "size should be at least %lu bytes, not %lu\n", expected, size);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size2 = LPSAFEARRAY_UserSize(&umcb.Flags, 1, &lpsa); ok(size2 == (size + sizeof(DWORD)) || size2 == (size + sizeof(DWORD) + 12), - "size should be %u bytes, not %u\n", size + (ULONG) sizeof(DWORD), size2); + "size should be %lu bytes, not %lu\n", size + (ULONG) sizeof(DWORD), size2);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok((next - buffer) <= size, "Marshaled %u bytes, expected at most %u\n", (ULONG) (next - buffer), size); + ok((next - buffer) <= size, "Marshaled %lu bytes, expected at most %lu\n", (ULONG) (next - buffer), size); check_safearray(buffer, lpsa); todo_wine - ok(heap_unknown[0]->refs == 3, "Unexpected refcount %d\n", heap_unknown[0]->refs); + ok(heap_unknown[0]->refs == 3, "Unexpected refcount %ld\n", heap_unknown[0]->refs);
lpsa2 = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); - ok((next - buffer) <= size, "Marshaled %u bytes, expected at most %u\n", (ULONG) (next - buffer), size); + ok((next - buffer) <= size, "Marshaled %lu bytes, expected at most %lu\n", (ULONG) (next - buffer), size); ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal, result %p\n", next);
for (i = 0; i < ARRAY_SIZE(heap_unknown); i++) @@ -585,7 +585,7 @@ static void test_marshal_LPSAFEARRAY(void) { indices[0] = i + sab[0].lLbound; hr = SafeArrayGetElement(lpsa2, indices, &gotvalue); - ok(hr == S_OK, "Failed to get unk element at %d, hres 0x%x\n", i, hr); + ok(hr == S_OK, "Failed to get unk element at %d, hres 0x%lx\n", i, hr); if (hr == S_OK) { ok(gotvalue == &heap_unknown[i]->IUnknown_iface, "Interface %d mismatch, expected %p, got %p\n", @@ -601,7 +601,7 @@ static void test_marshal_LPSAFEARRAY(void) /* Set one of the elements to NULL, see how this effects size. */ indices[0] = 3 + sab[0].lLbound; hr = SafeArrayPutElement(lpsa, indices, NULL); - ok(hr == S_OK, "Failed to put unknown element hr 0x%x\n", hr); + ok(hr == S_OK, "Failed to put unknown element hr 0x%lx\n", hr);
expected = 60; for (i = 0; i < sab[0].cElements; i++) @@ -616,24 +616,24 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size >= expected || size >= (expected + 12 ), - "size should be at least %u bytes, not %u\n", expected, size); + "size should be at least %lu bytes, not %lu\n", expected, size);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size2 = LPSAFEARRAY_UserSize(&umcb.Flags, 1, &lpsa); ok(size2 == (size + sizeof(DWORD)) || size2 == (size + sizeof(DWORD) + 12), - "size should be %u bytes, not %u\n", size + (ULONG) sizeof(DWORD), size2); + "size should be %lu bytes, not %lu\n", size + (ULONG) sizeof(DWORD), size2);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok((next - buffer) <= expected, "Marshaled %u bytes, expected at most %u bytes\n", (ULONG) (next - buffer), expected); + ok((next - buffer) <= expected, "Marshaled %lu bytes, expected at most %lu bytes\n", (ULONG) (next - buffer), expected); check_safearray(buffer, lpsa);
lpsa2 = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); - ok((next - buffer) <= expected, "Marshaled %u bytes, expected at most %u bytes\n", (ULONG) (next - buffer), expected); + ok((next - buffer) <= expected, "Marshaled %lu bytes, expected at most %lu bytes\n", (ULONG) (next - buffer), expected); ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal, result %p\n", next);
for (i = 0; i < ARRAY_SIZE(heap_unknown); i++) @@ -644,7 +644,7 @@ static void test_marshal_LPSAFEARRAY(void) { indices[0] = i + sab[0].lLbound; hr = SafeArrayGetElement(lpsa2, indices, &gotvalue); - ok(hr == S_OK, "Failed to get unk element at %d, hres 0x%x\n", i, hr); + ok(hr == S_OK, "Failed to get unk element at %d, hres 0x%lx\n", i, hr); if (hr == S_OK) { /* Our NULL interface. */ @@ -664,10 +664,10 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2);
- ok(heap_unknown[0]->refs == 1, "Unexpected refcount %d\n", heap_unknown[0]->refs); + ok(heap_unknown[0]->refs == 1, "Unexpected refcount %ld\n", heap_unknown[0]->refs);
hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); }
static void check_bstr(void *buffer, BSTR b) @@ -675,14 +675,14 @@ static void check_bstr(void *buffer, BSTR b) DWORD *wireb = buffer; DWORD len = SysStringByteLen(b);
- ok(*wireb == (len + 1) / 2, "wv[0] %08x\n", *wireb); + ok(*wireb == (len + 1) / 2, "wv[0] %08lx\n", *wireb); wireb++; if(b) - ok(*wireb == len, "wv[1] %08x\n", *wireb); + ok(*wireb == len, "wv[1] %08lx\n", *wireb); else - ok(*wireb == 0xffffffff, "wv[1] %08x\n", *wireb); + ok(*wireb == 0xffffffff, "wv[1] %08lx\n", *wireb); wireb++; - ok(*wireb == (len + 1) / 2, "wv[2] %08x\n", *wireb); + ok(*wireb == (len + 1) / 2, "wv[2] %08lx\n", *wireb); if(len) { wireb++; @@ -704,17 +704,17 @@ static void test_marshal_BSTR(void)
b = SysAllocString(str); len = SysStringLen(b); - ok(len == 13, "get %d\n", len); + ok(len == 13, "get %ld\n", len);
/* BSTRs are DWORD aligned */
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 1, &b); - ok(size == 42, "size %d\n", size); + ok(size == 42, "size %ld\n", size);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 38, "size %d\n", size); + ok(size == 38, "size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -737,7 +737,7 @@ static void test_marshal_BSTR(void) b = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 12, "size %d\n", size); + ok(size == 12, "size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -757,13 +757,13 @@ static void test_marshal_BSTR(void) b = SysAllocStringByteLen("abc", 3); *(((char*)b) + 3) = 'd'; len = SysStringLen(b); - ok(len == 1, "get %d\n", len); + ok(len == 1, "get %ld\n", len); len = SysStringByteLen(b); - ok(len == 3, "get %d\n", len); + ok(len == 3, "get %ld\n", len);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 16, "size %d\n", size); + ok(size == 16, "size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); @@ -786,13 +786,13 @@ static void test_marshal_BSTR(void)
b = SysAllocStringByteLen("", 0); len = SysStringLen(b); - ok(len == 0, "get %d\n", len); + ok(len == 0, "get %ld\n", len); len = SysStringByteLen(b); - ok(len == 0, "get %d\n", len); + ok(len == 0, "get %ld\n", len);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 12, "size %d\n", size); + ok(size == 12, "size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -806,7 +806,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 %d\n", len); + ok(len == 0, "byte len %ld\n", len); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); BSTR_UserFree(&umcb.Flags, &b2); HeapFree(GetProcessHeap(), 0, buffer); @@ -867,8 +867,8 @@ static DWORD *check_variant_header(DWORD *wirev, VARIANT *v, ULONG size) const variant_wire_t *header = (const variant_wire_t*)wirev; DWORD switch_is;
- ok(header->clSize == (size + 7) >> 3, "wv[0] %08x, expected %08x\n", header->clSize, (size + 7) >> 3); - ok(header->rpcReserved == 0, "wv[1] %08x\n", header->rpcReserved); + ok(header->clSize == (size + 7) >> 3, "wv[0] %08lx, expected %08lx\n", header->clSize, (size + 7) >> 3); + ok(header->rpcReserved == 0, "wv[1] %08lx\n", header->rpcReserved); ok(header->vt == V_VT(v), "vt %04x expected %04x\n", header->vt, V_VT(v)); ok(header->wReserved1 == V_U2(v).wReserved1, "res1 %04x expected %04x\n", header->wReserved1, V_U2(v).wReserved1); ok(header->wReserved2 == V_U2(v).wReserved2, "res2 %04x expected %04x\n", header->wReserved2, V_U2(v).wReserved2); @@ -877,7 +877,7 @@ static DWORD *check_variant_header(DWORD *wirev, VARIANT *v, ULONG size) switch_is = V_VT(v); if(switch_is & VT_ARRAY) switch_is &= ~VT_TYPEMASK; - ok(header->switch_is == switch_is, "switch_is %08x expected %08x\n", header->switch_is, switch_is); + ok(header->switch_is == switch_is, "switch_is %08lx expected %08lx\n", header->switch_is, switch_is);
return (DWORD*)((unsigned char*)wirev + sizeof(variant_wire_t)); } @@ -938,10 +938,10 @@ static void test_marshal_VARIANT(void)
/* Variants have an alignment of 8 */ rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 1, &v); - ok(stubMsg.BufferLength == 29, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 29, "size %ld\n", stubMsg.BufferLength);
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 21, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 21, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -950,7 +950,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*(char*)wirev == V_I1(&v), "wv[5] %08x\n", *wirev); + ok(*(char*)wirev == V_I1(&v), "wv[5] %08lx\n", *wirev); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -967,7 +967,7 @@ static void test_marshal_VARIANT(void) V_I2(&v) = 0x1234;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 22, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 22, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -976,7 +976,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*(short*)wirev == V_I2(&v), "wv[5] %08x\n", *wirev); + ok(*(short*)wirev == V_I2(&v), "wv[5] %08lx\n", *wirev); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -994,7 +994,7 @@ static void test_marshal_VARIANT(void) V_I2REF(&v) = &s;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 26, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 26, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1003,9 +1003,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); + ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*(short*)wirev == s, "wv[6] %08x\n", *wirev); + ok(*(short*)wirev == s, "wv[6] %08lx\n", *wirev); VariantInit(&v2); V_VT(&v2) = VT_I2 | VT_BYREF; V_BYREF(&v2) = mem = CoTaskMemAlloc(sizeof(V_I2(&v2))); @@ -1025,7 +1025,7 @@ static void test_marshal_VARIANT(void) V_I4(&v) = 0x1234;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 24, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1034,14 +1034,14 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == V_I4(&v), "wv[5] %08x\n", *wirev); + ok(*wirev == V_I4(&v), "wv[5] %08lx\n", *wirev);
VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); 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 %x expect %x\n", V_I4(&v), V_I4(&v2)); + ok(V_I4(&v) == V_I4(&v2), "got i4 %lx expect %lx\n", V_I4(&v), V_I4(&v2));
VARIANT_UserFree(&umcb.Flags, &v2); HeapFree(GetProcessHeap(), 0, oldbuffer); @@ -1052,7 +1052,7 @@ static void test_marshal_VARIANT(void) V_UI4(&v) = 0x1234;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 24, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1061,13 +1061,13 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0x1234, "wv[5] %08x\n", *wirev); + ok(*wirev == 0x1234, "wv[5] %08lx\n", *wirev); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); 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 %x expect %x\n", V_UI4(&v), V_UI4(&v2)); + ok(V_UI4(&v) == V_UI4(&v2), "got ui4 %lx expect %lx\n", V_UI4(&v), V_UI4(&v2));
VARIANT_UserFree(&umcb.Flags, &v2); HeapFree(GetProcessHeap(), 0, oldbuffer); @@ -1079,7 +1079,7 @@ static void test_marshal_VARIANT(void) V_UI4REF(&v) = &ul;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 28, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 28, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1088,16 +1088,16 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); + ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev == ul, "wv[6] %08x\n", *wirev); + ok(*wirev == ul, "wv[6] %08lx\n", *wirev);
VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); 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 %x expect ui4 ref %x\n", *V_UI4REF(&v), *V_UI4REF(&v2)); + ok(*V_UI4REF(&v) == *V_UI4REF(&v2), "got ui4 ref %lx expect ui4 ref %lx\n", *V_UI4REF(&v), *V_UI4REF(&v2));
VARIANT_UserFree(&umcb.Flags, &v2); HeapFree(GetProcessHeap(), 0, oldbuffer); @@ -1108,7 +1108,7 @@ static void test_marshal_VARIANT(void) V_I8(&v) = (LONGLONG)1000000 * 1000000;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 32, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 32, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1118,7 +1118,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0xcccccccc, "wv[5] %08x\n", *wirev); /* pad */ + ok(*wirev == 0xcccccccc, "wv[5] %08lx\n", *wirev); /* pad */ wirev++; ok(*(LONGLONG *)wirev == V_I8(&v), "wv[6] %s\n", wine_dbgstr_longlong(*(LONGLONG *)wirev)); VariantInit(&v2); @@ -1138,7 +1138,7 @@ static void test_marshal_VARIANT(void) V_R8(&v) = 3.1415;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 24, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1147,7 +1147,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*(float*)wirev == V_R4(&v), "wv[5] %08x\n", *wirev); + ok(*(float*)wirev == V_R4(&v), "wv[5] %08lx\n", *wirev); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -1164,7 +1164,7 @@ static void test_marshal_VARIANT(void) V_R8(&v) = 3.1415;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 32, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 32, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1174,9 +1174,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0xcccccccc, "wv[5] %08x\n", *wirev); /* pad */ + ok(*wirev == 0xcccccccc, "wv[5] %08lx\n", *wirev); /* pad */ wirev++; - ok(*(double*)wirev == V_R8(&v), "wv[6] %08x, wv[7] %08x\n", *wirev, *(wirev+1)); + ok(*(double*)wirev == V_R8(&v), "wv[6] %08lx, wv[7] %08lx\n", *wirev, *(wirev+1)); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -1194,7 +1194,7 @@ static void test_marshal_VARIANT(void) V_R8REF(&v) = &d;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 32, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 32, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1203,9 +1203,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 8, "wv[5] %08x\n", *wirev); + ok(*wirev == 8, "wv[5] %08lx\n", *wirev); wirev++; - ok(*(double*)wirev == d, "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1)); + ok(*(double*)wirev == d, "wv[6] %08lx wv[7] %08lx\n", *wirev, *(wirev+1)); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -1222,7 +1222,7 @@ static void test_marshal_VARIANT(void) V_BOOL(&v) = 0x1234;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 22, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 22, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1250,7 +1250,7 @@ static void test_marshal_VARIANT(void) V_VT(&v) = VT_DECIMAL;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 40, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 40, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1260,11 +1260,11 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0xcccccccc, "wirev[5] %08x\n", *wirev); /* pad */ + ok(*wirev == 0xcccccccc, "wirev[5] %08lx\n", *wirev); /* pad */ wirev++; dec2 = dec; dec2.wReserved = VT_DECIMAL; - ok(!memcmp(wirev, &dec2, sizeof(dec2)), "wirev[6] %08x wirev[7] %08x wirev[8] %08x wirev[9] %08x\n", + ok(!memcmp(wirev, &dec2, sizeof(dec2)), "wirev[6] %08lx wirev[7] %08lx wirev[8] %08lx wirev[9] %08lx\n", *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3)); VariantInit(&v2); stubMsg.Buffer = buffer; @@ -1282,7 +1282,7 @@ static void test_marshal_VARIANT(void) V_DECIMALREF(&v) = &dec;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 40, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 40, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1291,9 +1291,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 16, "wv[5] %08x\n", *wirev); + ok(*wirev == 16, "wv[5] %08lx\n", *wirev); wirev++; - 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)); + 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)); VariantInit(&v2); /* check_variant_header tests wReserved[123], so initialize to unique values. * (Could probably also do this by setting the variant to a known DECIMAL.) @@ -1316,7 +1316,7 @@ static void test_marshal_VARIANT(void) V_VT(&v) = VT_EMPTY;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 20, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 20, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1339,7 +1339,7 @@ static void test_marshal_VARIANT(void) V_VT(&v) = VT_NULL;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 20, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 20, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1364,7 +1364,7 @@ static void test_marshal_VARIANT(void) V_BSTR(&v) = b;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 60, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 60, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1372,7 +1372,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ + ok(*wirev, "wv[5] %08lx\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ wirev++; check_bstr(wirev, V_BSTR(&v)); VariantInit(&v2); @@ -1392,7 +1392,7 @@ static void test_marshal_VARIANT(void) V_BSTRREF(&v) = &b;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 64, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 64, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1400,9 +1400,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); + ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ + ok(*wirev, "wv[6] %08lx\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ wirev++; check_bstr(wirev, b); b2 = SysAllocString(str); @@ -1438,7 +1438,7 @@ static void test_marshal_VARIANT(void) rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); expected = 152; ok(stubMsg.BufferLength == expected || stubMsg.BufferLength == expected + 8, /* win64 */ - "size %u instead of %u\n", stubMsg.BufferLength, expected); + "size %lu instead of %lu\n", stubMsg.BufferLength, expected); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1446,7 +1446,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, expected); - ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ + ok(*wirev, "wv[5] %08lx\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ wirev++; check_safearray(wirev, lpsa); VariantInit(&v2); @@ -1475,7 +1475,7 @@ static void test_marshal_VARIANT(void) rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); expected = 152; ok(stubMsg.BufferLength == expected || stubMsg.BufferLength == expected + 16, /* win64 */ - "size %u instead of %u\n", stubMsg.BufferLength, expected); + "size %lu instead of %lu\n", stubMsg.BufferLength, expected); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1483,9 +1483,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, expected); - ok(*wirev == 4, "wv[5] %08x\n", *wirev); + ok(*wirev == 4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ + ok(*wirev, "wv[6] %08lx\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ wirev++; check_safearray(wirev, lpsa); VariantInit(&v2); @@ -1515,7 +1515,7 @@ static void test_marshal_VARIANT(void) rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); expected = 152; ok(stubMsg.BufferLength == expected || stubMsg.BufferLength == expected + 16, /* win64 */ - "size %u instead of %u\n", stubMsg.BufferLength, expected); + "size %lu instead of %lu\n", stubMsg.BufferLength, expected); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1523,9 +1523,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, expected); - ok(*wirev == 4, "wv[5] %08x\n", *wirev); + ok(*wirev == 4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ + ok(*wirev, "wv[6] %08lx\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ wirev++; check_safearray(wirev, lpsa); lpsa_copy = lpsa2 = SafeArrayCreate(VT_I8, 1, &sab); @@ -1552,11 +1552,11 @@ static void test_marshal_VARIANT(void) ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); lpsa2->fFeatures &= ~FADF_STATIC; hr = SafeArrayDestroy(*V_ARRAYREF(&v2)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); HeapFree(GetProcessHeap(), 0, oldbuffer); lpsa->fFeatures &= ~FADF_STATIC; hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/*** VARIANT BYREF ***/ VariantInit(&v); @@ -1567,7 +1567,7 @@ static void test_marshal_VARIANT(void) V_VARIANTREF(&v) = &v2;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 64, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 64, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); @@ -1576,16 +1576,16 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
- ok(*wirev == sizeof(VARIANT), "wv[5] %08x\n", *wirev); + ok(*wirev == sizeof(VARIANT), "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev == ('U' | 's' << 8 | 'e' << 16 | 'r' << 24), "wv[6] %08x\n", *wirev); /* 'User' */ + ok(*wirev == ('U' | 's' << 8 | 'e' << 16 | 'r' << 24), "wv[6] %08lx\n", *wirev); /* 'User' */ wirev++; - ok(*wirev == 0xcccccccc, "wv[7] %08x\n", *wirev); /* pad */ + ok(*wirev == 0xcccccccc, "wv[7] %08lx\n", *wirev); /* pad */ wirev++; wirev = check_variant_header(wirev, &v2, stubMsg.BufferLength - 32); - ok(*wirev == 0xcccccccc, "wv[13] %08x\n", *wirev); /* pad for VT_R8 */ + ok(*wirev == 0xcccccccc, "wv[13] %08lx\n", *wirev); /* pad for VT_R8 */ wirev++; - ok(*(double*)wirev == V_R8(&v2), "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1)); + ok(*(double*)wirev == V_R8(&v2), "wv[6] %08lx wv[7] %08lx\n", *wirev, *(wirev+1)); VariantInit(&v3); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); @@ -1607,36 +1607,36 @@ static void test_marshal_VARIANT(void) V_UNKNOWN(&v) = &heap_unknown->IUnknown_iface;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength > 40, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength > 40, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); todo_wine - ok(heap_unknown->refs == 2, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 2, "got refcount %ld\n", heap_unknown->refs); wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, next - buffer);
ok(*wirev == (DWORD_PTR)V_UNKNOWN(&v) /* Win9x */ || - *wirev == (DWORD_PTR)V_UNKNOWN(&v) + 1 /* NT */, "wv[5] %08x\n", *wirev); + *wirev == (DWORD_PTR)V_UNKNOWN(&v) + 1 /* NT */, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev == next - buffer - 0x20, "wv[6] %08x\n", *wirev); + ok(*wirev == next - buffer - 0x20, "wv[6] %08lx\n", *wirev); wirev++; - ok(*wirev == next - buffer - 0x20, "wv[7] %08x\n", *wirev); + ok(*wirev == next - buffer - 0x20, "wv[7] %08lx\n", *wirev); wirev++; - ok(*wirev == 0x574f454d, "wv[8] %08x\n", *wirev); + ok(*wirev == 0x574f454d, "wv[8] %08lx\n", *wirev); VariantInit(&v3); V_VT(&v3) = VT_UNKNOWN; V_UNKNOWN(&v3) = &heap_unknown->IUnknown_iface; IUnknown_AddRef(V_UNKNOWN(&v3)); stubMsg.Buffer = buffer; todo_wine - ok(heap_unknown->refs == 3, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 3, "got refcount %ld\n", heap_unknown->refs); next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3)); ok(V_UNKNOWN(&v) == V_UNKNOWN(&v3), "got %p expect %p\n", V_UNKNOWN(&v), V_UNKNOWN(&v3)); VARIANT_UserFree(&umcb.Flags, &v3); - ok(heap_unknown->refs == 1, "%d refcounts of IUnknown leaked\n", heap_unknown->refs - 1); + ok(heap_unknown->refs == 1, "%ld refcounts of IUnknown leaked\n", heap_unknown->refs - 1); IUnknown_Release(&heap_unknown->IUnknown_iface); HeapFree(GetProcessHeap(), 0, oldbuffer);
@@ -1646,14 +1646,14 @@ static void test_marshal_VARIANT(void) V_UNKNOWN(&v) = NULL;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength >= 24, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength >= 24, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, next - buffer); - ok(*wirev == 0, "wv[5] %08x\n", *wirev); + ok(*wirev == 0, "wv[5] %08lx\n", *wirev);
VariantInit(&v2); stubMsg.Buffer = buffer; @@ -1673,27 +1673,27 @@ static void test_marshal_VARIANT(void) V_UNKNOWNREF(&v) = (IUnknown **)&heap_unknown;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength >= 44, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength >= 44, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); - ok(heap_unknown->refs == 1, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 1, "got refcount %ld\n", heap_unknown->refs); next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); todo_wine - ok(heap_unknown->refs == 2, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 2, "got refcount %ld\n", heap_unknown->refs); wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, next - buffer);
- ok(*wirev == 4, "wv[5] %08x\n", *wirev); + ok(*wirev == 4, "wv[5] %08lx\n", *wirev); wirev++; ok(*wirev == (DWORD_PTR)heap_unknown /* Win9x, Win2000 */ || - *wirev == (DWORD_PTR)heap_unknown + 1 /* XP */, "wv[6] %08x\n", *wirev); + *wirev == (DWORD_PTR)heap_unknown + 1 /* XP */, "wv[6] %08lx\n", *wirev); wirev++; - ok(*wirev == next - buffer - 0x24, "wv[7] %08x\n", *wirev); + ok(*wirev == next - buffer - 0x24, "wv[7] %08lx\n", *wirev); wirev++; - ok(*wirev == next - buffer - 0x24, "wv[8] %08x\n", *wirev); + ok(*wirev == next - buffer - 0x24, "wv[8] %08lx\n", *wirev); wirev++; - ok(*wirev == 0x574f454d, "wv[9] %08x\n", *wirev); + ok(*wirev == 0x574f454d, "wv[9] %08lx\n", *wirev);
VariantInit(&v3); V_VT(&v3) = VT_UNKNOWN; @@ -1701,11 +1701,11 @@ static void test_marshal_VARIANT(void) IUnknown_AddRef(V_UNKNOWN(&v3)); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); - ok(heap_unknown->refs == 2, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 2, "got refcount %ld\n", heap_unknown->refs); ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3)); ok(*V_UNKNOWNREF(&v) == *V_UNKNOWNREF(&v3), "got %p expect %p\n", *V_UNKNOWNREF(&v), *V_UNKNOWNREF(&v3)); VARIANT_UserFree(&umcb.Flags, &v3); - ok(heap_unknown->refs == 1, "%d refcounts of IUnknown leaked\n", heap_unknown->refs - 1); + ok(heap_unknown->refs == 1, "%ld refcounts of IUnknown leaked\n", heap_unknown->refs - 1); IUnknown_Release(&heap_unknown->IUnknown_iface); HeapFree(GetProcessHeap(), 0, oldbuffer);
@@ -1715,7 +1715,7 @@ static void test_marshal_VARIANT(void) V_UNKNOWNREF(&v) = &unk;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength >= 28, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength >= 28, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); @@ -1724,7 +1724,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
- ok(*wirev == 4, "wv[5] %08x\n", *wirev); + ok(*wirev == 4, "wv[5] %08lx\n", *wirev);
VariantInit(&v2); stubMsg.Buffer = buffer; diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index 55190574ca9..d238ef7b049 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -40,7 +40,7 @@ #define FMT_NUMBER(vt,val) \ VariantInit(&v); V_VT(&v) = vt; val(&v) = 1; \ hres = VarFormatNumber(&v,2,0,0,0,0,&str); \ - ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8x\n", vt, hres); \ + ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8lx\n", vt, hres); \ if (hres == S_OK) { \ ok(str && wcscmp(str,szResult1) == 0, \ "VarFormatNumber (vt %d): string different\n", vt); \ @@ -78,7 +78,7 @@ static void test_VarFormatNumber(void) V_BSTR(&v) = SysAllocString(L"1");
hres = VarFormatNumber(&v,2,0,0,0,0,&str); - ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); + ok(hres == S_OK, "VarFormatNumber (bstr): returned %8lx\n", hres); if (hres == S_OK) ok(str && wcscmp(str, szResult1) == 0, "VarFormatNumber (bstr): string different\n"); SysFreeString(V_BSTR(&v)); @@ -86,7 +86,7 @@ static void test_VarFormatNumber(void)
V_BSTR(&v) = SysAllocString(L"-1"); hres = VarFormatNumber(&v,2,0,-1,0,0,&str); - ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); + ok(hres == S_OK, "VarFormatNumber (bstr): returned %8lx\n", hres); if (hres == S_OK) ok(str && wcscmp(str, L"(1.00)") == 0, "VarFormatNumber (-bstr): string different\n"); SysFreeString(V_BSTR(&v)); @@ -384,21 +384,21 @@ static void test_VarFormat(void) /* 'out' is not cleared */ out = (BSTR)0x1; hres = VarFormat(&in,NULL,fd,fw,flags,&out); /* Would crash if out is cleared */ - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); SysFreeString(out); out = NULL;
/* VT_NULL */ V_VT(&in) = VT_NULL; hres = VarFormat(&in,NULL,fd,fw,0,&out); - ok(hres == S_OK, "VarFormat failed with 0x%08x\n", hres); + ok(hres == S_OK, "VarFormat failed with 0x%08lx\n", hres); ok(out == NULL, "expected NULL formatted string\n");
/* Invalid args */ hres = VarFormat(&in,NULL,fd,fw,flags,NULL); - ok(hres == E_INVALIDARG, "Null out: expected E_INVALIDARG, got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "Null out: expected E_INVALIDARG, got 0x%08lx\n", hres); hres = VarFormat(NULL,NULL,fd,fw,flags,&out); - ok(hres == E_INVALIDARG, "Null in: expected E_INVALIDARG, got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "Null in: expected E_INVALIDARG, got 0x%08lx\n", hres); fd = -1; VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"",E_INVALIDARG,""); fd = 8; @@ -480,7 +480,7 @@ static void test_VarWeekdayName(void)
hres = VarWeekdayName(1, 0, 0, 0, NULL); ok(E_INVALIDARG == hres, - "Null pointer: expected E_INVALIDARG, got 0x%08x\n", hres); + "Null pointer: expected E_INVALIDARG, got 0x%08lx\n", hres);
/* Check all combinations */ for (iWeekday = 1; iWeekday <= 7; ++iWeekday) @@ -532,17 +532,17 @@ static void test_VarFormatFromTokens(void)
lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); hres = VarTokenizeFormatString(number_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, number_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"690.00"), "incorrectly formatted number: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); hres = VarTokenizeFormatString(number_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, number_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"6,90"), "incorrectly formatted number: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
@@ -553,17 +553,17 @@ static void test_VarFormatFromTokens(void)
lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); hres = VarTokenizeFormatString(date_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, date_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"11-12"), "incorrectly formatted date: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); hres = VarTokenizeFormatString(date_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, date_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"12-11"), "incorrectly formatted date: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
@@ -574,17 +574,17 @@ static void test_VarFormatFromTokens(void)
lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); hres = VarTokenizeFormatString(string_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, string_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"1.5"), "incorrectly formatted string: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); hres = VarTokenizeFormatString(string_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, string_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"1,5"), "incorrectly formatted string: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); } @@ -596,32 +596,32 @@ static void test_GetAltMonthNames(void)
str = (void *)0xdeadbeef; hr = GetAltMonthNames(0, &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str == NULL, "Got %p\n", str);
str = (void *)0xdeadbeef; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str == NULL, "Got %p\n", str);
str = NULL; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_ARABIC_EGYPT), SORT_DEFAULT), &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str != NULL, "Got %p\n", str);
str2 = NULL; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_ARABIC_EGYPT), SORT_DEFAULT), &str2); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str2 == str, "Got %p\n", str2);
str = NULL; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_DEFAULT), SORT_DEFAULT), &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str != NULL, "Got %p\n", str);
str = NULL; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT), &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str != NULL, "Got %p\n", str); }
@@ -634,19 +634,19 @@ static void test_VarFormatCurrency(void) V_CY(&in).int64 = 0; V_VT(&in) = VT_CY; hr = VarFormatCurrency(&in, 3, -2, -2, -2, 0, &str); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&in) = VT_BSTR; V_BSTR(&in) = str; hr = VarFormatCurrency(&in, 1, -2, -2, -2, 0, &str2); - ok(hr == S_OK, "Unexpected hr %#x for %s\n", hr, wine_dbgstr_w(str)); + ok(hr == S_OK, "Unexpected hr %#lx for %s\n", hr, wine_dbgstr_w(str)); ok(lstrcmpW(str, str2), "Expected different string.\n"); SysFreeString(str2);
V_VT(&in) = VT_BSTR | VT_BYREF; V_BSTRREF(&in) = &str; hr = VarFormatCurrency(&in, 1, -2, -2, -2, 0, &str2); - ok(hr == S_OK, "Unexpected hr %#x for %s\n", hr, wine_dbgstr_w(str)); + ok(hr == S_OK, "Unexpected hr %#lx for %s\n", hr, wine_dbgstr_w(str)); ok(lstrcmpW(str, str2), "Expected different string.\n");
SysFreeString(str); @@ -655,7 +655,7 @@ static void test_VarFormatCurrency(void) V_VT(&in) = VT_BSTR; V_BSTR(&in) = SysAllocString(L"test"); hr = VarFormatCurrency(&in, 1, -2, -2, -2, 0, &str2); - ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#x.\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#lx.\n", hr); VariantClear(&in); }
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index a4e2700c7df..03eb566f555 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -193,7 +193,7 @@ static HRESULT WINAPI DummyDispatch_Invoke(IDispatch *iface,
CHECK_EXPECT(dispatch_invoke);
- ok(dispid == DISPID_VALUE, "got dispid %d\n", dispid); + ok(dispid == DISPID_VALUE, "got dispid %ld\n", dispid); ok(IsEqualIID(riid, &IID_NULL), "go riid %s\n", wine_dbgstr_guid(riid)); ok(wFlags == DISPATCH_PROPERTYGET, "Flags wrong\n");
@@ -554,7 +554,7 @@ static const char *variantstr( const VARIANT *var ) case VT_I2: sprintf( vtstr_buffer[vtstr_current], "VT_I2(%d)", V_I2(var) ); break; case VT_I4: - sprintf( vtstr_buffer[vtstr_current], "VT_I4(%d)", V_I4(var) ); break; + sprintf( vtstr_buffer[vtstr_current], "VT_I4(%ld)", V_I4(var) ); break; case VT_INT: sprintf( vtstr_buffer[vtstr_current], "VT_INT(%d)", V_INT(var) ); break; case VT_I8: @@ -570,11 +570,11 @@ static const char *variantstr( const VARIANT *var ) case VT_UI2: sprintf( vtstr_buffer[vtstr_current], "VT_UI2(%u)", V_UI2(var) ); break; case VT_UI4: - sprintf( vtstr_buffer[vtstr_current], "VT_UI4(%u)", V_UI4(var) ); break; + sprintf( vtstr_buffer[vtstr_current], "VT_UI4(%lu)", V_UI4(var) ); break; case VT_UINT: sprintf( vtstr_buffer[vtstr_current], "VT_UINT(%d)", V_UINT(var) ); break; case VT_CY: - sprintf( vtstr_buffer[vtstr_current], "VT_CY(%x%08x)", S(V_CY(var)).Hi, S(V_CY(var)).Lo ); break; + sprintf( vtstr_buffer[vtstr_current], "VT_CY(%lx%08lx)", S(V_CY(var)).Hi, S(V_CY(var)).Lo ); break; case VT_DATE: sprintf( vtstr_buffer[vtstr_current], "VT_DATE(%g)", V_DATE(var) ); break; default: @@ -633,7 +633,7 @@ static void test_var_call1( int line, HRESULT (WINAPI *func)(LPVARIANT,LPVARIANT
memset( &result, 0, sizeof(result) ); hres = func( arg, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); + ok_(__FILE__,line)( hres == S_OK, "wrong result %lx\n", hres ); if (hres == S_OK) ok_(__FILE__,line)( is_expected_variant( &result, expected ), "got %s expected %s\n", variantstr(&result), variantstr(expected) ); @@ -651,7 +651,7 @@ static void test_var_call2( int line, HRESULT (WINAPI *func)(LPVARIANT,LPVARIANT
memset( &result, 0, sizeof(result) ); hres = func( left, right, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); + ok_(__FILE__,line)( hres == S_OK, "wrong result %lx\n", hres ); if (hres == S_OK) ok_(__FILE__,line)( is_expected_variant( &result, expected ), "got %s expected %s\n", variantstr(&result), variantstr(expected) ); @@ -785,7 +785,7 @@ static void test_VariantClear(void) V_UI4(&v) = ~0u; hres = VariantClear(&v); ok((hres == S_OK && V_VT(&v) == VT_EMPTY), - "VariantClear: Type set to %d, res %08x\n", V_VT(&v), hres); + "VariantClear: Type set to %d, res %08lx\n", V_VT(&v), hres); ok(V_UI4(&v) == ~0u, "VariantClear: Overwrote value\n");
/* Test all possible V_VT values. @@ -810,7 +810,7 @@ static void test_VariantClear(void) if (IsValidVariantClearVT(vt, ExtraFlags[i])) hExpected = S_OK;
- ok(hres == hExpected, "VariantClear: expected 0x%X, got 0x%X for vt %d | 0x%X\n", + ok(hres == hExpected, "VariantClear: expected 0x%lX, got 0x%lX for vt %d | 0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -824,11 +824,11 @@ static void test_VariantClear(void) V_VARIANTREF(&v) = &v2;
hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_VARIANTREF(&v) == &v2, "variant ref %p\n", V_VARIANTREF(&v2)); ok(V_VT(&v2) == VT_I4, "vt %04x\n", V_VT(&v2)); - ok(V_I4(&v2) == 0x1234, "i4 %04x\n", V_I4(&v2)); + ok(V_I4(&v2) == 0x1234, "i4 %04lx\n", V_I4(&v2));
/* I4 BYREF */ i4 = 0x4321; @@ -836,10 +836,10 @@ static void test_VariantClear(void) V_I4REF(&v) = &i4;
hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_I4REF(&v) == &i4, "i4 ref %p\n", V_I4REF(&v2)); - ok(i4 == 0x4321, "i4 changed %08x\n", i4); + ok(i4 == 0x4321, "i4 changed %08lx\n", i4);
/* UNKNOWN */ @@ -847,11 +847,11 @@ static void test_VariantClear(void) V_UNKNOWN(&v) = &test_myVariantClearImpl.IUnknown_iface; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_UNKNOWN(&v) == &test_myVariantClearImpl.IUnknown_iface, "unknown %p\n", V_UNKNOWN(&v)); /* Check that Release got called, but nothing else */ - ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); + ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08lx\n", test_myVariantClearImpl.events);
/* UNKNOWN BYREF */ punk = &test_myVariantClearImpl.IUnknown_iface; @@ -859,23 +859,23 @@ static void test_VariantClear(void) V_UNKNOWNREF(&v) = &punk; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_UNKNOWNREF(&v) == &punk, "unknown ref %p\n", V_UNKNOWNREF(&v)); /* Check that nothing got called */ - ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); + ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08lx\n", test_myVariantClearImpl.events);
/* DISPATCH */ V_VT(&v) = VT_DISPATCH; V_DISPATCH(&v) = (IDispatch*)&test_myVariantClearImpl.IUnknown_iface; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_DISPATCH(&v) == (IDispatch*)&test_myVariantClearImpl.IUnknown_iface, "dispatch %p\n", V_DISPATCH(&v)); /* Check that Release got called, but nothing else */ - ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); + ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08lx\n", test_myVariantClearImpl.events);
/* DISPATCH BYREF */ punk = &test_myVariantClearImpl.IUnknown_iface; @@ -883,11 +883,11 @@ static void test_VariantClear(void) V_DISPATCHREF(&v) = (IDispatch**)&punk; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_DISPATCHREF(&v) == (IDispatch**)&punk, "dispatch ref %p\n", V_DISPATCHREF(&v)); /* Check that nothing got called */ - ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); + ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08lx\n", test_myVariantClearImpl.events);
/* RECORD */ recinfo = get_test_recordinfo(); @@ -899,10 +899,10 @@ static void test_VariantClear(void) recinfo->ref = 2; recinfo->rec = rec; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(rec->pvRecord == NULL, "got %p\n", rec->pvRecord); ok(recinfo->recordclear == 1, "got %d\n", recinfo->recordclear); - ok(recinfo->ref == 1, "got %d\n", recinfo->ref); + ok(recinfo->ref == 1, "got %ld\n", recinfo->ref); IRecordInfo_Release(&recinfo->IRecordInfo_iface); }
@@ -938,7 +938,7 @@ static void test_VariantCopy(void) hres = VariantCopy(&vSrc, &vSrc);
ok(hres == hExpected, - "Copy(src==dst): expected 0x%X, got 0x%X for src==dest vt %d|0x%X\n", + "Copy(src==dst): expected 0x%lX, got 0x%lX for src==dest vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -966,7 +966,7 @@ static void test_VariantCopy(void) hres = VariantCopy(&vDst, &vSrc);
ok(hres == hExpected, - "Copy(bad dst): expected 0x%X, got 0x%X for dest vt %d|0x%X\n", + "Copy(bad dst): expected 0x%lX, got 0x%lX for dest vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); if (hres == S_OK) ok(V_VT(&vDst) == VT_UI1, @@ -996,7 +996,7 @@ static void test_VariantCopy(void) hres = VariantCopy(&vDst, &vSrc);
ok(hres == hExpected, - "Copy(bad src): expected 0x%X, got 0x%X for src vt %d|0x%X\n", + "Copy(bad src): expected 0x%lX, got 0x%lX for src vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); if (hres == S_OK) { @@ -1042,7 +1042,7 @@ static void test_VariantCopy(void) recinfo->getsize = 0; recinfo->rec = rec; hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres);
rec = &V_UNION(&vDst, brecVal); ok(rec->pvRecord != (void*)0xdeadbeef && rec->pvRecord != NULL, "got %p\n", rec->pvRecord); @@ -1120,7 +1120,7 @@ static void test_VariantCopyInd(void) hres = VariantCopyInd(&vSrc, &vSrc);
ok(hres == hExpected, - "CopyInd(src==dst): expected 0x%X, got 0x%X for src==dst vt %d|0x%X\n", + "CopyInd(src==dst): expected 0x%lX, got 0x%lX for src==dst vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -1147,7 +1147,7 @@ static void test_VariantCopyInd(void) hres = VariantCopyInd(&vDst, &vSrc);
ok(hres == hExpected, - "CopyInd(bad dst): expected 0x%X, got 0x%X for dst vt %d|0x%X\n", + "CopyInd(bad dst): expected 0x%lX, got 0x%lX for dst vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); if (hres == S_OK) ok(V_VT(&vDst) == VT_UI1, @@ -1201,7 +1201,7 @@ static void test_VariantCopyInd(void) hres = VariantCopyInd(&vDst, &vSrc);
ok(hres == hExpected, - "CopyInd(bad src): expected 0x%X, got 0x%X for src vt %d|0x%X\n", + "CopyInd(bad src): expected 0x%lX, got 0x%lX for src vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); if (hres == S_OK) { @@ -1235,7 +1235,7 @@ static void test_VariantCopyInd(void) VariantInit(&vDst);
hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK, "VariantCopyInd failed: 0x%08x\n", hres); + ok(hres == S_OK, "VariantCopyInd failed: 0x%08lx\n", hres); ok(V_VT(&vDst) == VT_UI1 && V_UI1(&vDst) == 0x77, "CopyInd(deref): expected dst vt = VT_UI1, val 0x77, got %d|0x%X, 0x%2X\n", V_VT(&vDst) & VT_TYPEMASK, V_VT(&vDst) & ~VT_TYPEMASK, V_UI1(&vDst)); @@ -1248,7 +1248,7 @@ static void test_VariantCopyInd(void) VariantInit(&vDst);
hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK, "VariantCopyInd failed: 0x%08x\n", hres); + ok(hres == S_OK, "VariantCopyInd failed: 0x%08lx\n", hres); ok(V_VT(&vDst) == VT_UI1 && V_UI1(&vDst) == 0x88, "CopyInd(deref): expected dst vt = VT_UI1, val 0x77, got %d|0x%X, 0x%2X\n", V_VT(&vDst) & VT_TYPEMASK, V_VT(&vDst) & ~VT_TYPEMASK, V_UI1(&vDst)); @@ -1264,7 +1264,7 @@ static void test_VariantCopyInd(void)
hres = VariantCopyInd(&vDst, &vSrc); ok(hres == E_INVALIDARG, - "CopyInd(ref->ref): expected E_INVALIDARG, got 0x%08x\n", hres); + "CopyInd(ref->ref): expected E_INVALIDARG, got 0x%08lx\n", hres); }
static HRESULT (WINAPI *pVarParseNumFromStr)(const OLECHAR*,LCID,ULONG,NUMPARSE*,BYTE*); @@ -1293,12 +1293,12 @@ static HRESULT convert_str( const char *str, INT dig, ULONG flags, static void expect_NumFromStr( int line, HRESULT hres, NUMPARSE *np, INT a, ULONG b, ULONG c, INT d, INT e, INT f ) { - ok_(__FILE__,line)(hres == S_OK, "returned %08x\n", hres); + ok_(__FILE__,line)(hres == S_OK, "returned %08lx\n", hres); if (hres == S_OK) { ok_(__FILE__,line)(np->cDig == a, "Expected cDig = %d, got %d\n", a, np->cDig); - ok_(__FILE__,line)(np->dwInFlags == b, "Expected dwInFlags = 0x%x, got 0x%x\n", b, np->dwInFlags); - ok_(__FILE__,line)(np->dwOutFlags == c, "Expected dwOutFlags = 0x%x, got 0x%x\n", c, np->dwOutFlags); + ok_(__FILE__,line)(np->dwInFlags == b, "Expected dwInFlags = 0x%lx, got 0x%lx\n", b, np->dwInFlags); + ok_(__FILE__,line)(np->dwOutFlags == c, "Expected dwOutFlags = 0x%lx, got 0x%lx\n", c, np->dwOutFlags); ok_(__FILE__,line)(np->cchUsed == d, "Expected cchUsed = %d, got %d\n", d, np->cchUsed); ok_(__FILE__,line)(np->nBaseShift == e, "Expected nBaseShift = %d, got %d\n", e, np->nBaseShift); ok_(__FILE__,line)(np->nPwr10 == f, "Expected nPwr10 = %d, got %d\n", f, np->nPwr10); @@ -1311,7 +1311,7 @@ static void expect_NumFromStr( int line, HRESULT hres, NUMPARSE *np, INT a, ULON #define CONVERT(str,flags) CONVERTN(str,sizeof(rgb),flags) #define EXPECT(a,b,c,d,e,f) expect_NumFromStr( __LINE__, hres, &np, a, b, c, d, e, f ) #define EXPECTRGB(a,b) ok(rgb[a] == b, "Digit[%d], expected %d, got %d\n", a, b, rgb[a]) -#define EXPECTFAIL ok(hres == DISP_E_TYPEMISMATCH, "Call succeeded, hres = %08x\n", hres) +#define EXPECTFAIL ok(hres == DISP_E_TYPEMISMATCH, "Call succeeded, hres = %08lx\n", hres) #define EXPECT2(a,b) EXPECTRGB(0,a); EXPECTRGB(1,b)
static void test_VarParseNumFromStrEn(void) @@ -2460,7 +2460,7 @@ static void test_VarParseNumFromStrMisc(void) lcid = MAKELCID(MAKELANGID(LANG_FRENCH,SUBLANG_FRENCH_SWISS),SORT_DEFAULT); WCONVERT(L"3CHF", NUMPRS_CURRENCY|NUMPRS_USE_ALL); /* Windows <= 8.1 uses an old currency symbol: "fr. 5" */ - todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres); + todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08lx\n", hres); if (hres == S_OK) { todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,4,0,0); @@ -2473,7 +2473,7 @@ static void test_VarParseNumFromStrMisc(void) /* Windows 8.1 incorrectly doubles the right-to-left mark: * "\x62f.\x645.\x200f\x200f 5" */ - ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres); + ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08lx\n", hres); if (hres == S_OK) { EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,6,0,0); @@ -2511,11 +2511,11 @@ static const char *szFailOk = "Call failed, hres = %08x\n"; #define EXPECT_UI2(val) EXPECT_OK { EXPECT_TYPE(VT_UI2); \ ok(V_UI2(&vOut) == val, "Expected ui2 = %d, got %d\n", (USHORT)val, V_UI2(&vOut)); } #define EXPECT_I4(val) EXPECT_OK { EXPECT_TYPE(VT_I4); \ - ok(V_I4(&vOut) == val, "Expected i4 = %d, got %d\n", (LONG)val, V_I4(&vOut)); } + ok(V_I4(&vOut) == val, "Expected i4 = %ld, got %ld\n", (LONG)val, V_I4(&vOut)); } #define EXPECT_UI4(val) EXPECT_OK { EXPECT_TYPE(VT_UI4); \ ok(V_UI4(&vOut) == val, "Expected ui4 = %d, got %d\n", (ULONG)val, V_UI4(&vOut)); } #define EXPECT_I8(high,low) EXPECT_OK { EXPECT_TYPE(VT_I8); \ - ok(V_I8(&vOut) == ((((ULONG64)(high))<<32)|(low)), "Expected i8 = %x%08x, got %x%08x\n", \ + ok(V_I8(&vOut) == ((((ULONG64)(high))<<32)|(low)), "Expected i8 = %lx%08lx, got %lx%08lx\n", \ (LONG)(high), (LONG)(low), (LONG)(V_I8(&vOut)>>32), (LONG)V_I8(&vOut) ); } #define EXPECT_UI8(val) EXPECT_OK { EXPECT_TYPE(VT_UI8); \ ok(V_UI8(&vOut) == val, "Expected ui8 = 0x%x%08x, got 0x%x%08x\n", \ @@ -2526,12 +2526,12 @@ static const char *szFailOk = "Call failed, hres = %08x\n"; ok(V_R8(&vOut) == val, "Expected r8 = %g, got %g\n", val, V_R8(&vOut)); } #define CY_MULTIPLIER 10000 #define EXPECT_CY(val) EXPECT_OK { EXPECT_TYPE(VT_CY); \ - ok(V_CY(&vOut).int64 == (LONG64)(val * CY_MULTIPLIER), "Expected r8 = 0x%x%08x, got 0x%x%08x\n", \ + ok(V_CY(&vOut).int64 == (LONG64)(val * CY_MULTIPLIER), "Expected r8 = 0x%lx%08lx, got 0x%lx%08lx\n", \ (DWORD)((LONG64)val >> 23), (DWORD)(LONG64)val, (DWORD)(V_CY(&vOut).int64 >>32), (DWORD)V_CY(&vOut).int64); } #define EXPECT_DECIMAL(valHi, valMid, valLo) EXPECT_OK { EXPECT_TYPE(VT_DECIMAL); \ ok((V_DECIMAL(&vOut).Hi32 == valHi) && (S1(U1(V_DECIMAL(&vOut))).Mid32 == valMid) && \ (S1(U1(V_DECIMAL(&vOut))).Lo32 == valLo), \ - "Expected decimal = %x/0x%x%08x, got %x/0x%x%08x\n", valHi, valMid, valLo, \ + "Expected decimal = %x/0x%x%08x, got %lx/0x%lx%08lx\n", valHi, valMid, valLo, \ V_DECIMAL(&vOut).Hi32, S1(U1(V_DECIMAL(&vOut))).Mid32, S1(U1(V_DECIMAL(&vOut))).Lo32); }
static void test_VarNumFromParseNum(void) @@ -2718,7 +2718,7 @@ static void test_UdateFromDate( int line, DATE dt, ULONG flags, HRESULT r, WORD ok_(__FILE__,line)(r == res && (res != S_OK || (ud.st.wYear == y && ud.st.wMonth == m && ud.st.wDay == d && ud.st.wHour == h && ud.st.wMinute == mn && ud.st.wSecond == s && ud.st.wMilliseconds == ms && ud.st.wDayOfWeek == dw && ud.wDayOfYear == dy)), - "%.16g expected res(%x) %d,%d,%d,%d,%d,%d,%d %d %d, got res(%x) %d,%d,%d,%d,%d,%d,%d %d %d\n", + "%.16g expected res(%lx) %d,%d,%d,%d,%d,%d,%d %d %d, got res(%lx) %d,%d,%d,%d,%d,%d,%d %d %d\n", dt, r, d, m, y, h, mn, s, ms, dw, dy, res, ud.st.wDay, ud.st.wMonth, ud.st.wYear, ud.st.wHour, ud.st.wMinute, ud.st.wSecond, ud.st.wMilliseconds, ud.st.wDayOfWeek, ud.wDayOfYear ); @@ -2777,7 +2777,7 @@ static void test_DateFromUDate( int line, WORD d, WORD m, WORD y, WORD h, WORD m ud.wDayOfYear = dy; res = pVarDateFromUdate(&ud, flags, &out); ok_(__FILE__,line)(r == res && (r != S_OK || EQ_DOUBLE(out, dt)), - "expected %x, %.16g, got %x, %.16g\n", r, dt, res, out); + "expected %lx, %.16g, got %lx, %.16g\n", r, dt, res, out); } #define UD2T(d,m,y,h,mn,s,ms,dw,dy,flags,r,dt) test_DateFromUDate(__LINE__,d,m,y,h,mn,s,ms,dw,dy,flags,r,dt)
@@ -3086,7 +3086,7 @@ static void test_VarAbs(void) if (vt == VT_I8 || vt == VT_UI8 || vt == VT_INT || vt == VT_UINT || vt == VT_I1 || vt == VT_UI2 || vt == VT_UI4) continue; - ok(hres == hExpected, "VarAbs: expected 0x%X, got 0x%X for vt %d | 0x%X\n", + ok(hres == hExpected, "VarAbs: expected 0x%lX, got 0x%lX for vt %d | 0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -3114,7 +3114,7 @@ static void test_VarAbs(void) memset(&vDst,0,sizeof(vDst)); hres = pVarAbs(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarAbs(CY): expected 0x0 got 0x%X\n", hres); + "VarAbs(CY): expected 0x0 got 0x%lX\n", hres); GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buff, ARRAY_SIZE(buff)); if (buff[1]) { @@ -3128,7 +3128,7 @@ static void test_VarAbs(void) memset(&vDst,0,sizeof(vDst)); hres = pVarAbs(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_R8 && V_R8(&vDst) == 1.1, - "VarAbs: expected 0x0,%d,%g, got 0x%X,%d,%g\n", VT_R8, 1.1, hres, V_VT(&vDst), V_R8(&vDst)); + "VarAbs: expected 0x0,%d,%g, got 0x%lX,%d,%g\n", VT_R8, 1.1, hres, V_VT(&vDst), V_R8(&vDst)); }
static HRESULT (WINAPI *pVarNot)(LPVARIANT,LPVARIANT); @@ -3193,7 +3193,7 @@ static void test_VarNot(void) }
hres = pVarNot(&v,&vDst); - ok(hres == hExpected, "VarNot: expected 0x%X, got 0x%X vt %d|0x%X\n", + ok(hres == hExpected, "VarNot: expected 0x%lX, got 0x%lX vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -3413,8 +3413,8 @@ static void test_VarSub(void) hres = pVarSub(&left, &right, &result);
ok(hres == expectedhres && V_VT(&result) == resvt, - "VarSub: %d|0x%X, %d|0x%X: Expected failure 0x%X, " - "got 0x%X, expected vt %d got vt %d\n", + "VarSub: %d|0x%X, %d|0x%X: Expected failure 0x%lX, " + "got 0x%lX, expected vt %d got vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], expectedhres, hres, resvt, V_VT(&result)); } @@ -3497,7 +3497,7 @@ static void test_Mod( int line, VARIANT *left, VARIANT *right, VARIANT *expected
memset( &result, 0, sizeof(result) ); hres = pVarMod( left, right, &result ); - ok_(__FILE__,line)( hres == expres, "wrong result %x/%x\n", hres, expres ); + ok_(__FILE__,line)( hres == expres, "wrong result %lx/%lx\n", hres, expres ); if (hres == S_OK) ok_(__FILE__,line)( is_expected_variant( &result, expected ), "got %s expected %s\n", variantstr(&result), variantstr(expected) ); @@ -3863,7 +3863,7 @@ static void test_VarMod(void) { hres = pVarMod(&v1,&v2,&vDst); ok(hres == hexpected, - "VarMod: expected 0x%x, got 0x%X for l type of %d, r type of %d,\n", hexpected, hres, l, r); + "VarMod: expected 0x%lx, got 0x%lX for l type of %d, r type of %d,\n", hexpected, hres, l, r); } } } @@ -3909,7 +3909,7 @@ static void test_VarMod(void) V_CY(&v2).int64 = 100000; hres = pVarMod(&v1,&v2,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst));
V_VT(&v1) = VT_I4; V_VT(&v2) = VT_CY; @@ -3917,7 +3917,7 @@ static void test_VarMod(void) V_CY(&v2).int64 = 100000; hres = pVarMod(&v1,&v2,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst));
/* some decimals */ V_VT(&v1) = VT_DECIMAL; @@ -3926,7 +3926,7 @@ static void test_VarMod(void) VarDecFromI4(10, &V_DECIMAL(&v2)); hres = pVarMod(&v1,&v2,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst));
V_VT(&v1) = VT_I4; V_VT(&v2) = VT_DECIMAL; @@ -3934,7 +3934,7 @@ static void test_VarMod(void) VarDecFromI4(10, &V_DECIMAL(&v2)); hres = pVarMod(&v1,&v2,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst));
VARMOD2(UINT,I4,100,10,I4,0,S_OK);
@@ -3947,7 +3947,7 @@ static void test_VarMod(void) V_I4(&vDst) = 1231; hres = pVarMod(&v1,&v2,&vDst); ok(hres == DISP_E_TYPEMISMATCH && V_VT(&vDst) == VT_EMPTY && V_I4(&vDst) == 1231, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", DISP_E_TYPEMISMATCH, VT_EMPTY, 1231, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", DISP_E_TYPEMISMATCH, VT_EMPTY, 1231, hres, V_VT(&vDst), V_I4(&vDst));
/* test some invalid types */ @@ -3988,7 +3988,7 @@ static void test_VarMod(void) V_I4(&v2)= 10; hres = pVarMod(&v1,&v2,&vDst); ok(hres == DISP_E_BADVARTYPE && V_VT(&vDst) == VT_EMPTY, - "VarMod: expected 0x%x,%d, got 0x%X,%d\n", DISP_E_BADVARTYPE, VT_EMPTY, hres, V_VT(&vDst)); + "VarMod: expected 0x%lx,%d, got 0x%lX,%d\n", DISP_E_BADVARTYPE, VT_EMPTY, hres, V_VT(&vDst));
SysFreeString(strNum0); SysFreeString(strNum1); @@ -4043,10 +4043,10 @@ static void test_VarFix(void) hres = pVarFix(&v,&vDst); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarFix: expected failure, got 0x%X vt %d|0x%X\n", + "VarFix: expected failure, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); else - ok(hres == S_OK, "VarFix: expected S_OK, got 0x%X vt %d|0x%X\n", + ok(hres == S_OK, "VarFix: expected S_OK, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); } } @@ -4075,13 +4075,13 @@ static void test_VarFix(void) V_VT(&v) = VT_EMPTY; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarFix: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, + "VarFix: expected 0x0,%d,0 got 0x%lX,%d,%d\n", VT_EMPTY, hres, V_VT(&vDst), V_I2(&vDst));
V_VT(&v) = VT_NULL; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarFix: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); + "VarFix: expected 0x0,%d got 0x%lX,%d\n", VT_NULL, hres, V_VT(&vDst));
V_VT(&v) = VT_DECIMAL; S(U(*pdec)).sign = DECIMAL_NEG; @@ -4091,7 +4091,7 @@ static void test_VarFix(void) S1(U1(*pdec)).Lo32 = 1; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&V_DECIMAL(&v), &V_DECIMAL(&vDst), sizeof(DECIMAL)), - "VarFix: expected 0x0,%d,identical, got 0x%X,%d\n", VT_DECIMAL, + "VarFix: expected 0x0,%d,identical, got 0x%lX,%d\n", VT_DECIMAL, hres, V_VT(&vDst));
/* FIXME: Test some fractional decimals when VarDecFix is implemented */ @@ -4100,13 +4100,13 @@ static void test_VarFix(void) pcy->int64 = -10000; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarFix: VT_CY wrong, hres=0x%X\n", hres); + "VarFix: VT_CY wrong, hres=0x%lX\n", hres);
V_VT(&v) = VT_CY; pcy->int64 = -16000; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarFix: VT_CY wrong, hres=0x%X\n", hres); + "VarFix: VT_CY wrong, hres=0x%lX\n", hres); }
static HRESULT (WINAPI *pVarInt)(LPVARIANT,LPVARIANT); @@ -4158,10 +4158,10 @@ static void test_VarInt(void) hres = pVarInt(&v,&vDst); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarInt: expected failure, got 0x%X vt %d|0x%X\n", + "VarInt: expected failure, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); else - ok(hres == S_OK, "VarInt: expected S_OK, got 0x%X vt %d|0x%X\n", + ok(hres == S_OK, "VarInt: expected S_OK, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); } } @@ -4190,13 +4190,13 @@ static void test_VarInt(void) V_VT(&v) = VT_EMPTY; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarInt: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, + "VarInt: expected 0x0,%d,0 got 0x%lX,%d,%d\n", VT_EMPTY, hres, V_VT(&vDst), V_I2(&vDst));
V_VT(&v) = VT_NULL; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarInt: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); + "VarInt: expected 0x0,%d got 0x%lX,%d\n", VT_NULL, hres, V_VT(&vDst));
V_VT(&v) = VT_DECIMAL; S(U(*pdec)).sign = DECIMAL_NEG; @@ -4206,7 +4206,7 @@ static void test_VarInt(void) S1(U1(*pdec)).Lo32 = 1; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&V_DECIMAL(&v), &V_DECIMAL(&vDst), sizeof(DECIMAL)), - "VarInt: expected 0x0,%d,identical, got 0x%X,%d\n", VT_DECIMAL, + "VarInt: expected 0x0,%d,identical, got 0x%lX,%d\n", VT_DECIMAL, hres, V_VT(&vDst));
/* FIXME: Test some fractional decimals when VarDecInt is implemented */ @@ -4215,13 +4215,13 @@ static void test_VarInt(void) pcy->int64 = -10000; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarInt: VT_CY wrong, hres=0x%X\n", hres); + "VarInt: VT_CY wrong, hres=0x%lX\n", hres);
V_VT(&v) = VT_CY; pcy->int64 = -11000; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -20000, - "VarInt: VT_CY wrong, hres=0x%X 0x%x%08x\n", + "VarInt: VT_CY wrong, hres=0x%lX 0x%lx%08lx\n", hres, (DWORD)(V_CY(&vDst).int64 >> 32), (DWORD)V_CY(&vDst).int64); }
@@ -4279,10 +4279,10 @@ static void test_VarNeg(void) hres = pVarNeg(&v,&vDst); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarNeg: expected failure, got 0x%X vt %d|0x%X\n", + "VarNeg: expected failure, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); else - ok(hres == S_OK, "VarNeg: expected S_OK, got 0x%X vt %d|0x%X\n", + ok(hres == S_OK, "VarNeg: expected S_OK, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); } } @@ -4315,13 +4315,13 @@ static void test_VarNeg(void) V_VT(&v) = VT_EMPTY; hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarNeg: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, + "VarNeg: expected 0x0,%d,0 got 0x%lX,%d,%d\n", VT_EMPTY, hres, V_VT(&vDst), V_I2(&vDst));
V_VT(&v) = VT_NULL; hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarNeg: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); + "VarNeg: expected 0x0,%d got 0x%lX,%d\n", VT_NULL, hres, V_VT(&vDst));
V_VT(&v) = VT_DECIMAL; S(U(*pdec)).sign = DECIMAL_NEG; @@ -4332,21 +4332,21 @@ static void test_VarNeg(void) hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && S(U(V_DECIMAL(&vDst))).sign == 0, - "VarNeg: expected 0x0,%d,0x00, got 0x%X,%d,%02x\n", VT_DECIMAL, + "VarNeg: expected 0x0,%d,0x00, got 0x%lX,%d,%02x\n", VT_DECIMAL, hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign);
S(U(*pdec)).sign = 0; hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && S(U(V_DECIMAL(&vDst))).sign == DECIMAL_NEG, - "VarNeg: expected 0x0,%d,0x7f, got 0x%X,%d,%02x\n", VT_DECIMAL, + "VarNeg: expected 0x0,%d,0x7f, got 0x%lX,%d,%02x\n", VT_DECIMAL, hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign);
V_VT(&v) = VT_CY; pcy->int64 = -10000; hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarNeg: VT_CY wrong, hres=0x%X\n", hres); + "VarNeg: VT_CY wrong, hres=0x%lX\n", hres); }
static HRESULT (WINAPI *pVarRound)(LPVARIANT,int,LPVARIANT); @@ -4358,7 +4358,7 @@ static void test_Round( int line, VARIANT *arg, int deci, VARIANT *expected )
memset( &result, 0, sizeof(result) ); hres = pVarRound( arg, deci, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); + ok_(__FILE__,line)( hres == S_OK, "wrong result %lx\n", hres ); if (hres == S_OK) ok_(__FILE__,line)( is_expected_variant( &result, expected ), "got %s expected %s\n", variantstr(&result), variantstr(expected) ); @@ -4472,13 +4472,13 @@ static void test_VarRound(void) V_VT(&v) = VT_EMPTY; hres = pVarRound(&v,0,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarRound: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, + "VarRound: expected 0x0,%d,0 got 0x%lX,%d,%d\n", VT_EMPTY, hres, V_VT(&vDst), V_I2(&vDst));
V_VT(&v) = VT_NULL; hres = pVarRound(&v,0,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarRound: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); + "VarRound: expected 0x0,%d got 0x%lX,%d\n", VT_NULL, hres, V_VT(&vDst));
/* VT_DECIMAL */ for (i = 0; i < ARRAY_SIZE(decimal_round_data); i++) @@ -4495,17 +4495,17 @@ static void test_VarRound(void) S1(U1(*pdec)).Lo32 = ptr->source.Lo32; VariantInit(&vDst); hres = pVarRound(&v, ptr->dec, &vDst); - ok(hres == S_OK, "%d: got 0x%08x\n", i, hres); + ok(hres == S_OK, "%d: got 0x%08lx\n", i, hres); if (hres == S_OK) { ok(V_VT(&vDst) == VT_DECIMAL, "%d: got VT %d, expected VT_DECIMAL\n", i, V_VT(&vDst)); ok(S(U(V_DECIMAL(&vDst))).sign == ptr->ret.sign, "%d: got sign 0x%02x, expected 0x%02x\n", i, S(U(V_DECIMAL(&vDst))).sign, ptr->ret.sign); - ok(V_DECIMAL(&vDst).Hi32 == ptr->ret.Hi32, "%d: got Hi32 %d, expected %d\n", + ok(V_DECIMAL(&vDst).Hi32 == ptr->ret.Hi32, "%d: got Hi32 %ld, expected %ld\n", i, V_DECIMAL(&vDst).Hi32, ptr->ret.Hi32); - ok(S1(U1(V_DECIMAL(&vDst))).Mid32 == ptr->ret.Mid32, "%d: got Mid32 %d, expected %d\n", + ok(S1(U1(V_DECIMAL(&vDst))).Mid32 == ptr->ret.Mid32, "%d: got Mid32 %ld, expected %ld\n", i, S1(U1(V_DECIMAL(&vDst))).Mid32, ptr->ret.Mid32); - ok(S1(U1(V_DECIMAL(&vDst))).Lo32 == ptr->ret.Lo32, "%d: got Lo32 %d, expected %d\n", + ok(S1(U1(V_DECIMAL(&vDst))).Lo32 == ptr->ret.Lo32, "%d: got Lo32 %ld, expected %ld\n", i, S1(U1(V_DECIMAL(&vDst))).Lo32, ptr->ret.Lo32); } } @@ -4515,7 +4515,7 @@ static void test_VarRound(void) pcy->int64 = 10000; hres = pVarRound(&v,0,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarRound: VT_CY wrong, hres=0x%X\n", hres); + "VarRound: VT_CY wrong, hres=0x%lX\n", hres);
}
@@ -4633,12 +4633,12 @@ static void test_VarXor(void) hres = pVarXor(&left, &right, &result); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarXor: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarXor: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); else ok(hres == S_OK && V_VT(&result) == resvt, - "VarXor: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarXor: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -5367,12 +5367,12 @@ static void test_VarOr(void) hres = pVarOr(&left, &right, &result); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarOr: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarOr: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); else ok(hres == S_OK && V_VT(&result) == resvt, - "VarOr: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarOr: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -6098,12 +6098,12 @@ static void test_VarEqv(void) hres = pVarEqv(&left, &right, &result); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarEqv: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarEqv: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); else ok(hres == S_OK && V_VT(&result) == resvt, - "VarEqv: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarEqv: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -6235,12 +6235,12 @@ static void test_VarMul(void) hres = pVarMul(&left, &right, &result); if (bFail) { ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarMul: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarMul: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); } else { ok(hres == S_OK && V_VT(&result) == resvt, - "VarMul: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarMul: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -6413,12 +6413,12 @@ static void test_VarAdd(void) hres = pVarAdd(&left, &right, &result); if (bFail) { ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarAdd: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarAdd: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); } else { ok(hres == S_OK && V_VT(&result) == resvt, - "VarAdd: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarAdd: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -6639,7 +6639,7 @@ static void test_VarCat(void)
/* Determine the error code for the vt combination */ ok(hres == expected_error_num, - "VarCat: %d, %d returned error, 0x%X expected 0x%X.\n", + "VarCat: %d, %d returned error, 0x%lX expected 0x%lX.\n", leftvt, rightvt, hres, expected_error_num);
/* Check types are correct */ @@ -6663,7 +6663,7 @@ static void test_VarCat(void) V_BSTR(&right) = SysAllocString(sz34); V_BSTR(&expected) = SysAllocString(sz1234); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ, "VarCat: VT_BSTR concat with VT_BSTR failed to return correct result\n"); @@ -6677,7 +6677,7 @@ static void test_VarCat(void) V_VT(&right) = VT_BSTR; V_BSTR(&right) = SysAllocString(sz1234); hres = pVarCat(&left,&right,&result); - ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08lx\n", hres); ok(V_VT(&result) == VT_EMPTY, "VarCat: VT_ERROR concat with VT_BSTR should have returned VT_EMPTY\n");
@@ -6689,7 +6689,7 @@ static void test_VarCat(void) V_VT(&right) = VT_ERROR; V_BSTR(&left) = SysAllocString(sz1234); hres = pVarCat(&left,&right,&result); - ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08lx\n", hres); ok(V_VT(&result) == VT_EMPTY, "VarCat: VT_BSTR concat with VT_ERROR should have returned VT_EMPTY\n");
@@ -6706,11 +6706,11 @@ static void test_VarCat(void) V_BOOL(&right) = TRUE; V_BSTR(&expected) = SysAllocString(sz12_true); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) { hres = pVarCmp(&result,&expected,lcid,0); - ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08x for %s, %s\n", + ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08lx for %s, %s\n", hres, variantstr(&result), variantstr(&expected)); }
@@ -6726,11 +6726,11 @@ static void test_VarCat(void) V_BOOL(&right) = FALSE; V_BSTR(&expected) = SysAllocString(sz12_false); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) { hres = pVarCmp(&result,&expected,lcid,0); - ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08x for %s, %s\n", + ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08lx for %s, %s\n", hres, variantstr(&result), variantstr(&expected)); }
@@ -6747,7 +6747,7 @@ static void test_VarCat(void) V_INT(&right) = 34; V_BSTR(&expected) = SysAllocString(sz1234); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ, "VarCat: NUMBER concat with NUMBER returned incorrect result\n"); @@ -6762,7 +6762,7 @@ static void test_VarCat(void) V_INT(&left) = 12; V_BSTR(&right) = SysAllocString(sz34); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ, "VarCat: NUMBER concat with VT_BSTR, incorrect result\n"); @@ -6776,7 +6776,7 @@ static void test_VarCat(void) V_BSTR(&left) = SysAllocString(sz12); V_INT(&right) = 34; hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ, "VarCat: VT_BSTR concat with NUMBER, incorrect result\n"); @@ -6796,7 +6796,7 @@ static void test_VarCat(void) V_BSTR(&expected)= SysAllocString(sz12_date); V_BSTR(&expected_broken)= SysAllocString(sz12_date_broken); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ || broken(pVarCmp(&result,&expected_broken,lcid,0) == VARCMP_EQ), /* Some W98 and NT4 (intermittent) */ @@ -6817,7 +6817,7 @@ static void test_VarCat(void) V_BSTR(&expected)= SysAllocString(date_sz12); V_BSTR(&expected_broken)= SysAllocString(date_sz12_broken); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ || broken(pVarCmp(&result,&expected_broken,lcid,0) == VARCMP_EQ), /* Some W98 and NT4 (intermittent) */ @@ -6837,7 +6837,7 @@ static void test_VarCat(void) V_BSTR(&right) = SysAllocString(sz_empty); V_BSTR(&expected)= SysAllocString(sz_empty); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&left,lcid,0) == VARCMP_EQ, "VarCat: EMPTY concat with EMPTY did not return empty VT_BSTR\n"); @@ -6857,7 +6857,7 @@ static void test_VarCat(void)
SET_EXPECT(dispatch_invoke); hres = VarCat(&left, &right, &result); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(V_VT(&result) == VT_BSTR, "got %d\n", V_VT(&result)); ok(SysStringLen(V_BSTR(&result)) == 0, "got %d\n", SysStringLen(V_BSTR(&result))); CHECK_CALLED(dispatch_invoke); @@ -6872,7 +6872,7 @@ static void test_VarCat(void)
SET_EXPECT(dispatch_invoke); hres = VarCat(&left, &right, &result); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(V_VT(&result) == VT_BSTR, "got %d\n", V_VT(&result)); ok(SysStringLen(V_BSTR(&result)) == 0, "got %d\n", SysStringLen(V_BSTR(&result))); CHECK_CALLED(dispatch_invoke); @@ -6889,7 +6889,7 @@ static void test_VarCat(void) V_BSTR(&left) = SysAllocString(sz12); SET_EXPECT(dispatch_invoke); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); CHECK_CALLED(dispatch_invoke); ok(!lstrcmpW(V_BSTR(&result), L"1234"), "got %s\n", wine_dbgstr_w(V_BSTR(&result)));
@@ -6904,7 +6904,7 @@ static void test_VarCat(void)
SET_EXPECT(dispatch_invoke); hres = VarCat(&left, &right, &result); - ok(hres == E_OUTOFMEMORY, "got 0x%08x\n", hres); + ok(hres == E_OUTOFMEMORY, "got 0x%08lx\n", hres); CHECK_CALLED(dispatch_invoke);
VariantClear(&left); @@ -6918,7 +6918,7 @@ static void test_VarCat(void)
SET_EXPECT(dispatch_invoke); hres = VarCat(&left, &right, &result); - ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08lx\n", hres); CHECK_CALLED(dispatch_invoke);
VariantClear(&left); @@ -6931,7 +6931,7 @@ static void test_VarCat(void) V_VT(&right) = VT_BSTR; V_BSTR(&right) = SysAllocStringLen(NULL,0); hres = pVarCat(&left, &right, &result); - ok(hres == S_OK, "VarCat failed: %08x\n", hres); + ok(hres == S_OK, "VarCat failed: %08lx\n", hres); VariantClear(&right);
cmp = lstrcmpW(V_BSTR(&result), L"True"); @@ -6940,13 +6940,13 @@ static void test_VarCat(void) V_VT(&right) = VT_BOOL; V_BOOL(&right) = 100; hres = pVarCat(&left, &right, &result); - ok(hres == S_OK, "VarCat failed: %08x\n", hres); + ok(hres == S_OK, "VarCat failed: %08lx\n", hres); test_bstr_var(&result, L"TrueTrue"); VariantClear(&result);
V_BOOL(&right) = VARIANT_FALSE; hres = pVarCat(&left, &right, &result); - ok(hres == S_OK, "VarCat failed: %08x\n", hres); + ok(hres == S_OK, "VarCat failed: %08lx\n", hres); test_bstr_var(&result, L"TrueFalse"); VariantClear(&result); }else { @@ -7069,12 +7069,12 @@ static void test_VarAnd(void) /* Check expected HRESULT and if result variant type is correct */ if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarAnd: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarAnd: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarAnd: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarAnd: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -7638,7 +7638,7 @@ static void test_cmp( int line, LCID lcid, UINT flags, VARIANT *left, VARIANT *r CHECKPTR(VarCmp);
hres = pVarCmp(left,right,lcid,flags); - ok_(__FILE__,line)(hres == result, "VarCmp(%s,%s): expected 0x%x, got hres=0x%x\n", + ok_(__FILE__,line)(hres == result, "VarCmp(%s,%s): expected 0x%lx, got hres=0x%lx\n", variantstr(left), variantstr(right), result, hres ); } static void test_cmpex( int line, LCID lcid, VARIANT *left, VARIANT *right, @@ -7779,11 +7779,11 @@ static void test_VarCmp(void) hres = pVarCmp(&left, &right, LOCALE_USER_DEFAULT, 0); if (bFail) { ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarCmp: %d|0x%X, %d|0x%X: Expected failure, got 0x%X\n", + "VarCmp: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres); } else { ok(hres == expect, - "VarCmp: %d|0x%X, %d|0x%X: Expected 0x%X, got 0x%X\n", + "VarCmp: %d|0x%X, %d|0x%X: Expected 0x%lX, got 0x%lX\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], expect, hres); } @@ -8005,12 +8005,12 @@ static void test_VarPow(void) /* Check expected HRESULT and if result variant type is correct */ if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarPow: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarPow: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarPow: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarPow: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -8371,7 +8371,7 @@ static void test_VarPow(void)
hres = pVarPow(&cy, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); @@ -8380,7 +8380,7 @@ static void test_VarPow(void) if (hres == S_OK) { ok(V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(EQ_DOUBLE(V_R8(&result), 4.0), "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); @@ -8388,27 +8388,27 @@ static void test_VarPow(void) else { ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, - "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_EMPTY, got hres 0x%lX type %s!\n", DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); }
hres = pVarPow(&left, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 10000.0), "VARPOW: CY value %f, expected %f\n", V_R8(&result), 10000.0);
hres = pVarPow(&left, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && EQ_DOUBLE(V_R8(&result),10000.0), "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 10000.0);
hres = pVarPow(&dec, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); @@ -8417,7 +8417,7 @@ static void test_VarPow(void) if (hres == S_OK) { ok(V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(EQ_DOUBLE(V_R8(&result), 4.0), "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); @@ -8425,7 +8425,7 @@ static void test_VarPow(void) else { ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, - "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_EMPTY, got hres 0x%lX type %s!\n", DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); }
@@ -8577,12 +8577,12 @@ static void test_VarDiv(void) if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH || hres == DISP_E_OVERFLOW || hres == DISP_E_DIVBYZERO, - "VarDiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarDiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarDiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarDiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -8793,7 +8793,7 @@ static void test_VarDiv(void) V_I4(&right) = 0; hres = pVarDiv(&left, &right, &result); ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARDIV: Division by (1.0/0.0) should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); + "VARDIV: Division by (1.0/0.0) should result in DISP_E_DIVBYZERO but got 0x%lX\n", hres);
V_VT(&left) = VT_R8; V_I4(&left) = 0; @@ -8801,7 +8801,7 @@ static void test_VarDiv(void) V_I4(&right) = 0; hres = pVarDiv(&left, &right, &result); ok(hres == DISP_E_OVERFLOW && V_VT(&result) == VT_EMPTY, - "VARDIV: Division by (0.0/0.0) should result in DISP_E_OVERFLOW but got 0x%X\n", hres); + "VARDIV: Division by (0.0/0.0) should result in DISP_E_OVERFLOW but got 0x%lX\n", hres);
SysFreeString(num1_str); SysFreeString(num2_str); @@ -8954,12 +8954,12 @@ static void test_VarIdiv(void) if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH || hres == DISP_E_DIVBYZERO, - "VarIdiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarIdiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarIdiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarIdiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -9303,51 +9303,51 @@ static void test_VarIdiv(void)
hres = pVarIdiv(&cy, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == 1, - "VARIDIV: CY value %d, expected %d\n", V_I4(&result), 1); + "VARIDIV: CY value %ld, expected %d\n", V_I4(&result), 1);
if (has_i8) { hres = pVarIdiv(&cy, &right, &result); ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIDIV: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I8(&result) == 5000, - "VARIDIV: CY value 0x%x%08x, expected 0x%x\n", + "VARIDIV: CY value 0x%lx%08lx, expected 0x%x\n", (DWORD)(V_I8(&result) >>32), (DWORD)V_I8(&result), 5000); }
hres = pVarIdiv(&left, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == 0, - "VARIDIV: CY value %d, expected %d\n", V_I4(&result), 0); + "VARIDIV: CY value %ld, expected %d\n", V_I4(&result), 0);
hres = pVarIdiv(&left, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == 50, - "VARIDIV: DECIMAL value %d, expected %d\n", V_I4(&result), 50); + "VARIDIV: DECIMAL value %ld, expected %d\n", V_I4(&result), 50);
hres = pVarIdiv(&dec, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == 1, - "VARIDIV: DECIMAL value %d, expected %d\n", V_I4(&result), 1); + "VARIDIV: DECIMAL value %ld, expected %d\n", V_I4(&result), 1);
if (has_i8) { hres = pVarIdiv(&dec, &right, &result); ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIDIV: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I8(&result) == 1, - "VARIDIV: DECIMAL value 0x%x%08x, expected %d\n", + "VARIDIV: DECIMAL value 0x%lx%08lx, expected %d\n", (DWORD)(V_I8(&result) >> 32), (DWORD)V_I8(&result), 1); }
@@ -9358,7 +9358,7 @@ static void test_VarIdiv(void) V_I4(&right) = 0; hres = pVarIdiv(&left, &right, &result); ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); + "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%lX\n", hres);
V_VT(&left) = VT_INT; V_I4(&left) = 0; @@ -9366,7 +9366,7 @@ static void test_VarIdiv(void) V_I4(&right) = 0; hres = pVarIdiv(&left, &right, &result); ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); + "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%lX\n", hres);
SysFreeString(num1_str); SysFreeString(num2_str); @@ -9519,12 +9519,12 @@ static void test_VarImp(void) /* Check expected HRESULT and if result variant type is correct */ if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarImp: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarImp: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarImp: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarImp: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -9883,51 +9883,51 @@ static void test_VarImp(void)
hres = pVarImp(&cy, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: CY value %d, expected %d\n", V_I4(&result), -1); + "VARIMP: CY value %ld, expected %d\n", V_I4(&result), -1);
if (has_i8) { hres = pVarImp(&cy, &right, &result); ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIMP: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I8(&result) == -2, - "VARIMP: CY value %x%08x, expected %d\n", + "VARIMP: CY value %lx%08lx, expected %d\n", (DWORD)((V_I8(&result)) >> 32), (DWORD)(V_I8(&result)), -2); }
hres = pVarImp(&left, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: CY value %d, expected %d\n", V_I4(&result), -1); + "VARIMP: CY value %ld, expected %d\n", V_I4(&result), -1);
hres = pVarImp(&left, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: DECIMAL value %d, expected %d\n", V_I4(&result), -1); + "VARIMP: DECIMAL value %ld, expected %d\n", V_I4(&result), -1);
hres = pVarImp(&dec, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: DECIMAL value %d, expected %d\n", V_I4(&result), -1); + "VARIMP: DECIMAL value %ld, expected %d\n", V_I4(&result), -1);
if (has_i8) { hres = pVarImp(&dec, &right, &result); ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIMP: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I8(&result) == -3, - "VARIMP: DECIMAL value 0x%x%08x, expected %d\n", + "VARIMP: DECIMAL value 0x%lx%08lx, expected %d\n", (DWORD)(V_I8(&result) >>32), (DWORD)V_I8(&result), -3); }
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index c368c5129bb..7a860e411db 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -69,7 +69,7 @@ static BOOL has_locales; /* Macros for converting and testing results */ #define CONVVARS(typ) HRESULT hres; CONV_TYPE out; typ in
-#define _EXPECT_NO_OUT(res) ok(hres == res, "expected " #res ", got hres=0x%08x\n", hres) +#define _EXPECT_NO_OUT(res) ok(hres == res, "expected " #res ", got hres=%#08lx\n", hres) #define EXPECT_OVERFLOW _EXPECT_NO_OUT(DISP_E_OVERFLOW) #define EXPECT_MISMATCH _EXPECT_NO_OUT(DISP_E_TYPEMISMATCH) #define EXPECT_BADVAR _EXPECT_NO_OUT(DISP_E_BADVARTYPE) @@ -79,12 +79,12 @@ static BOOL has_locales; #define EXPECT_EQ _EXPECT_NO_OUT(VARCMP_EQ)
#define _EXPECTRES(res, x, fs) \ - ok(hres == S_OK && out == (CONV_TYPE)(x), "expected " #x ", got " fs "; hres=0x%08x\n", out, hres) + ok(hres == S_OK && out == (CONV_TYPE)(x), "expected " #x ", got " fs "; hres=%#08lx\n", out, hres) #define EXPECT(x) EXPECTRES(S_OK, (x)) #define EXPECT_DBL(x) \ - ok(hres == S_OK && EQ_DOUBLE(out, (x)), "expected %.16g, got %.16g; hres=0x%08x\n", (x), out, hres) + ok(hres == S_OK && EQ_DOUBLE(out, (x)), "expected %.16g, got %.16g; hres=%#08lx\n", (x), out, hres) #define EXPECT_DBL2(new,old) \ - ok(hres == S_OK && (EQ_DOUBLE(out, (new)) || broken(EQ_DOUBLE(out, (old)))), "expected %.16g or %.16g, got %.16g; hres=0x%08x\n", (new), (old), out, hres) + ok(hres == S_OK && (EQ_DOUBLE(out, (new)) || broken(EQ_DOUBLE(out, (old)))), "expected %.16g or %.16g, got %.16g; hres=%#08lx\n", (new), (old), out, hres)
#define CONVERT(func, val) in = val; hres = func(in, &out) #define CONVERTRANGE(func,start,end) for (i = start; i < end; i+=1) { CONVERT(func, i); EXPECT(i); }; @@ -128,25 +128,25 @@ static BOOL has_locales; V_VT(&vSrc) = vt; srcval = in; \ hres = VariantCopy(&vDst, &vSrc); \ ok(hres == S_OK && V_VT(&vDst) == vt && dstval == in, \ - "copy hres 0x%X, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \ + "copy hres %#lX, 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%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, dstref); \ + "ref hres %#lX, 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%X, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \ + "ind hres %#lX, 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%X, type=%d (should be %d(" #typ ")), value=" fs " (should be " fs ")\n", \ + "hres=%#lX, 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%X, type=%d (should be %d(" #typ ")), value=%d (should be 1)\n", \ + "hres=%#lX, type=%d (should be %d(" #typ ")), value=%d (should be 1)\n", \ hres, V_VT(&vDst), typ, (int)res); #define BADVAR(typ) CHANGETYPEEX(typ); EXPECT_BADVAR #define MISMATCH(typ) CHANGETYPEEX(typ); EXPECT_MISMATCH @@ -203,31 +203,31 @@ static BOOL has_locales; 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%X, type=%d (should be VT_BOOL), value %d (should be VARIANT_TRUE)\n", \ + "->VT_BOOL hres=0x%lX, type=%d (should be VT_BOOL), value %d (should be VARIANT_TRUE)\n", \ hres, V_VT(&vDst), V_BOOL(&vDst)); \ 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%X, type=%d (should be VT_CY), value (%08x,%08x) (should be CY_MULTIPLIER)\n", \ + "->VT_CY hres=0x%lX, type=%d (should be VT_CY), value (%08lx,%08lx) (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) \ { \ 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%X, type=%d (should be VT_BSTR), *bstr='%c'\n", \ + "->VT_BSTR hres=0x%lX, type=%d (should be VT_BSTR), *bstr='%c'\n", \ hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?'); \ } \ hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_DECIMAL); \ 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%X, type=%d (should be VT_DECIMAL), sign=%d, scale=%d, hi=%u, lo=(%8x %8x),\n", \ + "->VT_DECIMAL hres=0x%lX, type=%d (should be VT_DECIMAL), sign=%d, scale=%d, hi=%lu, lo=(%8lx %8lx),\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%X, type=%d (should be VT_EMPTY)\n", hres, V_VT(&vDst)); \ + 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)); \ hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_NULL); \ - 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)); \ + 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)); \ MISMATCH(VT_DISPATCH); \ MISMATCH(VT_ERROR); \ MISMATCH(VT_UNKNOWN); \ @@ -359,7 +359,7 @@ static HRESULT WINAPI DummyDispatch_Invoke(IDispatch *iface,
CHECK_EXPECT(dispatch_invoke);
- ok(dispid == DISPID_VALUE, "got dispid %d\n", dispid); + ok(dispid == DISPID_VALUE, "got dispid %ld\n", dispid); ok(IsEqualIID(riid, &IID_NULL), "go riid %s\n", wine_dbgstr_guid(riid)); ok(wFlags == DISPATCH_PROPERTYGET, "Flags wrong\n");
@@ -890,7 +890,7 @@ static void test_VarUI1FromDisp(void) SET_EXPECT(dispatch_invoke); out = 10; hres = VarUI1FromDisp(&dispatch.IDispatch_iface, in, &out); - ok(broken(hres == DISP_E_BADVARTYPE) || hres == S_OK, "got 0x%08x\n", hres); + ok(broken(hres == DISP_E_BADVARTYPE) || hres == S_OK, "got 0x%08lx\n", hres); ok(broken(out == 10) || out == 1, "got %d\n", out); CHECK_CALLED(dispatch_invoke);
@@ -898,7 +898,7 @@ static void test_VarUI1FromDisp(void) V_VT(&vDst) = VT_EMPTY; V_UI1(&vDst) = 0; hres = VariantChangeTypeEx(&vDst, &vSrc, in, 0, VT_UI1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(V_VT(&vDst) == VT_UI1, "got %d\n", V_VT(&vDst)); ok(V_UI1(&vDst) == 1, "got %d\n", V_UI1(&vDst)); CHECK_CALLED(dispatch_invoke); @@ -908,14 +908,14 @@ static void test_VarUI1FromDisp(void) SET_EXPECT(dispatch_invoke); out = 10; hres = VarUI1FromDisp(&dispatch.IDispatch_iface, in, &out); - ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08lx\n", hres); ok(out == 10, "got %d\n", out); CHECK_CALLED(dispatch_invoke);
SET_EXPECT(dispatch_invoke); V_VT(&vDst) = VT_EMPTY; hres = VariantChangeTypeEx(&vDst, &vSrc, in, 0, VT_UI1); - ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08lx\n", hres); ok(V_VT(&vDst) == VT_EMPTY, "got %d\n", V_VT(&vDst)); CHECK_CALLED(dispatch_invoke); } @@ -1418,7 +1418,7 @@ static void test_VarUI2ChangeTypeEx(void) #undef CONV_TYPE #define CONV_TYPE LONG #undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d") +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%ld")
static void test_VarI4FromI1(void) { @@ -1632,7 +1632,7 @@ static void test_VarI4FromStr(void)
static void test_VarI4Copy(void) { - COPYTEST(1, VT_I4, V_I4(&vSrc), V_I4(&vDst), V_I4REF(&vSrc), V_I4REF(&vDst), "%d"); + COPYTEST(1l, VT_I4, V_I4(&vSrc), V_I4(&vDst), V_I4REF(&vSrc), V_I4REF(&vDst), "%ld"); }
static void test_VarI4ChangeTypeEx(void) @@ -1643,15 +1643,15 @@ static void test_VarI4ChangeTypeEx(void)
in = 1;
- INITIAL_TYPETEST(VT_I4, V_I4, "%d"); + INITIAL_TYPETEST(VT_I4, V_I4, "%ld"); COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_I4, V_I4, "%d", VT_UI4, V_UI4); + NEGATIVE_TYPETEST(VT_I4, V_I4, "%ld", VT_UI4, V_UI4); }
#undef CONV_TYPE #define CONV_TYPE ULONG #undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%u") +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%lu")
static void test_VarUI4FromI1(void) { @@ -1854,7 +1854,7 @@ static void test_VarUI4FromStr(void)
static void test_VarUI4Copy(void) { - COPYTEST(1u, VT_UI4, V_UI4(&vSrc), V_UI4(&vDst), V_UI4REF(&vSrc), V_UI4REF(&vDst), "%u"); + COPYTEST(1lu, VT_UI4, V_UI4(&vSrc), V_UI4(&vDst), V_UI4REF(&vSrc), V_UI4REF(&vDst), "%lu"); }
static void test_VarUI4ChangeTypeEx(void) @@ -1865,9 +1865,9 @@ static void test_VarUI4ChangeTypeEx(void)
in = 1;
- INITIAL_TYPETEST(VT_UI4, V_UI4, "%u"); + INITIAL_TYPETEST(VT_UI4, V_UI4, "%lu"); COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_UI4, V_UI4, "%u", VT_I4, V_I4); + NEGATIVE_TYPETEST(VT_UI4, V_UI4, "%lu", VT_I4, V_I4); }
/* @@ -3118,7 +3118,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%X, type=%d (should be VT_BSTR), *bstr=%s\n", + "hres=0x%lX, type=%d (should be VT_BSTR), *bstr=%s\n", hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?"); VariantClear(&vDst);
@@ -3127,7 +3127,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%X, type=%d (should be VT_BSTR), *bstr=%s\n", + "hres=0x%lX, type=%d (should be VT_BSTR), *bstr=%s\n", hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?"); VariantClear(&vDst); } @@ -3142,11 +3142,11 @@ static void test_VarDateChangeTypeEx(void)
#define EXPECTCY(x) \ ok((hres == S_OK && out.int64 == (LONGLONG)(x*CY_MULTIPLIER)), \ - "expected " #x "*CY_MULTIPLIER, got (%8x %8x); hres=0x%08x\n", S(out).Hi, S(out).Lo, hres) + "expected " #x "*CY_MULTIPLIER, got (%8lx %8lx); hres=0x%08lx\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 " (%u,%u), got (%u,%u); hres=0x%08x\n", \ + "expected " #x " " #y " (%lu,%lu), got (%lu,%lu); hres=0x%08lx\n", \ (ULONG)(x), (ULONG)(y), S(out).Hi, S(out).Lo, hres)
static void test_VarCyFromI1(void) @@ -3618,7 +3618,7 @@ static void test_VarCyInt(void) #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,(%x %x)), got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ + "expected (%d,%d,%d,(%lx %lx)), got (%d,%d,%ld,(%lx %lx)) hres 0x%08lx\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)
@@ -3626,14 +3626,14 @@ 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,(%x %x)), got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ + "expected (%d,%d,%d,(%lx %lx)), got (%d,%d,%ld,(%lx %lx)) hres 0x%08lx\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)
/* expect either a positive or negative zero */ #define EXPECTDECZERO() ok(hres == S_OK && S(U(out)).scale == 0 && \ (S(U(out)).sign == 0 || S(U(out)).sign == 0x80) && out.Hi32 == 0 && U1(out).Lo64 == 0, \ - "expected zero, got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ + "expected zero, got (%d,%d,%ld,(%lx %lx)) hres 0x%08lx\n", \ S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres)
#define EXPECTDECI if (i < 0) EXPECTDEC(0, 0x80, 0, -i); else EXPECTDEC(0, 0, 0, i) @@ -3887,14 +3887,14 @@ 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,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC64(l,1,0,0xffffffff,0xffffffff,0xffffffff);SETDEC(r,1,0,0,1); MATH2(VarDecAdd); EXPECTDEC64(0,0,0x19999999,0x99999999,0x9999999A);
SETDEC64(l,0,0,0xe22ea493,0xb30310a7,0x70000000);SETDEC64(r,0,0,0xe22ea493,0xb30310a7,0x70000000); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC64(l,1,0,0xe22ea493,0xb30310a7,0x70000000);SETDEC64(r,1,0,0xe22ea493,0xb30310a7,0x70000000); MATH2(VarDecAdd); @@ -3904,15 +3904,15 @@ static void test_VarDecAdd(void) MATH2(VarDecAdd); EXPECTDEC64(0,0,-1,0xFFFFFFFF,0xFFFFFF84);
SETDEC(l,3,0,0,123456); SETDEC64(r,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC(l,4,0,0,123456); SETDEC64(r,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC(l,5,0,0,123456); SETDEC64(r,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC(l,6,0,0,123456); SETDEC64(r,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); @@ -3971,7 +3971,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,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\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); @@ -3980,7 +3980,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,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\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); @@ -4030,10 +4030,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,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\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,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
} @@ -4436,7 +4436,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%X, type=%d (should be VT_BSTR), *bstr='%c'\n", \ + "hres=0x%lX, type=%d (should be VT_BSTR), *bstr='%c'\n", \ hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?'); \ VariantClear(&vDst)
@@ -4495,7 +4495,7 @@ static void test_VarBstrFromI4(void)
value = -2147483648; hres = VarBstrFromI4(value, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, int_min, sizeof(int_min)) == 0, "string different\n"); @@ -4504,7 +4504,7 @@ static void test_VarBstrFromI4(void)
value = -42; hres = VarBstrFromI4(value, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, minus_42, sizeof(minus_42)) == 0, "string different\n"); @@ -4529,7 +4529,7 @@ static void test_VarBstrFromR4(void) lcid_spanish = MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH), SORT_DEFAULT); f = 654322.23456f; hres = VarBstrFromR4(f, lcid, 0, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, szNative, sizeof(szNative)) == 0, "string different\n"); @@ -4538,7 +4538,7 @@ static void test_VarBstrFromR4(void)
f = -0.0; hres = VarBstrFromR4(f, lcid, 0, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { if (bstr[0] == '-') @@ -4551,7 +4551,7 @@ static void test_VarBstrFromR4(void) /* The following tests that lcid is used for decimal separator even without LOCALE_USE_NLS */ f = 0.5; hres = VarBstrFromR4(f, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, szOneHalf_English, sizeof(szOneHalf_English)) == 0, "English locale failed (got %s)\n", wtoascii(bstr)); @@ -4559,7 +4559,7 @@ static void test_VarBstrFromR4(void) } f = 0.5; hres = VarBstrFromR4(f, lcid_spanish, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, szOneHalf_Spanish, sizeof(szOneHalf_Spanish)) == 0, "Spanish locale failed (got %s)\n", wtoascii(bstr)); @@ -4583,7 +4583,7 @@ static void _BSTR_DATE(DATE dt, const char *str, int line) else buff[0] = 0; ok_(__FILE__, line)(hres == S_OK && !strcmp(str, buff), - "Expected '%s', got '%s', hres = 0x%08x\n", str, buff, hres); + "Expected '%s', got '%s', hres = 0x%08lx\n", str, buff, hres); }
static void test_VarBstrFromDate(void) @@ -4614,7 +4614,7 @@ static void _BSTR_CY(LONG a, LONG b, const char *str, LCID lcid, int line) S(l).Lo = b; S(l).Hi = a; hr = VarBstrFromCy(l, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hr == S_OK, "got hr 0x%08x\n", hr); + ok(hr == S_OK, "got hr 0x%08lx\n", hr);
if(bstr) { @@ -4665,7 +4665,7 @@ static void _BSTR_DEC(BYTE scale, BYTE sign, ULONG hi, ULONG mid, ULONGLONG lo,
SETDEC64(dec, scale, sign, hi, mid, lo); hr = VarBstrFromDec(&dec, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok_(__FILE__, line)(hr == S_OK, "got hr 0x%08x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "got hr 0x%08lx\n", hr);
if(bstr) { @@ -4739,7 +4739,7 @@ static void test_VarBstrFromDec(void)
#define _VARBSTRCMP(left,right,lcid,flags,result) \ hres = VarBstrCmp(left,right,lcid,flags); \ - ok(hres == result, "VarBstrCmp: expected " #result ", got hres=0x%x\n", hres) + ok(hres == result, "VarBstrCmp: expected " #result ", got hres=%#lx\n", hres) #define VARBSTRCMP(left,right,flags,result) \ _VARBSTRCMP(left,right,lcid,flags,result)
@@ -4872,7 +4872,7 @@ static void test_SysAllocString(void) DWORD_PTR p = (DWORD_PTR)str; int align = sizeof(void *);
- ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); ok ((p & ~(align-1)) == p, "Not aligned to %d\n", align); SysFreeString(str); @@ -4897,7 +4897,7 @@ static void test_SysAllocStringLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 0, "Expected 0, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 0, "Expected 0, got %ld\n", bstr->dwLen); ok (!bstr->szString[0], "String not empty\n"); SysFreeString(str); } @@ -4908,7 +4908,7 @@ static void test_SysAllocStringLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); SysFreeString(str); } @@ -4937,7 +4937,7 @@ static void test_SysAllocStringByteLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 0, "Expected 0, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 0, "Expected 0, got %ld\n", bstr->dwLen); ok (!bstr->szString[0], "String not empty\n"); SysFreeString(str); } @@ -4948,7 +4948,7 @@ static void test_SysAllocStringByteLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 4, "Expected 4, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 4, "Expected 4, got %ld\n", bstr->dwLen); ok (!lstrcmpA((LPCSTR)bstr->szString, szTestA), "String different\n"); SysFreeString(str); } @@ -4961,7 +4961,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 %d\n", bstr->dwLen); + ok (bstr->dwLen == 3, "Expected 3, got %ld\n", bstr->dwLen); ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n"); ok (!bstr->szString[2], "String not terminated\n"); SysFreeString(str); @@ -4973,7 +4973,7 @@ static void test_SysAllocStringByteLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); SysFreeString(str); } @@ -4988,7 +4988,7 @@ static void test_SysAllocStringByteLen(void) str = SysAllocStringByteLen(NULL, i); ok (str != NULL, "Expected non-NULL\n"); bstr = Get(str); - ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen); + ok (bstr->dwLen == i, "Expected %d, got %ld\n", i, bstr->dwLen); ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n"); SysFreeString(str);
@@ -4996,7 +4996,7 @@ static void test_SysAllocStringByteLen(void) str = SysAllocStringByteLen(buf, i); ok (str != NULL, "Expected non-NULL\n"); bstr = Get(str); - ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen); + ok (bstr->dwLen == i, "Expected %d, got %ld\n", i, bstr->dwLen); buf[i] = 0; ok (!lstrcmpA((LPCSTR)bstr->szString, buf), "String different\n"); ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n"); @@ -5020,7 +5020,7 @@ static void test_SysReAllocString(void) int changed;
bstr = Get(str); - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
changed = SysReAllocString(&str, szSmaller); @@ -5028,7 +5028,7 @@ static void test_SysReAllocString(void) /* Vista creates a new string, but older versions reuse the existing string. */ /*ok (str == oldstr, "Created new string\n");*/ bstr = Get(str); - ok (bstr->dwLen == 2, "Expected 2, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 2, "Expected 2, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szSmaller), "String different\n");
changed = SysReAllocString(&str, szLarger); @@ -5036,7 +5036,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 %d\n", bstr->dwLen); + ok (bstr->dwLen == 12, "Expected 12, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szLarger), "String different\n");
SysFreeString(str); @@ -5058,7 +5058,7 @@ static void test_SysReAllocStringLen(void) int changed;
bstr = Get(str); - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
changed = SysReAllocStringLen(&str, szSmaller, 1); @@ -5066,7 +5066,7 @@ static void test_SysReAllocStringLen(void) /* Vista creates a new string, but older versions reuse the existing string. */ /*ok (str == oldstr, "Created new string\n");*/ bstr = Get(str); - ok (bstr->dwLen == 2, "Expected 2, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 2, "Expected 2, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szSmaller), "String different\n");
changed = SysReAllocStringLen(&str, szLarger, 6); @@ -5074,7 +5074,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 %d\n", bstr->dwLen); + ok (bstr->dwLen == 12, "Expected 12, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szLarger), "String different\n");
changed = SysReAllocStringLen(&str, str, 6); @@ -5144,9 +5144,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%08x\n", hres); + ok (hres == S_OK,"Failed to copy binary bstring with hres 0x%08lx\n", hres); bstr = Get(V_BSTR(&vt2)); - ok (bstr->dwLen == 3, "Expected 3, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 3, "Expected 3, got %ld\n", bstr->dwLen); ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n"); VariantClear(&vt2); VariantClear(&vt1); @@ -5175,7 +5175,7 @@ if (0)
/* Concatenation of two NULL strings works */ ret = VarBstrCat(NULL, NULL, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == 0, "Expected a 0-length string\n"); SysFreeString(res); @@ -5184,13 +5184,13 @@ if (0)
/* Concatenation with one NULL arg */ ret = VarBstrCat(NULL, str1, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\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: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\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"); @@ -5199,7 +5199,7 @@ if (0) /* Concatenation of two zero-terminated strings */ str2 = SysAllocString(sz2); ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == ARRAY_SIZE(sz1sz2) - 1, "Unexpected length\n"); ok(!memcmp(res, sz1sz2, sizeof(sz1sz2)), "Unexpected value\n"); @@ -5213,7 +5213,7 @@ if (0) str2 = SysAllocStringLen(s2, ARRAY_SIZE(s2));
ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == ARRAY_SIZE(s1s2), "Unexpected length\n"); ok(!memcmp(res, s1s2, sizeof(s1s2)), "Unexpected value\n"); @@ -5231,7 +5231,7 @@ if (0) ok(len == (sizeof(str2A)-1)/sizeof(WCHAR), "got length %u\n", len);
ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); len = (sizeof(str1A) + sizeof(str2A) - 2)/sizeof(WCHAR); ok(SysStringLen(res) == len, "got %d, expected %u\n", SysStringLen(res), len); @@ -5250,7 +5250,7 @@ if (0) ok(len == 0, "got length %u\n", len);
ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == 1, "got %d, expected 1\n", SysStringLen(res)); ok(!memcmp(res, "HA", 2), "got (%s)\n", (char*)res); @@ -5277,7 +5277,7 @@ static void test_IUnknownClear(void) V_UNKNOWN(&v) = (IUnknown*)&u.IDispatch_iface; hres = VariantClear(&v); ok(hres == S_OK && u.ref == 0 && V_VT(&v) == VT_EMPTY, - "clear unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "clear unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 0, VT_EMPTY, hres, u.ref, V_VT(&v));
/* But not when clearing a by-reference*/ @@ -5286,7 +5286,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 1, VT_EMPTY, hres, u.ref, V_VT(&v)); }
@@ -5306,7 +5306,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_EMPTY, hres, u.ref, V_VT(&vDst));
/* AddRef is skipped on copy of by-reference IDispatch */ @@ -5316,7 +5316,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 1, VT_DISPATCH, hres, u.ref, V_VT(&vDst));
/* AddRef is called copying by-reference IDispatch with indirection */ @@ -5326,7 +5326,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_DISPATCH, hres, u.ref, V_VT(&vDst));
/* Indirection in place also calls AddRef */ @@ -5335,7 +5335,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_DISPATCH, hres, u.ref, V_VT(&vSrc)); }
@@ -5360,7 +5360,7 @@ static void test_IUnknownChangeTypeEx(void) V_DISPATCH(&vDst) = (void*)0xdeadbeef; hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_DISPATCH); ok(hres == S_OK && V_VT(&vDst) == VT_DISPATCH && V_DISPATCH(&vDst) == NULL, - "change unk(src,dst): expected 0x%08x,%d,%p, got 0x%08x,%d,%p\n", + "change unk(src,dst): expected 0x%08lx,%d,%p, got 0x%08lx,%d,%p\n", S_OK, VT_DISPATCH, NULL, hres, V_VT(&vDst), V_DISPATCH(&vDst));
V_VT(&vSrc) = VT_UNKNOWN; @@ -5370,7 +5370,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%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", + "change unk(src=src): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n", S_OK, 1, VT_DISPATCH, pu, hres, u.ref, V_VT(&vSrc), V_DISPATCH(&vSrc));
/* =>IDispatch */ @@ -5382,7 +5382,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) == pu, - "change unk(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", + "change unk(src,dst): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%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 */ @@ -5413,7 +5413,7 @@ static void test_IUnknownChangeTypeEx(void)
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); ok(hres == hExpected, - "change unk(badvar): vt %d expected 0x%08x, got 0x%08x\n", + "change unk(badvar): vt %d expected 0x%08lx, got 0x%08lx\n", vt, hExpected, hres); } } @@ -5435,7 +5435,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 0, VT_EMPTY, hres, d.ref, V_VT(&v));
d.ref = 1; @@ -5443,7 +5443,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 1, VT_EMPTY, hres, d.ref, V_VT(&v)); }
@@ -5464,7 +5464,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_EMPTY, hres, d.ref, V_VT(&vDst));
VariantInit(&vDst); @@ -5473,7 +5473,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 1, VT_DISPATCH, hres, d.ref, V_VT(&vDst));
VariantInit(&vDst); @@ -5482,7 +5482,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_DISPATCH, hres, d.ref, V_VT(&vDst));
d.ref = 1; @@ -5490,7 +5490,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%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_DISPATCH, hres, d.ref, V_VT(&vSrc)); }
@@ -5514,7 +5514,7 @@ static void test_IDispatchChangeTypeEx(void) V_UNKNOWN(&vDst) = (void*)0xdeadbeef; hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_UNKNOWN); ok(hres == S_OK && V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == NULL, - "change unk(src,dst): expected 0x%08x,%d,%p, got 0x%08x,%d,%p\n", + "change unk(src,dst): expected 0x%08lx,%d,%p, got 0x%08lx,%d,%p\n", S_OK, VT_UNKNOWN, NULL, hres, V_VT(&vDst), V_UNKNOWN(&vDst));
V_VT(&vSrc) = VT_DISPATCH; @@ -5524,7 +5524,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%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", + "change disp(src=src): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n", S_OK, 1, VT_UNKNOWN, pd, hres, d.ref, V_VT(&vSrc), V_UNKNOWN(&vSrc));
/* =>IUnknown */ @@ -5536,7 +5536,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%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", + "change disp(src,dst): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%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 @@ -5581,7 +5581,7 @@ static void test_ErrorChangeTypeEx(void) }
ok(hres == hExpected, - "change err: vt %d expected 0x%08x, got 0x%08x\n", vt, hExpected, hres); + "change err: vt %d expected 0x%08lx, got 0x%08lx\n", vt, hExpected, hres); } }
@@ -5647,7 +5647,7 @@ static void test_EmptyChangeTypeEx(void) V_VT(&vDst) = VT_NULL;
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); - ok(hres == hExpected, "change empty: vt %d expected 0x%08x, got 0x%08x, vt %d\n", + ok(hres == hExpected, "change empty: vt %d expected 0x%08lx, got 0x%08lx, vt %d\n", vt, hExpected, hres, V_VT(&vDst)); if (hres == S_OK) { @@ -5719,15 +5719,15 @@ static void test_NullChangeTypeEx(void) V_VT(&vDst) = VT_EMPTY;
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); - ok(hres == hExpected, "change null: vt %d expected 0x%08x, got 0x%08x, vt %d\n", + ok(hres == hExpected, "change null: vt %d expected 0x%08lx, got 0x%08lx, vt %d\n", vt, hExpected, hres, V_VT(&vDst));
/* should work only for VT_NULL -> VT_NULL case */ if (hres == S_OK) - ok(V_VT(&vDst) == VT_NULL, "change null: VT_NULL expected 0x%08x, got 0x%08x, vt %d\n", + ok(V_VT(&vDst) == VT_NULL, "change null: VT_NULL expected 0x%08lx, got 0x%08lx, vt %d\n", hExpected, hres, V_VT(&vDst)); else - ok(V_VT(&vDst) == VT_EMPTY, "change null: vt %d expected 0x%08x, got 0x%08x, vt %d\n", + ok(V_VT(&vDst) == VT_EMPTY, "change null: vt %d expected 0x%08lx, got 0x%08lx, vt %d\n", vt, hExpected, hres, V_VT(&vDst)); } } @@ -5748,7 +5748,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%08x,%d got %d,0x%08x,%d\n", + "change uint: Expected %d,0x%08lx,%d got %d,0x%08lx,%ld\n", VT_I4, S_OK, -1, V_VT(&vDst), hres, V_I4(&vDst)); }
@@ -5811,19 +5811,19 @@ 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 %08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08lx\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 %08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08lx\n", hres); ok(V_VT(&v2) == VT_INT && V_INT(&v2) == 4, "VariantChangeTypeEx changed dst variant\n"); V_VT(&v2) = 0xff; /* incorrect variant type */ hres = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_INT); - ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08lx\n", hres); ok(V_VT(&v2) == 0xff, "VariantChangeTypeEx changed dst variant\n"); hres = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_BSTR); - ok(hres == DISP_E_BADVARTYPE, "VariantChangeTypeEx returns %08x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "VariantChangeTypeEx returns %08lx\n", hres); ok(V_VT(&v2) == 0xff, "VariantChangeTypeEx changed dst variant\n"); SysFreeString(bstr); } @@ -5930,43 +5930,43 @@ static void test_recinfo(void) filename = create_test_typelib(2); MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH); hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &typelib); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
filename = create_test_typelib(3); MultiByteToWideChar(CP_ACP, 0, filename, -1, filename2W, MAX_PATH); hr = LoadTypeLibEx(filename2W, REGKIND_NONE, &typelib2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
typeinfo = NULL; found = 1; hr = ITypeLib_FindName(typelib, teststructW, 0, &typeinfo, &memid, &found); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(typeinfo != NULL, "got %p\n", typeinfo); hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&attr->guid, &UUID_test_struct), "got %s\n", wine_dbgstr_guid(&attr->guid)); ok(attr->typekind == TKIND_RECORD, "got %d\n", attr->typekind);
typeinfo2 = NULL; found = 1; hr = ITypeLib_FindName(typelib, teststruct2W, 0, &typeinfo2, &memid, &found); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(typeinfo2 != NULL, "got %p\n", typeinfo2);
typeinfo3 = NULL; found = 1; hr = ITypeLib_FindName(typelib2, teststruct3W, 0, &typeinfo3, &memid, &found); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(typeinfo3 != NULL, "got %p\n", typeinfo3);
hr = GetRecordInfoFromTypeInfo(typeinfo, &recinfo); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = GetRecordInfoFromTypeInfo(typeinfo2, &recinfo2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = GetRecordInfoFromTypeInfo(typeinfo3, &recinfo3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* IsMatchingType, these two records only differ in GUIDs */ ret = IRecordInfo_IsMatchingType(recinfo, recinfo2); @@ -5983,9 +5983,9 @@ static void test_recinfo(void)
size = 0; hr = IRecordInfo_GetSize(recinfo, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(size == sizeof(struct test_struct), "got size %d\n", size); - ok(attr->cbSizeInstance == sizeof(struct test_struct), "got instance size %d\n", attr->cbSizeInstance); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(size == sizeof(struct test_struct), "got size %ld\n", size); + ok(attr->cbSizeInstance == sizeof(struct test_struct), "got instance size %ld\n", attr->cbSizeInstance); ITypeInfo_ReleaseTypeAttr(typeinfo, attr);
/* RecordInit() */ @@ -5995,8 +5995,8 @@ static void test_recinfo(void) teststruct.bstr = (void*)0xdeadbeef;
hr = IRecordInfo_RecordInit(recinfo, &teststruct); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(teststruct.hr == 0, "got 0x%08x\n", teststruct.hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(teststruct.hr == 0, "got 0x%08lx\n", teststruct.hr); ok(teststruct.b == 0, "got 0x%08x\n", teststruct.b); ok(teststruct.disp == NULL, "got %p\n", teststruct.disp); ok(teststruct.bstr == NULL, "got %p\n", teststruct.bstr); @@ -6010,20 +6010,20 @@ static void test_recinfo(void) teststruct.bstr = SysAllocString(testW); memset(&testcopy, 0, sizeof(testcopy)); hr = IRecordInfo_RecordCopy(recinfo, &teststruct, &testcopy); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(testcopy.hr == S_FALSE, "got 0x%08x\n", testcopy.hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(testcopy.hr == S_FALSE, "got 0x%08lx\n", testcopy.hr); ok(testcopy.b == VARIANT_TRUE, "got %d\n", testcopy.b); ok(testcopy.disp == teststruct.disp, "got %p\n", testcopy.disp); - ok(dispatch.ref == 11, "got %d\n", dispatch.ref); + ok(dispatch.ref == 11, "got %ld\n", dispatch.ref); ok(testcopy.bstr != teststruct.bstr, "got %p\n", testcopy.bstr); ok(!lstrcmpW(testcopy.bstr, teststruct.bstr), "got %s, %s\n", wine_dbgstr_w(testcopy.bstr), wine_dbgstr_w(teststruct.bstr));
/* RecordClear() */ hr = IRecordInfo_RecordClear(recinfo, &teststruct); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(teststruct.bstr == NULL, "got %p\n", teststruct.bstr); hr = IRecordInfo_RecordClear(recinfo, &testcopy); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(testcopy.bstr == NULL, "got %p\n", testcopy.bstr);
/* now the destination contains the interface pointer */ @@ -6032,8 +6032,8 @@ static void test_recinfo(void) dispatch.ref = 10;
hr = IRecordInfo_RecordCopy(recinfo, &teststruct, &testcopy); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dispatch.ref == 9, "got %d\n", dispatch.ref); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dispatch.ref == 9, "got %ld\n", dispatch.ref);
IRecordInfo_Release(recinfo);
@@ -6051,7 +6051,7 @@ START_TEST(vartype) has_i8 = GetProcAddress(hOleaut32, "VarI8FromI1") != NULL; has_locales = has_i8 && GetProcAddress(hOleaut32, "GetVarConversionLocaleSetting") != NULL;
- trace("LCIDs: System=0x%08x, User=0x%08x\n", GetSystemDefaultLCID(), + trace("LCIDs: System=0x%08lx, User=0x%08lx\n", GetSystemDefaultLCID(), GetUserDefaultLCID());
test_bstr_cache();
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=110502
Your paranoid android.
=== build (build log) ===
WineRunBuild.pl:error: The build timed out
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=110501
Your paranoid android.
=== w1064v1809 (testbot log) ===
WineRunTask.pl:error: The previous 1 run(s) terminated abnormally