Commit e06b668f authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

mshtml/tests: Enable compilation with long types.

parent 816395e8
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = mshtml.dll
IMPORTS = ole32 oleaut32 wininet user32 urlmon gdi32 advapi32
C_SRCS = \
......
......@@ -189,7 +189,7 @@ static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids)
for(piid = iids; *piid; piid++) {
hres = IUnknown_QueryInterface(iface, *piid, (void**)&unk);
ok_(__FILE__,line) (hres == S_OK, "Could not get %s interface: %08x\n", wine_dbgstr_guid(*piid), hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get %s interface: %08lx\n", wine_dbgstr_guid(*piid), hres);
if(SUCCEEDED(hres))
IUnknown_Release(unk);
}
......@@ -208,10 +208,10 @@ static void set_plugin_readystate(READYSTATE state)
plugin_readystate = state;
hres = IOleClientSite_QueryInterface(client_site, &IID_IPropertyNotifySink, (void**)&prop_notif);
ok(hres == S_OK, "Could not get IPropertyNotifySink iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IPropertyNotifySink iface: %08lx\n", hres);
hres = IPropertyNotifySink_OnChanged(prop_notif, DISPID_READYSTATE);
ok(hres == S_OK, "OnChanged(DISPID_READYSTATE) failed: %08x\n", hres);
ok(hres == S_OK, "OnChanged(DISPID_READYSTATE) failed: %08lx\n", hres);
IPropertyNotifySink_Release(prop_notif);
}
......@@ -223,14 +223,14 @@ static void test_mon_displayname(IMoniker *mon, const WCHAR *exname, const WCHAR
HRESULT hres;
hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name);
ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
ok(hres == S_OK, "GetDisplayName failed: %08lx\n", hres);
ok(!lstrcmpW(display_name, exname) || broken(broken_name && !lstrcmpW(display_name, broken_name)),
"display_name = %s\n", wine_dbgstr_w(display_name));
CoTaskMemFree(display_name);
hres = IMoniker_IsSystemMoniker(mon, &mksys);
ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
ok(mksys == MKSYS_URLMONIKER, "mksys = %d\n", mksys);
ok(hres == S_OK, "IsSystemMoniker failed: %08lx\n", hres);
ok(mksys == MKSYS_URLMONIKER, "mksys = %ld\n", mksys);
}
static LRESULT WINAPI plugin_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
......@@ -314,13 +314,13 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
CHECK_EXPECT(Advise);
hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatch, (void**)&sink_disp);
ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatch iface: %08lx\n", hres);
hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatchEx, (void**)&dispex);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDispatchEx) returned: %08x\n", hres);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDispatchEx) returned: %08lx\n", hres);
hres = IUnknown_QueryInterface(pUnkSink, &DIID_DispActiveXTest, (void**)&ax_test);
ok(hres == S_OK, "Could not get DispActiveXTest iface: %08x\n", hres);
ok(hres == S_OK, "Could not get DispActiveXTest iface: %08lx\n", hres);
DispActiveXTest_Release(ax_test);
*pdwCookie = 0xdeadbeef;
......@@ -331,7 +331,7 @@ static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dw
{
CHECK_EXPECT(Unadvise);
ok(dwCookie == 0xdeadbeef, "dwCookie = %x\n", dwCookie);
ok(dwCookie == 0xdeadbeef, "dwCookie = %lx\n", dwCookie);
if(sink_disp) {
IDispatch_Release(sink_disp);
......@@ -396,7 +396,7 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
CHECK_EXPECT2(OnAmbientPropertyChange_UNKNOWN);
break;
default:
ok(0, "unexpected call %d\n", dispID);
ok(0, "unexpected call %ld\n", dispID);
}
return S_OK;
......@@ -443,15 +443,15 @@ static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTA
CHECK_EXPECT(QuickActivate);
ok(container != NULL, "container == NULL\n");
ok(container->cbSize == sizeof(*container), "container->cbSize = %d\n", container->cbSize);
ok(container->cbSize == sizeof(*container), "container->cbSize = %ld\n", container->cbSize);
ok(container->pClientSite != NULL, "container->pClientSite == NULL\n");
ok(container->pAdviseSink != NULL, "container->pAdviseSink == NULL\n");
ok(container->pPropertyNotifySink != NULL, "container->pPropertyNotifySink == NULL\n");
ok(!container->pUnkEventSink, "container->pUnkEventSink != NULL\n");
ok(container->dwAmbientFlags == (QACONTAINER_SUPPORTSMNEMONICS|QACONTAINER_MESSAGEREFLECT|QACONTAINER_USERMODE),
"container->dwAmbientFlags = %x\n", container->dwAmbientFlags);
"container->dwAmbientFlags = %lx\n", container->dwAmbientFlags);
if(have_container)
ok(!container->colorFore, "container->colorFore = %d\n", container->colorFore); /* FIXME */
ok(!container->colorFore, "container->colorFore = %ld\n", container->colorFore); /* FIXME */
todo_wine
ok(container->colorBack, "container->colorBack == 0\n"); /* FIXME */
if(have_container)
......@@ -460,20 +460,20 @@ static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTA
ok(!container->pFont, "container->pFont = %p\n", container->pFont);
todo_wine
ok(container->pUndoMgr != NULL, "container->pUndoMgr == NULL\n");
ok(!container->dwAppearance, "container->dwAppearance = %x\n", container->dwAppearance);
ok(!container->dwAppearance, "container->dwAppearance = %lx\n", container->dwAppearance);
if(have_container)
ok(!container->lcid, "container->lcid = %x\n", container->lcid);
ok(!container->lcid, "container->lcid = %lx\n", container->lcid);
ok(!container->hpal, "container->hpal = %p\n", container->hpal);
ok(!container->pBindHost, "container->pBindHost != NULL\n");
ok(!container->pOleControlSite, "container->pOleControlSite != NULL\n");
ok(!container->pServiceProvider, "container->pServiceProvider != NULL\n");
ok(control->cbSize == sizeof(*control), "control->cbSize = %d\n", control->cbSize);
ok(!control->dwMiscStatus, "control->dwMiscStatus = %x\n", control->dwMiscStatus);
ok(!control->dwViewStatus, "control->dwViewStatus = %x\n", control->dwViewStatus);
ok(!control->dwEventCookie, "control->dwEventCookie = %x\n", control->dwEventCookie);
ok(!control->dwPropNotifyCookie, "control->dwPropNotifyCookie = %x\n", control->dwPropNotifyCookie);
ok(!control->dwPointerActivationPolicy, "control->dwPointerActivationPolicy = %x\n", control->dwPointerActivationPolicy);
ok(control->cbSize == sizeof(*control), "control->cbSize = %ld\n", control->cbSize);
ok(!control->dwMiscStatus, "control->dwMiscStatus = %lx\n", control->dwMiscStatus);
ok(!control->dwViewStatus, "control->dwViewStatus = %lx\n", control->dwViewStatus);
ok(!control->dwEventCookie, "control->dwEventCookie = %lx\n", control->dwEventCookie);
ok(!control->dwPropNotifyCookie, "control->dwPropNotifyCookie = %lx\n", control->dwPropNotifyCookie);
ok(!control->dwPointerActivationPolicy, "control->dwPointerActivationPolicy = %lx\n", control->dwPointerActivationPolicy);
ok(iface_cmp((IUnknown*)container->pClientSite, (IUnknown*)container->pAdviseSink),
"container->pClientSite != container->pAdviseSink\n");
......@@ -570,20 +570,20 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
V_VT(&v) = VT_BSTR;
hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"param_value"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
V_VT(&v) = VT_I4;
V_I4(&v) = 0xdeadbeef;
hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL);
ok(hres == DISP_E_TYPEMISMATCH, "Read failed: %08x, expected DISP_E_TYPEMISMATCH\n", hres);
ok(hres == DISP_E_TYPEMISMATCH, "Read failed: %08lx, expected DISP_E_TYPEMISMATCH\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 0xdeadbeef, "V_I4(v) = %x\n", V_I4(&v));
ok(V_I4(&v) == 0xdeadbeef, "V_I4(v) = %lx\n", V_I4(&v));
V_VT(&v) = VT_BSTR;
hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"3"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
SysFreeString(V_BSTR(&v));
......@@ -591,27 +591,27 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
V_VT(&v) = VT_I4;
V_I4(&v) = 0xdeadbeef;
hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 3, "V_I4(v) = %x\n", V_I4(&v));
ok(V_I4(&v) == 3, "V_I4(v) = %lx\n", V_I4(&v));
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = (BSTR)0xdeadbeef;
hres = IPropertyBag_Read(pPropBag, no_paramW, &v, NULL);
ok(hres == E_INVALIDARG, "Read failed: %08x\n", hres);
ok(hres == E_INVALIDARG, "Read failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
ok(V_BSTR(&v) == (BSTR)0xdeadbeef, "V_BSTR(v) = %p\n", V_BSTR(&v));
set_plugin_readystate(READYSTATE_INTERACTIVE);
hres = IOleClientSite_QueryInterface(client_site, &IID_IBindHost, (void**)&bind_host);
ok(hres == S_OK, "Could not get IBindHost iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IBindHost iface: %08lx\n", hres);
hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(sp, &SID_SBindHost, &IID_IBindHost, (void**)&bind_host2);
ok(hres == S_OK, "QueryService(SID_SBindHost) failed: %08x\n", hres);
ok(hres == S_OK, "QueryService(SID_SBindHost) failed: %08lx\n", hres);
IServiceProvider_Release(sp);
ok(iface_cmp((IUnknown*)bind_host, (IUnknown*)bind_host2), "bind_host != bind_host2\n");
......@@ -619,7 +619,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
mon = NULL;
hres = IBindHost_CreateMoniker(bind_host, test_swfW, NULL, &mon, 0);
ok(hres == S_OK, "CreateMoniker failed: %08x\n", hres);
ok(hres == S_OK, "CreateMoniker failed: %08lx\n", hres);
ok(mon != NULL, "mon == NULL\n");
test_mon_displayname(mon, L"about:test.swf", L"about:blanktest.swf");
IMoniker_Release(mon);
......@@ -628,7 +628,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
mon = NULL;
hres = IOleClientSite_GetMoniker(client_site, OLEGETMONIKER_ONLYIFTHERE, OLEWHICHMK_CONTAINER, &mon);
ok(hres == S_OK, "GetMoniker failed: %08x\n", hres);
ok(hres == S_OK, "GetMoniker failed: %08lx\n", hres);
ok(mon != NULL, "mon == NULL\n");
test_mon_displayname(mon, L"about:blank", NULL);
IMoniker_Release(mon);
......@@ -782,7 +782,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF
*/
return S_OK;
default:
ok(0, "unexpected call %d\n", dispIdMember);
ok(0, "unexpected call %ld\n", dispIdMember);
}
return E_NOTIMPL;
......@@ -927,8 +927,8 @@ static HRESULT WINAPI ViewObjectEx_SetAdvise(IViewObjectEx *iface, DWORD aspects
{
CHECK_EXPECT(SetAdvise);
ok(aspects == DVASPECT_CONTENT, "aspects = %x\n", aspects);
ok(!advf, "advf = %x\n", advf);
ok(aspects == DVASPECT_CONTENT, "aspects = %lx\n", aspects);
ok(!advf, "advf = %lx\n", advf);
ok(pAdvSink != NULL, "pAdvSink = NULL\n");
return S_OK;
......@@ -1046,7 +1046,7 @@ static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
{
CHECK_EXPECT(Close);
ok(dwSaveOption == OLECLOSE_NOSAVE, "dwSaveOption = %d\n", dwSaveOption);
ok(dwSaveOption == OLECLOSE_NOSAVE, "dwSaveOption = %ld\n", dwSaveOption);
return S_OK;
}
......@@ -1089,34 +1089,34 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
CHECK_EXPECT(DoVerb);
ok(iVerb == OLEIVERB_INPLACEACTIVATE, "iVerb = %d\n", iVerb);
ok(iVerb == OLEIVERB_INPLACEACTIVATE, "iVerb = %ld\n", iVerb);
ok(!lpmsg, "lpmsg != NULL\n");
ok(pActiveSite != NULL, "pActiveSite == NULL\n");
ok(!lindex, "lindex = %d\n", lindex);
ok(!lindex, "lindex = %ld\n", lindex);
ok(hwndParent != NULL, "hwndParent == NULL\n");
ok(lprcPosRect != NULL, "lprcPosRect == NULL\n");
hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleInPlaceSiteEx, (void**)&ip_site);
ok(hres == S_OK, "Could not get IOleInPlaceSiteEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IOleInPlaceSiteEx iface: %08lx\n", hres);
hres = IOleInPlaceSiteEx_CanInPlaceActivate(ip_site);
ok(hres == S_OK, "CanInPlaceActivate failed: %08x\n", hres);
ok(hres == S_OK, "CanInPlaceActivate failed: %08lx\n", hres);
SET_EXPECT(InPlaceObject_GetWindow);
no_redraw = 0xdeadbeef;
hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ip_site, &no_redraw, 0);
ok(hres == S_OK, "InPlaceActivateEx failed: %08x\n", hres);
ok(hres == S_OK, "InPlaceActivateEx failed: %08lx\n", hres);
ok(!no_redraw, "no_redraw = %x\n", no_redraw);
CHECK_CALLED(InPlaceObject_GetWindow);
no_redraw = 0xdeadbeef;
hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ip_site, &no_redraw, 0);
ok(hres == S_OK, "InPlaceActivateEx failed: %08x\n", hres);
ok(hres == S_OK, "InPlaceActivateEx failed: %08lx\n", hres);
ok(no_redraw == 0xdeadbeef, "no_redraw = %x\n", no_redraw);
hwnd = NULL;
hres = IOleInPlaceSiteEx_GetWindow(ip_site, &hwnd);
ok(hres == S_OK, "GetWindow failed: %08x\n", hres);
ok(hres == S_OK, "GetWindow failed: %08lx\n", hres);
ok(hwnd != NULL, "hwnd == NULL\n");
ok(hwnd == hwndParent, "hwnd != hwndParent\n");
......@@ -1126,7 +1126,7 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
ip_uiwindow = NULL;
frame_info.cb = sizeof(OLEINPLACEFRAMEINFO);
hres = IOleInPlaceSiteEx_GetWindowContext(ip_site, &ip_frame, &ip_uiwindow, &pos_rect, &clip_rect, &frame_info);
ok(hres == S_OK, "GetWindowContext failed: %08x\n", hres);
ok(hres == S_OK, "GetWindowContext failed: %08lx\n", hres);
ok(ip_frame != NULL, "ip_frame == NULL\n");
ok(ip_uiwindow != NULL, "ip_uiwindow == NULL\n");
ok((IOleInPlaceUIWindow*)ip_frame != ip_uiwindow, "ip_frame == ip_uiwindow\n");
......@@ -1146,7 +1146,7 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
IOleInPlaceSiteEx_Release(ip_site);
hres = IOleClientSite_ShowObject(client_site);
ok(hres == S_OK, "ShowObject failed: %08x\n", hres);
ok(hres == S_OK, "ShowObject failed: %08lx\n", hres);
SET_EXPECT(InPlaceObject_GetWindow);
SET_EXPECT(SetObjectRects);
......@@ -1217,7 +1217,7 @@ static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **pp
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
{
CHECK_EXPECT(GetMiscStatus);
ok(dwAspect == DVASPECT_CONTENT, "dwAspect = %d\n", dwAspect);
ok(dwAspect == DVASPECT_CONTENT, "dwAspect = %ld\n", dwAspect);
ok(pdwStatus != NULL, "pdwStatus == NULL\n");
*pdwStatus = OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE
|OLEMISC_INSIDEOUT|OLEMISC_CANTLINKINSIDE|OLEMISC_RECOMPOSEONRESIZE;
......@@ -1301,10 +1301,10 @@ static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObjectWindow
CHECK_EXPECT(InPlaceDeactivate);
hres = IOleClientSite_QueryInterface(client_site, &IID_IOleInPlaceSite, (void**)&ip_site);
ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08lx\n", hres);
hres = IOleInPlaceSite_OnInPlaceDeactivate(ip_site);
ok(hres == S_OK, "OnInPlaceDeactivate failed: %08x\n", hres);
ok(hres == S_OK, "OnInPlaceDeactivate failed: %08lx\n", hres);
IOleInPlaceSite_Release(ip_site);
return S_OK;
......@@ -1520,9 +1520,9 @@ static void test_elem_dispex(IDispatchEx *dispex)
hres = IDispatchEx_GetDispID(dispex, str, 0, &id);
CHECK_CALLED(GetIDsOfNames_scriptprop);
SysFreeString(str);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
todo_wine
ok(id == DISPID_SCRIPTPROP, "id = %d\n", id);
ok(id == DISPID_SCRIPTPROP, "id = %ld\n", id);
SET_EXPECT(Invoke_SECURITYCTX);
SET_EXPECT(Invoke_SCRIPTPROP);
......@@ -1530,9 +1530,9 @@ static void test_elem_dispex(IDispatchEx *dispex)
memset(&ei, 0, sizeof(ei));
V_VT(&v) = VT_EMPTY;
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 4, "V_I4(v) = %d\n", V_I4(&v));
ok(V_I4(&v) == 4, "V_I4(v) = %ld\n", V_I4(&v));
CHECK_CALLED(Invoke_SECURITYCTX);
CHECK_CALLED(Invoke_SCRIPTPROP);
}
......@@ -1550,7 +1550,7 @@ static void test_iface_wrapping(IHTMLObjectElement *elem)
SET_EXPECT(wrapped_Release);
unk = (void*)0xdeadbeef;
hres = IHTMLObjectElement_QueryInterface(elem, &IID_ITestActiveX, (void**)&unk);
ok(hres == S_OK, "QueryInterface(IID_ITestActiveX failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_ITestActiveX failed: %08lx\n", hres);
CHECK_CALLED(QI_ITestActiveX);
CHECK_CALLED(wrapped_AddRef);
CHECK_CALLED(wrapped_Release);
......@@ -1568,17 +1568,17 @@ static void test_iface_wrapping(IHTMLObjectElement *elem)
SET_EXPECT(wrapped_func);
hres = ((HRESULT (WINAPI*)(IUnknown*,int,double))vtbl[63])(unk, 10, 32.0);
ok(hres == S_OK, "wrapped_func returned %08x\n", hres);
ok(hres == S_OK, "wrapped_func returned %08lx\n", hres);
CHECK_CALLED(wrapped_func);
hres = IUnknown_QueryInterface(unk, &IID_IHTMLObjectElement, (void**)&elem2);
ok(hres == S_OK, "Could not get IHTMLObjectElement from wrapped iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLObjectElement from wrapped iface: %08lx\n", hres);
ok(iface_cmp((IUnknown*)elem2, (IUnknown*)elem), "elem2 != elem\n");
IHTMLObjectElement_Release(elem2);
SET_EXPECT(wrapped_Release);
ref = IUnknown_Release(unk);
ok(!ref, "ref=%d\n", ref);
ok(!ref, "ref=%ld\n", ref);
CHECK_CALLED(wrapped_Release);
SET_EXPECT(QI_ITestActiveX);
......@@ -1586,7 +1586,7 @@ static void test_iface_wrapping(IHTMLObjectElement *elem)
SET_EXPECT(wrapped_Release);
unk = (void*)0xdeadbeef;
hres = IHTMLObjectElement_QueryInterface(elem, &IID_ITestActiveX, (void**)&unk2);
ok(hres == S_OK, "QueryInterface(IID_ITestActiveX failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_ITestActiveX failed: %08lx\n", hres);
CHECK_CALLED(QI_ITestActiveX);
CHECK_CALLED(wrapped_AddRef);
CHECK_CALLED(wrapped_Release);
......@@ -1595,7 +1595,7 @@ static void test_iface_wrapping(IHTMLObjectElement *elem)
SET_EXPECT(wrapped_Release);
ref = IUnknown_Release(unk2);
ok(!ref, "ref=%d\n", ref);
ok(!ref, "ref=%ld\n", ref);
CHECK_CALLED(wrapped_Release);
}
......@@ -1611,41 +1611,41 @@ static void test_object_elem(IHTMLDocument2 *doc)
HRESULT hres;
hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3);
ok(hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLDocument3 iface: %08lx\n", hres);
str = SysAllocString(L"objid");
elem = (void*)0xdeadbeef;
hres = IHTMLDocument3_getElementById(doc3, str, &elem);
IHTMLDocument3_Release(doc3);
SysFreeString(str);
ok(hres == S_OK, "getElementById failed: %08x\n", hres);
ok(hres == S_OK, "getElementById failed: %08lx\n", hres);
ok(elem != NULL, "elem == NULL\n");
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLObjectElement, (void**)&objelem);
IHTMLElement_Release(elem);
ok(hres == S_OK, "Could not get IHTMLObjectElement iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLObjectElement iface: %08lx\n", hres);
SET_EXPECT(Invoke_SECURITYCTX);
hres = IHTMLObjectElement_get_object(objelem, &disp);
ok(hres == S_OK, "get_object failed: %08x\n", hres);
ok(hres == S_OK, "get_object failed: %08lx\n", hres);
ok(disp == &Dispatch, "disp != Dispatch\n");
CHECK_CALLED(Invoke_SECURITYCTX);
hres = IHTMLObjectElement_QueryInterface(objelem, &IID_IDispatchEx, (void**)&dispex);
ok(hres == S_OK, "QueryInterface failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface failed: %08lx\n", hres);
test_elem_dispex(dispex);
IDispatchEx_Release(dispex);
test_iface_wrapping(objelem);
hres = IHTMLObjectElement_get_width(objelem, &v);
ok(hres == S_OK, "get_width failed: %08x\n", hres);
ok(hres == S_OK, "get_width failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(width) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"300"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
hres = IHTMLObjectElement_get_height(objelem, &v);
ok(hres == S_OK, "get_height failed: %08x\n", hres);
ok(hres == S_OK, "get_height failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(height) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"200"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
......@@ -1655,12 +1655,12 @@ static void test_object_elem(IHTMLDocument2 *doc)
SET_EXPECT(OnAmbientPropertyChange_UNKNOWN);
SET_EXPECT(Invoke_ENABLED);
hres = IHTMLObjectElement_put_width(objelem, v);
ok(hres == S_OK, "put_width failed: %08x\n", hres);
ok(hres == S_OK, "put_width failed: %08lx\n", hres);
CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN);
CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
hres = IHTMLObjectElement_get_width(objelem, &v);
ok(hres == S_OK, "get_width failed: %08x\n", hres);
ok(hres == S_OK, "get_width failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(width) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"400"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
......@@ -1670,12 +1670,12 @@ static void test_object_elem(IHTMLDocument2 *doc)
SET_EXPECT(OnAmbientPropertyChange_UNKNOWN);
SET_EXPECT(Invoke_ENABLED);
hres = IHTMLObjectElement_put_height(objelem, v);
ok(hres == S_OK, "put_height failed: %08x\n", hres);
ok(hres == S_OK, "put_height failed: %08lx\n", hres);
CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN);
CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
hres = IHTMLObjectElement_get_height(objelem, &v);
ok(hres == S_OK, "get_height failed: %08x\n", hres);
ok(hres == S_OK, "get_height failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(height) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"250"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
......@@ -1694,31 +1694,31 @@ static void test_container(IHTMLDocument2 *doc_obj)
container = NULL;
hres = IOleClientSite_GetContainer(client_site, &container);
ok(hres == S_OK, "GetContainer failed: %08x\n", hres);
ok(hres == S_OK, "GetContainer failed: %08lx\n", hres);
ok(container != NULL, "container == NULL\n");
hres = IHTMLDocument2_get_parentWindow(doc_obj, &parent_window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
ok(parent_window != NULL, "parentWindow == NULL\n");
hres = IHTMLWindow2_get_document(parent_window, &doc);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
ok(doc != NULL, "doc == NULL\n");
ok(iface_cmp((IUnknown*)doc, (IUnknown*)container), "container != doc\n");
IHTMLDocument2_Release(doc);
hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&serv_prov);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(serv_prov, &IID_IHTMLWindow2, &IID_IHTMLWindow2, (void**)&html_window);
ok(hres == S_OK, "Could not get IHTMLWindow2 service: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLWindow2 service: %08lx\n", hres);
todo_wine
ok(!iface_cmp((IUnknown*)html_window, (IUnknown*)parent_window), "html_window != parent_window\n");
IHTMLWindow2_Release(html_window);
SET_EXPECT(QueryService_TestActiveX);
hres = IServiceProvider_QueryService(serv_prov, &CLSID_TestActiveX, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "QueryService(CLSID_TestActiveX) failed: %08x\n", hres);
ok(hres == S_OK, "QueryService(CLSID_TestActiveX) failed: %08lx\n", hres);
ok(unk == (IUnknown*)&OleObject, "unexpected unk %p\n", unk);
CHECK_CALLED(QueryService_TestActiveX);
IUnknown_Release(unk);
......@@ -1735,11 +1735,11 @@ static void test_ui_activate(void)
HRESULT hres;
hres = IOleClientSite_QueryInterface(client_site, &IID_IOleInPlaceSite, (void**)&ip_site);
ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08lx\n", hres);
SET_EXPECT(Invoke_ENABLED);
hres = IOleInPlaceSite_OnUIActivate(ip_site);
ok(hres == S_OK, "OnUIActivate failed: %08x\n", hres);
ok(hres == S_OK, "OnUIActivate failed: %08lx\n", hres);
CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
IOleInPlaceSite_Release(ip_site);
......@@ -2075,23 +2075,23 @@ static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocum
HRESULT hres;
hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document);
ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres);
ok(hres == S_OK, "could not get IOleDocument: %08lx\n", hres);
hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view);
IOleDocument_Release(document);
ok(hres == S_OK, "CreateView failed: %08x\n", hres);
ok(hres == S_OK, "CreateView failed: %08lx\n", hres);
hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite);
ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres);
ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
hres = IOleDocumentView_UIActivate(view, TRUE);
ok(hres == S_OK, "UIActivate failed: %08x\n", hres);
ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
hres = IOleDocumentView_SetRect(view, &rect);
ok(hres == S_OK, "SetRect failed: %08x\n", hres);
ok(hres == S_OK, "SetRect failed: %08lx\n", hres);
hres = IOleDocumentView_Show(view, TRUE);
ok(hres == S_OK, "Show failed: %08x\n", hres);
ok(hres == S_OK, "Show failed: %08lx\n", hres);
return S_OK;
}
......@@ -2194,7 +2194,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
hres = IHTMLDocument2_get_readyState(notif_doc, &state);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
if(!lstrcmpW(state, completeW))
doc_complete = TRUE;
......@@ -2236,10 +2236,10 @@ static void doc_load_string(IHTMLDocument2 *doc, const char *str)
mem = GlobalAlloc(0, len);
memcpy(mem, str, len);
hr = CreateStreamOnHGlobal(mem, TRUE, &stream);
ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
hr = IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init);
ok(hr == S_OK, "Failed to get IPersistStreamInit, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to get IPersistStreamInit, hr %#lx.\n", hr);
IPersistStreamInit_Load(init, stream);
IPersistStreamInit_Release(init);
......@@ -2254,15 +2254,15 @@ static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08lx\n", hres);
hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
IConnectionPointContainer_Release(container);
ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
ok(hres == S_OK, "FindConnectionPoint failed: %08lx\n", hres);
hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
ok(hres == S_OK, "Advise failed: %08lx\n", hres);
}
static void set_client_site(IHTMLDocument2 *doc, BOOL set)
......@@ -2279,19 +2279,19 @@ static void set_client_site(IHTMLDocument2 *doc, BOOL set)
}
hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj);
ok(hres == S_OK, "Could not et IOleObject: %08x\n", hres);
ok(hres == S_OK, "Could not et IOleObject: %08lx\n", hres);
hres = IOleObject_SetClientSite(oleobj, set ? &ClientSite : NULL);
ok(hres == S_OK, "SetClientSite failed: %08x\n", hres);
ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
if(set) {
IHlinkTarget *hlink;
hres = IOleObject_QueryInterface(oleobj, &IID_IHlinkTarget, (void**)&hlink);
ok(hres == S_OK, "Could not get IHlinkTarget iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHlinkTarget iface: %08lx\n", hres);
hres = IHlinkTarget_Navigate(hlink, 0, NULL);
ok(hres == S_OK, "Navgate failed: %08x\n", hres);
ok(hres == S_OK, "Navgate failed: %08lx\n", hres);
IHlinkTarget_Release(hlink);
}
......@@ -2305,7 +2305,7 @@ static IHTMLDocument2 *create_document(void)
hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IHTMLDocument2, (void**)&doc);
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
return doc;
}
......@@ -2334,7 +2334,7 @@ static void release_doc(IHTMLDocument2 *doc)
set_client_site(doc, FALSE);
ref = IHTMLDocument2_Release(doc);
ok(!ref || broken(ref == 1) /* Vista */, "ref = %d\n", ref);
ok(!ref || broken(ref == 1) /* Vista */, "ref = %ld\n", ref);
if(client_site) {
IOleClientSite_Release(client_site);
......@@ -2346,7 +2346,7 @@ static void release_doc(IHTMLDocument2 *doc)
plugin_hwnd = NULL;
}
ok(!activex_refcnt, "activex_refcnt = %d\n", activex_refcnt);
ok(!activex_refcnt, "activex_refcnt = %ld\n", activex_refcnt);
}
static void init_test(int behavior)
......@@ -2367,7 +2367,7 @@ static void test_event_call(void)
V_VT(&res) = VT_EMPTY;
hres = IDispatch_Invoke(sink_disp, 1, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
ok(V_VT(&res) == VT_I4 && V_I4(&res) == 6, "unexpected result\n");
V_VT(args) = VT_I4;
......@@ -2377,12 +2377,12 @@ static void test_event_call(void)
dp.cArgs = 2;
V_VT(&res) = VT_EMPTY;
hres = IDispatch_Invoke(sink_disp, 2, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(V_VT(&res) == VT_I4 && V_I4(&res) == 7, "unexpected result: %d\n", V_I4(&res));
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
ok(V_VT(&res) == VT_I4 && V_I4(&res) == 7, "unexpected result: %ld\n", V_I4(&res));
V_VT(&res) = VT_ERROR;
hres = IDispatch_Invoke(sink_disp, 10, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
ok(V_VT(&res) == VT_EMPTY, "V_VT(res) = %d\n", V_VT(&res));
}
......@@ -2592,13 +2592,13 @@ static void test_exec_script(IHTMLDocument2 *doc, const WCHAR *codew, const WCHA
HRESULT hres;
hres = IHTMLDocument2_get_parentWindow(doc, &window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
code = SysAllocString(codew);
lang = SysAllocString(langw);
hres = IHTMLWindow2_execScript(window, code, lang, &v);
ok(hres == S_OK, "execScript failed: %08x\n", hres);
ok(hres == S_OK, "execScript failed: %08lx\n", hres);
SysFreeString(lang);
VariantClear(&v);
......@@ -2684,13 +2684,13 @@ static void load_typelib(void)
GetModuleFileNameW(NULL, path, MAX_PATH);
hres = LoadTypeLib(path, &typelib);
ok(hres == S_OK, "LoadTypeLib failed: %08x\n", hres);
ok(hres == S_OK, "LoadTypeLib failed: %08lx\n", hres);
hres = ITypeLib_GetTypeInfoOfGuid(typelib, &DIID_DispActiveXTest, &actxtest_typeinfo);
ok(hres == S_OK, "GetTypeInfoOfGuid(DIID_DispActiveXTest) failed: %08x\n", hres);
ok(hres == S_OK, "GetTypeInfoOfGuid(DIID_DispActiveXTest) failed: %08lx\n", hres);
hres = ITypeLib_GetTypeInfoOfGuid(typelib, &CLSID_ActiveXTest, &class_typeinfo);
ok(hres == S_OK, "GetTypeInfoOfGuid(CLSID_ActiveXTest) failed: %08x\n", hres);
ok(hres == S_OK, "GetTypeInfoOfGuid(CLSID_ActiveXTest) failed: %08lx\n", hres);
ITypeLib_Release(typelib);
}
......@@ -2738,7 +2738,7 @@ static BOOL register_activex(void)
hres = CoRegisterClassObject(&CLSID_TestActiveX, (IUnknown*)&activex_cf,
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
ok(hres == S_OK, "Could not register control: %08x\n", hres);
ok(hres == S_OK, "Could not register control: %08lx\n", hres);
return TRUE;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -159,23 +159,23 @@ static void _test_disp(unsigned line, IUnknown *unk, const IID *diid)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex);
ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08lx\n", hres);
if(FAILED(hres))
return;
ticnt = 0xdeadbeef;
hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08lx\n", hres);
ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt);
hres = IDispatchEx_GetTypeInfo(dispex, 0, 0, &typeinfo);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08lx\n", hres);
if(SUCCEEDED(hres)) {
TYPEATTR *type_attr;
hres = ITypeInfo_GetTypeAttr(typeinfo, &type_attr);
ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08lx\n", hres);
if(diid)
ok_(__FILE__,line) (IsEqualGUID(&type_attr->guid, diid), "unexpected guid %s\n",
wine_dbgstr_guid(&type_attr->guid));
......@@ -194,7 +194,7 @@ static IHTMLDocument3 *_get_doc3_iface(unsigned line, IUnknown *unk)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument3, (void**)&doc3);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDocument3 iface: %08lx\n", hres);
return doc3;
}
......@@ -206,7 +206,7 @@ static IHTMLElement *_get_elem_iface(unsigned line, IUnknown *unk)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement, (void**)&elem);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement iface: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement iface: %08lx\n", hres);
return elem;
}
......@@ -218,7 +218,7 @@ static IHTMLElement2 *_get_elem2_iface(unsigned line, IUnknown *unk)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement2, (void**)&elem2);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement2 iface: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement2 iface: %08lx\n", hres);
return elem2;
}
......@@ -230,7 +230,7 @@ static IHTMLElement3 *_get_elem3_iface(unsigned line, IUnknown *unk)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement3, (void**)&elem3);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement3 iface: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement3 iface: %08lx\n", hres);
return elem3;
}
......@@ -242,7 +242,7 @@ static IHTMLElement4 *_get_elem4_iface(unsigned line, IUnknown *unk)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement4, (void**)&elem4);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement4 iface: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement4 iface: %08lx\n", hres);
return elem4;
}
......@@ -254,7 +254,7 @@ static IHTMLIFrameElement *_get_iframe_iface(unsigned line, IUnknown *unk)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLIFrameElement, (void**)&iframe);
ok_(__FILE__,line)(hres == S_OK, "QueryInterface(IID_IHTMLIFrameElement) failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "QueryInterface(IID_IHTMLIFrameElement) failed: %08lx\n", hres);
return iframe;
}
......@@ -266,7 +266,7 @@ static IHTMLElement *_doc_get_body(unsigned line, IHTMLDocument2 *doc)
HRESULT hres;
hres = IHTMLDocument2_get_body(doc, &body);
ok_(__FILE__,line) (hres == S_OK, "get_body failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "get_body failed: %08lx\n", hres);
ok_(__FILE__,line) (body != NULL, "body == NULL\n");
return body;
......@@ -284,7 +284,7 @@ static IHTMLElement *_get_elem_id(unsigned line, IHTMLDocument2 *doc, const WCHA
hres = IHTMLDocument3_getElementById(doc3, str, &elem);
SysFreeString(str);
IHTMLDocument3_Release(doc3);
ok_(__FILE__,line) (hres == S_OK, "getElementById failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "getElementById failed: %08lx\n", hres);
ok_(__FILE__,line) (elem != NULL, "elem == NULL\n");
return elem;
......@@ -299,7 +299,7 @@ static void _test_elem_tag(unsigned line, IUnknown *unk, const WCHAR *extag)
hres = IHTMLElement_get_tagName(elem, &tag);
IHTMLElement_Release(elem);
ok_(__FILE__, line) (hres == S_OK, "get_tagName failed: %08x\n", hres);
ok_(__FILE__, line) (hres == S_OK, "get_tagName failed: %08lx\n", hres);
ok_(__FILE__, line) (!lstrcmpW(tag, extag), "got tag: %s, expected %s\n", wine_dbgstr_w(tag), wine_dbgstr_w(extag));
SysFreeString(tag);
......@@ -312,7 +312,7 @@ static IHTMLEventObj *_get_event_obj(unsigned line)
HRESULT hres;
hres = IHTMLWindow2_get_event(window, &event);
ok_(__FILE__,line) (hres == S_OK, "get_event failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "get_event failed: %08lx\n", hres);
ok_(__FILE__,line) (event != NULL, "event = NULL\n");
/* Native IE uses an undocumented DIID in IE9+ mode */
......@@ -329,7 +329,7 @@ static void _set_elem_innerhtml(unsigned line, IHTMLElement *elem, const WCHAR *
html = SysAllocString(inner_html);
hres = IHTMLElement_put_innerHTML(elem, html);
ok_(__FILE__,line)(hres == S_OK, "put_innerHTML failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "put_innerHTML failed: %08lx\n", hres);
SysFreeString(html);
}
......@@ -347,7 +347,7 @@ static void _elem_fire_event(unsigned line, IUnknown *unk, const WCHAR *event, V
hres = IHTMLElement3_fireEvent(elem3, str, evobj, &b);
in_fire_event--;
SysFreeString(str);
ok_(__FILE__,line)(hres == S_OK, "fireEvent failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "fireEvent failed: %08lx\n", hres);
ok_(__FILE__,line)(b == VARIANT_TRUE, "fireEvent returned %x\n", b);
}
......@@ -355,12 +355,12 @@ static void _elem_fire_event(unsigned line, IUnknown *unk, const WCHAR *event, V
static void _test_event_args(unsigned line, const IID *dispiid, DISPID id, WORD wFlags, DISPPARAMS *pdp,
VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
{
ok_(__FILE__,line) (id == DISPID_VALUE, "id = %d\n", id);
ok_(__FILE__,line) (id == DISPID_VALUE, "id = %ld\n", id);
ok_(__FILE__,line) (wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
ok_(__FILE__,line) (pdp != NULL, "pdp == NULL\n");
ok_(__FILE__,line) (pdp->cArgs == (document_mode < 9 ? 1 : 2), "pdp->cArgs = %d\n", pdp->cArgs);
ok_(__FILE__,line) (pdp->cNamedArgs == 1, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs);
ok_(__FILE__,line) (pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %d\n",
ok_(__FILE__,line) (pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %ld\n",
pdp->rgdispidNamedArgs[0]);
ok_(__FILE__,line) (V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(rgvarg) = %d\n", V_VT(pdp->rgvarg));
if(pdp->cArgs > 1)
......@@ -379,15 +379,15 @@ static void _test_event_args(unsigned line, const IID *dispiid, DISPID id, WORD
hres = IDispatch_QueryInterface(V_DISPATCH(pdp->rgvarg+1), &IID_IDOMEvent, (void**)&event);
if(in_fire_event)
ok(hres == E_NOINTERFACE, "QI(IID_IDOMEvent) returned %08x\n", hres);
ok(hres == E_NOINTERFACE, "QI(IID_IDOMEvent) returned %08lx\n", hres);
else
ok(hres == S_OK, "Could not get IDOMEvent iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDOMEvent iface: %08lx\n", hres);
hres = IDispatch_QueryInterface(V_DISPATCH(pdp->rgvarg+1), &IID_IHTMLEventObj, (void**)&event_obj);
if(in_fire_event)
ok(hres == S_OK, "Could not get IDOMEventObj iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDOMEventObj iface: %08lx\n", hres);
else
ok(hres == E_NOINTERFACE, "QI(IID_IHTMLEventObj) returned %08x\n", hres);
ok(hres == E_NOINTERFACE, "QI(IID_IHTMLEventObj) returned %08lx\n", hres);
if(event)
IDOMEvent_Release(event);
......@@ -395,7 +395,7 @@ static void _test_event_args(unsigned line, const IID *dispiid, DISPID id, WORD
IHTMLEventObj_Release(event_obj);
hres = IHTMLWindow2_get_event(window, &window_event);
ok(hres == S_OK, "get_event failed: %08x\n", hres);
ok(hres == S_OK, "get_event failed: %08lx\n", hres);
if(window_event) {
todo_wine_if(in_fire_event)
ok(!iface_cmp((IUnknown*)V_DISPATCH(pdp->rgvarg+1), (IUnknown*)window_event),
......@@ -411,7 +411,7 @@ static void _test_attached_event_args(unsigned line, DISPID id, WORD wFlags, DIS
{
IHTMLEventObj *event;
ok(id == DISPID_VALUE, "id = %d\n", id);
ok(id == DISPID_VALUE, "id = %ld\n", id);
ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
ok(pdp != NULL, "pDispParams == NULL\n");
ok(pdp->cArgs == 1, "pdp->cArgs = %d\n", pdp->cArgs);
......@@ -439,7 +439,7 @@ static IHTMLElement *_get_event_src(unsigned line)
hres = IHTMLEventObj_get_srcElement(event, &src_elem);
IHTMLEventObj_Release(event);
ok_(__FILE__,line) (hres == S_OK, "get_srcElement failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "get_srcElement failed: %08lx\n", hres);
return src_elem;
}
......@@ -464,7 +464,7 @@ static void _test_event_altkey(unsigned line, IHTMLEventObj *event, VARIANT_BOOL
HRESULT hres;
hres = IHTMLEventObj_get_altKey(event, &b);
ok_(__FILE__,line)(hres == S_OK, "get_altKey failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_altKey failed: %08lx\n", hres);
ok_(__FILE__,line)(b == exval, "altKey = %x, expected %x\n", b, exval);
}
......@@ -474,7 +474,7 @@ static void _test_event_ctrlkey(unsigned line, IHTMLEventObj *event, VARIANT_BOO
HRESULT hres;
hres = IHTMLEventObj_get_ctrlKey(event, &b);
ok_(__FILE__,line)(hres == S_OK, "get_ctrlKey failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_ctrlKey failed: %08lx\n", hres);
ok_(__FILE__,line)(b == exval, "ctrlKey = %x, expected %x\n", b, exval);
}
......@@ -484,7 +484,7 @@ static void _test_event_shiftkey(unsigned line, IHTMLEventObj *event, VARIANT_BO
HRESULT hres;
hres = IHTMLEventObj_get_shiftKey(event, &b);
ok_(__FILE__,line)(hres == S_OK, "get_shiftKey failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_shiftKey failed: %08lx\n", hres);
ok_(__FILE__,line)(b == exval, "shiftKey = %x, expected %x\n", b, exval);
}
......@@ -495,7 +495,7 @@ static void _test_event_cancelbubble(unsigned line, IHTMLEventObj *event, VARIAN
HRESULT hres;
hres = IHTMLEventObj_get_cancelBubble(event, &b);
ok_(__FILE__,line)(hres == S_OK, "get_cancelBubble failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_cancelBubble failed: %08lx\n", hres);
ok_(__FILE__,line)(b == exval, "cancelBubble = %x, expected %x\n", b, exval);
}
......@@ -505,7 +505,7 @@ static void _test_event_fromelem(unsigned line, IHTMLEventObj *event, const WCHA
HRESULT hres;
hres = IHTMLEventObj_get_fromElement(event, &elem);
ok_(__FILE__,line)(hres == S_OK, "get_fromElement failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_fromElement failed: %08lx\n", hres);
if(from_tag)
_test_elem_tag(line, (IUnknown*)elem, from_tag);
else
......@@ -520,7 +520,7 @@ static void _test_event_toelem(unsigned line, IHTMLEventObj *event, const WCHAR
HRESULT hres;
hres = IHTMLEventObj_get_toElement(event, &elem);
ok_(__FILE__,line)(hres == S_OK, "get_toElement failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_toElement failed: %08lx\n", hres);
if(to_tag)
_test_elem_tag(line, (IUnknown*)elem, to_tag);
else
......@@ -535,8 +535,8 @@ static void _test_event_keycode(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_keyCode(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_keyCode failed: %08x\n", hres);
ok_(__FILE__,line)(l == exl, "keyCode = %x, expected %x\n", l, exl);
ok_(__FILE__,line)(hres == S_OK, "get_keyCode failed: %08lx\n", hres);
ok_(__FILE__,line)(l == exl, "keyCode = %lx, expected %lx\n", l, exl);
}
static void _test_event_button(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -545,8 +545,8 @@ static void _test_event_button(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_button(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_button failed: %08x\n", hres);
ok_(__FILE__,line)(l == exl, "button = %x, expected %x\n", l, exl);
ok_(__FILE__,line)(hres == S_OK, "get_button failed: %08lx\n", hres);
ok_(__FILE__,line)(l == exl, "button = %lx, expected %lx\n", l, exl);
}
static void _test_event_reason(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -555,8 +555,8 @@ static void _test_event_reason(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_reason(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_reason failed: %08x\n", hres);
ok_(__FILE__,line)(l == exl, "reason = %x, expected %x\n", l, exl);
ok_(__FILE__,line)(hres == S_OK, "get_reason failed: %08lx\n", hres);
ok_(__FILE__,line)(l == exl, "reason = %lx, expected %lx\n", l, exl);
}
static void _test_event_x(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -565,9 +565,9 @@ static void _test_event_x(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_x(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_x failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_x failed: %08lx\n", hres);
if(exl != -10) /* don't test the exact value */
ok_(__FILE__,line)(l == exl, "x = %d, expected %d\n", l, exl);
ok_(__FILE__,line)(l == exl, "x = %ld, expected %ld\n", l, exl);
}
static void _test_event_y(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -576,9 +576,9 @@ static void _test_event_y(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_y(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_y failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_y failed: %08lx\n", hres);
if(exl != -10) /* don't test the exact value */
ok_(__FILE__,line)(l == exl, "y = %d, expected %d\n", l, exl);
ok_(__FILE__,line)(l == exl, "y = %ld, expected %ld\n", l, exl);
}
static void _test_event_clientx(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -587,9 +587,9 @@ static void _test_event_clientx(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_clientX(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_clientX failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_clientX failed: %08lx\n", hres);
if(exl != -10) /* don't test the exact value */
ok_(__FILE__,line)(l == exl, "clientX = %d, expected %d\n", l, exl);
ok_(__FILE__,line)(l == exl, "clientX = %ld, expected %ld\n", l, exl);
}
static void _test_event_clienty(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -598,9 +598,9 @@ static void _test_event_clienty(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_clientY(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_clientY failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_clientY failed: %08lx\n", hres);
if(exl != -10) /* don't test the exact value */
ok_(__FILE__,line)(l == exl, "clientY = %d, expected %d\n", l, exl);
ok_(__FILE__,line)(l == exl, "clientY = %ld, expected %ld\n", l, exl);
}
static void _test_event_offsetx(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -609,9 +609,9 @@ static void _test_event_offsetx(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_offsetX(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_offsetX failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_offsetX failed: %08lx\n", hres);
if(exl != -10) /* don't test the exact value */
ok_(__FILE__,line)(l == exl, "offsetX = %d, expected %d\n", l, exl);
ok_(__FILE__,line)(l == exl, "offsetX = %ld, expected %ld\n", l, exl);
}
static void _test_event_offsety(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -620,9 +620,9 @@ static void _test_event_offsety(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_offsetY(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_offsetY failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_offsetY failed: %08lx\n", hres);
if(exl != -10) /* don't test the exact value */
ok_(__FILE__,line)(l == exl, "offsetY = %d, expected %d\n", l, exl);
ok_(__FILE__,line)(l == exl, "offsetY = %ld, expected %ld\n", l, exl);
}
static void _test_event_screenx(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -631,9 +631,9 @@ static void _test_event_screenx(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_screenX(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_screenX failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_screenX failed: %08lx\n", hres);
if(exl != -10) /* don't test the exact value */
ok_(__FILE__,line)(l == exl, "screenX = %d, expected %d\n", l, exl);
ok_(__FILE__,line)(l == exl, "screenX = %ld, expected %ld\n", l, exl);
}
static void _test_event_screeny(unsigned line, IHTMLEventObj *event, LONG exl)
......@@ -642,9 +642,9 @@ static void _test_event_screeny(unsigned line, IHTMLEventObj *event, LONG exl)
HRESULT hres;
hres = IHTMLEventObj_get_screenY(event, &l);
ok_(__FILE__,line)(hres == S_OK, "get_screenY failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_screenY failed: %08lx\n", hres);
if(exl != -10) /* don't test the exact value for -10 */
ok_(__FILE__,line)(l == exl, "screenY = %d, expected %d\n", l, exl);
ok_(__FILE__,line)(l == exl, "screenY = %ld, expected %ld\n", l, exl);
}
static void _test_event_type(unsigned line, IHTMLEventObj *event, const WCHAR *exstr)
......@@ -653,7 +653,7 @@ static void _test_event_type(unsigned line, IHTMLEventObj *event, const WCHAR *e
HRESULT hres;
hres = IHTMLEventObj_get_type(event, &str);
ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08lx\n", hres);
ok_(__FILE__,line)(!lstrcmpW(str, exstr), "type = %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(exstr));
}
......@@ -663,7 +663,7 @@ static void _test_event_qualifier(unsigned line, IHTMLEventObj *event, const WCH
HRESULT hres;
hres = IHTMLEventObj_get_qualifier(event, &str);
ok_(__FILE__,line)(hres == S_OK, "get_qualifier failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_qualifier failed: %08lx\n", hres);
if(exstr)
ok_(__FILE__,line)(!lstrcmpW(str, exstr), "qualifier = %s, expected %s\n", wine_dbgstr_w(str),
wine_dbgstr_w(exstr));
......@@ -677,7 +677,7 @@ static void _test_event_srcfilter(unsigned line, IHTMLEventObj *event)
HRESULT hres;
hres = IHTMLEventObj_get_srcFilter(event, &disp);
ok_(__FILE__,line)(hres == S_OK, "get_srcFilter failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_srcFilter failed: %08lx\n", hres);
ok_(__FILE__,line)(!disp, "srcFilter != NULL\n");
}
......@@ -712,7 +712,7 @@ static void _test_event_obj(unsigned line, const WCHAR *type, const xy_test_t *x
V_VT(&v) = VT_NULL;
hres = IHTMLEventObj_get_returnValue(event, &v);
ok_(__FILE__,line)(hres == S_OK, "get_returnValue failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_returnValue failed: %08lx\n", hres);
/* Depending on source of event, returnValue may be true bool in IE9+ mode */
ok_(__FILE__,line)(V_VT(&v) == VT_EMPTY || (document_mode >= 9 && V_VT(&v) == VT_BOOL),
"V_VT(returnValue) = %d\n", V_VT(&v));
......@@ -720,7 +720,7 @@ static void _test_event_obj(unsigned line, const WCHAR *type, const xy_test_t *x
ok_(__FILE__,line)(V_BOOL(&v) == VARIANT_TRUE, "V_BOOL(returnValue) = %x\n", V_BOOL(&v));
hres = IHTMLEventObj_QueryInterface(event, &IID_IDOMEvent, (void**)&dom_event);
ok(hres == E_NOINTERFACE, "Could not get IDOMEvent iface: %08x\n", hres);
ok(hres == E_NOINTERFACE, "Could not get IDOMEvent iface: %08lx\n", hres);
IHTMLEventObj_Release(event);
}
......@@ -737,7 +737,7 @@ static void _elem_attach_event(unsigned line, IUnknown *unk, const WCHAR *namew,
hres = IHTMLElement2_attachEvent(elem, name, disp, &res);
IHTMLElement2_Release(elem);
SysFreeString(name);
ok_(__FILE__,line)(hres == S_OK, "attachEvent failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "attachEvent failed: %08lx\n", hres);
ok_(__FILE__,line)(res == VARIANT_TRUE, "attachEvent returned %x\n", res);
}
......@@ -749,12 +749,12 @@ static void _add_event_listener(unsigned line, IUnknown *unk, const WCHAR *type,
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IEventTarget, (void**)&event_target);
ok_(__FILE__,line)(hres == S_OK, "Could not get IEventTarget iface: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "Could not get IEventTarget iface: %08lx\n", hres);
str = SysAllocString(type);
hres = IEventTarget_addEventListener(event_target, str, listener, use_capture);
SysFreeString(str);
ok_(__FILE__,line)(hres == S_OK, "addEventListener failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "addEventListener failed: %08lx\n", hres);
IEventTarget_Release(event_target);
}
......@@ -767,12 +767,12 @@ static void _remove_event_listener(unsigned line, IUnknown *unk, const WCHAR *ty
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IEventTarget, (void**)&event_target);
ok_(__FILE__,line)(hres == S_OK, "Could not get IEventTarget iface: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "Could not get IEventTarget iface: %08lx\n", hres);
str = SysAllocString(type);
hres = IEventTarget_removeEventListener(event_target, str, listener, use_capture);
SysFreeString(str);
ok_(__FILE__,line)(hres == S_OK, "removeEventListener failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "removeEventListener failed: %08lx\n", hres);
IEventTarget_Release(event_target);
}
......@@ -788,7 +788,7 @@ static void _elem_detach_event(unsigned line, IUnknown *unk, const WCHAR *namew,
hres = IHTMLElement2_detachEvent(elem, name, disp);
IHTMLElement2_Release(elem);
SysFreeString(name);
ok_(__FILE__,line)(hres == S_OK, "detachEvent failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "detachEvent failed: %08lx\n", hres);
}
#define doc_attach_event(a,b,c) _doc_attach_event(__LINE__,a,b,c)
......@@ -803,7 +803,7 @@ static void _doc_attach_event(unsigned line, IHTMLDocument2 *doc, const WCHAR *n
hres = IHTMLDocument3_attachEvent(doc3, name, disp, &res);
IHTMLDocument3_Release(doc3);
SysFreeString(name);
ok_(__FILE__,line)(hres == S_OK, "attachEvent failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "attachEvent failed: %08lx\n", hres);
ok_(__FILE__,line)(res == VARIANT_TRUE, "attachEvent returned %x\n", res);
}
......@@ -818,7 +818,7 @@ static void _doc_detach_event(unsigned line, IHTMLDocument2 *doc, const WCHAR *n
hres = IHTMLDocument3_detachEvent(doc3, name, disp);
IHTMLDocument3_Release(doc3);
SysFreeString(name);
ok_(__FILE__,line)(hres == S_OK, "detachEvent failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "detachEvent failed: %08lx\n", hres);
}
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
......@@ -902,7 +902,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
......@@ -1214,7 +1214,7 @@ static HRESULT WINAPI submit_onclick_attached_check_cancel(IDispatchEx *iface, D
event = NULL;
hres = IHTMLWindow2_get_event(window, &event);
ok(hres == S_OK, "get_event failed: %08x\n", hres);
ok(hres == S_OK, "get_event failed: %08lx\n", hres);
ok(event != NULL, "event == NULL\n");
test_event_cancelbubble(event, VARIANT_TRUE);
......@@ -1238,12 +1238,12 @@ static HRESULT WINAPI submit_onclick_setret(IDispatchEx *iface, DISPID id, LCID
event = NULL;
hres = IHTMLWindow2_get_event(window, &event);
ok(hres == S_OK, "get_event failed: %08x\n", hres);
ok(hres == S_OK, "get_event failed: %08lx\n", hres);
ok(event != NULL, "event == NULL\n");
V_VT(&v) = VT_ERROR;
hres = IHTMLEventObj_get_returnValue(event, &v);
ok(hres == S_OK, "get_returnValue failed: %08x\n", hres);
ok(hres == S_OK, "get_returnValue failed: %08lx\n", hres);
if(document_mode < 9) {
ok(V_VT(&v) == VT_EMPTY, "V_VT(returnValue) = %d\n", V_VT(&v));
}else todo_wine {
......@@ -1252,11 +1252,11 @@ static HRESULT WINAPI submit_onclick_setret(IDispatchEx *iface, DISPID id, LCID
}
hres = IHTMLEventObj_put_returnValue(event, onclick_event_retval);
ok(hres == S_OK, "put_returnValue failed: %08x\n", hres);
ok(hres == S_OK, "put_returnValue failed: %08lx\n", hres);
V_VT(&v) = VT_ERROR;
hres = IHTMLEventObj_get_returnValue(event, &v);
ok(hres == S_OK, "get_returnValue failed: %08x\n", hres);
ok(hres == S_OK, "get_returnValue failed: %08lx\n", hres);
ok(VarCmp(&v, &onclick_event_retval, 0, 0) == VARCMP_EQ, "unexpected returnValue\n");
IHTMLEventObj_Release(event);
......@@ -1278,13 +1278,13 @@ static HRESULT WINAPI submit_onclick_cancel(IDispatchEx *iface, DISPID id, LCID
event = NULL;
hres = IHTMLWindow2_get_event(window, &event);
ok(hres == S_OK, "get_event failed: %08x\n", hres);
ok(hres == S_OK, "get_event failed: %08lx\n", hres);
ok(event != NULL, "event == NULL\n");
test_event_cancelbubble(event, VARIANT_FALSE);
hres = IHTMLEventObj_put_cancelBubble(event, VARIANT_TRUE);
ok(hres == S_OK, "put_returnValue failed: %08x\n", hres);
ok(hres == S_OK, "put_returnValue failed: %08lx\n", hres);
test_event_cancelbubble(event, VARIANT_TRUE);
IHTMLEventObj_Release(event);
......@@ -1304,7 +1304,7 @@ static HRESULT WINAPI iframedoc_onreadystatechange(IDispatchEx *iface, DISPID id
event = (void*)0xdeadbeef;
hres = IHTMLWindow2_get_event(window, &event);
ok(hres == S_OK, "get_event failed: %08x\n", hres);
ok(hres == S_OK, "get_event failed: %08lx\n", hres);
ok(!event, "event = %p\n", event);
return S_OK;
......@@ -1333,29 +1333,29 @@ static HRESULT WINAPI iframe_onreadystatechange(IDispatchEx *iface, DISPID id, L
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement2_get_readyState(elem2, &v);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(readyState) = %d\n", V_VT(&v));
hres = IHTMLElement2_QueryInterface(elem2, &IID_IHTMLFrameBase2, (void**)&iframe);
IHTMLElement2_Release(elem2);
ok(hres == S_OK, "Could not get IHTMLFrameBase2 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLFrameBase2 iface: %08lx\n", hres);
str = NULL;
hres = IHTMLFrameBase2_get_readyState(iframe, &str);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(str != NULL, "readyState == NULL\n");
ok(!lstrcmpW(str, V_BSTR(&v)), "ready states differ\n");
VariantClear(&v);
hres = IHTMLFrameBase2_get_contentWindow(iframe, &iframe_window);
ok(hres == S_OK, "get_contentDocument failed: %08x\n", hres);
ok(hres == S_OK, "get_contentDocument failed: %08lx\n", hres);
hres = IHTMLWindow2_get_document(iframe_window, &iframe_doc);
IHTMLWindow2_Release(iframe_window);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
hres = IHTMLDocument2_get_readyState(iframe_doc, &str2);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
ok(!lstrcmpW(str, str2), "unexpected document readyState %s\n", wine_dbgstr_w(str2));
SysFreeString(str2);
......@@ -1365,7 +1365,7 @@ static HRESULT WINAPI iframe_onreadystatechange(IDispatchEx *iface, DISPID id, L
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&iframedoc_onreadystatechange_obj;
hres = IHTMLDocument2_put_onreadystatechange(iframe_doc, v);
ok(hres == S_OK, "put_onreadystatechange: %08x\n", hres);
ok(hres == S_OK, "put_onreadystatechange: %08lx\n", hres);
}else if(!lstrcmpW(str, L"interactive"))
CHECK_EXPECT(iframe_onreadystatechange_interactive);
else if(!lstrcmpW(str, L"complete"))
......@@ -1437,7 +1437,7 @@ static void _test_cp_args(unsigned line, REFIID riid, WORD flags, DISPPARAMS *dp
ok_(__FILE__,line)(dp->rgvarg != NULL, "dp->rgvarg = %p\n", dp->rgvarg);
ok_(__FILE__,line)(V_VT(&dp->rgvarg[0]) == VT_DISPATCH, "vt = %d\n", V_VT(&dp->rgvarg[0]));
hr = IDispatch_QueryInterface(V_DISPATCH(&dp->rgvarg[0]), &IID_IHTMLEventObj, (void **)&event);
ok_(__FILE__,line)(hr == S_OK, "Could not get IHTMLEventObj iface: %08x\n", hr);
ok_(__FILE__,line)(hr == S_OK, "Could not get IHTMLEventObj iface: %08lx\n", hr);
IHTMLEventObj_Release(event);
}
else
......@@ -1489,7 +1489,7 @@ static HRESULT WINAPI doccp(IDispatchEx *iface, DISPID dispIdMember,
test_cp_args(riid, wFlags, pdp, pVarResult, pei, puArgErr, FALSE);
break;
default:
ok(0, "unexpected call %d\n", dispIdMember);
ok(0, "unexpected call %ld\n", dispIdMember);
return E_NOTIMPL;
}
......@@ -1508,7 +1508,7 @@ static HRESULT WINAPI doccp2(IDispatchEx *iface, DISPID dispIdMember,
test_cp_args(riid, wFlags, pdp, pVarResult, pei, puArgErr, TRUE);
break;
default:
ok(0, "unexpected call %d\n", dispIdMember);
ok(0, "unexpected call %ld\n", dispIdMember);
return E_NOTIMPL;
}
......@@ -1528,7 +1528,7 @@ static HRESULT WINAPI doccp_onclick_cancel(IDispatchEx *iface, DISPID dispIdMemb
V_BOOL(pVarResult) = VARIANT_FALSE;
break;
default:
ok(0, "unexpected call %d\n", dispIdMember);
ok(0, "unexpected call %ld\n", dispIdMember);
return E_NOTIMPL;
}
......@@ -1546,7 +1546,7 @@ static HRESULT WINAPI elem2_cp(IDispatchEx *iface, DISPID dispIdMember, REFIID r
test_cp_eventarg(riid, wFlags, pdp, pVarResult, pei, puArgErr);
break;
default:
ok(0, "unexpected call %d\n", dispIdMember);
ok(0, "unexpected call %ld\n", dispIdMember);
return E_NOTIMPL;
}
......@@ -1561,10 +1561,10 @@ static HRESULT WINAPI timeoutFunc_Invoke(IDispatchEx *iface, DISPID dispIdMember
{
CHECK_EXPECT(timeout);
ok(dispIdMember == DISPID_VALUE, "dispIdMember = %d\n", dispIdMember);
ok(dispIdMember == DISPID_VALUE, "dispIdMember = %ld\n", dispIdMember);
ok(IsEqualGUID(&IID_NULL, riid), "riid = %s\n", wine_dbgstr_guid(riid));
ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
ok(!lcid, "lcid = %x\n", lcid);
ok(!lcid, "lcid = %lx\n", lcid);
ok(pDispParams != NULL, "pDispParams == NULL\n");
ok(!pDispParams->cArgs, "pdp->cArgs = %d\n", pDispParams->cArgs);
ok(!pDispParams->cNamedArgs, "pdp->cNamedArgs = %d\n", pDispParams->cNamedArgs);
......@@ -1676,11 +1676,11 @@ static IConnectionPoint *get_cp(IUnknown *unk, REFIID riid)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&cp_container);
ok(hres == S_OK, "Could not get IConnectionPointContainer: %08x\n", hres);
ok(hres == S_OK, "Could not get IConnectionPointContainer: %08lx\n", hres);
hres = IConnectionPointContainer_FindConnectionPoint(cp_container, riid, &cp);
IConnectionPointContainer_Release(cp_container);
ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
ok(hres == S_OK, "FindConnectionPoint failed: %08lx\n", hres);
return cp;
}
......@@ -1694,7 +1694,7 @@ static DWORD register_cp(IUnknown *unk, REFIID riid, IUnknown *sink)
cp = get_cp(unk, riid);
hres = IConnectionPoint_Advise(cp, sink, &cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
ok(hres == S_OK, "Advise failed: %08lx\n", hres);
return cookie;
}
......@@ -1707,7 +1707,7 @@ static void unregister_cp(IUnknown *unk, REFIID riid, DWORD cookie)
cp = get_cp(unk, riid);
hres = IConnectionPoint_Unadvise(cp, cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Unadvise failed: %08x\n", hres);
ok(hres == S_OK, "Unadvise failed: %08lx\n", hres);
}
static HRESULT WINAPI EventDispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
......@@ -1777,7 +1777,7 @@ static HRESULT WINAPI EventDispatch_Invoke(IDispatch *iface, DISPID dispIdMember
case 1049:
break; /* TODO */
default:
ok(0, "Unexpected call: %d\n", dispIdMember);
ok(0, "Unexpected call: %ld\n", dispIdMember);
}
return S_OK;
......@@ -1825,27 +1825,27 @@ static void test_onclick(IHTMLDocument2 *doc)
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement_get_onclick(div, &v);
ok(hres == S_OK, "get_onclick failed: %08x\n", hres);
ok(hres == S_OK, "get_onclick failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "V_VT(onclick) = %d\n", V_VT(&v));
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement_put_onclick(div, v);
ok(hres == (document_mode < 9 ? E_NOTIMPL : S_OK), "put_onclick failed: %08x\n", hres);
ok(hres == (document_mode < 9 ? E_NOTIMPL : S_OK), "put_onclick failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement_get_onclick(div, &v);
ok(hres == S_OK, "get_onclick failed: %08x\n", hres);
ok(hres == S_OK, "get_onclick failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "V_VT(onclick) = %d\n", V_VT(&v));
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = SysAllocString(L"function();");
hres = IHTMLElement_put_onclick(div, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
SysFreeString(V_BSTR(&v));
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement_get_onclick(div, &v);
ok(hres == S_OK, "get_onclick failed: %08x\n", hres);
ok(hres == S_OK, "get_onclick failed: %08lx\n", hres);
if(document_mode < 9) {
ok(V_VT(&v) == VT_BSTR, "V_VT(onclick) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"function();"), "V_BSTR(onclick) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
......@@ -1858,32 +1858,32 @@ static void test_onclick(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&div_onclick_obj;
hres = IHTMLElement_put_onclick(div, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
V_VT(&v) = VT_NULL;
hres = IHTMLElement_put_ondblclick(div, v);
ok(hres == S_OK, "put_ondblclick failed: %08x\n", hres);
ok(hres == S_OK, "put_ondblclick failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement_get_onclick(div, &v);
ok(hres == S_OK, "get_onclick failed: %08x\n", hres);
ok(hres == S_OK, "get_onclick failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onclick) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&div_onclick_obj, "V_DISPATCH(onclick) != onclickFunc\n");
VariantClear(&v);
V_VT(&v) = VT_EMPTY;
hres = IHTMLDocument2_get_onclick(doc, &v);
ok(hres == S_OK, "get_onclick failed: %08x\n", hres);
ok(hres == S_OK, "get_onclick failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "V_VT(onclick) = %d\n", V_VT(&v));
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&document_onclick_obj;
hres = IHTMLDocument2_put_onclick(doc, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLDocument2_get_onclick(doc, &v);
ok(hres == S_OK, "get_onclick failed: %08x\n", hres);
ok(hres == S_OK, "get_onclick failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onclick) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&document_onclick_obj, "V_DISPATCH(onclick) != onclickFunc\n");
VariantClear(&v);
......@@ -1898,7 +1898,7 @@ static void test_onclick(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&body_onclick_obj;
hres = IHTMLElement_put_onclick(body, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
if(winetest_interactive && document_mode < 9) {
SET_EXPECT(div_onclick);
......@@ -1925,7 +1925,7 @@ static void test_onclick(IHTMLDocument2 *doc)
SET_EXPECT(invoke_onclick);
hres = IHTMLElement_click(div);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(div_onclick);
CHECK_CALLED(div_onclick_attached);
......@@ -1972,7 +1972,7 @@ static void test_onclick(IHTMLDocument2 *doc)
SET_EXPECT(invoke_onclick);
hres = IHTMLElement_click(div);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(div_onclick);
CHECK_CALLED(div_onclick_disp);
......@@ -2007,7 +2007,7 @@ static void test_onclick(IHTMLDocument2 *doc)
trace("click >>>\n");
hres = IHTMLElement_click(div);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
trace("click <<<\n");
CHECK_CALLED(div_onclick);
......@@ -2031,10 +2031,10 @@ static void test_onclick(IHTMLDocument2 *doc)
V_VT(&v) = VT_NULL;
hres = IHTMLElement_put_onclick(div, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
hres = IHTMLElement_get_onclick(div, &v);
ok(hres == S_OK, "get_onclick failed: %08x\n", hres);
ok(hres == S_OK, "get_onclick failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "get_onclick returned vt %d\n", V_VT(&v));
elem_detach_event((IUnknown*)div, L"onclick", (IDispatch*)&div_onclick_disp);
......@@ -2053,7 +2053,7 @@ static void test_onclick(IHTMLDocument2 *doc)
SET_EXPECT(invoke_onclick);
hres = IHTMLElement_click(div);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(div_onclick_attached);
CHECK_CALLED(body_onclick);
......@@ -2079,27 +2079,27 @@ static void test_onreadystatechange(IHTMLDocument2 *doc)
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement2_get_onreadystatechange(elem2, &v);
ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "get_onreadystatechange failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "V_VT(onreadystatechange) = %d\n", V_VT(&v));
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&iframe_onreadystatechange_obj;
hres = IHTMLElement2_put_onreadystatechange(elem2, v);
ok(hres == S_OK, "put_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "put_onreadystatechange failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement2_get_onreadystatechange(elem2, &v);
ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "get_onreadystatechange failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onreadystatechange) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&iframe_onreadystatechange_obj, "unexpected onreadystatechange value\n");
hres = IHTMLElement2_QueryInterface(elem2, &IID_IHTMLFrameBase, (void**)&iframe);
IHTMLElement2_Release(elem2);
ok(hres == S_OK, "Could not get IHTMLFrameBase iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLFrameBase iface: %08lx\n", hres);
hres = IHTMLFrameBase_put_src(iframe, (str = SysAllocString(L"about:blank")));
SysFreeString(str);
ok(hres == S_OK, "put_src failed: %08x\n", hres);
ok(hres == S_OK, "put_src failed: %08lx\n", hres);
SET_EXPECT(iframe_onreadystatechange_loading);
SET_EXPECT(iframedoc_onreadystatechange);
......@@ -2125,21 +2125,21 @@ static void test_imgload(IHTMLDocument2 *doc)
elem = get_elem_id(doc, L"imgid");
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLImgElement, (void**)&img);
IHTMLElement_Release(elem);
ok(hres == S_OK, "Could not get IHTMLImgElement iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLImgElement iface: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLImgElement_get_onload(img, &v);
ok(hres == S_OK, "get_onload failed: %08x\n", hres);
ok(hres == S_OK, "get_onload failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "V_VT(onload) = %d\n", V_VT(&v));
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&img_onload_obj;
hres = IHTMLImgElement_put_onload(img, v);
ok(hres == S_OK, "put_onload failed: %08x\n", hres);
ok(hres == S_OK, "put_onload failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLImgElement_get_onload(img, &v);
ok(hres == S_OK, "get_onload failed: %08x\n", hres);
ok(hres == S_OK, "get_onload failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onload) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&img_onload_obj, "V_DISPATCH(onload) != onloadkFunc\n");
VariantClear(&v);
......@@ -2147,18 +2147,18 @@ static void test_imgload(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&img_onerror_obj;
hres = IHTMLImgElement_put_onerror(img, v);
ok(hres == S_OK, "put_onerror failed: %08x\n", hres);
ok(hres == S_OK, "put_onerror failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLImgElement_get_onerror(img, &v);
ok(hres == S_OK, "get_onerror failed: %08x\n", hres);
ok(hres == S_OK, "get_onerror failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onerror) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&img_onerror_obj, "V_DISPATCH(onerror) != onerrorFunc\n");
VariantClear(&v);
str = SysAllocString(L"http://test.winehq.org/tests/winehq_snapshot/index_files/winehq_logo_text.png");
hres = IHTMLImgElement_put_src(img, str);
ok(hres == S_OK, "put_src failed: %08x\n", hres);
ok(hres == S_OK, "put_src failed: %08lx\n", hres);
SysFreeString(str);
SET_EXPECT(img_onload);
......@@ -2169,7 +2169,7 @@ static void test_imgload(IHTMLDocument2 *doc)
str = SysAllocString(L"about:blank");
hres = IHTMLImgElement_put_src(img, str);
ok(hres == S_OK, "put_src failed: %08x\n", hres);
ok(hres == S_OK, "put_src failed: %08lx\n", hres);
SysFreeString(str);
pump_msgs(&called_img_onerror); /* FIXME: should not be needed */
......@@ -2181,32 +2181,32 @@ static void test_imgload(IHTMLDocument2 *doc)
/* test onload on unattached image */
hres = IHTMLDocument2_createElement(doc, (str = SysAllocString(L"img")), &elem);
SysFreeString(str);
ok(hres == S_OK, "createElement(img) failed: %08x\n", hres);
ok(hres == S_OK, "createElement(img) failed: %08lx\n", hres);
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLImgElement, (void**)&img);
IHTMLElement_Release(elem);
ok(hres == S_OK, "Could not get IHTMLImgElement iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLImgElement iface: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLImgElement_get_onload(img, &v);
ok(hres == S_OK, "get_onload failed: %08x\n", hres);
ok(hres == S_OK, "get_onload failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "V_VT(onload) = %d\n", V_VT(&v));
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&unattached_img_onload_obj;
hres = IHTMLImgElement_put_onload(img, v);
ok(hres == S_OK, "put_onload failed: %08x\n", hres);
ok(hres == S_OK, "put_onload failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLImgElement_get_onload(img, &v);
ok(hres == S_OK, "get_onload failed: %08x\n", hres);
ok(hres == S_OK, "get_onload failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onload) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&unattached_img_onload_obj, "incorrect V_DISPATCH(onload)\n");
VariantClear(&v);
str = SysAllocString(L"http://test.winehq.org/tests/winehq_snapshot/index_files/winehq_logo_text.png?v=1");
hres = IHTMLImgElement_put_src(img, str);
ok(hres == S_OK, "put_src failed: %08x\n", hres);
ok(hres == S_OK, "put_src failed: %08lx\n", hres);
SysFreeString(str);
SET_EXPECT(img_onload);
......@@ -2227,28 +2227,28 @@ static void test_link_load(IHTMLDocument2 *doc)
elem = get_elem_id(doc, L"linkid");
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLLinkElement, (void**)&link);
IHTMLElement_Release(elem);
ok(hres == S_OK, "Could not get IHTMLLinkElement iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLLinkElement iface: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLLinkElement_get_onload(link, &v);
ok(hres == S_OK, "get_onload failed: %08x\n", hres);
ok(hres == S_OK, "get_onload failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "V_VT(onload) = %d\n", V_VT(&v));
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&link_onload_obj;
hres = IHTMLLinkElement_put_onload(link, v);
ok(hres == S_OK, "put_onload failed: %08x\n", hres);
ok(hres == S_OK, "put_onload failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLLinkElement_get_onload(link, &v);
ok(hres == S_OK, "get_onload failed: %08x\n", hres);
ok(hres == S_OK, "get_onload failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onload) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&link_onload_obj, "V_DISPATCH(onload) != onloadkFunc\n");
VariantClear(&v);
str = SysAllocString(L"http://test.winehq.org/tests/winehq_snapshot/index_files/styles.css");
hres = IHTMLLinkElement_put_href(link, str);
ok(hres == S_OK, "put_src failed: %08x\n", hres);
ok(hres == S_OK, "put_src failed: %08lx\n", hres);
SysFreeString(str);
SET_EXPECT(link_onload);
......@@ -2276,17 +2276,17 @@ static void test_focus(IHTMLDocument2 *doc)
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement2_get_onfocus(elem2, &v);
ok(hres == S_OK, "get_onfocus failed: %08x\n", hres);
ok(hres == S_OK, "get_onfocus failed: %08lx\n", hres);
ok(V_VT(&v) == VT_NULL, "V_VT(onfocus) = %d\n", V_VT(&v));
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&input_onfocus_obj;
hres = IHTMLElement2_put_onfocus(elem2, v);
ok(hres == S_OK, "put_onfocus failed: %08x\n", hres);
ok(hres == S_OK, "put_onfocus failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement2_get_onfocus(elem2, &v);
ok(hres == S_OK, "get_onfocus failed: %08x\n", hres);
ok(hres == S_OK, "get_onfocus failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onfocus) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&input_onfocus_obj, "V_DISPATCH(onfocus) != onfocusFunc\n");
VariantClear(&v);
......@@ -2294,18 +2294,18 @@ static void test_focus(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&div_onfocusin_obj;
hres = IHTMLElement4_put_onfocusin(div, v);
ok(hres == S_OK, "put_onfocusin failed: %08x\n", hres);
ok(hres == S_OK, "put_onfocusin failed: %08lx\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement4_get_onfocusin(div, &v);
ok(hres == S_OK, "get_onfocusin failed: %08x\n", hres);
ok(hres == S_OK, "get_onfocusin failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onfocusin) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&div_onfocusin_obj, "V_DISPATCH(onfocus) != onfocusFunc\n");
VariantClear(&v);
V_VT(&v) = VT_EMPTY;
hres = IHTMLElement2_get_onfocus(elem2, &v);
ok(hres == S_OK, "get_onfocus failed: %08x\n", hres);
ok(hres == S_OK, "get_onfocus failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(onfocus) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&input_onfocus_obj, "V_DISPATCH(onfocus) != onfocusFunc\n");
VariantClear(&v);
......@@ -2317,7 +2317,7 @@ static void test_focus(IHTMLDocument2 *doc)
ok(!IsChild(container_hwnd, GetFocus()), "focus belongs to document window\n");
hres = IHTMLWindow2_focus(window);
ok(hres == S_OK, "focus failed: %08x\n", hres);
ok(hres == S_OK, "focus failed: %08lx\n", hres);
ok(IsChild(container_hwnd, GetFocus()), "focus does not belong to document window\n");
pump_msgs(NULL);
......@@ -2325,7 +2325,7 @@ static void test_focus(IHTMLDocument2 *doc)
SET_EXPECT(div_onfocusin);
SET_EXPECT(input_onfocus);
hres = IHTMLElement2_focus(elem2);
ok(hres == S_OK, "focus failed: %08x\n", hres);
ok(hres == S_OK, "focus failed: %08lx\n", hres);
pump_msgs(NULL);
CHECK_CALLED(div_onfocusin);
CHECK_CALLED(input_onfocus);
......@@ -2338,12 +2338,12 @@ static void test_focus(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&input_onblur_obj;
hres = IHTMLElement2_put_onblur(elem2, v);
ok(hres == S_OK, "put_onblur failed: %08x\n", hres);
ok(hres == S_OK, "put_onblur failed: %08lx\n", hres);
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&div_onfocusout_obj;
hres = IHTMLElement4_put_onfocusout(div, v);
ok(hres == S_OK, "put_onfocusout failed: %08x\n", hres);
ok(hres == S_OK, "put_onfocusout failed: %08lx\n", hres);
SET_EXPECT(div_onfocusout);
SET_EXPECT(input_onblur);
......@@ -2351,7 +2351,7 @@ static void test_focus(IHTMLDocument2 *doc)
pump_msgs(NULL);
CHECK_CALLED(input_onblur);
CHECK_CALLED(div_onfocusout);
ok(hres == S_OK, "blur failed: %08x\n", hres);
ok(hres == S_OK, "blur failed: %08lx\n", hres);
if(!winetest_interactive)
ShowWindow(container_hwnd, SW_HIDE);
......@@ -2379,16 +2379,16 @@ static void test_submit(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&form_onclick_obj;
hres = IHTMLElement_put_onclick(elem, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLFormElement, (void**)&form);
IHTMLElement_Release(elem);
ok(hres == S_OK, "Could not get IHTMLFormElement iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLFormElement iface: %08lx\n", hres);
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&form_onsubmit_obj;
hres = IHTMLFormElement_put_onsubmit(form, v);
ok(hres == S_OK, "put_onsubmit failed: %08x\n", hres);
ok(hres == S_OK, "put_onsubmit failed: %08lx\n", hres);
IHTMLFormElement_Release(form);
......@@ -2397,19 +2397,19 @@ static void test_submit(IHTMLDocument2 *doc)
SET_EXPECT(form_onclick);
SET_EXPECT(form_onsubmit);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(form_onclick);
CHECK_CALLED(form_onsubmit);
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&submit_onclick_obj;
hres = IHTMLElement_put_onclick(submit, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
SET_EXPECT(form_onclick);
SET_EXPECT(submit_onclick);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(form_onclick);
CHECK_CALLED(submit_onclick);
......@@ -2419,19 +2419,19 @@ static void test_submit(IHTMLDocument2 *doc)
SET_EXPECT(submit_onclick);
SET_EXPECT(submit_onclick_attached);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(form_onclick);
CHECK_CALLED(submit_onclick);
CHECK_CALLED(submit_onclick_attached);
V_VT(&v) = VT_NULL;
hres = IHTMLElement_put_onclick(submit, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
SET_EXPECT(form_onclick);
SET_EXPECT(submit_onclick_attached);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(form_onclick);
CHECK_CALLED(submit_onclick_attached);
......@@ -2442,7 +2442,7 @@ static void test_submit(IHTMLDocument2 *doc)
SET_EXPECT(form_onclick);
SET_EXPECT(doccp_onclick_cancel);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(form_onclick);
CHECK_CALLED(doccp_onclick_cancel);
......@@ -2451,7 +2451,7 @@ static void test_submit(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&submit_onclick_setret_obj;
hres = IHTMLElement_put_onclick(submit, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
V_VT(&onclick_retval) = VT_BOOL;
V_BOOL(&onclick_retval) = VARIANT_TRUE;
......@@ -2462,7 +2462,7 @@ static void test_submit(IHTMLDocument2 *doc)
SET_EXPECT(form_onclick);
SET_EXPECT(form_onsubmit);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(submit_onclick_setret);
CHECK_CALLED(form_onclick);
CHECK_CALLED(form_onsubmit);
......@@ -2473,7 +2473,7 @@ static void test_submit(IHTMLDocument2 *doc)
SET_EXPECT(submit_onclick_setret);
SET_EXPECT(form_onclick);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(submit_onclick_setret);
CHECK_CALLED(form_onclick);
......@@ -2485,7 +2485,7 @@ static void test_submit(IHTMLDocument2 *doc)
SET_EXPECT(submit_onclick_setret);
SET_EXPECT(form_onclick);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(submit_onclick_setret);
CHECK_CALLED(form_onclick);
......@@ -2495,7 +2495,7 @@ static void test_submit(IHTMLDocument2 *doc)
SET_EXPECT(submit_onclick_setret);
SET_EXPECT(form_onclick);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(submit_onclick_setret);
CHECK_CALLED(form_onclick);
......@@ -2505,13 +2505,13 @@ static void test_submit(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&submit_onclick_cancel_obj;
hres = IHTMLElement_put_onclick(submit, v);
ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
ok(hres == S_OK, "put_onclick failed: %08lx\n", hres);
SET_EXPECT(submit_onclick_cancel);
SET_EXPECT(submit_onclick_attached_check_cancel);
SET_EXPECT(submit_onclick_attached);
hres = IHTMLElement_click(submit);
ok(hres == S_OK, "click failed: %08x\n", hres);
ok(hres == S_OK, "click failed: %08lx\n", hres);
CHECK_CALLED(submit_onclick_cancel);
CHECK_CALLED(submit_onclick_attached_check_cancel);
CHECK_CALLED(submit_onclick_attached);
......@@ -2529,25 +2529,25 @@ static void test_timeout(IHTMLDocument2 *doc)
HRESULT hres;
hres = IHTMLWindow2_QueryInterface(window, &IID_IHTMLWindow3, (void**)&win3);
ok(hres == S_OK, "Could not get IHTMLWindow3 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLWindow3 iface: %08lx\n", hres);
V_VT(&expr) = VT_DISPATCH;
V_DISPATCH(&expr) = (IDispatch*)&timeoutFunc2;
V_VT(&var) = VT_EMPTY;
id = 0;
hres = IHTMLWindow3_setInterval(win3, &expr, 1, &var, &id);
ok(hres == S_OK, "setInterval failed: %08x\n", hres);
ok(hres == S_OK, "setInterval failed: %08lx\n", hres);
ok(id, "id = 0\n");
hres = IHTMLWindow2_clearTimeout(window, id);
ok(hres == S_OK, "clearTimeout failer: %08x\n", hres);
ok(hres == S_OK, "clearTimeout failer: %08lx\n", hres);
V_VT(&expr) = VT_DISPATCH;
V_DISPATCH(&expr) = (IDispatch*)&timeoutFunc;
V_VT(&var) = VT_EMPTY;
id = 0;
hres = IHTMLWindow3_setTimeout(win3, &expr, 0, &var, &id);
ok(hres == S_OK, "setTimeout failed: %08x\n", hres);
ok(hres == S_OK, "setTimeout failed: %08lx\n", hres);
ok(id, "id = 0\n");
SET_EXPECT(timeout);
......@@ -2559,18 +2559,18 @@ static void test_timeout(IHTMLDocument2 *doc)
V_VT(&var) = VT_EMPTY;
id = 0;
hres = IHTMLWindow3_setTimeout(win3, &expr, 0, &var, &id);
ok(hres == S_OK, "setTimeout failed: %08x\n", hres);
ok(hres == S_OK, "setTimeout failed: %08lx\n", hres);
ok(id, "id = 0\n");
hres = IHTMLWindow2_clearTimeout(window, id);
ok(hres == S_OK, "clearTimeout failed: %08x\n", hres);
ok(hres == S_OK, "clearTimeout failed: %08lx\n", hres);
V_VT(&expr) = VT_DISPATCH;
V_DISPATCH(&expr) = (IDispatch*)&timeoutFunc;
V_VT(&var) = VT_EMPTY;
id = 0;
hres = IHTMLWindow3_setInterval(win3, &expr, 1, &var, &id);
ok(hres == S_OK, "setInterval failed: %08x\n", hres);
ok(hres == S_OK, "setInterval failed: %08lx\n", hres);
ok(id, "id = 0\n");
SET_EXPECT(timeout);
......@@ -2582,7 +2582,7 @@ static void test_timeout(IHTMLDocument2 *doc)
CHECK_CALLED(timeout);
hres = IHTMLWindow2_clearInterval(window, id);
ok(hres == S_OK, "clearTimeout failer: %08x\n", hres);
ok(hres == S_OK, "clearTimeout failer: %08lx\n", hres);
IHTMLWindow3_Release(win3);
}
......@@ -2594,10 +2594,10 @@ static IHTMLWindow2 *get_iframe_window(IHTMLIFrameElement *iframe)
HRESULT hres;
hres = IHTMLIFrameElement_QueryInterface(iframe, &IID_IHTMLFrameBase2, (void**)&base);
ok(hres == S_OK, "QueryInterface(IID_IHTMLFrameBase2) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IHTMLFrameBase2) failed: %08lx\n", hres);
hres = IHTMLFrameBase2_get_contentWindow(base, &window);
ok(hres == S_OK, "get_contentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_contentWindow failed: %08lx\n", hres);
ok(window != NULL, "window == NULL\n");
IHTMLFrameBase2_Release(base);
......@@ -2613,7 +2613,7 @@ static IHTMLDocument2 *get_iframe_doc(IHTMLIFrameElement *iframe)
window = get_iframe_window(iframe);
hres = IHTMLWindow2_get_document(window, &result);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
ok(result != NULL, "result == NULL\n");
IHTMLWindow2_Release(window);
......@@ -2644,7 +2644,7 @@ static void test_iframe_connections(IHTMLDocument2 *doc)
cp = get_cp((IUnknown*)doc, &IID_IDispatch);
hres = IConnectionPoint_Unadvise(cp, cookie);
IConnectionPoint_Release(cp);
ok(hres == CONNECT_E_NOCONNECTION, "Unadvise returned %08x, expected CONNECT_E_NOCONNECTION\n", hres);
ok(hres == CONNECT_E_NOCONNECTION, "Unadvise returned %08lx, expected CONNECT_E_NOCONNECTION\n", hres);
unregister_cp((IUnknown*)iframes_doc, &IID_IDispatch, cookie);
......@@ -2653,18 +2653,18 @@ static void test_iframe_connections(IHTMLDocument2 *doc)
VARIANT v;
hres = IHTMLIFrameElement_QueryInterface(iframe, &IID_IHTMLFrameBase2, (void**)&frame_base2);
ok(hres == S_OK, "Could not get IHTMLFrameBase2 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLFrameBase2 iface: %08lx\n", hres);
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&iframe_onload_obj;
hres = IHTMLFrameBase2_put_onload(frame_base2, v);
ok(hres == S_OK, "put_onload failed: %08x\n", hres);
ok(hres == S_OK, "put_onload failed: %08lx\n", hres);
IHTMLFrameBase2_Release(frame_base2);
str = SysAllocString(L"about:blank");
hres = IHTMLDocument2_put_URL(iframes_doc, str);
ok(hres == S_OK, "put_URL failed: %08x\n", hres);
ok(hres == S_OK, "put_URL failed: %08lx\n", hres);
SysFreeString(str);
SET_EXPECT(iframe_onload);
......@@ -2673,7 +2673,7 @@ static void test_iframe_connections(IHTMLDocument2 *doc)
str = SysAllocString(L"about:test");
hres = IHTMLDocument2_put_URL(iframes_doc, str);
ok(hres == S_OK, "put_URL failed: %08x\n", hres);
ok(hres == S_OK, "put_URL failed: %08lx\n", hres);
SysFreeString(str);
SET_EXPECT(iframe_onload);
......@@ -2704,37 +2704,37 @@ static void test_create_event(IHTMLDocument2 *doc)
trace("createEvent tests...\n");
hres = IHTMLDocument2_QueryInterface(doc, &IID_IDocumentEvent, (void**)&doc_event);
ok(hres == S_OK, "Could not get IDocumentEvent iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDocumentEvent iface: %08lx\n", hres);
str = SysAllocString(L"Event");
hres = IDocumentEvent_createEvent(doc_event, str, &event);
SysFreeString(str);
ok(hres == S_OK, "createEvent failed: %08x\n", hres);
ok(hres == S_OK, "createEvent failed: %08lx\n", hres);
phase = 0xdead;
hres = IDOMEvent_get_eventPhase(event, &phase);
ok(hres == S_OK, "get_eventPhase failed: %08x\n", hres);
ok(hres == S_OK, "get_eventPhase failed: %08lx\n", hres);
ok(!phase, "phase = %u\n", phase);
hres = IDOMEvent_preventDefault(event);
ok(hres == S_OK, "preventDefault failed: %08x\n", hres);
ok(hres == S_OK, "preventDefault failed: %08lx\n", hres);
hres = IDOMEvent_stopPropagation(event);
ok(hres == S_OK, "stopPropagation failed: %08x\n", hres);
ok(hres == S_OK, "stopPropagation failed: %08lx\n", hres);
str = (void*)0xdeadbeef;
hres = IDOMEvent_get_type(event, &str);
ok(hres == S_OK, "get_type failed: %08x\n", hres);
ok(hres == S_OK, "get_type failed: %08lx\n", hres);
ok(!str, "type = %s\n", wine_dbgstr_w(str));
b = 0xdead;
hres = IDOMEvent_get_bubbles(event, &b);
ok(hres == S_OK, "get_bubbles failed: %08x\n", hres);
ok(hres == S_OK, "get_bubbles failed: %08lx\n", hres);
ok(!b, "bubbles = %x\n", b);
b = 0xdead;
hres = IDOMEvent_get_cancelable(event, &b);
ok(hres == S_OK, "get_cancelable failed: %08x\n", hres);
ok(hres == S_OK, "get_cancelable failed: %08lx\n", hres);
ok(!b, "cancelable = %x\n", b);
elem = doc_get_body(doc);
......@@ -2742,27 +2742,27 @@ static void test_create_event(IHTMLDocument2 *doc)
IHTMLElement_Release(elem);
hres = IEventTarget_dispatchEvent(event_target, NULL, &b);
ok(hres == E_INVALIDARG, "dispatchEvent failed: %08x\n", hres);
ok(hres == E_INVALIDARG, "dispatchEvent failed: %08lx\n", hres);
IEventTarget_Release(event_target);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMUIEvent, (void**)&ui_event);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDOMUIEvent returned %08x\n", hres);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDOMUIEvent returned %08lx\n", hres);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMMouseEvent, (void**)&mouse_event);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDOMMouseEvent returned %08x\n", hres);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDOMMouseEvent returned %08lx\n", hres);
IDOMEvent_Release(event);
str = SysAllocString(L"MouseEvent");
hres = IDocumentEvent_createEvent(doc_event, str, &event);
SysFreeString(str);
ok(hres == S_OK, "createEvent failed: %08x\n", hres);
ok(hres == S_OK, "createEvent failed: %08lx\n", hres);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMUIEvent, (void**)&ui_event);
ok(hres == S_OK, "QueryInterface(IID_IDOMUIEvent returned %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IDOMUIEvent returned %08lx\n", hres);
IDOMUIEvent_Release(ui_event);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMMouseEvent, (void**)&mouse_event);
ok(hres == S_OK, "QueryInterface(IID_IDOMMouseEvent returned %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IDOMMouseEvent returned %08lx\n", hres);
IDOMMouseEvent_Release(mouse_event);
IDOMEvent_Release(event);
......@@ -2770,26 +2770,26 @@ static void test_create_event(IHTMLDocument2 *doc)
str = SysAllocString(L"UIEvent");
hres = IDocumentEvent_createEvent(doc_event, str, &event);
SysFreeString(str);
ok(hres == S_OK, "createEvent failed: %08x\n", hres);
ok(hres == S_OK, "createEvent failed: %08lx\n", hres);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMUIEvent, (void**)&ui_event);
ok(hres == S_OK, "QueryInterface(IID_IDOMUIEvent returned %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IDOMUIEvent returned %08lx\n", hres);
IDOMUIEvent_Release(ui_event);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMMouseEvent, (void**)&mouse_event);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDOMMouseEvent returned %08x\n", hres);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDOMMouseEvent returned %08lx\n", hres);
IDOMEvent_Release(event);
str = SysAllocString(L"KeyboardEvent");
hres = IDocumentEvent_createEvent(doc_event, str, &event);
SysFreeString(str);
ok(hres == S_OK, "createEvent failed: %08x\n", hres);
ok(hres == S_OK, "createEvent failed: %08lx\n", hres);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMUIEvent, (void**)&ui_event);
ok(hres == S_OK, "QueryInterface(IID_IDOMUIEvent returned %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IDOMUIEvent returned %08lx\n", hres);
IDOMUIEvent_Release(ui_event);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMKeyboardEvent, (void**)&keyboard_event);
ok(hres == S_OK, "QueryInterface(IID_IDOMKeyboardEvent returned %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IDOMKeyboardEvent returned %08lx\n", hres);
IDOMKeyboardEvent_Release(keyboard_event);
IDOMEvent_Release(event);
......@@ -2797,10 +2797,10 @@ static void test_create_event(IHTMLDocument2 *doc)
str = SysAllocString(L"CustomEvent");
hres = IDocumentEvent_createEvent(doc_event, str, &event);
SysFreeString(str);
ok(hres == S_OK, "createEvent failed: %08x\n", hres);
ok(hres == S_OK, "createEvent failed: %08lx\n", hres);
hres = IDOMEvent_QueryInterface(event, &IID_IDOMCustomEvent, (void**)&custom_event);
ok(hres == S_OK, "QueryInterface(IID_IDOMCustomEvent returned %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IDOMCustomEvent returned %08lx\n", hres);
IDOMCustomEvent_Release(custom_event);
IDOMEvent_Release(event);
......@@ -3132,23 +3132,23 @@ static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocum
HRESULT hres;
hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document);
ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres);
ok(hres == S_OK, "could not get IOleDocument: %08lx\n", hres);
hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view);
IOleDocument_Release(document);
ok(hres == S_OK, "CreateView failed: %08x\n", hres);
ok(hres == S_OK, "CreateView failed: %08lx\n", hres);
hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite);
ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres);
ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
hres = IOleDocumentView_UIActivate(view, TRUE);
ok(hres == S_OK, "UIActivate failed: %08x\n", hres);
ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
hres = IOleDocumentView_SetRect(view, &rect);
ok(hres == S_OK, "SetRect failed: %08x\n", hres);
ok(hres == S_OK, "SetRect failed: %08lx\n", hres);
hres = IOleDocumentView_Show(view, TRUE);
ok(hres == S_OK, "Show failed: %08x\n", hres);
ok(hres == S_OK, "Show failed: %08lx\n", hres);
return S_OK;
}
......@@ -3208,7 +3208,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
HRESULT hres;
hres = IHTMLDocument2_get_readyState(notif_doc, &state);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
if(!lstrcmpW(state, L"complete"))
doc_complete = TRUE;
......@@ -3250,10 +3250,10 @@ static void doc_load_string(IHTMLDocument2 *doc, const char *str)
mem = GlobalAlloc(0, len);
memcpy(mem, str, len);
hres = CreateStreamOnHGlobal(mem, TRUE, &stream);
ok(hres == S_OK, "Failed to create a stream, hr %#x.\n", hres);
ok(hres == S_OK, "Failed to create a stream, hr %#lx.\n", hres);
hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init);
ok(hres == S_OK, "Failed to get IPersistStreamInit, hr %#x.\n", hres);
ok(hres == S_OK, "Failed to get IPersistStreamInit, hr %#lx.\n", hres);
IPersistStreamInit_Load(init, stream);
IPersistStreamInit_Release(init);
......@@ -3268,15 +3268,15 @@ static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08lx\n", hres);
hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
IConnectionPointContainer_Release(container);
ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
ok(hres == S_OK, "FindConnectionPoint failed: %08lx\n", hres);
hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
ok(hres == S_OK, "Advise failed: %08lx\n", hres);
}
static void set_client_site(IHTMLDocument2 *doc, BOOL set)
......@@ -3293,19 +3293,19 @@ static void set_client_site(IHTMLDocument2 *doc, BOOL set)
}
hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj);
ok(hres == S_OK, "Could not et IOleObject: %08x\n", hres);
ok(hres == S_OK, "Could not et IOleObject: %08lx\n", hres);
hres = IOleObject_SetClientSite(oleobj, set ? &ClientSite : NULL);
ok(hres == S_OK, "SetClientSite failed: %08x\n", hres);
ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
if(set) {
IHlinkTarget *hlink;
hres = IOleObject_QueryInterface(oleobj, &IID_IHlinkTarget, (void**)&hlink);
ok(hres == S_OK, "Could not get IHlinkTarget iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHlinkTarget iface: %08lx\n", hres);
hres = IHlinkTarget_Navigate(hlink, 0, NULL);
ok(hres == S_OK, "Navgate failed: %08x\n", hres);
ok(hres == S_OK, "Navgate failed: %08lx\n", hres);
IHlinkTarget_Release(hlink);
}
......@@ -3322,7 +3322,7 @@ static IHTMLDocument2 *create_document(void)
#if !defined(__i386__) && !defined(__x86_64__)
todo_wine
#endif
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
return SUCCEEDED(hres) ? doc : NULL;
}
......@@ -3349,7 +3349,7 @@ static void run_test(const char *str, testfunc_t test)
}
hres = IHTMLDocument2_get_body(doc, &body);
ok(hres == S_OK, "get_body failed: %08x\n", hres);
ok(hres == S_OK, "get_body failed: %08lx\n", hres);
if(body) {
IHTMLDocument6 *doc6;
......@@ -3360,7 +3360,7 @@ static void run_test(const char *str, testfunc_t test)
if(SUCCEEDED(hres)) {
VARIANT v;
hres = IHTMLDocument6_get_documentMode(doc6, &v);
ok(hres == S_OK, "get_documentMode failed: %08x\n", hres);
ok(hres == S_OK, "get_documentMode failed: %08lx\n", hres);
ok(V_VT(&v) == VT_R4, "V_VT(documentMode) = %u\n", V_VT(&v));
document_mode = V_R4(&v);
IHTMLDocument6_Release(doc6);
......@@ -3369,7 +3369,7 @@ static void run_test(const char *str, testfunc_t test)
}
hres = IHTMLDocument2_get_parentWindow(doc, &window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
ok(window != NULL, "window == NULL\n");
test(doc);
......@@ -3420,18 +3420,18 @@ static void test_empty_document(void)
return;
hres = IHTMLDocument2_get_parentWindow(doc, &window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
hres = IHTMLWindow2_get_document(window, &windows_doc);
IHTMLWindow2_Release(window);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
cookie = register_cp((IUnknown*)windows_doc, &IID_IDispatch, (IUnknown*)&div_onclick_disp);
cp = get_cp((IUnknown*)doc, &IID_IDispatch);
hres = IConnectionPoint_Unadvise(cp, cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Unadvise failed: %08x\n", hres);
ok(hres == S_OK, "Unadvise failed: %08lx\n", hres);
IHTMLDocument2_Release(windows_doc);
IHTMLDocument2_Release(doc);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -107,11 +107,11 @@ static void test_href(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_href(loc, NULL);
ok(hres == E_POINTER,
"%s: get_href should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_href should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_href(loc, &str);
ok(hres == S_OK, "%s: get_href failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_href failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->href),
"%s: expected retrieved href to be L\"%s\", was: %s\n",
......@@ -119,7 +119,7 @@ static void test_href(IHTMLLocation *loc, const struct location_test *test)
SysFreeString(str);
hres = IHTMLLocation_toString(loc, &str);
ok(hres == S_OK, "%s: toString failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: toString failed: 0x%08lx\n", test->name, hres);
ok(str_eq_wa(str, test->href), "%s: toString returned %s, expected %s\n",
test->name, wine_dbgstr_w(str), test->href);
SysFreeString(str);
......@@ -132,11 +132,11 @@ static void test_protocol(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_protocol(loc, NULL);
ok(hres == E_POINTER,
"%s: get_protocol should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_protocol should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_protocol(loc, &str);
ok(hres == S_OK, "%s: get_protocol failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_protocol failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->protocol),
"%s: expected retrieved protocol to be L\"%s\", was: %s\n",
......@@ -151,11 +151,11 @@ static void test_host(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_host(loc, NULL);
ok(hres == E_POINTER,
"%s: get_host should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_host should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_host(loc, &str);
ok(hres == S_OK, "%s: get_host failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_host failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK){
int len = test->host ? strlen(test->host) : 0;
ok(str_eq_wa(str, test->host),
......@@ -175,11 +175,11 @@ static void test_hostname(IHTMLLocation *loc, IHTMLDocument2 *doc, const struct
hres = IHTMLLocation_get_hostname(loc, NULL);
ok(hres == E_POINTER,
"%s: get_hostname should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_hostname should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_hostname(loc, &str);
ok(hres == S_OK, "%s: get_hostname failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_hostname failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->hostname),
"%s: expected retrieved hostname to be L\"%s\", was: %s\n",
......@@ -187,7 +187,7 @@ static void test_hostname(IHTMLLocation *loc, IHTMLDocument2 *doc, const struct
SysFreeString(str);
hres = IHTMLDocument2_get_domain(doc, &str);
ok(hres == S_OK, "%s: get_domain failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_domain failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->hostname ? test->hostname : ""),
"%s: expected retrieved domain to be L\"%s\", was: %s\n",
......@@ -202,11 +202,11 @@ static void test_port(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_port(loc, NULL);
ok(hres == E_POINTER,
"%s: get_port should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_port should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_port(loc, &str);
ok(hres == S_OK, "%s: get_port failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_port failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->port)
|| (!str && !*test->port), /* IE11 */
......@@ -222,11 +222,11 @@ static void test_pathname(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_pathname(loc, NULL);
ok(hres == E_POINTER,
"%s: get_pathname should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_pathname should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_pathname(loc, &str);
ok(hres == S_OK, "%s: get_pathname failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_pathname failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
/* FIXME: We seem to be testing location in a buggy state. Path names do not
* include leading slash, while other tests confirm that it should be there */
......@@ -244,11 +244,11 @@ static void test_search(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_search(loc, NULL);
ok(hres == E_POINTER,
"%s: get_search should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_search should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_search(loc, &str);
ok(hres == S_OK, "%s: get_search failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_search failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->search),
"%s: expected retrieved search to be L\"%s\", was: %s\n",
......@@ -263,11 +263,11 @@ static void test_hash(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_hash(loc, NULL);
ok(hres == E_POINTER,
"%s: get_hash should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_hash should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_hash(loc, &str);
ok(hres == S_OK, "%s: get_hash failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_hash failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->hash),
"%s: expected retrieved hash to be L\"%s\", was: %s\n",
......@@ -287,13 +287,13 @@ static void perform_test(const struct location_test* test)
IHTMLLocation *location;
hres = CreateBindCtx(0, &bc);
ok(hres == S_OK, "%s: CreateBindCtx failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: CreateBindCtx failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres))
return;
MultiByteToWideChar(CP_ACP, 0, test->url, -1, url, ARRAY_SIZE(url));
hres = CreateURLMoniker(NULL, url, &url_mon);
ok(hres == S_OK, "%s: CreateURLMoniker failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: CreateURLMoniker failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IBindCtx_Release(bc);
return;
......@@ -305,7 +305,7 @@ static void perform_test(const struct location_test* test)
#if !defined(__i386__) && !defined(__x86_64__)
todo_wine
#endif
ok(hres == S_OK, "%s: CoCreateInstance failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: CoCreateInstance failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IMoniker_Release(url_mon);
IBindCtx_Release(bc);
......@@ -324,7 +324,7 @@ static void perform_test(const struct location_test* test)
hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker,
(void**)&persist_mon);
ok(hres == S_OK, "%s: IHTMlDocument2_QueryInterface failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: IHTMlDocument2_QueryInterface failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IHTMLDocument2_Release(doc);
IMoniker_Release(url_mon);
......@@ -334,7 +334,7 @@ static void perform_test(const struct location_test* test)
hres = IPersistMoniker_Load(persist_mon, FALSE, url_mon, bc,
STGM_SHARE_EXCLUSIVE | STGM_READWRITE);
ok(hres == S_OK, "%s: IPersistMoniker_Load failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: IPersistMoniker_Load failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IPersistMoniker_Release(persist_mon);
IHTMLDocument2_Release(doc);
......@@ -344,7 +344,7 @@ static void perform_test(const struct location_test* test)
}
hres = IHTMLDocument2_get_location(doc, &location);
ok(hres == S_OK, "%s: IHTMLDocument2_get_location failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: IHTMLDocument2_get_location failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IPersistMoniker_Release(persist_mon);
IHTMLDocument2_Release(doc);
......
......@@ -36,7 +36,7 @@ static void test_HTMLLoadOptions(void)
hres = CoCreateInstance(&CLSID_HTMLLoadOptions, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IHtmlLoadOptions, (void**)&loadopts);
ok(hres == S_OK, "creating HTMLLoadOptions failed: %08x\n", hres);
ok(hres == S_OK, "creating HTMLLoadOptions failed: %08lx\n", hres);
if(FAILED(hres))
return;
......@@ -44,64 +44,64 @@ static void test_HTMLLoadOptions(void)
size = 0xdeadbeef;
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, i, NULL, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == 0, "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == 0, "size = %ld\n", size);
ok(buf[0] == 0xdd, "buf changed\n");
}
size = 0xdeadbeef;
hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, NULL, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == 0, "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == 0, "size = %ld\n", size);
hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, &data, sizeof(data));
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
size = sizeof(data);
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == sizeof(data), "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == sizeof(data), "size = %ld\n", size);
ok(*(DWORD*)buf == data, "unexpected buf\n");
size = sizeof(data)-1;
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size);
ok(hres == E_FAIL, "QueryOption failed: %08x\n", hres);
ok(size == sizeof(data) || !size, "size = %d\n", size);
ok(hres == E_FAIL, "QueryOption failed: %08lx\n", hres);
ok(size == sizeof(data) || !size, "size = %ld\n", size);
ok(buf[0] == 0xdd, "buf changed\n");
data = 100;
hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, &data, 0);
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
size = 0xdeadbeef;
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == 0, "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == 0, "size = %ld\n", size);
ok(buf[0] == 0xdd, "buf changed\n");
hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, NULL, 0);
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
hres = IHtmlLoadOptions_SetOption(loadopts, 1000, &data, sizeof(data));
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
size = sizeof(data);
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, 1000, buf, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == sizeof(data), "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == sizeof(data), "size = %ld\n", size);
ok(*(DWORD*)buf == data, "unexpected buf\n");
hres = IHtmlLoadOptions_SetOption(loadopts, 1000, buf, sizeof(buf));
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
size = 0xdeadbeef;
hres = IHtmlLoadOptions_QueryOption(loadopts, 1000, buf, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == sizeof(buf), "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == sizeof(buf), "size = %ld\n", size);
IHtmlLoadOptions_Release(loadopts);
}
......
......@@ -115,7 +115,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
ok(ulStatusCode == BINDSTATUS_MIMETYPEAVAILABLE
|| ulStatusCode == BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
"ulStatusCode=%d\n", ulStatusCode);
"ulStatusCode=%ld\n", ulStatusCode);
ok(!lstrcmpW(szStatusText, text_html), "szStatusText != text/html\n");
return S_OK;
......@@ -128,7 +128,7 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
ok(ulProgress == ulProgressMax, "ulProgress != ulProgressMax\n");
ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE),
"grcf = %08x\n", grfBSCF);
"grcf = %08lx\n", grfBSCF);
return S_OK;
}
......@@ -140,15 +140,15 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR
if(expect_hr_win32err) {
ok((hrResult&0xffff0000) == ((FACILITY_WIN32 << 16)|0x80000000) || hrResult == expect_hrResult,
"expected win32 err or %08x got: %08x\n", expect_hrResult, hrResult);
"expected win32 err or %08lx got: %08lx\n", expect_hrResult, hrResult);
}else {
ok(hrResult == expect_hrResult || (expect_hrResult == E_INVALIDARG && hrResult == MK_E_SYNTAX)
|| (expect_hrResult == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND) &&
(hrResult == MK_E_SYNTAX || hrResult == HRESULT_FROM_WIN32(ERROR_DLL_NOT_FOUND))),
"expected: %08x got: %08x\n", expect_hrResult, hrResult);
"expected: %08lx got: %08lx\n", expect_hrResult, hrResult);
expect_hrResult = hrResult;
}
ok(dwError == 0, "dwError = %d\n", dwError);
ok(dwError == 0, "dwError = %ld\n", dwError);
ok(!szResult, "szResult != NULL\n");
return S_OK;
......@@ -196,7 +196,7 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
ok(grfBINDF != NULL, "grfBINDF == NULL\n");
ok(pbindinfo != NULL, "pbindinfo == NULL\n");
ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %d\n", pbindinfo->cbSize);
ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %ld\n", pbindinfo->cbSize);
*grfBINDF = bindf;
return S_OK;
......@@ -234,9 +234,9 @@ static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT
hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0);
if(expect_win32err)
ok((hres&0xffff0000) == ((FACILITY_WIN32 << 16)|0x80000000) || hres == expect_hrResult,
"expected win32 err or %08x got: %08x\n", expected_hres, hres);
"expected win32 err or %08lx got: %08lx\n", expected_hres, hres);
else
ok(hres == expect_hrResult, "expected: %08x got: %08x\n", expect_hrResult, hres);
ok(hres == expect_hrResult, "expected: %08lx got: %08lx\n", expect_hrResult, hres);
CHECK_CALLED(GetBindInfo);
CHECK_CALLED(ReportResult);
......@@ -254,7 +254,7 @@ static void protocol_start(IInternetProtocol *protocol, const WCHAR *url)
expect_hr_win32err = FALSE;
hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0);
ok(hres == S_OK, "Start failed: %08x\n", hres);
ok(hres == S_OK, "Start failed: %08lx\n", hres);
CHECK_CALLED(GetBindInfo);
CHECK_CALLED(ReportProgress);
......@@ -272,14 +272,14 @@ static void test_res_url_fail(const WCHAR *url_suffix)
wcscat(url, url_suffix);
hres = CoCreateInstance(&CLSID_ResProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not create ResProtocol instance: %08x\n", hres);
ok(hres == S_OK, "Could not create ResProtocol instance: %08lx\n", hres);
SET_EXPECT(GetBindInfo);
SET_EXPECT(ReportResult);
expect_hr_win32err = TRUE;
hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0);
ok(HRESULT_FACILITY(hres) == FACILITY_WIN32,
"%s: expected win32 error, got: %08x\n", debugstr_w(url_suffix), hres);
"%s: expected win32 error, got: %08lx\n", debugstr_w(url_suffix), hres);
CHECK_CALLED(GetBindInfo);
CHECK_CALLED(ReportResult);
......@@ -298,19 +298,19 @@ static void test_res_url(const char *url_suffix)
MultiByteToWideChar(CP_ACP, 0, url_suffix, -1, url+res_url_base_len, ARRAY_SIZE(url)-res_url_base_len);
hres = CoCreateInstance(&CLSID_ResProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not create ResProtocol instance: %08x\n", hres);
ok(hres == S_OK, "Could not create ResProtocol instance: %08lx\n", hres);
protocol_start(protocol, url);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &size);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
ref = IInternetProtocol_Release(protocol);
ok(!ref, "ref=%u\n", ref);
ok(!ref, "ref=%lu\n", ref);
}
static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file)
......@@ -331,12 +331,12 @@ static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file)
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
win_skip("SearchPathW is not implemented\n");
else
ok(0, "SearchPath failed: %u\n", GetLastError());
ok(0, "SearchPath failed: %lu\n", GetLastError());
return;
}
len += ARRAY_SIZE(fileW)+1;
ok(len == size, "wrong size %u, expected %u\n", size, len);
ok(len == size, "wrong size %lu, expected %lu\n", size, len);
ok(!lstrcmpW(url + ARRAY_SIZE(fileW), buf), "wrong file part %s\n", wine_dbgstr_w(url));
}
......@@ -365,12 +365,12 @@ static void test_res_protocol(void)
static const WCHAR mshtml_dllW[] = {'m','s','h','t','m','l','.','d','l','l',0};
hres = CoGetClassObject(&CLSID_ResProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres);
ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
if(FAILED(hres))
return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08lx\n", hres);
if(SUCCEEDED(hres)) {
WCHAR buf[128];
DWORD size, expected_size;
......@@ -381,56 +381,56 @@ static void test_res_protocol(void)
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, i, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
"[%d] failed: %08lx, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK, "ParseUrl failed: %08lx\n", hres);
res_sec_url_cmp(buf, size, mshtml_dllW);
ok(size == lstrlenW(buf)+1, "size = %d\n", size);
ok(size == lstrlenW(buf)+1, "size = %ld\n", size);
expected_size = size;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf,
expected_size, &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK, "ParseUrl failed: %08lx\n", hres);
res_sec_url_cmp(buf, size, mshtml_dllW);
ok(size == expected_size, "size = %d\n", size);
ok(size == expected_size, "size = %ld\n", size);
size = 0;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf,
3, &size, 0);
ok(hres == S_FALSE, "ParseUrl failed: %08x, expected S_FALSE\n", hres);
ok(size == expected_size, "size = %d\n", size);
ok(hres == S_FALSE, "ParseUrl failed: %08lx, expected S_FALSE\n", hres);
ok(size == expected_size, "size = %ld\n", size);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX || hres == E_INVALIDARG,
"ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
"ParseUrl failed: %08lx, expected MK_E_SYNTAX\n", hres);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url5, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08lx, expected MK_E_SYNTAX\n", hres);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url6, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08lx, expected MK_E_SYNTAX\n", hres);
size = 0xdeadbeef;
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == ARRAY_SIZE(blank_url) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%d\n", size);
ok(size == ARRAY_SIZE(blank_url) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == ARRAY_SIZE(wrong_url1) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%d\n", size);
ok(size == ARRAY_SIZE(wrong_url1) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%ld\n", size);
if (0)
{
......@@ -439,20 +439,20 @@ static void test_res_protocol(void)
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == 1, "size=%u, expected 1\n", size);
ok(size == 1, "size=%lu, expected 1\n", size);
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(hres == E_POINTER, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(hres == E_POINTER, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
}
......@@ -460,32 +460,32 @@ static void test_res_protocol(void)
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_UNESCAPE+1, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
"ParseUrl failed: %08lx, expected INET_E_DEFAULT_ACTION\n", hres);
ok(buf[0] == '?', "buf changed\n");
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, blank_url, test_part_url,
0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, blank_url, test_part_url,
URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, NULL, NULL,
URL_FILE_USE_PATHURL, NULL, 0xdeadbeef, NULL, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, blank_url, blank_url, 0);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, NULL, NULL, 0xdeadbeef);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
for(i=0; i<30; i++) {
if(i == QUERY_USES_NETWORK || i == QUERY_IS_SECURE || i == QUERY_IS_SAFE)
......@@ -494,43 +494,43 @@ static void test_res_protocol(void)
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, i, 0,
buf, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"QueryInfo(%d) returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres);
"QueryInfo(%d) returned: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres);
}
size = 0xdeadbeef;
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), &size, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(size == sizeof(DWORD), "size=%d\n", size);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(size == sizeof(DWORD), "size=%ld\n", size);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), NULL, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0,
buf, 3, &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
size = 0xdeadbeef;
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, NULL, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), &size, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(size == sizeof(DWORD), "size=%d\n", size);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(size == sizeof(DWORD), "size=%ld\n", size);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, 60, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"QueryInfo failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
"QueryInfo failed: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
IInternetProtocolInfo_Release(protocol_info);
}
......@@ -542,14 +542,14 @@ static void test_res_protocol(void)
BYTE buf[512];
ULONG cb;
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(SUCCEEDED(hres)) {
IInternetPriority *priority;
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority);
ok(hres == E_NOINTERFACE,
"QueryInterface(IInternetPriority) returned %08x, expected E_NOINTEFACE\n", hres);
"QueryInterface(IInternetPriority) returned %08lx, expected E_NOINTEFACE\n", hres);
test_protocol_fail(protocol, wrong_url1, E_INVALIDARG, FALSE);
test_protocol_fail(protocol, wrong_url2,
......@@ -559,58 +559,58 @@ static void test_res_protocol(void)
cb = 0xdeadbeef;
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == E_FAIL, "Read returned %08x expected E_FAIL\n", hres);
ok(cb == 0xdeadbeef, "cb=%u expected 0xdeadbeef\n", cb);
ok(hres == E_FAIL, "Read returned %08lx expected E_FAIL\n", hres);
ok(cb == 0xdeadbeef, "cb=%lu expected 0xdeadbeef\n", cb);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == 2, "cb=%u expected 2\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 2, "cb=%lu expected 2\n", cb);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres);
ok(cb == 0, "cb=%u expected 0\n", cb);
ok(hres == S_FALSE, "Read failed: %08lx expected S_FALSE\n", hres);
ok(cb == 0, "cb=%lu expected 0\n", cb);
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n\n", hres);
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == 2, "cb=%u expected 2\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 2, "cb=%lu expected 2\n", cb);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
IInternetProtocol_Release(protocol);
}
......@@ -665,43 +665,43 @@ static void do_test_about_protocol(IClassFactory *factory, DWORD bf)
bindf = bf;
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(FAILED(hres))
return;
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority);
ok(hres == E_NOINTERFACE,
"QueryInterface(IInternetPriority) returned %08x, expected E_NOINTEFACE\n", hres);
"QueryInterface(IInternetPriority) returned %08lx, expected E_NOINTEFACE\n", hres);
protocol_start(protocol, about_blank_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == sizeof(blank_html), "cb=%d\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == sizeof(blank_html), "cb=%ld\n", cb);
ok(!memcmp(buf, blank_html, cb), "Read wrong data\n");
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
protocol_start(protocol, about_test_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == sizeof(test_html), "cb=%d\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == sizeof(test_html), "cb=%ld\n", cb);
ok(!memcmp(buf, test_html, cb), "Read wrong data\n");
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
protocol_start(protocol, about_res_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == sizeof(blank_html), "cb=%d\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == sizeof(blank_html), "cb=%ld\n", cb);
ok(!memcmp(buf, blank_html, cb), "Read wrong data\n");
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
IInternetProtocol_Release(protocol);
}
......@@ -714,12 +714,12 @@ static void test_about_protocol(void)
HRESULT hres;
hres = CoGetClassObject(&CLSID_AboutProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres);
ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
if(FAILED(hres))
return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08lx\n", hres);
if(SUCCEEDED(hres)) {
WCHAR buf[128];
DWORD size;
......@@ -730,37 +730,37 @@ static void test_about_protocol(void)
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, i, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
"[%d] failed: %08lx, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK, "ParseUrl failed: %08lx\n", hres);
ok(!lstrcmpW(about_blank_url, buf), "buf != blank_url\n");
size = 0xdeadbeef;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_SECURITY_URL, 0, buf,
3, &size, 0);
ok(hres == S_FALSE, "ParseUrl failed: %08x, expected S_FALSE\n", hres);
ok(size == 12, "size = %d\n", size);
ok(hres == S_FALSE, "ParseUrl failed: %08lx, expected S_FALSE\n", hres);
ok(size == 12, "size = %ld\n", size);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_test_url, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK, "ParseUrl failed: %08lx\n", hres);
ok(!lstrcmpW(about_test_url, buf), "buf != test_url\n");
ok(size == 11, "size = %d\n", size);
ok(size == 11, "size = %ld\n", size);
size = 0xdeadbeef;
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?' || buf[0] == '\0' /* Win10 */,
"Expected buf to be unchanged or empty, got %s\n",
wine_dbgstr_w(buf));
ok(size == ARRAY_SIZE(about_blank_url) || size == ARRAY_SIZE(buf), /* IE8 */
"size=%d\n", size);
"size=%ld\n", size);
if (0)
{
......@@ -769,51 +769,51 @@ static void test_about_protocol(void)
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == 1, "size=%u, expected 1\n", size);
ok(size == 1, "size=%lu, expected 1\n", size);
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(hres == E_POINTER, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(hres == E_POINTER, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_UNESCAPE+1, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
"ParseUrl failed: %08lx, expected INET_E_DEFAULT_ACTION\n", hres);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, about_blank_url, about_test_url,
0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, about_blank_url, about_test_url,
URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, NULL, NULL,
URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, about_blank_url, about_blank_url, 0);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, NULL, NULL, 0xdeadbeef);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
for(i=0; i<30; i++) {
switch(i) {
......@@ -830,7 +830,7 @@ static void test_about_protocol(void)
default:
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, i, 0,
buf, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo(%d) returned: %08x, expected E_FAIL\n", i, hres);
ok(hres == E_FAIL, "QueryInfo(%d) returned: %08lx, expected E_FAIL\n", i, hres);
}
}
......@@ -838,33 +838,33 @@ static void test_about_protocol(void)
buf, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER ||
hres == E_FAIL, /* win2k */
"QueryInfo returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER or E_FAIL\n", hres);
"QueryInfo returned: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER or E_FAIL\n", hres);
size = 0xdeadbeef;
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), &size, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(size == sizeof(DWORD), "size=%d\n", size);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(size == sizeof(DWORD), "size=%ld\n", size);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), NULL, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0,
buf, 3, &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, 60, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo failed: %08lx, expected E_FAIL\n", hres);
IInternetProtocolInfo_Release(protocol_info);
}
......@@ -890,12 +890,12 @@ static void test_javascript_protocol(void)
HRESULT hres;
hres = CoGetClassObject(&CLSID_JSProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres);
ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
if(FAILED(hres))
return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08lx\n", hres);
if(SUCCEEDED(hres)) {
WCHAR buf[128];
DWORD size;
......@@ -906,23 +906,23 @@ static void test_javascript_protocol(void)
hres = IInternetProtocolInfo_ParseUrl(protocol_info, javascript_test_url, i, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
"[%d] failed: %08lx, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, javascript_test_url, PARSE_UNESCAPE+1, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
"ParseUrl failed: %08lx, expected INET_E_DEFAULT_ACTION\n", hres);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, javascript_test_url, javascript_test_url,
0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, javascript_test_url, javascript_test_url, 0);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
for(i=0; i<30; i++) {
switch(i) {
......@@ -933,7 +933,7 @@ static void test_javascript_protocol(void)
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, i, 0,
buf, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"QueryInfo(%d) returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres);
"QueryInfo(%d) returned: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres);
}
}
......@@ -941,28 +941,28 @@ static void test_javascript_protocol(void)
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), &size, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(size == sizeof(DWORD), "size=%d\n", size);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(size == sizeof(DWORD), "size=%ld\n", size);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), NULL, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0,
buf, 3, &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, 60, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"QueryInfo failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
"QueryInfo failed: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
/* FIXME: test QUERY_IS_SECURE */
......@@ -1014,18 +1014,18 @@ static void test_com_aggregation(const CLSID *clsid)
HRESULT hres;
hres = CoGetClassObject(clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&class_factory);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres);
ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CreateInstance returned: %08x\n", hres);
ok(hres == S_OK, "CreateInstance returned: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocol, (void**)&unk2);
ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatch iface: %08lx\n", hres);
SET_EXPECT(outer_QI_test);
hres = IUnknown_QueryInterface(unk2, &outer_test_iid, (void**)&unk3);
CHECK_CALLED(outer_QI_test);
ok(hres == S_OK, "Could not get IInternetProtocol iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocol iface: %08lx\n", hres);
ok(unk3 == (IUnknown*)0xdeadbeef, "unexpected unk2\n");
IUnknown_Release(unk2);
......@@ -1033,7 +1033,7 @@ static void test_com_aggregation(const CLSID *clsid)
unk = (void*)0xdeadbeef;
hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IInternetProtocol, (void**)&unk);
ok(hres == E_INVALIDARG, "CreateInstance returned: %08x\n", hres);
ok(hres == E_INVALIDARG, "CreateInstance returned: %08lx\n", hres);
ok(!unk, "unk = %p\n", unk);
IClassFactory_Release(class_factory);
......
......@@ -224,7 +224,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
hres = IHTMLDocument2_get_readyState(notif_doc, &state);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
if(!lstrcmpW(state, completeW))
doc_complete = TRUE;
......@@ -276,8 +276,8 @@ static HRESULT WINAPI VariantChangeType_ChangeType(IVariantChangeType *iface, VA
ok(V_VT(dst) == VT_EMPTY, "V_VT(dst) = %d\n", V_VT(dst));
ok(src != NULL, "src = NULL\n");
ok(V_VT(src) == VT_I4, "V_VT(src) = %d\n", V_VT(src));
ok(V_I4(src) == 0xf0f0f0, "V_I4(src) = %x\n", V_I4(src));
ok(lcid == LOCALE_NEUTRAL, "lcid = %d\n", lcid);
ok(V_I4(src) == 0xf0f0f0, "V_I4(src) = %lx\n", V_I4(src));
ok(lcid == LOCALE_NEUTRAL, "lcid = %ld\n", lcid);
ok(vt == VT_BSTR, "vt = %d\n", vt);
V_VT(dst) = VT_BSTR;
......@@ -401,7 +401,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
......@@ -446,13 +446,13 @@ static HRESULT WINAPI funcDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid
{
CHECK_EXPECT(funcDisp);
ok(id == DISPID_VALUE, "id = %d\n", id);
ok(lcid == 0, "lcid = %x\n", lcid);
ok(id == DISPID_VALUE, "id = %ld\n", id);
ok(lcid == 0, "lcid = %lx\n", lcid);
ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
ok(pdp != NULL, "pdp == NULL\n");
ok(pdp->cArgs == 2, "pdp->cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(rgvarg) = %d\n", V_VT(pdp->rgvarg));
ok(V_VT(pdp->rgvarg+1) == VT_BOOL, "V_VT(rgvarg[1]) = %d\n", V_VT(pdp->rgvarg));
ok(V_BOOL(pdp->rgvarg+1) == VARIANT_TRUE, "V_BOOL(rgvarg[1]) = %x\n", V_BOOL(pdp->rgvarg));
......@@ -489,21 +489,21 @@ static HRESULT WINAPI scriptDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
{
if(!lstrcmpW(bstrName, L"testProp")) {
CHECK_EXPECT(script_testprop_d);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %lx\n", grfdex);
*pid = DISPID_SCRIPT_TESTPROP;
return S_OK;
}
if(!lstrcmpW(bstrName, L"testProp2")) {
CHECK_EXPECT(script_testprop2_d);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %lx\n", grfdex);
*pid = DISPID_SCRIPT_TESTPROP2;
return S_OK;
}
if(!lstrcmpW(bstrName, L"divid")) {
CHECK_EXPECT(script_divid_d);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %lx\n", grfdex);
return E_FAIL;
}
......@@ -518,7 +518,7 @@ static HRESULT WINAPI scriptDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
case DISPID_SCRIPT_TESTPROP:
CHECK_EXPECT(script_testprop_i);
ok(lcid == 0, "lcid = %x\n", lcid);
ok(lcid == 0, "lcid = %lx\n", lcid);
ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
ok(pdp != NULL, "pdp == NULL\n");
ok(pdp->cArgs == 0, "pdp->cArgs = %d\n", pdp->cArgs);
......@@ -1178,23 +1178,23 @@ static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocum
HRESULT hres;
hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document);
ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres);
ok(hres == S_OK, "could not get IOleDocument: %08lx\n", hres);
hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view);
IOleDocument_Release(document);
ok(hres == S_OK, "CreateView failed: %08x\n", hres);
ok(hres == S_OK, "CreateView failed: %08lx\n", hres);
hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite);
ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres);
ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
hres = IOleDocumentView_UIActivate(view, TRUE);
ok(hres == S_OK, "UIActivate failed: %08x\n", hres);
ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
hres = IOleDocumentView_SetRect(view, &rect);
ok(hres == S_OK, "SetRect failed: %08x\n", hres);
ok(hres == S_OK, "SetRect failed: %08lx\n", hres);
hres = IOleDocumentView_Show(view, TRUE);
ok(hres == S_OK, "Show failed: %08x\n", hres);
ok(hres == S_OK, "Show failed: %08lx\n", hres);
return S_OK;
}
......@@ -1234,7 +1234,7 @@ static IHTMLDocument2 *create_document(void)
#if !defined(__i386__) && !defined(__x86_64__)
todo_wine
#endif
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
return SUCCEEDED(hres) ? doc : NULL;
}
......@@ -1251,10 +1251,10 @@ static void load_string(IHTMLDocument2 *doc, const char *str)
mem = GlobalAlloc(0, len);
memcpy(mem, str, len);
hres = CreateStreamOnHGlobal(mem, TRUE, &stream);
ok(hres == S_OK, "Failed to create a stream, hr %#x.\n", hres);
ok(hres == S_OK, "Failed to create a stream, hr %#lx.\n", hres);
hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init);
ok(hres == S_OK, "Failed to get IPersistStreamInit, hr %#x.\n", hres);
ok(hres == S_OK, "Failed to get IPersistStreamInit, hr %#lx.\n", hres);
IPersistStreamInit_Load(init, stream);
IPersistStreamInit_Release(init);
......@@ -1269,17 +1269,17 @@ static void do_advise(IHTMLDocument2 *doc, REFIID riid, IUnknown *unk_advise)
HRESULT hres;
hres = IHTMLDocument2_QueryInterface(doc, &IID_IConnectionPointContainer, (void**)&container);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08lx\n", hres);
hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
IConnectionPointContainer_Release(container);
ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
ok(hres == S_OK, "FindConnectionPoint failed: %08lx\n", hres);
notif_doc = doc;
hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
ok(hres == S_OK, "Advise failed: %08lx\n", hres);
}
static void set_client_site(IHTMLDocument2 *doc, BOOL set)
......@@ -1296,19 +1296,19 @@ static void set_client_site(IHTMLDocument2 *doc, BOOL set)
}
hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj);
ok(hres == S_OK, "Could not et IOleObject: %08x\n", hres);
ok(hres == S_OK, "Could not et IOleObject: %08lx\n", hres);
hres = IOleObject_SetClientSite(oleobj, set ? &ClientSite : NULL);
ok(hres == S_OK, "SetClientSite failed: %08x\n", hres);
ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
if(set) {
IHlinkTarget *hlink;
hres = IOleObject_QueryInterface(oleobj, &IID_IHlinkTarget, (void**)&hlink);
ok(hres == S_OK, "Could not get IHlinkTarget iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHlinkTarget iface: %08lx\n", hres);
hres = IHlinkTarget_Navigate(hlink, 0, NULL);
ok(hres == S_OK, "Navgate failed: %08x\n", hres);
ok(hres == S_OK, "Navgate failed: %08lx\n", hres);
IHlinkTarget_Release(hlink);
}
......@@ -1336,13 +1336,13 @@ static void load_doc(IHTMLDocument2 *doc, const char *str)
}
hres = IHTMLDocument2_get_body(doc, &body);
ok(hres == S_OK, "get_body failed: %08x\n", hres);
ok(hres == S_OK, "get_body failed: %08lx\n", hres);
/* Check we can query for function on the IHTMLElementBody interface */
name = (WCHAR*)ucPtr;
hres = IHTMLElement_GetIDsOfNames(body, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispID);
ok(hres == S_OK, "GetIDsOfNames(background) failed %08x\n", hres);
ok(dispID == DISPID_IHTMLBODYELEMENT_BACKGROUND, "Incorrect dispID got (%d)\n", dispID);
ok(hres == S_OK, "GetIDsOfNames(background) failed %08lx\n", hres);
ok(dispID == DISPID_IHTMLBODYELEMENT_BACKGROUND, "Incorrect dispID got (%ld)\n", dispID);
IHTMLElement_Release(body);
}
......@@ -1387,9 +1387,9 @@ static HRESULT WINAPI ObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *ifac
ok(IsEqualGUID(&IID_IActiveScriptParse, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
ok(dwOptionSetMask == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
"dwOptionSetMask=%x\n", dwOptionSetMask);
"dwOptionSetMask=%lx\n", dwOptionSetMask);
ok(dwEnabledOptions == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
"dwEnabledOptions=%x\n", dwOptionSetMask);
"dwEnabledOptions=%lx\n", dwOptionSetMask);
return S_OK;
}
......@@ -1454,10 +1454,10 @@ static HRESULT WINAPI AXObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *if
CHECK_EXPECT(AXSetInterfaceSafetyOptions_IDispatchEx_caller);
break;
default:
ok(0, "unexpected dwEnabledOptions %x\n", dwEnabledOptions);
ok(0, "unexpected dwEnabledOptions %lx\n", dwEnabledOptions);
}
ok(dwOptionSetMask == dwEnabledOptions, "dwOptionSetMask=%x, expected %x\n", dwOptionSetMask, dwEnabledOptions);
ok(dwOptionSetMask == dwEnabledOptions, "dwOptionSetMask=%lx, expected %lx\n", dwOptionSetMask, dwEnabledOptions);
return ax_setopt_dispex_hres;
}
......@@ -1474,10 +1474,10 @@ static HRESULT WINAPI AXObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *if
hres = ax_setopt_disp_data_hres;
break;
default:
ok(0, "unexpected dwEnabledOptions %x\n", dwEnabledOptions);
ok(0, "unexpected dwEnabledOptions %lx\n", dwEnabledOptions);
hres = E_FAIL;
}
ok(dwOptionSetMask == dwEnabledOptions, "dwOptionSetMask=%x, expected %x\n", dwOptionSetMask, dwEnabledOptions);
ok(dwOptionSetMask == dwEnabledOptions, "dwOptionSetMask=%lx, expected %lx\n", dwOptionSetMask, dwEnabledOptions);
return hres;
}
......@@ -1506,9 +1506,9 @@ static BOOL set_safe_reg(BOOL safe_call, BOOL safe_data)
#define check_custom_policy(a,b,c,d) _check_custom_policy(__LINE__,a,b,c,d)
static void _check_custom_policy(unsigned line, HRESULT hres, BYTE *ppolicy, DWORD policy_size, DWORD expolicy)
{
ok_(__FILE__,line)(hres == S_OK, "QueryCusromPolicy failed: %08x\n", hres);
ok_(__FILE__,line)(policy_size == sizeof(DWORD), "policy_size = %d\n", policy_size);
ok_(__FILE__,line)(*(DWORD*)ppolicy == expolicy, "policy = %x, expected %x\n", *(DWORD*)ppolicy, expolicy);
ok_(__FILE__,line)(hres == S_OK, "QueryCusromPolicy failed: %08lx\n", hres);
ok_(__FILE__,line)(policy_size == sizeof(DWORD), "policy_size = %ld\n", policy_size);
ok_(__FILE__,line)(*(DWORD*)ppolicy == expolicy, "policy = %lx, expected %lx\n", *(DWORD*)ppolicy, expolicy);
CoTaskMemFree(ppolicy);
}
......@@ -1584,17 +1584,17 @@ static void test_security(void)
HRESULT hres;
hres = IActiveScriptSite_QueryInterface(site, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(sp, &SID_SInternetHostSecurityManager,
&IID_IInternetHostSecurityManager, (void**)&sec_mgr);
IServiceProvider_Release(sp);
ok(hres == S_OK, "QueryService failed: %08x\n", hres);
ok(hres == S_OK, "QueryService failed: %08lx\n", hres);
hres = IInternetHostSecurityManager_ProcessUrlAction(sec_mgr, URLACTION_ACTIVEX_RUN, (BYTE*)&policy, sizeof(policy),
(BYTE*)&CLSID_TestActiveX, sizeof(CLSID), 0, 0);
ok(hres == S_OK, "ProcessUrlAction failed: %08x\n", hres);
ok(policy == URLPOLICY_ALLOW, "policy = %x\n", policy);
ok(hres == S_OK, "ProcessUrlAction failed: %08lx\n", hres);
ok(policy == URLPOLICY_ALLOW, "policy = %lx\n", policy);
cs.clsid = CLSID_TestActiveX;
cs.pUnk = (IUnknown*)&AXObjectSafety;
......@@ -1803,7 +1803,7 @@ static HRESULT WINAPI ActiveScriptProperty_SetProperty(IActiveScriptProperty *if
case SCRIPTPROP_INVOKEVERSIONING:
CHECK_EXPECT(SetProperty_INVOKEVERSIONING);
ok(V_VT(pvarValue) == VT_I4, "V_VT(pvarValue)=%d\n", V_VT(pvarValue));
ok(V_I4(pvarValue) == 1, "V_I4(pvarValue)=%d\n", V_I4(pvarValue));
ok(V_I4(pvarValue) == 1, "V_I4(pvarValue)=%ld\n", V_I4(pvarValue));
break;
case SCRIPTPROP_ABBREVIATE_GLOBALNAME_RESOLUTION:
if(V_BOOL(pvarValue))
......@@ -1815,7 +1815,7 @@ static HRESULT WINAPI ActiveScriptProperty_SetProperty(IActiveScriptProperty *if
case 0x70000003: /* Undocumented property set by IE10 */
return E_NOTIMPL;
default:
ok(0, "unexpected property %x\n", dwProperty);
ok(0, "unexpected property %lx\n", dwProperty);
return E_NOTIMPL;
}
......@@ -1934,21 +1934,21 @@ static void test_func(IDispatchEx *obj)
str = SysAllocString(L"toString");
hres = IDispatchEx_GetDispID(obj, str, fdexNameCaseSensitive, &id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(id == DISPID_IOMNAVIGATOR_TOSTRING, "id = %x\n", id);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
ok(id == DISPID_IOMNAVIGATOR_TOSTRING, "id = %lx\n", id);
memset(&dp, 0, sizeof(dp));
memset(&ei, 0, sizeof(ei));
VariantInit(&var);
hres = IDispatchEx_InvokeEx(obj, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(var)=%d\n", V_VT(&var));
ok(V_DISPATCH(&var) != NULL, "V_DISPATCH(var) == NULL\n");
disp = V_DISPATCH(&var);
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
IDispatch_Release(disp);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
/* FIXME: Test InvokeEx(DISPATCH_METHOD) */
......@@ -1956,7 +1956,7 @@ static void test_func(IDispatchEx *obj)
memset(&ei, 0, sizeof(ei));
VariantInit(&var);
hres = IDispatchEx_Invoke(dispex, DISPID_VALUE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, &var, &ei, NULL);
ok(hres == S_OK || broken(hres == E_ACCESSDENIED), "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK || broken(hres == E_ACCESSDENIED), "InvokeEx failed: %08lx\n", hres);
if(SUCCEEDED(hres)) {
DISPID named_args[2] = { DISPID_THIS, 0xdeadbeef };
VARIANT args[2];
......@@ -1974,7 +1974,7 @@ static void test_func(IDispatchEx *obj)
V_VT(args+1) = VT_I4;
V_I4(args+1) = 3;
hres = IDispatchEx_Invoke(dispex, DISPID_VALUE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&var));
ok(!lstrcmpW(V_BSTR(&var), L"[object]"), "V_BSTR(var) = %s\n", wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var);
......@@ -1983,17 +1983,17 @@ static void test_func(IDispatchEx *obj)
V_VT(&var) = VT_I4;
V_I4(&var) = 100;
hres = dispex_propput(obj, id, 0, &var, NULL);
todo_wine ok(hres == E_NOTIMPL, "InvokeEx failed: %08x\n", hres);
todo_wine ok(hres == E_NOTIMPL, "InvokeEx failed: %08lx\n", hres);
hres = dispex_propget(dispex, DISPID_VALUE, &var, NULL);
ok(hres == E_ACCESSDENIED, "InvokeEx returned: %08x, expected E_ACCESSDENIED\n", hres);
ok(hres == E_ACCESSDENIED, "InvokeEx returned: %08lx, expected E_ACCESSDENIED\n", hres);
if(SUCCEEDED(hres))
VariantClear(&var);
SET_EXPECT(QS_IActiveScriptSite);
SET_EXPECT(QS_GetCaller);
hres = dispex_propget(dispex, DISPID_VALUE, &var, &caller_sp);
ok(hres == S_OK, "InvokeEx returned: %08x, expected S_OK\n", hres);
ok(hres == S_OK, "InvokeEx returned: %08lx, expected S_OK\n", hres);
ok(V_VT(&var) == VT_BSTR, "V_VT(var) = %d\n", V_VT(&var));
ok(!lstrcmpW(V_BSTR(&var), L"\nfunction toString() {\n [native code]\n}\n"),
"V_BSTR(var) = %s\n", wine_dbgstr_w(V_BSTR(&var)));
......@@ -2013,21 +2013,21 @@ static void test_nextdispid(IDispatchEx *dispex)
name = SysAllocString(L"dynVal");
hres = IDispatchEx_GetDispID(dispex, name, fdexNameCaseSensitive|fdexNameEnsure, &dyn_id);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
SysFreeString(name);
V_VT(&var) = VT_EMPTY;
hres = dispex_propput(dispex, dyn_id, 0, &var, NULL);
ok(hres == S_OK, "dispex_propput failed: %08x\n", hres);
ok(hres == S_OK, "dispex_propput failed: %08lx\n", hres);
while(last_id != dyn_id) {
hres = IDispatchEx_GetNextDispID(dispex, fdexEnumAll, last_id, &id);
ok(hres == S_OK, "GetNextDispID returned: %08x\n", hres);
ok(hres == S_OK, "GetNextDispID returned: %08lx\n", hres);
ok(id != DISPID_STARTENUM, "id == DISPID_STARTENUM\n");
ok(id != DISPID_IOMNAVIGATOR_TOSTRING, "id == DISPID_IOMNAVIGATOR_TOSTRING\n");
hres = IDispatchEx_GetMemberName(dispex, id, &name);
ok(hres == S_OK, "GetMemberName failed: %08x\n", hres);
ok(hres == S_OK, "GetMemberName failed: %08lx\n", hres);
if(id == dyn_id)
ok(!lstrcmpW(name, L"dynVal"), "name = %s\n", wine_dbgstr_w(name));
......@@ -2039,7 +2039,7 @@ static void test_nextdispid(IDispatchEx *dispex)
}
hres = IDispatchEx_GetNextDispID(dispex, 0, id, &id);
ok(hres == S_FALSE, "GetNextDispID returned: %08x\n", hres);
ok(hres == S_FALSE, "GetNextDispID returned: %08lx\n", hres);
ok(id == DISPID_STARTENUM, "id != DISPID_STARTENUM\n");
}
......@@ -2056,7 +2056,7 @@ static void test_global_id(void)
SET_EXPECT(script_divid_d);
tmp = SysAllocString(L"divid");
hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
SysFreeString(tmp);
CHECK_CALLED(GetScriptDispatch);
CHECK_CALLED(script_divid_d);
......@@ -2065,7 +2065,7 @@ static void test_global_id(void)
memset(&ei, 0, sizeof(ei));
memset(&dp, 0, sizeof(dp));
hres = IDispatchEx_InvokeEx(window_dispex, id, 0, DISPATCH_PROPERTYGET, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(var) = %d\n", V_VT(&var));
VariantClear(&var);
}
......@@ -2079,28 +2079,28 @@ static void test_arg_conv(IHTMLWindow2 *window)
HRESULT hres;
hres = IHTMLWindow2_get_document(window, &doc);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
hres = IHTMLDocument2_get_body(doc, &elem);
IHTMLDocument2_Release(doc);
ok(hres == S_OK, "get_body failed: %08x\n", hres);
ok(hres == S_OK, "get_body failed: %08lx\n", hres);
hres = IHTMLElement_QueryInterface(elem, &IID_IDispatchEx, (void**)&dispex);
IHTMLElement_Release(elem);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
SET_EXPECT(QS_VariantConversion);
SET_EXPECT(ChangeType);
V_VT(&v) = VT_I4;
V_I4(&v) = 0xf0f0f0;
hres = dispex_propput(dispex, DISPID_IHTMLBODYELEMENT_BACKGROUND, 0, &v, &caller_sp);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
CHECK_CALLED(QS_VariantConversion);
CHECK_CALLED(ChangeType);
V_VT(&v) = VT_EMPTY;
hres = dispex_propget(dispex, DISPID_IHTMLBODYELEMENT_BGCOLOR, &v, &caller_sp);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&v));
ok(!V_BSTR(&v), "V_BSTR(&var) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
......@@ -2115,10 +2115,10 @@ static void _test_elem_disabled(unsigned line, IHTMLElement *elem, VARIANT_BOOL
HRESULT hres;
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLElement3, (void**)&elem3);
ok_(__FILE__,line)(hres == S_OK, "Could not get IHTMLElement3 iface: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "Could not get IHTMLElement3 iface: %08lx\n", hres);
hres = IHTMLElement3_get_disabled(elem3, &b);
ok_(__FILE__,line)(hres == S_OK, "get_disabled failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "get_disabled failed: %08lx\n", hres);
ok_(__FILE__,line)(b == exb, "disabled = %x, expected %x\n", b, exb);
IHTMLElement3_Release(elem3);
......@@ -2133,21 +2133,21 @@ static void test_default_arg_conv(IHTMLWindow2 *window)
HRESULT hres;
hres = IHTMLWindow2_get_document(window, &doc);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
hres = IHTMLDocument2_get_body(doc, &elem);
IHTMLDocument2_Release(doc);
ok(hres == S_OK, "get_body failed: %08x\n", hres);
ok(hres == S_OK, "get_body failed: %08lx\n", hres);
hres = IHTMLElement_QueryInterface(elem, &IID_IDispatchEx, (void**)&dispex);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
test_elem_disabled(elem, VARIANT_FALSE);
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = SysAllocString(L"test");
hres = dispex_propput(dispex, DISPID_IHTMLELEMENT3_DISABLED, 0, &v, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
SysFreeString(V_BSTR(&v));
test_elem_disabled(elem, VARIANT_TRUE);
......@@ -2155,14 +2155,14 @@ static void test_default_arg_conv(IHTMLWindow2 *window)
V_VT(&v) = VT_I4;
V_I4(&v) = 0;
hres = dispex_propput(dispex, DISPID_IHTMLELEMENT3_DISABLED, 0, &v, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
test_elem_disabled(elem, VARIANT_FALSE);
V_VT(&v) = VT_I4;
V_I4(&v) = 1;
hres = dispex_propput(dispex, DISPID_IHTMLELEMENT3_DISABLED, DISPATCH_PROPERTYPUTREF, &v, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
test_elem_disabled(elem, VARIANT_TRUE);
......@@ -2184,16 +2184,16 @@ static void test_named_args(IHTMLWindow2 *window)
BSTR bstr;
hres = IHTMLWindow2_get_document(window, &doc);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
bstr = SysAllocString(L"div");
hres = IHTMLDocument2_createElement(doc, bstr, &elem);
IHTMLDocument2_Release(doc);
SysFreeString(bstr);
ok(hres == S_OK, "createElement failed: %08x\n", hres);
ok(hres == S_OK, "createElement failed: %08lx\n", hres);
hres = IHTMLElement_QueryInterface(elem, &IID_IDispatchEx, (void**)&dispex);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
bstr = SysAllocString(L"setAttribute");
hres = IDispatchEx_GetDispID(dispex, bstr, fdexNameCaseSensitive, &id);
......@@ -2208,16 +2208,16 @@ static void test_named_args(IHTMLWindow2 *window)
V_VT(&args[1]) = VT_I4;
V_I4(&args[1]) = 0;
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, NULL, NULL, NULL);
ok(hres == S_OK, "InvokeEx returned: %08x\n", hres);
ok(hres == S_OK, "InvokeEx returned: %08lx\n", hres);
hres = IHTMLElement_getAttribute(elem, V_BSTR(&args[0]), 0, &var);
ok(hres == S_OK, "getAttribute failed: %08x\n", hres);
ok(hres == S_OK, "getAttribute failed: %08lx\n", hres);
ok(V_VT(&var) == VT_NULL, "V_VT(var)=%d\n", V_VT(&var));
bstr = SysAllocString(L"0");
hres = IHTMLElement_getAttribute(elem, bstr, 0, &var);
SysFreeString(bstr);
ok(hres == S_OK, "getAttribute failed: %08x\n", hres);
ok(hres == S_OK, "getAttribute failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&var));
ok(!lstrcmpW(V_BSTR(&var), L"testattr"), "V_BSTR(&var) = %s\n", debugstr_w(V_BSTR(&var)));
VariantClear(&var);
......@@ -2227,12 +2227,12 @@ static void test_named_args(IHTMLWindow2 *window)
V_BSTR(&args[2]) = SysAllocString(L"testval");
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, NULL, NULL, NULL);
VariantClear(&args[2]);
ok(hres == DISP_E_TYPEMISMATCH, "InvokeEx returned: %08x\n", hres);
ok(hres == DISP_E_TYPEMISMATCH, "InvokeEx returned: %08lx\n", hres);
V_VT(&args[2]) = VT_I4;
V_I4(&args[2]) = 0;
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, NULL, NULL, NULL);
ok(hres == DISP_E_TYPEMISMATCH, "InvokeEx returned: %08x\n", hres);
ok(hres == DISP_E_TYPEMISMATCH, "InvokeEx returned: %08lx\n", hres);
args[2] = args[0];
V_VT(&args[1]) = VT_BSTR;
......@@ -2240,11 +2240,11 @@ static void test_named_args(IHTMLWindow2 *window)
V_VT(&args[0]) = VT_I4;
V_I4(&args[0]) = 0;
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, NULL, NULL, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
VariantClear(&args[1]);
hres = IHTMLElement_getAttribute(elem, V_BSTR(&args[2]), 0, &var);
ok(hres == S_OK, "getAttribute failed: %08x\n", hres);
ok(hres == S_OK, "getAttribute failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&var));
ok(!lstrcmpW(V_BSTR(&var), L"testval"), "V_BSTR(&var) = %s\n", debugstr_w(V_BSTR(&var)));
VariantClear(&var);
......@@ -2255,11 +2255,11 @@ static void test_named_args(IHTMLWindow2 *window)
V_VT(&args[0]) = VT_BSTR;
V_BSTR(&args[0]) = SysAllocString(L"newValue");
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, NULL, NULL, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
VariantClear(&args[0]);
hres = IHTMLElement_getAttribute(elem, V_BSTR(&args[1]), 0, &var);
ok(hres == S_OK, "getAttribute failed: %08x\n", hres);
ok(hres == S_OK, "getAttribute failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&var));
ok(!lstrcmpW(V_BSTR(&var), L"newValue"), "V_BSTR(&var) = %s\n", debugstr_w(V_BSTR(&var)));
VariantClear(&var);
......@@ -2274,12 +2274,12 @@ static void test_named_args(IHTMLWindow2 *window)
V_VT(&args[0]) = VT_BSTR;
V_BSTR(&args[0]) = SysAllocString(L"extra");
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, NULL, NULL, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
VariantClear(&args[2]);
VariantClear(&args[0]);
hres = IHTMLElement_getAttribute(elem, V_BSTR(&args[3]), 0, &var);
ok(hres == S_OK, "getAttribute failed: %08x\n", hres);
ok(hres == S_OK, "getAttribute failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&var));
ok(!lstrcmpW(V_BSTR(&var), L"foobar"), "V_BSTR(&var) = %s\n", debugstr_w(V_BSTR(&var)));
VariantClear(&var);
......@@ -2291,11 +2291,11 @@ static void test_named_args(IHTMLWindow2 *window)
V_VT(&args[2]) = VT_BSTR;
V_BSTR(&args[2]) = SysAllocString(L"withThis");
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, NULL, NULL, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
VariantClear(&args[2]);
hres = IHTMLElement_getAttribute(elem, V_BSTR(&args[3]), 0, &var);
ok(hres == S_OK, "getAttribute failed: %08x\n", hres);
ok(hres == S_OK, "getAttribute failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&var));
ok(!lstrcmpW(V_BSTR(&var), L"withThis"), "V_BSTR(&var) = %s\n", debugstr_w(V_BSTR(&var)));
VariantClear(&args[3]);
......@@ -2316,10 +2316,10 @@ static void test_ui(void)
win_skip("IActiveScriptSiteUIControl not supported\n");
return;
}
ok(hres == S_OK, "Could not get IActiveScriptSiteUIControl: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptSiteUIControl: %08lx\n", hres);
hres = IActiveScriptSiteUIControl_GetUIBehavior(ui_control, SCRIPTUICITEM_MSGBOX, &uic_handling);
ok(hres == S_OK, "GetUIBehavior failed: %08x\n", hres);
ok(hres == S_OK, "GetUIBehavior failed: %08lx\n", hres);
ok(uic_handling == SCRIPTUICHANDLING_ALLOW, "uic_handling = %d\n", uic_handling);
IActiveScriptSiteUIControl_Release(ui_control);
......@@ -2332,10 +2332,10 @@ static void test_sp(void)
HRESULT hres;
hres = IActiveScriptSite_QueryInterface(site, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(sp, &SID_SContainerDispatch, &IID_IHTMLDocument, (void**)&unk);
ok(hres == S_OK, "Could not get SID_SContainerDispatch service: %08x\n", hres);
ok(hres == S_OK, "Could not get SID_SContainerDispatch service: %08lx\n", hres);
IUnknown_Release(unk);
IServiceProvider_Release(sp);
......@@ -2363,8 +2363,8 @@ static void test_script_run(void)
tmp = SysAllocString(documentW);
hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id);
SysFreeString(tmp);
ok(hres == S_OK, "GetDispID(document) failed: %08x\n", hres);
ok(id == DISPID_IHTMLWINDOW2_DOCUMENT, "id=%x\n", id);
ok(hres == S_OK, "GetDispID(document) failed: %08lx\n", hres);
ok(id == DISPID_IHTMLWINDOW2_DOCUMENT, "id=%lx\n", id);
CHECK_CALLED(GetScriptDispatch);
......@@ -2373,61 +2373,61 @@ static void test_script_run(void)
memset(&ei, 0, sizeof(ei));
hres = IDispatchEx_InvokeEx(window_dispex, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(var)=%d\n", V_VT(&var));
ok(V_DISPATCH(&var) != NULL, "V_DISPATCH(&var) == NULL\n");
hres = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IDispatchEx, (void**)&document);
VariantClear(&var);
ok(hres == S_OK, "Could not get DispatchEx: %08x\n", hres);
ok(hres == S_OK, "Could not get DispatchEx: %08lx\n", hres);
tmp = SysAllocString(testW);
hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive, &id);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(document) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(document) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres);
hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive | fdexNameImplicit, &id);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(document) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(document) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres);
SysFreeString(tmp);
id = 0;
tmp = SysAllocString(testW);
hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive|fdexNameEnsure, &id);
SysFreeString(tmp);
ok(hres == S_OK, "GetDispID(document) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(document) failed: %08lx\n", hres);
ok(id, "id == 0\n");
V_VT(&var) = VT_I4;
V_I4(&var) = 100;
hres = dispex_propput(document, id, 0, &var, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
tmp = SysAllocString(testW);
hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive, &id);
SysFreeString(tmp);
ok(hres == S_OK, "GetDispID(document) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(document) failed: %08lx\n", hres);
hres = IDispatchEx_DeleteMemberByDispID(document, id);
ok(hres == E_NOTIMPL, "DeleteMemberByDispID failed = %08x\n", hres);
ok(hres == E_NOTIMPL, "DeleteMemberByDispID failed = %08lx\n", hres);
VariantInit(&var);
memset(&dp, 0, sizeof(dp));
memset(&ei, 0, sizeof(ei));
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var));
ok(V_I4(&var) == 100, "V_I4(&var) = %d\n", V_I4(&var));
ok(V_I4(&var) == 100, "V_I4(&var) = %ld\n", V_I4(&var));
V_VT(&var) = VT_I4;
V_I4(&var) = 200;
hres = dispex_propput(document, id, DISPATCH_PROPERTYPUTREF, &var, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
VariantInit(&var);
memset(&dp, 0, sizeof(dp));
memset(&ei, 0, sizeof(ei));
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var));
ok(V_I4(&var) == 200, "V_I4(&var) = %d\n", V_I4(&var));
ok(V_I4(&var) == 200, "V_I4(&var) = %ld\n", V_I4(&var));
memset(&dp, 0, sizeof(dp));
memset(&ei, 0, sizeof(ei));
......@@ -2436,39 +2436,39 @@ static void test_script_run(void)
dp.cArgs = 1;
dp.rgvarg = &var;
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYPUT, &dp, NULL, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
VariantInit(&var);
memset(&dp, 0, sizeof(dp));
memset(&ei, 0, sizeof(ei));
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var));
ok(V_I4(&var) == 300, "V_I4(&var) = %d\n", V_I4(&var));
ok(V_I4(&var) == 300, "V_I4(&var) = %ld\n", V_I4(&var));
V_VT(&var) = VT_BSTR;
V_BSTR(&var) = NULL;
hres = dispex_propput(document, id, 0, &var, NULL);
ok(hres == S_OK, "dispex_propput failed: %08x\n", hres);
ok(hres == S_OK, "dispex_propput failed: %08lx\n", hres);
VariantInit(&var);
memset(&dp, 0, sizeof(dp));
memset(&ei, 0, sizeof(ei));
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&var));
ok(!V_BSTR(&var), "V_BSTR(&var) = %s\n", wine_dbgstr_w(V_BSTR(&var)));
unk = (void*)0xdeadbeef;
hres = IDispatchEx_GetNameSpaceParent(window_dispex, &unk);
ok(hres == S_OK, "GetNameSpaceParent failed: %08x\n", hres);
ok(hres == S_OK, "GetNameSpaceParent failed: %08lx\n", hres);
ok(!unk, "unk=%p, expected NULL\n", unk);
id = 0;
tmp = SysAllocString(funcW);
hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive|fdexNameEnsure, &id);
SysFreeString(tmp);
ok(hres == S_OK, "GetDispID(func) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(func) failed: %08lx\n", hres);
ok(id, "id == 0\n");
dp.cArgs = 1;
......@@ -2478,7 +2478,7 @@ static void test_script_run(void)
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = (IDispatch*)&funcDisp;
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYPUT, &dp, NULL, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
VariantInit(&var);
memset(&dp, 0, sizeof(dp));
......@@ -2495,21 +2495,21 @@ static void test_script_run(void)
CHECK_CALLED_BROKEN(SetProperty_ABBREVIATE_GLOBALNAME_RESOLUTION_FALSE); /* IE11 */
CHECK_CALLED(funcDisp);
ok(hres == S_OK, "InvokeEx(INVOKE_FUNC) failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx(INVOKE_FUNC) failed: %08lx\n", hres);
ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var));
ok(V_I4(&var) == 100, "V_I4(&var) == NULL\n");
IDispatchEx_Release(document);
hres = IDispatchEx_QueryInterface(window_dispex, &IID_IHTMLWindow2, (void**)&window);
ok(hres == S_OK, "Could not get IHTMLWindow2 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLWindow2 iface: %08lx\n", hres);
hres = IHTMLWindow2_get_navigator(window, &navigator);
ok(hres == S_OK, "get_navigator failed: %08x\n", hres);
ok(hres == S_OK, "get_navigator failed: %08lx\n", hres);
hres = IOmNavigator_QueryInterface(navigator, &IID_IDispatchEx, (void**)&dispex);
IOmNavigator_Release(navigator);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
test_func(dispex);
test_nextdispid(dispex);
......@@ -2521,7 +2521,7 @@ static void test_script_run(void)
tmp = SysAllocString(L"test");
hres = IDispatchEx_DeleteMemberByName(dispex, tmp, fdexNameCaseSensitive);
ok(hres == E_NOTIMPL, "DeleteMemberByName failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "DeleteMemberByName failed: %08lx\n", hres);
IDispatchEx_Release(dispex);
......@@ -2531,7 +2531,7 @@ static void test_script_run(void)
SET_EXPECT(script_testprop_d);
tmp = SysAllocString(L"testProp");
hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
ok(id != DISPID_SCRIPT_TESTPROP, "id == DISPID_SCRIPT_TESTPROP\n");
CHECK_CALLED(GetScriptDispatch);
CHECK_CALLED(script_testprop_d);
......@@ -2539,7 +2539,7 @@ static void test_script_run(void)
tmp = SysAllocString(L"testProp");
hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
ok(id != DISPID_SCRIPT_TESTPROP, "id == DISPID_SCRIPT_TESTPROP\n");
SysFreeString(tmp);
......@@ -2548,7 +2548,7 @@ static void test_script_run(void)
memset(&ei, 0, sizeof(ei));
memset(&dp, 0, sizeof(dp));
hres = IDispatchEx_InvokeEx(window_dispex, id, 0, DISPATCH_PROPERTYGET, &dp, &var, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&var) == VT_NULL, "V_VT(var) = %d\n", V_VT(&var));
CHECK_CALLED(GetScriptDispatch);
CHECK_CALLED(script_testprop_i);
......@@ -2557,7 +2557,7 @@ static void test_script_run(void)
SET_EXPECT(script_testprop2_d);
tmp = SysAllocString(L"testProp2");
hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive|fdexNameEnsure, &id);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
ok(id != DISPID_SCRIPT_TESTPROP2, "id == DISPID_SCRIPT_TESTPROP2\n");
CHECK_CALLED(GetScriptDispatch);
CHECK_CALLED(script_testprop2_d);
......@@ -2565,7 +2565,7 @@ static void test_script_run(void)
tmp = SysAllocString(L"test");
hres = IDispatchEx_DeleteMemberByName(window_dispex, tmp, fdexNameCaseSensitive);
ok(hres == E_NOTIMPL, "DeleteMemberByName failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "DeleteMemberByName failed: %08lx\n", hres);
test_global_id();
......@@ -2586,7 +2586,7 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac
CHECK_EXPECT(ParseScriptText_execScript);
ok(!pstrItemName, "pstrItemName = %s\n", wine_dbgstr_w(pstrItemName));
ok(!lstrcmpW(pstrDelimiter, L"\""), "pstrDelimiter = %s\n", wine_dbgstr_w(pstrDelimiter));
ok(dwFlags == SCRIPTTEXT_ISVISIBLE, "dwFlags = %x\n", dwFlags);
ok(dwFlags == SCRIPTTEXT_ISVISIBLE, "dwFlags = %lx\n", dwFlags);
V_VT(pvarResult) = VT_I4;
V_I4(pvarResult) = 10;
......@@ -2595,7 +2595,7 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac
CHECK_EXPECT(ParseScriptText_script);
ok(!lstrcmpW(pstrItemName, L"window"), "pstrItemName = %s\n", wine_dbgstr_w(pstrItemName));
ok(!lstrcmpW(pstrDelimiter, L"</SCRIPT>"), "pstrDelimiter = %s\n", wine_dbgstr_w(pstrDelimiter));
ok(dwFlags == (SCRIPTTEXT_ISVISIBLE|SCRIPTTEXT_HOSTMANAGESSOURCE), "dwFlags = %x\n", dwFlags);
ok(dwFlags == (SCRIPTTEXT_ISVISIBLE|SCRIPTTEXT_HOSTMANAGESSOURCE), "dwFlags = %lx\n", dwFlags);
test_script_run();
return S_OK;
......@@ -2676,26 +2676,26 @@ static HRESULT WINAPI ActiveScript_SetScriptSite(IActiveScript *iface, IActiveSc
ok(pass != NULL, "pass == NULL\n");
hres = IActiveScriptSite_QueryInterface(pass, &IID_IActiveScriptSiteInterruptPoll, (void**)&poll);
ok(hres == S_OK, "Could not get IActiveScriptSiteInterruptPoll interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptSiteInterruptPoll interface: %08lx\n", hres);
if(SUCCEEDED(hres))
IActiveScriptSiteInterruptPoll_Release(poll);
hres = IActiveScriptSite_GetLCID(pass, &lcid);
ok(hres == S_OK, "GetLCID failed: %08x\n", hres);
ok(hres == S_OK, "GetLCID failed: %08lx\n", hres);
hres = IActiveScriptSite_OnStateChange(pass, (state = SCRIPTSTATE_INITIALIZED));
ok(hres == S_OK, "OnStateChange failed: %08x\n", hres);
ok(hres == S_OK, "OnStateChange failed: %08lx\n", hres);
hres = IActiveScriptSite_QueryInterface(pass, &IID_IActiveScriptSiteDebug, (void**)&debug);
ok(hres == S_OK, "Could not get IActiveScriptSiteDebug interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptSiteDebug interface: %08lx\n", hres);
if(SUCCEEDED(hres))
IActiveScriptSiteDebug_Release(debug);
hres = IActiveScriptSite_QueryInterface(pass, &IID_ICanHandleException, (void**)&canexception);
ok(hres == E_NOINTERFACE, "Could not get IID_ICanHandleException interface: %08x\n", hres);
ok(hres == E_NOINTERFACE, "Could not get IID_ICanHandleException interface: %08lx\n", hres);
hres = IActiveScriptSite_QueryInterface(pass, &IID_IServiceProvider, (void**)&service);
ok(hres == S_OK, "Could not get IServiceProvider interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider interface: %08lx\n", hres);
if(SUCCEEDED(hres))
IServiceProvider_Release(service);
......@@ -2731,7 +2731,7 @@ static HRESULT WINAPI ActiveScript_SetScriptState(IActiveScript *iface, SCRIPTST
}
hres = IActiveScriptSite_OnStateChange(site, (state = ss));
ok(hres == S_OK, "OnStateChange failed: %08x\n", hres);
ok(hres == S_OK, "OnStateChange failed: %08lx\n", hres);
return S_OK;
}
......@@ -2764,14 +2764,14 @@ static HRESULT WINAPI ActiveScript_AddNamedItem(IActiveScript *iface,
CHECK_EXPECT(AddNamedItem);
ok(!lstrcmpW(pstrName, windowW), "pstrName=%s\n", wine_dbgstr_w(pstrName));
ok(dwFlags == (SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS), "dwFlags=%x\n", dwFlags);
ok(dwFlags == (SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS), "dwFlags=%lx\n", dwFlags);
hres = IActiveScriptSite_GetItemInfo(site, windowW, SCRIPTINFO_IUNKNOWN, &unk, NULL);
ok(hres == S_OK, "GetItemInfo failed: %08x\n", hres);
ok(hres == S_OK, "GetItemInfo failed: %08lx\n", hres);
ok(unk != NULL, "unk == NULL\n");
hres = IUnknown_QueryInterface(unk, &IID_IDispatch, (void**)&disp);
ok(hres == S_OK, "Could not get IDispatch interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatch interface: %08lx\n", hres);
if(SUCCEEDED(hres))
IDispatch_Release(disp);
......@@ -2781,7 +2781,7 @@ static HRESULT WINAPI ActiveScript_AddNamedItem(IActiveScript *iface,
IUnknown_Release(unk2);
hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&window_dispex);
ok(hres == S_OK, "Could not get IDispatchEx interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx interface: %08lx\n", hres);
IUnknown_Release(unk);
return S_OK;
......@@ -2945,33 +2945,33 @@ static void report_data(ProtocolHandler *This)
static const WCHAR emptyW[] = {0};
hres = IInternetProtocolSink_QueryInterface(This->sink, &IID_IServiceProvider, (void**)&service_provider);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate, &IID_IHttpNegotiate, (void**)&http_negotiate);
IServiceProvider_Release(service_provider);
ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08lx\n", hres);
hres = IUri_GetDisplayUri(This->uri, &url);
ok(hres == S_OK, "Failed to get display uri: %08x\n", hres);
ok(hres == S_OK, "Failed to get display uri: %08lx\n", hres);
hres = IHttpNegotiate_BeginningTransaction(http_negotiate, url, emptyW, 0, &addl_headers);
ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres);
ok(hres == S_OK, "BeginningTransaction failed: %08lx\n", hres);
SysFreeString(url);
CoTaskMemFree(addl_headers);
headers = SysAllocString(L"HTTP/1.1 200 OK\r\n\r\n");
hres = IHttpNegotiate_OnResponse(http_negotiate, 200, headers, NULL, NULL);
ok(hres == S_OK, "OnResponse failed: %08x\n", hres);
ok(hres == S_OK, "OnResponse failed: %08lx\n", hres);
SysFreeString(headers);
IHttpNegotiate_Release(http_negotiate);
hres = IInternetProtocolSink_ReportData(This->sink, BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION,
This->size, This->size);
ok(hres == S_OK, "ReportData failed: %08x\n", hres);
ok(hres == S_OK, "ReportData failed: %08lx\n", hres);
hres = IInternetProtocolSink_ReportResult(This->sink, S_OK, 0, NULL);
ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
ok(hres == S_OK, "ReportResult failed: %08lx\n", hres);
}
typedef struct js_stream_t {
......@@ -3051,17 +3051,17 @@ static void stream_write(const WCHAR *name, const WCHAR *data)
stream->protocol_handler = NULL;
hres = CreateStreamOnHGlobal(NULL, TRUE, &protocol_handler->stream);
ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres);
ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres);
hres = IStream_Write(protocol_handler->stream, bom_utf16, sizeof(bom_utf16), NULL);
ok(hres == S_OK, "Write failed: %08x\n", hres);
ok(hres == S_OK, "Write failed: %08lx\n", hres);
hres = IStream_Write(protocol_handler->stream, data, lstrlenW(data)*sizeof(WCHAR), NULL);
ok(hres == S_OK, "Write failed: %08x\n", hres);
ok(hres == S_OK, "Write failed: %08lx\n", hres);
U(large_zero).QuadPart = 0;
hres = IStream_Seek(protocol_handler->stream, large_zero, STREAM_SEEK_SET, NULL);
ok(hres == S_OK, "Seek failed: %08x\n", hres);
ok(hres == S_OK, "Seek failed: %08lx\n", hres);
async_switch(protocol_handler);
IInternetProtocolEx_Release(&protocol_handler->IInternetProtocolEx_iface);
......@@ -3133,7 +3133,7 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocolEx *iface, PROTOCOLDATA
static HRESULT WINAPI Protocol_Abort(IInternetProtocolEx *iface, HRESULT hrReason, DWORD dwOptions)
{
trace("Abort(%08x %x)\n", hrReason, dwOptions);
trace("Abort(%08lx %lx)\n", hrReason, dwOptions);
return E_NOTIMPL;
}
......@@ -3162,7 +3162,7 @@ static HRESULT WINAPI Protocol_Read(IInternetProtocolEx *iface, void *pv, ULONG
if(This->stream) {
hres = IStream_Read(This->stream, pv, cb, &read);
ok(SUCCEEDED(hres), "Read failed: %08x\n", hres);
ok(SUCCEEDED(hres), "Read failed: %08lx\n", hres);
if(FAILED(hres))
return hres;
if(pcbRead)
......@@ -3213,7 +3213,7 @@ static HRESULT WINAPI ProtocolEx_StartEx(IInternetProtocolEx *iface, IUri *uri,
static const WCHAR empty_prefixW[] = {'/','e','m','p','t','y'};
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bindf, &This->bind_info);
ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres);
ok(hres == S_OK, "GetBindInfo failed: %08lx\n", hres);
hres = IUri_GetPath(uri, &path);
if(FAILED(hres))
......@@ -3224,7 +3224,7 @@ static HRESULT WINAPI ProtocolEx_StartEx(IInternetProtocolEx *iface, IUri *uri,
This->size = strlen(This->data);
}else if(!lstrcmpW(path, L"/echo.php")) {
ok(This->bind_info.dwBindVerb == BINDVERB_POST, "unexpected bind verb %d\n", This->bind_info.dwBindVerb == BINDVERB_POST);
todo_wine ok(This->bind_info.stgmedData.tymed == TYMED_ISTREAM, "tymed = %x\n", This->bind_info.stgmedData.tymed);
todo_wine ok(This->bind_info.stgmedData.tymed == TYMED_ISTREAM, "tymed = %lx\n", This->bind_info.stgmedData.tymed);
switch(This->bind_info.stgmedData.tymed) {
case TYMED_HGLOBAL:
This->size = This->bind_info.cbstgmedData;
......@@ -3235,13 +3235,13 @@ static HRESULT WINAPI ProtocolEx_StartEx(IInternetProtocolEx *iface, IUri *uri,
IStream_AddRef(This->stream);
break;
default:
ok(0, "unexpected tymed %d\n", This->bind_info.stgmedData.tymed);
ok(0, "unexpected tymed %ld\n", This->bind_info.stgmedData.tymed);
}
}else if(!lstrcmpW(path, L"/jsstream.php")) {
BSTR query;
hres = IUri_GetQuery(uri, &query);
ok(hres == S_OK, "GetQuery failed: %08x\n", hres);
ok(hres == S_OK, "GetQuery failed: %08lx\n", hres);
ok(SysStringLen(query) > 1 && *query == '?', "unexpected query %s\n", wine_dbgstr_w(query));
register_stream(This, query+1);
SysFreeString(query);
......@@ -3394,23 +3394,23 @@ static void test_exec_script(IHTMLDocument2 *doc, const WCHAR *codew, const WCHA
HRESULT hres;
hres = IHTMLDocument2_get_parentWindow(doc, &window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
code = SysAllocString(codew);
lang = SysAllocString(langw);
SET_EXPECT(ParseScriptText_execScript);
hres = IHTMLWindow2_execScript(window, code, lang, &v);
ok(hres == S_OK, "execScript failed: %08x\n", hres);
ok(hres == S_OK, "execScript failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 10, "V_I4(v) = %d\n", V_I4(&v));
ok(V_I4(&v) == 10, "V_I4(v) = %ld\n", V_I4(&v));
CHECK_CALLED(ParseScriptText_execScript);
SysFreeString(lang);
lang = SysAllocString(L"invalid");
V_VT(&v) = 100;
hres = IHTMLWindow2_execScript(window, code, lang, &v);
ok(hres == CO_E_CLASSSTRING, "execScript failed: %08x, expected CO_E_CLASSSTRING\n", hres);
ok(hres == CO_E_CLASSSTRING, "execScript failed: %08lx, expected CO_E_CLASSSTRING\n", hres);
ok(V_VT(&v) == 100, "V_VT(v) = %d\n", V_VT(&v));
SysFreeString(lang);
SysFreeString(code);
......@@ -3487,10 +3487,10 @@ static void run_from_moniker(IMoniker *mon)
do_advise(doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink);
hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker, (void**)&persist);
ok(hres == S_OK, "Could not get IPersistMoniker iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IPersistMoniker iface: %08lx\n", hres);
hres = IPersistMoniker_Load(persist, FALSE, mon, NULL, 0);
ok(hres == S_OK, "Load failed: %08x\n", hres);
ok(hres == S_OK, "Load failed: %08lx\n", hres);
IPersistMoniker_Release(persist);
......@@ -3522,7 +3522,7 @@ static void run_js_script(const char *test_name)
MultiByteToWideChar(CP_ACP, 0, test_name, -1, ptr, url + ARRAY_SIZE(url) - ptr);
hres = CreateURLMoniker(NULL, url, &mon);
ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres);
ok(hres == S_OK, "CreateURLMoniker failed: %08lx\n", hres);
run_from_moniker(mon);
IMoniker_Release(mon);
......@@ -3541,7 +3541,7 @@ static void run_from_path(const WCHAR *path, const char *opt)
url = SysAllocString(buf);
hres = CreateURLMoniker(NULL, url, &mon);
SysFreeString(url);
ok(hres == S_OK, "CreateUrlMoniker failed: %08x\n", hres);
ok(hres == S_OK, "CreateUrlMoniker failed: %08lx\n", hres);
run_from_moniker(mon);
......@@ -3580,10 +3580,10 @@ static void init_protocol_handler(void)
static const WCHAR httpW[] = {'h','t','t','p',0};
hres = CoInternetGetSession(0, &internet_session, 0);
ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
ok(hres == S_OK, "CoInternetGetSession failed: %08lx\n", hres);
hres = IInternetSession_RegisterNameSpace(internet_session, &protocol_cf, &CLSID_HttpProtocol, httpW, 0, NULL, 0);
ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres);
ok(hres == S_OK, "RegisterNameSpace failed: %08lx\n", hres);
IInternetSession_Release(internet_session);
}
......@@ -3647,7 +3647,7 @@ static BOOL register_script_engine(void)
hres = CoRegisterClassObject(&CLSID_TestScript, (IUnknown *)&script_cf,
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
ok(hres == S_OK, "Could not register script engine: %08x\n", hres);
ok(hres == S_OK, "Could not register script engine: %08lx\n", hres);
return TRUE;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -72,23 +72,23 @@ static void _test_disp(unsigned line, IUnknown *unk, const IID *diid, const IID
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex);
ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08lx\n", hres);
if(FAILED(hres))
return;
ticnt = 0xdeadbeef;
hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08lx\n", hres);
ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt);
hres = IDispatchEx_GetTypeInfo(dispex, 0, 0, &typeinfo);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08lx\n", hres);
if(SUCCEEDED(hres)) {
TYPEATTR *type_attr;
hres = ITypeInfo_GetTypeAttr(typeinfo, &type_attr);
ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08lx\n", hres);
ok_(__FILE__,line) (IsEqualGUID(&type_attr->guid, diid)
|| broken(broken_diid && IsEqualGUID(&type_attr->guid, broken_diid)),
"unexpected guid %s\n", wine_dbgstr_guid(&type_attr->guid));
......@@ -104,12 +104,12 @@ static void _test_disp(unsigned line, IUnknown *unk, const IID *diid, const IID
static void _test_event_args(unsigned line, const IID *dispiid, const IID *broken_dispiid, DISPID id, WORD wFlags,
DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
{
ok_(__FILE__,line) (id == DISPID_VALUE, "id = %d\n", id);
ok_(__FILE__,line) (id == DISPID_VALUE, "id = %ld\n", id);
ok_(__FILE__,line) (wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
ok_(__FILE__,line) (pdp != NULL, "pdp == NULL\n");
ok_(__FILE__,line) (pdp->cArgs == 1, "pdp->cArgs = %d\n", pdp->cArgs);
ok_(__FILE__,line) (pdp->cNamedArgs == 1, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs);
ok_(__FILE__,line) (pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %d\n",
ok_(__FILE__,line) (pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %ld\n",
pdp->rgdispidNamedArgs[0]);
ok_(__FILE__,line) (V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(rgvarg) = %d\n", V_VT(pdp->rgvarg));
ok_(__FILE__,line) (pvarRes != NULL, "pvarRes == NULL\n");
......@@ -180,7 +180,7 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
......@@ -223,7 +223,7 @@ static HRESULT WINAPI xmlhttprequest_onreadystatechange(IDispatchEx *iface, DISP
test_event_args(&DIID_DispHTMLXMLHttpRequest, &IID_IHTMLXMLHttpRequest, id, wFlags, pdp, pvarRes, pei, pspCaller);
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
readystatechange_cnt++;
switch(val) {
......@@ -241,7 +241,7 @@ static HRESULT WINAPI xmlhttprequest_onreadystatechange(IDispatchEx *iface, DISP
CHECK_EXPECT(xmlhttprequest_onreadystatechange_done);
break;
default:
ok(0, "unexpected readyState: %d\n", val);
ok(0, "unexpected readyState: %ld\n", val);
}
return S_OK;
}
......@@ -297,7 +297,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
HRESULT hres;
hres = IHTMLDocument2_get_readyState(notif_doc, &state);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
if(!lstrcmpW(state, L"complete"))
doc_complete = TRUE;
......@@ -332,15 +332,15 @@ static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08lx\n", hres);
hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
IConnectionPointContainer_Release(container);
ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
ok(hres == S_OK, "FindConnectionPoint failed: %08lx\n", hres);
hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
ok(hres == S_OK, "Advise failed: %08lx\n", hres);
}
static void pump_msgs(BOOL *b)
......@@ -375,7 +375,7 @@ static void create_xmlhttprequest(IHTMLDocument2 *doc)
HRESULT hres;
hres = IHTMLDocument2_get_parentWindow(doc, &window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
ok(window != NULL, "window == NULL\n");
hres = IHTMLWindow2_QueryInterface(window, &IID_IHTMLWindow5, (void**)&window5);
......@@ -388,17 +388,17 @@ static void create_xmlhttprequest(IHTMLDocument2 *doc)
VariantInit(&var);
hres = IHTMLWindow5_get_XMLHttpRequest(window5, &var);
IHTMLWindow5_Release(window5);
ok(hres == S_OK, "get_XMLHttpRequest failed: %08x\n", hres);
ok(hres == S_OK, "get_XMLHttpRequest failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(&var) is %08x, expected VT_DISPATCH\n", V_VT(&var));
hres = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IHTMLXMLHttpRequestFactory, (void**)&factory);
VariantClear(&var);
ok(hres == S_OK, "QueryInterface(IID_IHTMLXMLHttpRequestFactory) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IHTMLXMLHttpRequestFactory) failed: %08lx\n", hres);
ok(factory != NULL, "factory == NULL\n");
hres = IHTMLXMLHttpRequestFactory_create(factory, &xhr);
IHTMLXMLHttpRequestFactory_Release(factory);
ok(hres == S_OK, "create failed: %08x\n", hres);
ok(hres == S_OK, "create failed: %08lx\n", hres);
ok(xhr != NULL, "xhr == NULL\n");
}
......@@ -411,14 +411,14 @@ static void test_header(const struct HEADER_TYPE expect[], int num)
all = NULL;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &all);
ok(hres == S_OK, "getAllResponseHeader failed: %08x\n", hres);
ok(hres == S_OK, "getAllResponseHeader failed: %08lx\n", hres);
ok(all != NULL, "all == NULL\n");
for(i = 0; i < num; ++i) {
text = NULL;
key = SysAllocString(expect[i].key);
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, key, &text);
ok(hres == S_OK, "getResponseHeader failed, got %08x\n", hres);
ok(hres == S_OK, "getResponseHeader failed, got %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
ok(!lstrcmpW(text, expect[i].value),
"Expect %s: %s, got %s\n", wine_dbgstr_w(expect[i].key), wine_dbgstr_w(expect[i].value),
......@@ -442,16 +442,16 @@ static void test_illegal_xml(IXMLDOMDocument *xmldom)
BSTR bstr;
hres = IXMLDOMDocument_get_baseName(xmldom, NULL);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08x\n", hres);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08lx\n", hres);
hres = IXMLDOMDocument_get_baseName(xmldom, &bstr);
ok(hres == S_FALSE, "get_baseName failed: %08x\n", hres);
ok(hres == S_FALSE, "get_baseName failed: %08lx\n", hres);
ok(bstr == NULL, "bstr(%p): %s\n", bstr, wine_dbgstr_w(bstr));
SysFreeString(bstr);
hres = IXMLDOMDocument_get_dataType(xmldom, NULL);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08x\n", hres);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08lx\n", hres);
hres = IXMLDOMDocument_get_dataType(xmldom, &variant);
ok(hres == S_FALSE, "get_dataType failed: %08x\n", hres);
ok(hres == S_FALSE, "get_dataType failed: %08lx\n", hres);
ok(V_VT(&variant) == VT_NULL, "got %s\n", wine_dbgstr_variant(&variant));
VariantClear(&variant);
......@@ -460,16 +460,16 @@ static void test_illegal_xml(IXMLDOMDocument *xmldom)
SysFreeString(bstr);
hres = IXMLDOMDocument_get_firstChild(xmldom, NULL);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08x\n", hres);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08lx\n", hres);
first = (void*)0xdeadbeef;
hres = IXMLDOMDocument_get_firstChild(xmldom, &first);
ok(hres == S_FALSE, "get_firstChild failed: %08x\n", hres);
ok(hres == S_FALSE, "get_firstChild failed: %08lx\n", hres);
ok(first == NULL, "first != NULL\n");
last = (void*)0xdeadbeef;
hres = IXMLDOMDocument_get_lastChild(xmldom, &last);
ok(hres == S_FALSE, "get_lastChild failed: %08x\n", hres);
ok(hres == S_FALSE, "get_lastChild failed: %08lx\n", hres);
ok(last == NULL, "last != NULL\n");
}
......@@ -480,7 +480,7 @@ static void _set_request_header(unsigned line, IHTMLXMLHttpRequest *xhr, const W
HRESULT hres;
hres = IHTMLXMLHttpRequest_setRequestHeader(xhr, header, value);
ok_(__FILE__,line)(hres == S_OK, "setRequestHeader failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "setRequestHeader failed: %08lx\n", hres);
SysFreeString(header);
SysFreeString(value);
......@@ -496,23 +496,23 @@ static void test_responseXML(const WCHAR *expect_text)
disp = NULL;
hres = IHTMLXMLHttpRequest_get_responseXML(xhr, &disp);
ok(hres == S_OK, "get_responseXML failed: %08x\n", hres);
ok(hres == S_OK, "get_responseXML failed: %08lx\n", hres);
ok(disp != NULL, "disp == NULL\n");
xmldom = NULL;
hres = IDispatch_QueryInterface(disp, &IID_IXMLDOMDocument, (void**)&xmldom);
ok(hres == S_OK, "QueryInterface(IXMLDOMDocument) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IXMLDOMDocument) failed: %08lx\n", hres);
ok(xmldom != NULL, "xmldom == NULL\n");
hres = IXMLDOMDocument_QueryInterface(xmldom, &IID_IObjectSafety, (void**)&safety);
ok(hres == S_OK, "QueryInterface IObjectSafety failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface IObjectSafety failed: %08lx\n", hres);
hres = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, &supported, &enabled);
ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres);
ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres);
ok(broken(supported == (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA)) ||
supported == (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER) /* msxml3 SP8+ */,
"Expected supported: (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), got %08x\n", supported);
"Expected supported: (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), got %08lx\n", supported);
ok(enabled == ((INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER) & supported),
"Expected enabled: (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), got 0x%08x\n", enabled);
"Expected enabled: (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), got 0x%08lx\n", enabled);
IObjectSafety_Release(safety);
if(!expect_text)
......@@ -535,7 +535,7 @@ static HRESULT _xhr_open(unsigned line, const WCHAR *url_w, const WCHAR *method_
V_VT(&empty) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_open(xhr, method, url, async, empty, empty);
ok_(__FILE__,line)(hres == S_OK, "open failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "open failed: %08lx\n", hres);
SysFreeString(method);
SysFreeString(url);
......@@ -549,7 +549,7 @@ static void _test_response_text(unsigned line, const WCHAR *expect_text)
HRESULT hres;
hres = IHTMLXMLHttpRequest_get_responseText(xhr, &text);
ok(hres == S_OK, "get_responseText failed: %08x\n", hres);
ok(hres == S_OK, "get_responseText failed: %08lx\n", hres);
ok(text != NULL, "test == NULL\n");
if(expect_text) {
unsigned len;
......@@ -583,51 +583,51 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
V_VT(&var) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_get_onreadystatechange(xhr, &var);
ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "get_onreadystatechange failed: %08lx\n", hres);
ok(V_VT(&var) == VT_NULL, "V_VT(onreadystatechange) = %d\n", V_VT(&var));
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = (IDispatch*)&xmlhttprequest_onreadystatechange_obj;
hres = IHTMLXMLHttpRequest_put_onreadystatechange(xhr, var);
ok(hres == S_OK, "put_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "put_onreadystatechange failed: %08lx\n", hres);
V_VT(&var) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_get_onreadystatechange(xhr, &var);
ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "get_onreadystatechange failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(onreadystatechange) = %d\n", V_VT(&var));
ok(V_DISPATCH(&var) == (IDispatch*)&xmlhttprequest_onreadystatechange_obj, "unexpected onreadystatechange value\n");
hres = IHTMLXMLHttpRequest_get_readyState(xhr, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 0, "Expect UNSENT, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 0, "Expect UNSENT, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_status(xhr, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(text == NULL, "Expect NULL, got %p\n", text);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
method = SysAllocString(L"GET");
......@@ -638,7 +638,7 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
SET_EXPECT(xmlhttprequest_onreadystatechange_opened);
hres = IHTMLXMLHttpRequest_open(xhr, method, url, vbool, vempty, vempty);
todo_wine ok(hres == S_OK, "open failed: %08x\n", hres); /* Gecko 30+ only supports async */
todo_wine ok(hres == S_OK, "open failed: %08lx\n", hres); /* Gecko 30+ only supports async */
todo_wine CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
SysFreeString(method);
......@@ -652,27 +652,27 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(text == NULL, "Expect NULL, got %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 1, "Expect OPENED, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 1, "Expect OPENED, got %ld\n", val);
set_request_header(xhr, L"x-wine-test", L"sync-test");
......@@ -682,7 +682,7 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
SET_EXPECT(xmlhttprequest_onreadystatechange_done);
loading_cnt = 0;
hres = IHTMLXMLHttpRequest_send(xhr, vempty);
ok(hres == S_OK, "send failed: %08x\n", hres);
ok(hres == S_OK, "send failed: %08lx\n", hres);
CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
CHECK_CALLED(xmlhttprequest_onreadystatechange_headers_received);
CHECK_CALLED(xmlhttprequest_onreadystatechange_loading);
......@@ -691,7 +691,7 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
text = NULL;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == S_OK, "getResponseHeader failed, got %08x\n", hres);
ok(hres == S_OK, "getResponseHeader failed, got %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
SysFreeString(text);
......@@ -700,11 +700,11 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == S_OK, "get_status failed: %08x\n", hres);
ok(val == 200, "Expect 200, got %d\n", val);
ok(hres == S_OK, "get_status failed: %08lx\n", hres);
ok(val == 200, "Expect 200, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == S_OK, "get_statusText failed: %08x\n", hres);
ok(hres == S_OK, "get_statusText failed: %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
ok(!lstrcmpW(text, L"OK"),
"Expected \"OK\", got %s\n", wine_dbgstr_w(text));
......@@ -712,8 +712,8 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 4, "Expect DONE, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 4, "Expect DONE, got %ld\n", val);
test_response_text(expect_text);
test_responseXML(expect_text);
......@@ -740,51 +740,51 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = (IDispatch*)&xmlhttprequest_onreadystatechange_obj;
hres = IHTMLXMLHttpRequest_put_onreadystatechange(xhr, var);
ok(hres == S_OK, "put_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "put_onreadystatechange failed: %08lx\n", hres);
V_VT(&var) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_get_onreadystatechange(xhr, &var);
ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "get_onreadystatechange failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(onreadystatechange) = %d\n", V_VT(&var));
ok(V_DISPATCH(&var) == (IDispatch*)&xmlhttprequest_onreadystatechange_obj, "unexpected onreadystatechange value\n");
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, NULL, &text);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08x\n", hres);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08lx\n", hres);
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, NULL, NULL);
ok(hres == E_POINTER || broken(hres == E_INVALIDARG), /* Vista and before */
"Expect E_POINTER, got %08x\n", hres);
"Expect E_POINTER, got %08lx\n", hres);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(text == NULL, "Expect NULL, got %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 0, "Expect UNSENT, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 0, "Expect UNSENT, got %ld\n", val);
SET_EXPECT(xmlhttprequest_onreadystatechange_opened);
hres = xhr_open(xml_url, L"GET");
......@@ -798,27 +798,27 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(text == NULL, "Expect NULL, got %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 1, "Expect OPENED, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 1, "Expect OPENED, got %ld\n", val);
set_request_header(xhr, L"x-wine-test", L"async-test");
......@@ -830,7 +830,7 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
V_VT(&vempty) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_send(xhr, vempty);
ok(hres == S_OK, "send failed: %08x\n", hres);
ok(hres == S_OK, "send failed: %08lx\n", hres);
if(SUCCEEDED(hres))
pump_msgs(&called_xmlhttprequest_onreadystatechange_done);
todo_wine CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
......@@ -849,7 +849,7 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
text = NULL;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == S_OK, "getAllResponseHeader failed, got %08x\n", hres);
ok(hres == S_OK, "getAllResponseHeader failed, got %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
SysFreeString(text);
......@@ -858,20 +858,20 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == S_OK, "get_status failed: %08x\n", hres);
ok(val == 200, "Expect 200, got %d\n", val);
ok(hres == S_OK, "get_status failed: %08lx\n", hres);
ok(val == 200, "Expect 200, got %ld\n", val);
text = NULL;
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == S_OK, "get_statusText failed: %08x\n", hres);
ok(hres == S_OK, "get_statusText failed: %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
ok(!lstrcmpW(text, L"OK"), "Expected \"OK\", got %s\n", wine_dbgstr_w(text));
SysFreeString(text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 4, "Expect DONE, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 4, "Expect DONE, got %ld\n", val);
test_response_text(expect_text);
test_responseXML(expect_text);
......@@ -902,15 +902,15 @@ static void test_async_xhr_abort(IHTMLDocument2 *doc, const WCHAR *xml_url)
CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
hres = IHTMLXMLHttpRequest_abort(xhr);
ok(hres == S_OK, "abort failed: %08x\n", hres);
ok(hres == S_OK, "abort failed: %08lx\n", hres);
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 0, "Expect UNSENT, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 0, "Expect UNSENT, got %ld\n", val);
IHTMLXMLHttpRequest_Release(xhr);
xhr = NULL;
......@@ -930,20 +930,20 @@ static void test_async_xhr_abort(IHTMLDocument2 *doc, const WCHAR *xml_url)
SET_EXPECT(xmlhttprequest_onreadystatechange_opened);
SET_EXPECT(xmlhttprequest_onreadystatechange_done);
hres = IHTMLXMLHttpRequest_send(xhr, vempty);
ok(hres == S_OK, "send failed: %08x\n", hres);
ok(hres == S_OK, "send failed: %08lx\n", hres);
todo_wine CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
hres = IHTMLXMLHttpRequest_abort(xhr);
ok(hres == S_OK, "abort failed: %08x\n", hres);
ok(hres == S_OK, "abort failed: %08lx\n", hres);
CHECK_CALLED(xmlhttprequest_onreadystatechange_done);
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 0, "Expect UNSENT, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 0, "Expect UNSENT, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
ok(loading_cnt == 0, "loading_cnt = %d, expect 0, loading_cnt\n", loading_cnt);
todo_wine ok(readystatechange_cnt == 2, "readystatechange_cnt = %d, expect 2\n", readystatechange_cnt);
......@@ -966,7 +966,7 @@ static void test_xhr_post(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&xmlhttprequest_onreadystatechange_obj;
hres = IHTMLXMLHttpRequest_put_onreadystatechange(xhr, v);
ok(hres == S_OK, "put_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "put_onreadystatechange failed: %08lx\n", hres);
SET_EXPECT(xmlhttprequest_onreadystatechange_opened);
xhr_open(L"http://test.winehq.org/tests/post.php", L"POST");
......@@ -984,7 +984,7 @@ static void test_xhr_post(IHTMLDocument2 *doc)
SET_EXPECT(xmlhttprequest_onreadystatechange_done);
hres = IHTMLXMLHttpRequest_send(xhr, v);
ok(hres == S_OK, "send failed: %08x\n", hres);
ok(hres == S_OK, "send failed: %08lx\n", hres);
if(SUCCEEDED(hres))
pump_msgs(&called_xmlhttprequest_onreadystatechange_done);
......@@ -1012,11 +1012,11 @@ static IHTMLDocument2 *create_doc_from_url(const WCHAR *start_url)
HRESULT hres;
hres = CreateBindCtx(0, &bc);
ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres);
ok(hres == S_OK, "CreateBindCtx failed: 0x%08lx\n", hres);
url = SysAllocString(start_url);
hres = CreateURLMoniker(NULL, url, &url_mon);
ok(hres == S_OK, "CreateURLMoniker failed: 0x%08x\n", hres);
ok(hres == S_OK, "CreateURLMoniker failed: 0x%08lx\n", hres);
hres = CoCreateInstance(&CLSID_HTMLDocument, NULL,
CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, &IID_IHTMLDocument2,
......@@ -1024,15 +1024,15 @@ static IHTMLDocument2 *create_doc_from_url(const WCHAR *start_url)
#if !defined(__i386__) && !defined(__x86_64__)
todo_wine
#endif
ok(hres == S_OK, "CoCreateInstance failed: 0x%08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: 0x%08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker,
(void**)&persist_mon);
ok(hres == S_OK, "IHTMLDocument2_QueryInterface failed: 0x%08x\n", hres);
ok(hres == S_OK, "IHTMLDocument2_QueryInterface failed: 0x%08lx\n", hres);
hres = IPersistMoniker_Load(persist_mon, FALSE, url_mon, bc,
STGM_SHARE_EXCLUSIVE | STGM_READWRITE);
ok(hres == S_OK, "IPersistMoniker_Load failed: 0x%08x\n", hres);
ok(hres == S_OK, "IPersistMoniker_Load failed: 0x%08lx\n", hres);
IPersistMoniker_Release(persist_mon);
IMoniker_Release(url_mon);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment