Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleacc/Makefile.in | 1 - dlls/oleacc/client.c | 20 ++++++++++---------- dlls/oleacc/main.c | 32 ++++++++++++++++---------------- dlls/oleacc/propservice.c | 30 +++++++++++++++--------------- dlls/oleacc/window.c | 20 ++++++++++---------- 5 files changed, 51 insertions(+), 52 deletions(-)
diff --git a/dlls/oleacc/Makefile.in b/dlls/oleacc/Makefile.in index 629e9ae57f6..331229f2d4e 100644 --- a/dlls/oleacc/Makefile.in +++ b/dlls/oleacc/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = oleacc.dll IMPORTLIB = oleacc IMPORTS = uuid oleaut32 ole32 user32 rpcrt4 diff --git a/dlls/oleacc/client.c b/dlls/oleacc/client.c index 192a006bdba..20993109d28 100644 --- a/dlls/oleacc/client.c +++ b/dlls/oleacc/client.c @@ -129,7 +129,7 @@ static ULONG WINAPI Client_AddRef(IAccessible *iface) Client *This = impl_from_Client(iface); ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) ref = %u\n", This, ref); + TRACE("(%p) ref = %lu\n", This, ref); return ref; }
@@ -138,7 +138,7 @@ static ULONG WINAPI Client_Release(IAccessible *iface) Client *This = impl_from_Client(iface); ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ref = %u\n", This, ref); + TRACE("(%p) ref = %lu\n", This, ref);
if(!ref) heap_free(This); @@ -156,7 +156,7 @@ static HRESULT WINAPI Client_GetTypeInfo(IAccessible *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { Client *This = impl_from_Client(iface); - FIXME("(%p)->(%u %x %p)\n", This, iTInfo, lcid, ppTInfo); + FIXME("(%p)->(%u %lx %p)\n", This, iTInfo, lcid, ppTInfo); return E_NOTIMPL; }
@@ -164,7 +164,7 @@ static HRESULT WINAPI Client_GetIDsOfNames(IAccessible *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { Client *This = impl_from_Client(iface); - FIXME("(%p)->(%s %p %u %x %p)\n", This, debugstr_guid(riid), + FIXME("(%p)->(%s %p %u %lx %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); return E_NOTIMPL; } @@ -174,7 +174,7 @@ static HRESULT WINAPI Client_Invoke(IAccessible *iface, DISPID dispIdMember, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { Client *This = impl_from_Client(iface); - FIXME("(%p)->(%x %s %x %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + FIXME("(%p)->(%lx %s %lx %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); return E_NOTIMPL; } @@ -405,7 +405,7 @@ static HRESULT WINAPI Client_get_accDefaultAction(IAccessible *iface, static HRESULT WINAPI Client_accSelect(IAccessible *iface, LONG flagsSelect, VARIANT varID) { Client *This = impl_from_Client(iface); - FIXME("(%p)->(%x %s)\n", This, flagsSelect, debugstr_variant(&varID)); + FIXME("(%p)->(%lx %s)\n", This, flagsSelect, debugstr_variant(&varID)); return E_NOTIMPL; }
@@ -444,7 +444,7 @@ static HRESULT WINAPI Client_accNavigate(IAccessible *iface, LONG navDir, VARIANT varStart, VARIANT *pvarEnd) { Client *This = impl_from_Client(iface); - FIXME("(%p)->(%d %s %p)\n", This, navDir, debugstr_variant(&varStart), pvarEnd); + FIXME("(%p)->(%ld %s %p)\n", This, navDir, debugstr_variant(&varStart), pvarEnd); return E_NOTIMPL; }
@@ -455,7 +455,7 @@ static HRESULT WINAPI Client_accHitTest(IAccessible *iface, HWND child; POINT pt;
- TRACE("(%p)->(%d %d %p)\n", This, xLeft, yTop, pvarID); + TRACE("(%p)->(%ld %ld %p)\n", This, xLeft, yTop, pvarID);
V_VT(pvarID) = VT_I4; V_I4(pvarID) = 0; @@ -612,7 +612,7 @@ static HRESULT WINAPI Client_EnumVARIANT_Next(IEnumVARIANT *iface, ULONG fetched = 0; HRESULT hr;
- TRACE("(%p)->(%u %p %p)\n", This, celt, rgVar, pCeltFetched); + TRACE("(%p)->(%lu %p %p)\n", This, celt, rgVar, pCeltFetched);
if(!celt) { if(pCeltFetched) @@ -659,7 +659,7 @@ static HRESULT WINAPI Client_EnumVARIANT_Skip(IEnumVARIANT *iface, ULONG celt) Client *This = impl_from_Client_EnumVARIANT(iface); HWND next;
- TRACE("(%p)->(%u)\n", This, celt); + TRACE("(%p)->(%lu)\n", This, celt);
while(celt) { if(!This->enum_pos) diff --git a/dlls/oleacc/main.c b/dlls/oleacc/main.c index d2a80cfde34..dced84be7b5 100644 --- a/dlls/oleacc/main.c +++ b/dlls/oleacc/main.c @@ -84,7 +84,7 @@ const struct win_class_data* find_class_data(HWND hwnd, const struct win_class_d HRESULT WINAPI CreateStdAccessibleObject( HWND hwnd, LONG idObject, REFIID riidInterface, void** ppvObject ) { - TRACE("%p %d %s %p\n", hwnd, idObject, + TRACE("%p %ld %s %p\n", hwnd, idObject, debugstr_guid( riidInterface ), ppvObject );
switch(idObject) { @@ -93,7 +93,7 @@ HRESULT WINAPI CreateStdAccessibleObject( HWND hwnd, LONG idObject, case OBJID_WINDOW: return create_window_object(hwnd, riidInterface, ppvObject); default: - FIXME("unhandled object id: %d\n", idObject); + FIXME("unhandled object id: %ld\n", idObject); return E_NOTIMPL; } } @@ -109,10 +109,10 @@ HRESULT WINAPI ObjectFromLresult( LRESULT result, REFIID riid, WPARAM wParam, vo HRESULT hr; WCHAR *p;
- TRACE("%ld %s %ld %p\n", result, debugstr_guid(riid), wParam, ppObject ); + TRACE("%Id %s %Id %p\n", result, debugstr_guid(riid), wParam, ppObject );
if(wParam) - FIXME("unsupported wParam = %lx\n", wParam); + FIXME("unsupported wParam = %Ix\n", wParam);
if(!ppObject) return E_INVALIDARG; @@ -182,10 +182,10 @@ LRESULT WINAPI LresultFromObject( REFIID riid, WPARAM wParam, LPUNKNOWN pAcc ) ATOM atom; void *view;
- TRACE("%s %ld %p\n", debugstr_guid(riid), wParam, pAcc); + TRACE("%s %Id %p\n", debugstr_guid(riid), wParam, pAcc);
if(wParam) - FIXME("unsupported wParam = %lx\n", wParam); + FIXME("unsupported wParam = %Ix\n", wParam);
if(!pAcc) return E_INVALIDARG; @@ -276,7 +276,7 @@ HRESULT WINAPI AccessibleObjectFromPoint( POINT point, IAccessible** acc, VARIAN VARIANT v; HWND hwnd;
- TRACE("{%d,%d} %p %p\n", point.x, point.y, acc, child_id); + TRACE("{%ld,%ld} %p %p\n", point.x, point.y, acc, child_id);
if (!acc || !child_id) return E_INVALIDARG; @@ -342,7 +342,7 @@ HRESULT WINAPI AccessibleObjectFromEvent( HWND hwnd, DWORD object_id, DWORD chil IDispatch *child = NULL; HRESULT hr;
- TRACE("%p %d %d %p %p\n", hwnd, object_id, child_id, acc_out, child_id_out); + TRACE("%p %ld %ld %p %p\n", hwnd, object_id, child_id, acc_out, child_id_out);
if (!acc_out) return E_INVALIDARG; @@ -356,7 +356,7 @@ HRESULT WINAPI AccessibleObjectFromEvent( HWND hwnd, DWORD object_id, DWORD chil variant_init_i4(&child_id_variant, child_id); hr = IAccessible_get_accChild(acc, child_id_variant, &child); if (FAILED(hr)) - TRACE("get_accChild failed with %#x!\n", hr); + TRACE("get_accChild failed with %#lx!\n", hr);
if (SUCCEEDED(hr) && child) { @@ -378,7 +378,7 @@ HRESULT WINAPI AccessibleObjectFromEvent( HWND hwnd, DWORD object_id, DWORD chil HRESULT WINAPI AccessibleObjectFromWindow( HWND hwnd, DWORD dwObjectID, REFIID riid, void** ppvObject ) { - TRACE("%p %d %s %p\n", hwnd, dwObjectID, + TRACE("%p %ld %s %p\n", hwnd, dwObjectID, debugstr_guid( riid ), ppvObject );
if(!ppvObject) @@ -435,7 +435,7 @@ HRESULT WINAPI WindowFromAccessibleObject(IAccessible *acc, HWND *phwnd) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - TRACE("%p, %d, %p\n", hinstDLL, fdwReason, lpvReserved); + TRACE("%p, %ld, %p\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason) { @@ -497,7 +497,7 @@ UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax) INT ret; WCHAR *resptr;
- TRACE("%u %p %u\n", role, lpRole, rolemax); + TRACE("%lu %p %u\n", role, lpRole, rolemax);
/* return role text length */ if(!lpRole) @@ -517,7 +517,7 @@ UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax) UINT length; WCHAR *roletextW;
- TRACE("%u %p %u\n", role, lpRole, rolemax); + TRACE("%lu %p %u\n", role, lpRole, rolemax);
if(lpRole && !rolemax) return 0; @@ -564,7 +564,7 @@ UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len) { DWORD state_id;
- TRACE("%x %p %u\n", state_bit, state_str, state_str_len); + TRACE("%lx %p %u\n", state_bit, state_str, state_str_len);
if(state_bit & ~(STATE_SYSTEM_VALID | STATE_SYSTEM_HASPOPUP)) { if(state_str && state_str_len) @@ -594,7 +594,7 @@ UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len) { DWORD state_id;
- TRACE("%x %p %u\n", state_bit, state_str, state_str_len); + TRACE("%lx %p %u\n", state_bit, state_str, state_str_len);
if(state_str && !state_str_len) return 0; @@ -629,7 +629,7 @@ HRESULT WINAPI AccessibleChildren(IAccessible *container, LONG i, child_no; HRESULT hr;
- TRACE("%p %d %d %p %p\n", container, start, count, children, children_cnt); + TRACE("%p %ld %ld %p %p\n", container, start, count, children, children_cnt);
if(!container || !children || !children_cnt) return E_INVALIDARG; diff --git a/dlls/oleacc/propservice.c b/dlls/oleacc/propservice.c index 3ed1818ef74..d589ee46288 100644 --- a/dlls/oleacc/propservice.c +++ b/dlls/oleacc/propservice.c @@ -57,105 +57,105 @@ static ULONG WINAPI AccPropServices_Release(IAccPropServices *iface) static HRESULT WINAPI AccPropServices_SetPropValue(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, MSAAPROPID idProp, VARIANT var) { - FIXME("(%p %u %s %s)\n", pIDString, dwIDStringLen, debugstr_guid(&idProp), debugstr_variant(&var)); + FIXME("(%p %lu %s %s)\n", pIDString, dwIDStringLen, debugstr_guid(&idProp), debugstr_variant(&var)); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_SetPropServer(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope) { - FIXME("(%p %u %p %d %p %u)\n", pIDString, dwIDStringLen, paProps, cProps, pServer, AnnoScope); + FIXME("(%p %lu %p %d %p %u)\n", pIDString, dwIDStringLen, paProps, cProps, pServer, AnnoScope); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_ClearProps(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, const MSAAPROPID *paProps, int cProps) { - FIXME("(%p %u %p %d)\n", pIDString, dwIDStringLen, paProps, cProps); + FIXME("(%p %lu %p %d)\n", pIDString, dwIDStringLen, paProps, cProps); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_SetHwndProp(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, MSAAPROPID idProp, VARIANT var) { - FIXME("(%p %u %u %s %s)\n", hwnd, idObject, idChild, debugstr_guid(&idProp), debugstr_variant(&var)); + FIXME("(%p %lu %lu %s %s)\n", hwnd, idObject, idChild, debugstr_guid(&idProp), debugstr_variant(&var)); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_SetHwndPropStr(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, MSAAPROPID idProp, LPWSTR str) { - FIXME("(%p %u %u %s %s)\n", hwnd, idObject, idChild, debugstr_guid(&idProp), debugstr_w(str)); + FIXME("(%p %lu %lu %s %s)\n", hwnd, idObject, idChild, debugstr_guid(&idProp), debugstr_w(str)); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_SetHwndPropServer(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope) { - FIXME("(%p %u %u %p %d %p %u)\n", hwnd, idObject, idChild, paProps, cProps, pServer, AnnoScope); + FIXME("(%p %lu %lu %p %d %p %u)\n", hwnd, idObject, idChild, paProps, cProps, pServer, AnnoScope); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_ClearHwndProps(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, const MSAAPROPID *paProps, int cProps) { - FIXME("(%p %u %u %p %d)\n", hwnd, idObject, idChild, paProps, cProps); + FIXME("(%p %lu %lu %p %d)\n", hwnd, idObject, idChild, paProps, cProps); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_ComposeHwndIdentityString(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, BYTE **ppIDString, DWORD *pdwIDStringLen) { - FIXME("(%p %u %u %p %p)\n", hwnd, idObject, idChild, ppIDString, pdwIDStringLen); + FIXME("(%p %lu %lu %p %p)\n", hwnd, idObject, idChild, ppIDString, pdwIDStringLen); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_DecomposeHwndIdentityString(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, HWND *phwnd, DWORD *pidObject, DWORD *pidChild) { - FIXME("(%p %u %p %p %p)\n", pIDString, dwIDStringLen, phwnd, pidObject, pidChild); + FIXME("(%p %lu %p %p %p)\n", pIDString, dwIDStringLen, phwnd, pidObject, pidChild); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_SetHmenuProp(IAccPropServices *iface, HMENU hmenu, DWORD idChild, MSAAPROPID idProp, VARIANT var) { - FIXME("(%p %u %s %s)\n", hmenu, idChild, debugstr_guid(&idProp), debugstr_variant(&var)); + FIXME("(%p %lu %s %s)\n", hmenu, idChild, debugstr_guid(&idProp), debugstr_variant(&var)); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_SetHmenuPropStr(IAccPropServices *iface, HMENU hmenu, DWORD idChild, MSAAPROPID idProp, LPWSTR str) { - FIXME("(%p %u %s %s)\n", hmenu, idChild, debugstr_guid(&idProp), debugstr_w(str)); + FIXME("(%p %lu %s %s)\n", hmenu, idChild, debugstr_guid(&idProp), debugstr_w(str)); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_SetHmenuPropServer(IAccPropServices *iface, HMENU hmenu, DWORD idChild, const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope) { - FIXME("(%p %u %p %d %p %u)\n", hmenu, idChild, paProps, cProps, pServer, AnnoScope); + FIXME("(%p %lu %p %d %p %u)\n", hmenu, idChild, paProps, cProps, pServer, AnnoScope); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_ClearHmenuProps(IAccPropServices *iface, HMENU hmenu, DWORD idChild, const MSAAPROPID *paProps, int cProps) { - FIXME("(%p %u %p %d)\n", hmenu, idChild, paProps, cProps); + FIXME("(%p %lu %p %d)\n", hmenu, idChild, paProps, cProps); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_ComposeHmenuIdentityString(IAccPropServices *iface, HMENU hmenu, DWORD idChild, BYTE **ppIDString, DWORD *pdwIDStringLen) { - FIXME("(%p %u %p %p)\n", hmenu, idChild, ppIDString, pdwIDStringLen); + FIXME("(%p %lu %p %p)\n", hmenu, idChild, ppIDString, pdwIDStringLen); return E_NOTIMPL; }
static HRESULT WINAPI AccPropServices_DecomposeHmenuIdentityString(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, HMENU *phmenu, DWORD *pidChild) { - FIXME("(%p %u %p %p\n", pIDString, dwIDStringLen, phmenu, pidChild); + FIXME("(%p %lu %p %p\n", pIDString, dwIDStringLen, phmenu, pidChild); return E_NOTIMPL; }
diff --git a/dlls/oleacc/window.c b/dlls/oleacc/window.c index 87f9956b49e..470bfd5b362 100644 --- a/dlls/oleacc/window.c +++ b/dlls/oleacc/window.c @@ -70,7 +70,7 @@ static ULONG WINAPI Window_AddRef(IAccessible *iface) Window *This = impl_from_Window(iface); ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) ref = %u\n", This, ref); + TRACE("(%p) ref = %lu\n", This, ref); return ref; }
@@ -79,7 +79,7 @@ static ULONG WINAPI Window_Release(IAccessible *iface) Window *This = impl_from_Window(iface); ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ref = %u\n", This, ref); + TRACE("(%p) ref = %lu\n", This, ref);
if(!ref) heap_free(This); @@ -97,7 +97,7 @@ static HRESULT WINAPI Window_GetTypeInfo(IAccessible *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { Window *This = impl_from_Window(iface); - FIXME("(%p)->(%u %x %p)\n", This, iTInfo, lcid, ppTInfo); + FIXME("(%p)->(%u %lx %p)\n", This, iTInfo, lcid, ppTInfo); return E_NOTIMPL; }
@@ -105,7 +105,7 @@ static HRESULT WINAPI Window_GetIDsOfNames(IAccessible *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { Window *This = impl_from_Window(iface); - FIXME("(%p)->(%s %p %u %x %p)\n", This, debugstr_guid(riid), + FIXME("(%p)->(%s %p %u %lx %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); return E_NOTIMPL; } @@ -115,7 +115,7 @@ static HRESULT WINAPI Window_Invoke(IAccessible *iface, DISPID dispIdMember, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { Window *This = impl_from_Window(iface); - FIXME("(%p)->(%x %s %x %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + FIXME("(%p)->(%lx %s %lx %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); return E_NOTIMPL; } @@ -226,7 +226,7 @@ static HRESULT WINAPI Window_get_accDefaultAction(IAccessible *iface, static HRESULT WINAPI Window_accSelect(IAccessible *iface, LONG flagsSelect, VARIANT varID) { Window *This = impl_from_Window(iface); - FIXME("(%p)->(%x %s)\n", This, flagsSelect, debugstr_variant(&varID)); + FIXME("(%p)->(%lx %s)\n", This, flagsSelect, debugstr_variant(&varID)); return E_NOTIMPL; }
@@ -243,7 +243,7 @@ static HRESULT WINAPI Window_accNavigate(IAccessible *iface, LONG navDir, VARIANT varStart, VARIANT *pvarEnd) { Window *This = impl_from_Window(iface); - FIXME("(%p)->(%d %s %p)\n", This, navDir, debugstr_variant(&varStart), pvarEnd); + FIXME("(%p)->(%ld %s %p)\n", This, navDir, debugstr_variant(&varStart), pvarEnd); return E_NOTIMPL; }
@@ -255,7 +255,7 @@ static HRESULT WINAPI Window_accHitTest(IAccessible *iface, LONG x, LONG y, VARI HRESULT hr; RECT rect;
- TRACE("(%p)->(%d %d %p)\n", This, x, y, v); + TRACE("(%p)->(%ld %ld %p)\n", This, x, y, v);
V_VT(v) = VT_EMPTY; if (!GetClientRect(This->hwnd, &rect)) @@ -409,14 +409,14 @@ static HRESULT WINAPI Window_EnumVARIANT_Next(IEnumVARIANT *iface, ULONG celt, VARIANT *rgVar, ULONG *pCeltFetched) { Window *This = impl_from_Window_EnumVARIANT(iface); - FIXME("(%p)->(%u %p %p)\n", This, celt, rgVar, pCeltFetched); + FIXME("(%p)->(%lu %p %p)\n", This, celt, rgVar, pCeltFetched); return E_NOTIMPL; }
static HRESULT WINAPI Window_EnumVARIANT_Skip(IEnumVARIANT *iface, ULONG celt) { Window *This = impl_from_Window_EnumVARIANT(iface); - FIXME("(%p)->(%u)\n", This, celt); + FIXME("(%p)->(%lu)\n", This, celt); return E_NOTIMPL; }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/wsdapi/Makefile.in | 1 - dlls/wsdapi/address.c | 8 ++++---- dlls/wsdapi/discovery.c | 6 +++--- dlls/wsdapi/memory.c | 2 +- dlls/wsdapi/msgparams.c | 4 ++-- dlls/wsdapi/network.c | 12 ++++++------ dlls/wsdapi/xml.c | 6 +++--- 7 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/dlls/wsdapi/Makefile.in b/dlls/wsdapi/Makefile.in index cb477fd5f44..dd7b350d80b 100644 --- a/dlls/wsdapi/Makefile.in +++ b/dlls/wsdapi/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = wsdapi.dll IMPORTLIB = wsdapi IMPORTS = bcrypt iphlpapi rpcrt4 user32 webservices ws2_32 diff --git a/dlls/wsdapi/address.c b/dlls/wsdapi/address.c index 7f11f48ce7c..bb8f54ef93c 100644 --- a/dlls/wsdapi/address.c +++ b/dlls/wsdapi/address.c @@ -78,7 +78,7 @@ static ULONG WINAPI IWSDUdpAddressImpl_AddRef(IWSDUdpAddress *iface) IWSDUdpAddressImpl *This = impl_from_IWSDUdpAddress(iface); ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; }
@@ -87,7 +87,7 @@ static ULONG WINAPI IWSDUdpAddressImpl_Release(IWSDUdpAddress *iface) IWSDUdpAddressImpl *This = impl_from_IWSDUdpAddress(iface); ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref);
if (ref == 0) { @@ -99,7 +99,7 @@ static ULONG WINAPI IWSDUdpAddressImpl_Release(IWSDUdpAddress *iface)
static HRESULT WINAPI IWSDUdpAddressImpl_Serialize(IWSDUdpAddress *This, LPWSTR pszBuffer, DWORD cchLength, BOOL fSafe) { - FIXME("(%p, %p, %d, %d)\n", This, pszBuffer, cchLength, fSafe); + FIXME("(%p, %p, %ld, %d)\n", This, pszBuffer, cchLength, fSafe); return E_NOTIMPL; }
@@ -294,7 +294,7 @@ static HRESULT WINAPI IWSDUdpAddressImpl_GetMessageType(IWSDUdpAddress *This, WS
static HRESULT WINAPI IWSDUdpAddressImpl_SetTTL(IWSDUdpAddress *This, DWORD dwTTL) { - FIXME("(%p, %d)\n", This, dwTTL); + FIXME("(%p, %ld)\n", This, dwTTL); return E_NOTIMPL; }
diff --git a/dlls/wsdapi/discovery.c b/dlls/wsdapi/discovery.c index 708cb803d03..9341eec7b78 100644 --- a/dlls/wsdapi/discovery.c +++ b/dlls/wsdapi/discovery.c @@ -69,7 +69,7 @@ static ULONG WINAPI IWSDiscoveryPublisherImpl_AddRef(IWSDiscoveryPublisher *ifac IWSDiscoveryPublisherImpl *This = impl_from_IWSDiscoveryPublisher(iface); ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; }
@@ -80,7 +80,7 @@ static ULONG WINAPI IWSDiscoveryPublisherImpl_Release(IWSDiscoveryPublisher *ifa struct notificationSink *sink, *cursor; struct message_id *msg_id, *msg_id_cursor;
- TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref);
if (ref == 0) { @@ -118,7 +118,7 @@ static HRESULT WINAPI IWSDiscoveryPublisherImpl_SetAddressFamily(IWSDiscoveryPub { IWSDiscoveryPublisherImpl *impl = impl_from_IWSDiscoveryPublisher(This);
- TRACE("(%p, %d)\n", This, dwAddressFamily); + TRACE("(%p, %ld)\n", This, dwAddressFamily);
/* Has the address family already been set? */ if (impl->addressFamily != 0) diff --git a/dlls/wsdapi/memory.c b/dlls/wsdapi/memory.c index 89a6d2dc47d..83261623aee 100644 --- a/dlls/wsdapi/memory.c +++ b/dlls/wsdapi/memory.c @@ -82,7 +82,7 @@ void * WINAPI WSDAllocateLinkedMemory(void *pParent, SIZE_T cbSize) struct memory_allocation *allocation, *parent; void *ptr;
- TRACE("(%p, %lu)\n", pParent, cbSize); + TRACE("(%p, %Iu)\n", pParent, cbSize);
ptr = HeapAlloc(GetProcessHeap(), 0, MEMORY_ALLOCATION_SIZE + cbSize);
diff --git a/dlls/wsdapi/msgparams.c b/dlls/wsdapi/msgparams.c index dd07a5bf652..139fc734a2e 100644 --- a/dlls/wsdapi/msgparams.c +++ b/dlls/wsdapi/msgparams.c @@ -58,7 +58,7 @@ static ULONG IWSDMessageParametersImpl_AddRef(IWSDMessageParameters *iface) IWSDMessageParametersImpl *This = impl_from_IWSDMessageParameters(iface); ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; }
@@ -67,7 +67,7 @@ static ULONG IWSDMessageParametersImpl_Release(IWSDMessageParameters *iface) IWSDMessageParametersImpl *This = impl_from_IWSDMessageParameters(iface); ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref);
if (ref == 0) { diff --git a/dlls/wsdapi/network.c b/dlls/wsdapi/network.c index ab290845834..4a9a706b747 100644 --- a/dlls/wsdapi/network.c +++ b/dlls/wsdapi/network.c @@ -116,7 +116,7 @@ static BOOL send_udp_multicast_of_type(char *data, int length, int max_initial_d
if (retval != ERROR_BUFFER_OVERFLOW) { - WARN("GetAdaptorsAddresses failed with error %08x\n", retval); + WARN("GetAdaptorsAddresses failed with error %08lx\n", retval); goto cleanup; }
@@ -133,7 +133,7 @@ static BOOL send_udp_multicast_of_type(char *data, int length, int max_initial_d
if (retval != ERROR_SUCCESS) { - WARN("GetAdaptorsAddresses failed with error %08x\n", retval); + WARN("GetAdaptorsAddresses failed with error %08lx\n", retval); goto cleanup; }
@@ -200,7 +200,7 @@ static BOOL send_udp_multicast_of_type(char *data, int length, int max_initial_d
if (thread_handle == NULL) { - WARN("CreateThread failed (error %d)\n", GetLastError()); + WARN("CreateThread failed (error %ld)\n", GetLastError()); closesocket(s);
heap_free(send_params->data); @@ -487,7 +487,7 @@ static int start_listening(IWSDiscoveryPublisherImpl *impl, SOCKADDR_STORAGE *bi
if (thread_handle == NULL) { - WARN("CreateThread failed (error %d)\n", GetLastError()); + WARN("CreateThread failed (error %ld)\n", GetLastError()); goto cleanup; }
@@ -514,7 +514,7 @@ static BOOL start_listening_on_all_addresses(IWSDiscoveryPublisherImpl *impl, UL
if (ret != ERROR_BUFFER_OVERFLOW) { - WARN("GetAdaptorsAddresses failed with error %08x\n", ret); + WARN("GetAdaptorsAddresses failed with error %08lx\n", ret); return FALSE; }
@@ -532,7 +532,7 @@ static BOOL start_listening_on_all_addresses(IWSDiscoveryPublisherImpl *impl, UL
if (ret != ERROR_SUCCESS) { - WARN("GetAdaptorsAddresses failed with error %08x\n", ret); + WARN("GetAdaptorsAddresses failed with error %08lx\n", ret); goto cleanup; }
diff --git a/dlls/wsdapi/xml.c b/dlls/wsdapi/xml.c index ca47583da64..d92582718dd 100644 --- a/dlls/wsdapi/xml.c +++ b/dlls/wsdapi/xml.c @@ -466,7 +466,7 @@ static ULONG WINAPI IWSDXMLContextImpl_AddRef(IWSDXMLContext *iface) IWSDXMLContextImpl *This = impl_from_IWSDXMLContext(iface); ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; }
@@ -475,7 +475,7 @@ static ULONG WINAPI IWSDXMLContextImpl_Release(IWSDXMLContext *iface) IWSDXMLContextImpl *This = impl_from_IWSDXMLContext(iface); ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref);
if (ref == 0) { @@ -617,7 +617,7 @@ static HRESULT WINAPI IWSDXMLContextImpl_SetNamespaces(IWSDXMLContext *iface, co
static HRESULT WINAPI IWSDXMLContextImpl_SetTypes(IWSDXMLContext *iface, const PCWSDXML_TYPE *pTypes, DWORD dwTypesCount, BYTE bLayerNumber) { - FIXME("(%p, %p, %d, %d)\n", iface, pTypes, dwTypesCount, bLayerNumber); + FIXME("(%p, %p, %ld, %d)\n", iface, pTypes, dwTypesCount, bLayerNumber); return E_NOTIMPL; }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/wsock32/Makefile.in | 1 - dlls/wsock32/service.c | 12 ++++++------ dlls/wsock32/socket.c | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/dlls/wsock32/Makefile.in b/dlls/wsock32/Makefile.in index 5307150bfef..b5a9c437825 100644 --- a/dlls/wsock32/Makefile.in +++ b/dlls/wsock32/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = wsock32.dll IMPORTLIB = wsock32 IMPORTS = mswsock ws2_32 iphlpapi diff --git a/dlls/wsock32/service.c b/dlls/wsock32/service.c index f2a45c983b5..c10951110b5 100644 --- a/dlls/wsock32/service.c +++ b/dlls/wsock32/service.c @@ -36,7 +36,7 @@ INT WINAPI GetAddressByNameA(DWORD dwNameSpace, LPGUID lpServiceType, LPSTR lpSe LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPSTR lpAliasBuffer, LPDWORD lpdwAliasBufferLength) { - FIXME("(0x%08x, %s, %s, %p, 0x%08x, %p, %p, %p, %p, %p) stub\n", dwNameSpace, + FIXME("(0x%08lx, %s, %s, %p, 0x%08lx, %p, %p, %p, %p, %p) stub\n", dwNameSpace, debugstr_guid(lpServiceType), debugstr_a(lpServiceName), lpiProtocols, dwResolution, lpServiceAsyncInfo, lpCsaddrBuffer, lpdwBufferLength, lpAliasBuffer, lpdwAliasBufferLength); @@ -50,7 +50,7 @@ INT WINAPI GetAddressByNameW(DWORD dwNameSpace, LPGUID lpServiceType, LPWSTR lpS LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPWSTR lpAliasBuffer, LPDWORD lpdwAliasBufferLength) { - FIXME("(0x%08x, %s, %s, %p, 0x%08x, %p, %p, %p, %p, %p) stub\n", dwNameSpace, + FIXME("(0x%08lx, %s, %s, %p, 0x%08lx, %p, %p, %p, %p, %p) stub\n", dwNameSpace, debugstr_guid(lpServiceType), debugstr_w(lpServiceName), lpiProtocols, dwResolution, lpServiceAsyncInfo, lpCsaddrBuffer, lpdwBufferLength, lpAliasBuffer, lpdwAliasBufferLength); @@ -133,7 +133,7 @@ INT WINAPI SetServiceA(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSE LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags) { /* tell the user they've got a substandard implementation */ - FIXME("wsock32: SetServiceA(%u, %u, %u, %p, %p, %p): stub\n", dwNameSpace, dwOperation, dwFlags, + FIXME("wsock32: SetServiceA(%lu, %lu, %lu, %p, %p, %p): stub\n", dwNameSpace, dwOperation, dwFlags, lpServiceInfo, lpServiceAsyncInfo, lpdwStatusFlags);
/* some programs may be able to compensate if they know what happened */ @@ -150,7 +150,7 @@ INT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSE LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags) { /* tell the user they've got a substandard implementation */ - FIXME("wsock32: SetServiceW(%u, %u, %u, %p, %p, %p): stub\n", dwNameSpace, dwOperation, dwFlags, + FIXME("wsock32: SetServiceW(%lu, %lu, %lu, %p, %p, %p): stub\n", dwNameSpace, dwOperation, dwFlags, lpServiceInfo, lpServiceAsyncInfo, lpdwStatusFlags);
/* some programs may be able to compensate if they know what happened */ @@ -192,7 +192,7 @@ INT WINAPI GetServiceA(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName, DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo) { - FIXME("(%u, %p, %s, %u, %p, %p, %p): stub\n", dwNameSpace, + FIXME("(%lu, %p, %s, %lu, %p, %p, %p): stub\n", dwNameSpace, lpGuid, lpServiceName, dwProperties, lpBuffer, lpdwBufferSize, lpServiceAsyncInfo);
/* some programs may be able to compensate if they know what happened */ @@ -209,7 +209,7 @@ INT WINAPI GetServiceW(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName, DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo) { - FIXME("(%u, %p, %s, %u, %p, %p, %p): stub\n", dwNameSpace, + FIXME("(%lu, %p, %s, %lu, %p, %p, %p): stub\n", dwNameSpace, lpGuid, lpServiceName, dwProperties, lpBuffer, lpdwBufferSize, lpServiceAsyncInfo);
/* some programs may be able to compensate if they know what happened */ diff --git a/dlls/wsock32/socket.c b/dlls/wsock32/socket.c index 88ddf5b8eeb..2df54b2280a 100644 --- a/dlls/wsock32/socket.c +++ b/dlls/wsock32/socket.c @@ -250,7 +250,7 @@ DWORD WINAPI WsControl(DWORD protocol, */ if (index == 1) return NO_ERROR; - ERR ("Error retrieving data for interface index %u\n", + ERR ("Error retrieving data for interface index %lu\n", index); return ret; } @@ -405,8 +405,8 @@ DWORD WINAPI WsControl(DWORD protocol, { if (table->table[i].dwIndex == index) { - TRACE("Found IP info for tei_instance 0x%x:\n", index); - TRACE("IP 0x%08x, mask 0x%08x\n", table->table[i].dwAddr, + TRACE("Found IP info for tei_instance 0x%lx:\n", index); + TRACE("IP 0x%08lx, mask 0x%08lx\n", table->table[i].dwAddr, table->table[i].dwMask); *baseIPInfo = table->table[i]; break; @@ -615,7 +615,7 @@ DWORD WINAPI WsControl(DWORD protocol, }
default: - FIXME("Protocol Not Supported -> protocol=0x%x, action=0x%x, Request=%p, RequestLen=%p, Response=%p, ResponseLen=%p\n", + FIXME("Protocol Not Supported -> protocol=0x%lx, action=0x%lx, Request=%p, RequestLen=%p, Response=%p, ResponseLen=%p\n", protocol, action, pRequestInfo, pcbRequestInfoLen, pResponseInfo, pcbResponseInfoLen);
return (WSAEOPNOTSUPP);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/wtsapi32/Makefile.in | 1 - dlls/wtsapi32/wtsapi32.c | 74 +++++++++++++++++++++++---------------------- 2 files changed, 37 insertions(+), 38 deletions(-)
diff --git a/dlls/wtsapi32/Makefile.in b/dlls/wtsapi32/Makefile.in index 4bcff219411..e54c088f21c 100644 --- a/dlls/wtsapi32/Makefile.in +++ b/dlls/wtsapi32/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = wtsapi32.dll IMPORTLIB = wtsapi32 IMPORTS = advapi32 diff --git a/dlls/wtsapi32/wtsapi32.c b/dlls/wtsapi32/wtsapi32.c index d766223df99..e7a6297396a 100644 --- a/dlls/wtsapi32/wtsapi32.c +++ b/dlls/wtsapi32/wtsapi32.c @@ -44,7 +44,7 @@ void WINAPI WTSCloseServer(HANDLE hServer) */ BOOL WINAPI WTSConnectSessionA(ULONG LogonId, ULONG TargetLogonId, PSTR pPassword, BOOL bWait) { - FIXME("Stub %d %d (%s) %d\n", LogonId, TargetLogonId, debugstr_a(pPassword), bWait); + FIXME("Stub %ld %ld (%s) %d\n", LogonId, TargetLogonId, debugstr_a(pPassword), bWait); return TRUE; }
@@ -53,7 +53,7 @@ BOOL WINAPI WTSConnectSessionA(ULONG LogonId, ULONG TargetLogonId, PSTR pPasswor */ BOOL WINAPI WTSConnectSessionW(ULONG LogonId, ULONG TargetLogonId, PWSTR pPassword, BOOL bWait) { - FIXME("Stub %d %d (%s) %d\n", LogonId, TargetLogonId, debugstr_w(pPassword), bWait); + FIXME("Stub %ld %ld (%s) %d\n", LogonId, TargetLogonId, debugstr_w(pPassword), bWait); return TRUE; }
@@ -62,7 +62,7 @@ BOOL WINAPI WTSConnectSessionW(ULONG LogonId, ULONG TargetLogonId, PWSTR pPasswo */ BOOL WINAPI WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait) { - FIXME("Stub %p 0x%08x %d\n", hServer, SessionId, bWait); + FIXME("Stub %p 0x%08lx %d\n", hServer, SessionId, bWait); return TRUE; }
@@ -89,7 +89,7 @@ BOOL WINAPI WTSEnumerateProcessesExW(HANDLE server, DWORD *level, DWORD session_ NTSTATUS status; char *p;
- TRACE("server %p, level %u, session_id %#x, ret_info %p, ret_count %p\n", + TRACE("server %p, level %lu, session_id %#lx, ret_info %p, ret_count %p\n", server, *level, session_id, ret_info, ret_count);
if (!ret_info || !ret_count) @@ -99,11 +99,11 @@ BOOL WINAPI WTSEnumerateProcessesExW(HANDLE server, DWORD *level, DWORD session_ }
if (session_id != WTS_ANY_SESSION) - FIXME("ignoring session id %#x\n", session_id); + FIXME("ignoring session id %#lx\n", session_id);
if (*level) { - FIXME("unhandled level %u\n", *level); + FIXME("unhandled level %lu\n", *level); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } @@ -207,7 +207,7 @@ BOOL WINAPI WTSEnumerateProcessesExW(HANDLE server, DWORD *level, DWORD session_ */ BOOL WINAPI WTSEnumerateProcessesExA(HANDLE server, DWORD *level, DWORD session_id, char **info, DWORD *count) { - FIXME("Stub %p %p %d %p %p\n", server, level, session_id, info, count); + FIXME("Stub %p %p %ld %p %p\n", server, level, session_id, info, count); if (count) *count = 0; return FALSE; } @@ -218,7 +218,7 @@ BOOL WINAPI WTSEnumerateProcessesExA(HANDLE server, DWORD *level, DWORD session_ BOOL WINAPI WTSEnumerateProcessesA(HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_PROCESS_INFOA* ppProcessInfo, DWORD* pCount) { - FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version, + FIXME("Stub %p 0x%08lx 0x%08lx %p %p\n", hServer, Reserved, Version, ppProcessInfo, pCount);
if (!ppProcessInfo || !pCount) return FALSE; @@ -237,7 +237,7 @@ BOOL WINAPI WTSEnumerateProcessesW(HANDLE server, DWORD reserved, DWORD version, { DWORD level = 0;
- TRACE("server %p, reserved %#x, version %u, info %p, count %p\n", server, reserved, version, info, count); + TRACE("server %p, reserved %#lx, version %lu, info %p, count %p\n", server, reserved, version, info, count);
if (reserved || version != 1) { @@ -253,7 +253,7 @@ BOOL WINAPI WTSEnumerateProcessesW(HANDLE server, DWORD reserved, DWORD version, */ BOOL WINAPI WTSEnumerateServersA(LPSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOA *ppServerInfo, DWORD *pCount) { - FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_a(pDomainName), Reserved, Version, ppServerInfo, pCount); + FIXME("Stub %s 0x%08lx 0x%08lx %p %p\n", debugstr_a(pDomainName), Reserved, Version, ppServerInfo, pCount); return FALSE; }
@@ -262,7 +262,7 @@ BOOL WINAPI WTSEnumerateServersA(LPSTR pDomainName, DWORD Reserved, DWORD Versio */ BOOL WINAPI WTSEnumerateServersW(LPWSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOW *ppServerInfo, DWORD *pCount) { - FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_w(pDomainName), Reserved, Version, ppServerInfo, pCount); + FIXME("Stub %s 0x%08lx 0x%08lx %p %p\n", debugstr_w(pDomainName), Reserved, Version, ppServerInfo, pCount); return FALSE; }
@@ -272,7 +272,7 @@ BOOL WINAPI WTSEnumerateServersW(LPWSTR pDomainName, DWORD Reserved, DWORD Versi */ BOOL WINAPI WTSEnumerateSessionsExW(HANDLE server, DWORD *level, DWORD filter, WTS_SESSION_INFO_1W* info, DWORD *count) { - FIXME("Stub %p %p %d %p %p\n", server, level, filter, info, count); + FIXME("Stub %p %p %ld %p %p\n", server, level, filter, info, count); if (count) *count = 0; return FALSE; } @@ -282,7 +282,7 @@ BOOL WINAPI WTSEnumerateSessionsExW(HANDLE server, DWORD *level, DWORD filter, W */ BOOL WINAPI WTSEnumerateSessionsExA(HANDLE server, DWORD *level, DWORD filter, WTS_SESSION_INFO_1A* info, DWORD *count) { - FIXME("Stub %p %p %d %p %p\n", server, level, filter, info, count); + FIXME("Stub %p %p %ld %p %p\n", server, level, filter, info, count); if (count) *count = 0; return FALSE; } @@ -295,7 +295,7 @@ BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version, { static int once;
- if (!once++) FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version, + if (!once++) FIXME("Stub %p 0x%08lx 0x%08lx %p %p\n", hServer, Reserved, Version, ppSessionInfo, pCount);
if (!ppSessionInfo || !pCount) return FALSE; @@ -312,7 +312,7 @@ BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version, BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_SESSION_INFOW* ppSessionInfo, DWORD* pCount) { - FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version, + FIXME("Stub %p 0x%08lx 0x%08lx %p %p\n", hServer, Reserved, Version, ppSessionInfo, pCount);
if (!ppSessionInfo || !pCount) return FALSE; @@ -336,7 +336,7 @@ void WINAPI WTSFreeMemory(PVOID pMemory) */ BOOL WINAPI WTSFreeMemoryExA(WTS_TYPE_CLASS type, void *ptr, ULONG nmemb) { - TRACE("%d %p %d\n", type, ptr, nmemb); + TRACE("%d %p %ld\n", type, ptr, nmemb); heap_free(ptr); return TRUE; } @@ -346,7 +346,7 @@ BOOL WINAPI WTSFreeMemoryExA(WTS_TYPE_CLASS type, void *ptr, ULONG nmemb) */ BOOL WINAPI WTSFreeMemoryExW(WTS_TYPE_CLASS type, void *ptr, ULONG nmemb) { - TRACE("%d %p %d\n", type, ptr, nmemb); + TRACE("%d %p %ld\n", type, ptr, nmemb); heap_free(ptr); return TRUE; } @@ -357,7 +357,7 @@ BOOL WINAPI WTSFreeMemoryExW(WTS_TYPE_CLASS type, void *ptr, ULONG nmemb) */ BOOL WINAPI WTSLogoffSession(HANDLE hserver, DWORD session_id, BOOL bwait) { - FIXME("(%p, 0x%x, %d): stub\n", hserver, session_id, bwait); + FIXME("(%p, 0x%lx, %d): stub\n", hserver, session_id, bwait); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } @@ -410,7 +410,7 @@ BOOL WINAPI WTSQuerySessionInformationA(HANDLE server, DWORD session_id, WTS_INF { WCHAR *bufferW = NULL;
- TRACE("%p 0x%08x %d %p %p\n", server, session_id, class, buffer, count); + TRACE("%p 0x%08lx %d %p %p\n", server, session_id, class, buffer, count);
if (!buffer || !count) { @@ -450,7 +450,7 @@ BOOL WINAPI WTSQuerySessionInformationA(HANDLE server, DWORD session_id, WTS_INF */ BOOL WINAPI WTSQuerySessionInformationW(HANDLE server, DWORD session_id, WTS_INFO_CLASS class, WCHAR **buffer, DWORD *count) { - TRACE("%p 0x%08x %d %p %p\n", server, session_id, class, buffer, count); + TRACE("%p 0x%08lx %d %p %p\n", server, session_id, class, buffer, count);
if (!buffer || !count) { @@ -496,7 +496,7 @@ BOOL WINAPI WTSQuerySessionInformationW(HANDLE server, DWORD session_id, WTS_INF */ BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token) { - FIXME("%u %p semi-stub!\n", session_id, token); + FIXME("%lu %p semi-stub!\n", session_id, token);
if (!token) { @@ -535,7 +535,7 @@ BOOL WINAPI WTSQueryUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG */ BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags) { - FIXME("Stub %p 0x%08x\n", hWnd, dwFlags); + FIXME("Stub %p 0x%08lx\n", hWnd, dwFlags); return TRUE; }
@@ -544,7 +544,7 @@ BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags) */ BOOL WINAPI WTSRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd, DWORD dwFlags) { - FIXME("Stub %p %p 0x%08x\n", hServer, hWnd, dwFlags); + FIXME("Stub %p %p 0x%08lx\n", hServer, hWnd, dwFlags); return TRUE; }
@@ -555,7 +555,7 @@ BOOL WINAPI WTSRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd, DWORD dw BOOL WINAPI WTSSendMessageA(HANDLE hServer, DWORD SessionId, LPSTR pTitle, DWORD TitleLength, LPSTR pMessage, DWORD MessageLength, DWORD Style, DWORD Timeout, DWORD *pResponse, BOOL bWait) { - FIXME("Stub %p 0x%08x (%s) %d (%s) %d 0x%08x %d %p %d\n", hServer, SessionId, debugstr_a(pTitle), TitleLength, debugstr_a(pMessage), MessageLength, Style, Timeout, pResponse, bWait); + FIXME("Stub %p 0x%08lx (%s) %ld (%s) %ld 0x%08lx %ld %p %d\n", hServer, SessionId, debugstr_a(pTitle), TitleLength, debugstr_a(pMessage), MessageLength, Style, Timeout, pResponse, bWait); return FALSE; }
@@ -565,7 +565,7 @@ BOOL WINAPI WTSSendMessageA(HANDLE hServer, DWORD SessionId, LPSTR pTitle, DWORD BOOL WINAPI WTSSendMessageW(HANDLE hServer, DWORD SessionId, LPWSTR pTitle, DWORD TitleLength, LPWSTR pMessage, DWORD MessageLength, DWORD Style, DWORD Timeout, DWORD *pResponse, BOOL bWait) { - FIXME("Stub %p 0x%08x (%s) %d (%s) %d 0x%08x %d %p %d\n", hServer, SessionId, debugstr_w(pTitle), TitleLength, debugstr_w(pMessage), MessageLength, Style, Timeout, pResponse, bWait); + FIXME("Stub %p 0x%08lx (%s) %ld (%s) %ld 0x%08lx %ld %p %d\n", hServer, SessionId, debugstr_w(pTitle), TitleLength, debugstr_w(pMessage), MessageLength, Style, Timeout, pResponse, bWait); return FALSE; }
@@ -574,7 +574,7 @@ BOOL WINAPI WTSSendMessageW(HANDLE hServer, DWORD SessionId, LPWSTR pTitle, DWOR */ BOOL WINAPI WTSSetUserConfigA(LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR pBuffer, DWORD DataLength) { - FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_a(pServerName), debugstr_a(pUserName), WTSConfigClass,pBuffer, DataLength); + FIXME("Stub (%s) (%s) 0x%08x %p %ld\n", debugstr_a(pServerName), debugstr_a(pUserName), WTSConfigClass,pBuffer, DataLength); return FALSE; }
@@ -583,7 +583,7 @@ BOOL WINAPI WTSSetUserConfigA(LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLA */ BOOL WINAPI WTSSetUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR pBuffer, DWORD DataLength) { - FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_w(pServerName), debugstr_w(pUserName), WTSConfigClass,pBuffer, DataLength); + FIXME("Stub (%s) (%s) 0x%08x %p %ld\n", debugstr_w(pServerName), debugstr_w(pUserName), WTSConfigClass,pBuffer, DataLength); return FALSE; }
@@ -592,7 +592,7 @@ BOOL WINAPI WTSSetUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_C */ BOOL WINAPI WTSShutdownSystem(HANDLE hServer, DWORD ShutdownFlag) { - FIXME("Stub %p 0x%08x\n", hServer,ShutdownFlag); + FIXME("Stub %p 0x%08lx\n", hServer,ShutdownFlag); return FALSE; }
@@ -601,7 +601,7 @@ BOOL WINAPI WTSShutdownSystem(HANDLE hServer, DWORD ShutdownFlag) */ BOOL WINAPI WTSStartRemoteControlSessionA(LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers) { - FIXME("Stub (%s) %d %d %d\n", debugstr_a(pTargetServerName), TargetLogonId, HotkeyVk, HotkeyModifiers); + FIXME("Stub (%s) %ld %d %d\n", debugstr_a(pTargetServerName), TargetLogonId, HotkeyVk, HotkeyModifiers); return FALSE; }
@@ -610,7 +610,7 @@ BOOL WINAPI WTSStartRemoteControlSessionA(LPSTR pTargetServerName, ULONG TargetL */ BOOL WINAPI WTSStartRemoteControlSessionW(LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers) { - FIXME("Stub (%s) %d %d %d\n", debugstr_w(pTargetServerName), TargetLogonId, HotkeyVk, HotkeyModifiers); + FIXME("Stub (%s) %ld %d %d\n", debugstr_w(pTargetServerName), TargetLogonId, HotkeyVk, HotkeyModifiers); return FALSE; }
@@ -619,7 +619,7 @@ BOOL WINAPI WTSStartRemoteControlSessionW(LPWSTR pTargetServerName, ULONG Target */ BOOL WINAPI WTSStopRemoteControlSession(ULONG LogonId) { - FIXME("Stub %d\n", LogonId); + FIXME("Stub %ld\n", LogonId); return FALSE; }
@@ -628,7 +628,7 @@ BOOL WINAPI WTSStopRemoteControlSession(ULONG LogonId) */ BOOL WINAPI WTSTerminateProcess(HANDLE hServer, DWORD ProcessId, DWORD ExitCode) { - FIXME("Stub %p %d %d\n", hServer, ProcessId, ExitCode); + FIXME("Stub %p %ld %ld\n", hServer, ProcessId, ExitCode); return FALSE; }
@@ -665,7 +665,7 @@ BOOL WINAPI WTSVirtualChannelClose(HANDLE hChannelHandle) */ HANDLE WINAPI WTSVirtualChannelOpen(HANDLE hServer, DWORD SessionId, LPSTR pVirtualName) { - FIXME("Stub %p %d (%s)\n", hServer, SessionId, debugstr_a(pVirtualName)); + FIXME("Stub %p %ld (%s)\n", hServer, SessionId, debugstr_a(pVirtualName)); return NULL; }
@@ -674,7 +674,7 @@ HANDLE WINAPI WTSVirtualChannelOpen(HANDLE hServer, DWORD SessionId, LPSTR pVirt */ HANDLE WINAPI WTSVirtualChannelOpenEx(DWORD SessionId, LPSTR pVirtualName, DWORD flags) { - FIXME("Stub %d (%s) %d\n", SessionId, debugstr_a(pVirtualName), flags); + FIXME("Stub %ld (%s) %ld\n", SessionId, debugstr_a(pVirtualName), flags); return NULL; }
@@ -711,7 +711,7 @@ BOOL WINAPI WTSVirtualChannelQuery(HANDLE hChannelHandle, WTS_VIRTUAL_CLASS WtsV */ BOOL WINAPI WTSVirtualChannelRead(HANDLE hChannelHandle, ULONG TimeOut, PCHAR Buffer, ULONG BufferSize, PULONG pBytesRead) { - FIXME("Stub %p %d %p %d %p\n", hChannelHandle, TimeOut, Buffer, BufferSize, pBytesRead); + FIXME("Stub %p %ld %p %ld %p\n", hChannelHandle, TimeOut, Buffer, BufferSize, pBytesRead); return FALSE; }
@@ -720,7 +720,7 @@ BOOL WINAPI WTSVirtualChannelRead(HANDLE hChannelHandle, ULONG TimeOut, PCHAR Bu */ BOOL WINAPI WTSVirtualChannelWrite(HANDLE hChannelHandle, PCHAR Buffer, ULONG Length, PULONG pBytesWritten) { - FIXME("Stub %p %p %d %p\n", hChannelHandle, Buffer, Length, pBytesWritten); + FIXME("Stub %p %p %ld %p\n", hChannelHandle, Buffer, Length, pBytesWritten); return FALSE; }
@@ -730,6 +730,6 @@ BOOL WINAPI WTSVirtualChannelWrite(HANDLE hChannelHandle, PCHAR Buffer, ULONG Le BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD Mask, DWORD* Flags) { /* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */ - FIXME("Stub %p 0x%08x %p\n", hServer, Mask, Flags); + FIXME("Stub %p 0x%08lx %p\n", hServer, Mask, Flags); return FALSE; }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/winemapi/Makefile.in | 1 - dlls/winemapi/main.c | 6 +++--- dlls/winemapi/sendmail.c | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/winemapi/Makefile.in b/dlls/winemapi/Makefile.in index 5408ee834b7..813ee42b349 100644 --- a/dlls/winemapi/Makefile.in +++ b/dlls/winemapi/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = winemapi.dll IMPORTS = shlwapi shell32 mapi32
diff --git a/dlls/winemapi/main.c b/dlls/winemapi/main.c index b627d49a6b1..e8407f8879b 100644 --- a/dlls/winemapi/main.c +++ b/dlls/winemapi/main.c @@ -64,7 +64,7 @@ ULONG WINAPI MAPIFindNext(LHANDLE session, ULONG_PTR uiparam, LPSTR msg_type, ULONG WINAPI MAPILogon(ULONG_PTR uiparam, LPSTR profile, LPSTR password, FLAGS flags, ULONG reserved, LPLHANDLE session) { - TRACE("(0x%08lx %s %p 0x%08x 0x%08x %p)\n", uiparam, + TRACE("(0x%08Ix %s %p 0x%08lx 0x%08lx %p)\n", uiparam, debugstr_a(profile), password, flags, reserved, session);
if (session) @@ -76,7 +76,7 @@ ULONG WINAPI MAPILogon(ULONG_PTR uiparam, LPSTR profile, LPSTR password, ULONG WINAPI MAPILogoff(LHANDLE session, ULONG_PTR uiparam, FLAGS flags, ULONG reserved) { - TRACE("(0x%08lx 0x%08lx 0x%08x 0x%08x)\n", session, + TRACE("(0x%08Ix 0x%08Ix 0x%08lx 0x%08lx)\n", session, uiparam, flags, reserved);
return SUCCESS_SUCCESS; @@ -97,7 +97,7 @@ ULONG WINAPI MAPIResolveName(LHANDLE session, ULONG_PTR uiparam, LPSTR name, SCODE scode; char *p;
- TRACE("(0x%08lx 0x%08lx %s 0x%08x 0x%08x %p)\n", session, uiparam, + TRACE("(0x%08Ix 0x%08Ix %s 0x%08lx 0x%08lx %p)\n", session, uiparam, debugstr_a(name), flags, reserved, recip);
if (!name || !name[0]) diff --git a/dlls/winemapi/sendmail.c b/dlls/winemapi/sendmail.c index ca1b6c59df1..1bd3908ef6d 100644 --- a/dlls/winemapi/sendmail.c +++ b/dlls/winemapi/sendmail.c @@ -101,7 +101,7 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam, HRESULT res; DWORD size;
- TRACE("(0x%08lx 0x%08lx %p 0x%08x 0x%08x)\n", session, uiparam, + TRACE("(0x%08Ix 0x%08Ix %p 0x%08lx 0x%08lx)\n", session, uiparam, message, flags, reserved);
if (!message) @@ -144,7 +144,7 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam, break;
default: - TRACE("Unknown recipient class: %d\n", + TRACE("Unknown recipient class: %ld\n", message->lpRecips[i].ulRecipClass); } } @@ -154,7 +154,7 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
if (message->nFileCount) { - FIXME("Ignoring %u attachments:\n", message->nFileCount); + FIXME("Ignoring %lu attachments:\n", message->nFileCount); for (i = 0; i < message->nFileCount; i++) FIXME("\t%s (%s)\n", debugstr_a(message->lpFiles[i].lpszPathName), debugstr_a(message->lpFiles[i].lpszFileName));
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/activeds/tests/Makefile.in | 1 - dlls/activeds/tests/activeds.c | 62 ++++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 32 deletions(-)
diff --git a/dlls/activeds/tests/Makefile.in b/dlls/activeds/tests/Makefile.in index 340336d4c0a..25ae2a9bfd2 100644 --- a/dlls/activeds/tests/Makefile.in +++ b/dlls/activeds/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = activeds.dll IMPORTS = ole32 oleaut32 activeds
diff --git a/dlls/activeds/tests/activeds.c b/dlls/activeds/tests/activeds.c index c2dc3d58c4b..bc6a6bfc568 100644 --- a/dlls/activeds/tests/activeds.c +++ b/dlls/activeds/tests/activeds.c @@ -41,46 +41,46 @@ static void test_ADsBuildVarArrayStr(void) LONG start, end, idx;
hr = ADsBuildVarArrayStr(NULL, 0, NULL); - ok(hr == E_ADS_BAD_PARAMETER || hr == E_FAIL /* XP */, "got %#x\n", hr); + ok(hr == E_ADS_BAD_PARAMETER || hr == E_FAIL /* XP */, "got %#lx\n", hr);
hr = ADsBuildVarArrayStr(NULL, 0, &var); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(V_VT(&var) == (VT_ARRAY | VT_VARIANT), "got %d\n", V_VT(&var)); start = 0xdeadbeef; hr = SafeArrayGetLBound(V_ARRAY(&var), 1, &start); - ok(hr == S_OK, "got %#x\n", hr); - ok(start == 0, "got %d\n", start); + ok(hr == S_OK, "got %#lx\n", hr); + ok(start == 0, "got %ld\n", start); end = 0xdeadbeef; hr = SafeArrayGetUBound(V_ARRAY(&var), 1, &end); - ok(hr == S_OK, "got %#x\n", hr); - ok(end == -1, "got %d\n", end); + ok(hr == S_OK, "got %#lx\n", hr); + ok(end == -1, "got %ld\n", end); VariantClear(&var);
hr = ADsBuildVarArrayStr((LPWSTR *)props, ARRAY_SIZE(props), &var); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(V_VT(&var) == (VT_ARRAY | VT_VARIANT), "got %d\n", V_VT(&var)); start = 0xdeadbeef; hr = SafeArrayGetLBound(V_ARRAY(&var), 1, &start); - ok(hr == S_OK, "got %#x\n", hr); - ok(start == 0, "got %d\n", start); + ok(hr == S_OK, "got %#lx\n", hr); + ok(start == 0, "got %ld\n", start); end = 0xdeadbeef; hr = SafeArrayGetUBound(V_ARRAY(&var), 1, &end); - ok(hr == S_OK, "got %#x\n", hr); - ok(end == 1, "got %d\n", end); + ok(hr == S_OK, "got %#lx\n", hr); + ok(end == 1, "got %ld\n", end); idx = 0; hr = SafeArrayGetElement(V_ARRAY(&var), &idx, &item); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(V_VT(&item) == VT_BSTR, "got %d\n", V_VT(&item)); ok(!lstrcmpW(V_BSTR(&item), L"prop1"), "got %s\n", wine_dbgstr_w(V_BSTR(&item))); VariantClear(&item); hr = SafeArrayAccessData(V_ARRAY(&var), (void *)&data); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(V_VT(&data[0]) == VT_BSTR, "got %d\n", V_VT(&data[0])); ok(!lstrcmpW(V_BSTR(&data[0]), L"prop1"), "got %s\n", wine_dbgstr_w(V_BSTR(&data[0]))); ok(V_VT(&data[0]) == VT_BSTR, "got %d\n", V_VT(&data[0])); ok(!lstrcmpW(V_BSTR(&data[1]), L"prop2"), "got %s\n", wine_dbgstr_w(V_BSTR(&data[1]))); hr = SafeArrayUnaccessData(V_ARRAY(&var)); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); VariantClear(&var); }
@@ -93,68 +93,68 @@ static void test_Pathname(void) LONG count, i;
hr = CoCreateInstance(&CLSID_Pathname, 0, CLSCTX_INPROC_SERVER, &IID_IADsPathname, (void **)&path); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
count = 0xdeadbeef; hr = IADsPathname_GetNumElements(path, &count); - ok(hr == S_OK, "got %#x\n", hr); - ok(count == 0, "got %d\n", count); + ok(hr == S_OK, "got %#lx\n", hr); + ok(count == 0, "got %ld\n", count);
bstr = NULL; hr = IADsPathname_Retrieve(path, ADS_FORMAT_X500, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(bstr && !wcscmp(bstr, L"LDAP://"), "got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
bstr = SysAllocString(L"LDAP://sample"); hr = IADsPathname_Set(path, bstr, ADS_SETTYPE_FULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); SysFreeString(bstr);
count = 0xdeadbeef; hr = IADsPathname_GetNumElements(path, &count); - ok(hr == S_OK, "got %#x\n", hr); - ok(count == 0, "got %d\n", count); + ok(hr == S_OK, "got %#lx\n", hr); + ok(count == 0, "got %ld\n", count);
hr = IADsPathname_GetElement(path, 0, &bstr); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_INDEX), "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_INDEX), "got %#lx\n", hr); SysFreeString(bstr);
bstr = SysAllocString(L"LDAP://sample:123/a=b,c=d,e=f"); hr = IADsPathname_Set(path, bstr, ADS_SETTYPE_FULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); SysFreeString(bstr);
count = 0xdeadbeef; hr = IADsPathname_GetNumElements(path, &count); - ok(hr == S_OK, "got %#x\n", hr); - ok(count == 3, "got %d\n", count); + ok(hr == S_OK, "got %#lx\n", hr); + ok(count == 3, "got %ld\n", count);
for (i = 0; i < count; i++) { hr = IADsPathname_GetElement(path, i, &bstr); - ok(hr == S_OK, "got %#x\n", hr); - ok(!wcscmp(bstr, elem[i]), "%u: %s\n", i, wine_dbgstr_w(bstr)); + ok(hr == S_OK, "got %#lx\n", hr); + ok(!wcscmp(bstr, elem[i]), "%lu: %s\n", i, wine_dbgstr_w(bstr)); SysFreeString(bstr); }
hr = IADsPathname_Retrieve(path, ADS_FORMAT_X500, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(!wcscmp(bstr, L"LDAP://sample:123/a=b,c=d,e=f"), "got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
hr = IADsPathname_Retrieve(path, ADS_FORMAT_PROVIDER, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(!wcscmp(bstr, L"LDAP"), "got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
hr = IADsPathname_Retrieve(path, ADS_FORMAT_SERVER, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(!wcscmp(bstr, L"sample:123"), "got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
hr = IADsPathname_Retrieve(path, ADS_FORMAT_LEAF, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(!wcscmp(bstr, L"a=b"), "got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/adsldp/tests/Makefile.in | 1 dlls/adsldp/tests/ldap.c | 120 +++++++++++++++++++++-------------------- dlls/adsldp/tests/sysinfo.c | 50 +++++++++-------- 3 files changed, 85 insertions(+), 86 deletions(-)
diff --git a/dlls/adsldp/tests/Makefile.in b/dlls/adsldp/tests/Makefile.in index 78a0fff0f40..26b937aa684 100644 --- a/dlls/adsldp/tests/Makefile.in +++ b/dlls/adsldp/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = adsldp.dll IMPORTS = ole32 oleaut32 secur32 advapi32 activeds uuid
diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c index 161fc5d0bbc..558dc02c0c5 100644 --- a/dlls/adsldp/tests/ldap.c +++ b/dlls/adsldp/tests/ldap.c @@ -75,18 +75,18 @@ static void test_LDAP(void) int i;
hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IADs, (void **)&ads); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IADs_Release(ads);
hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IDispatch, (void **)&disp); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IDispatch_Release(disp);
hr = IUnknown_QueryInterface(unk, &IID_IADsOpenDSObject, (void **)&ads_open); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(test); i++) { @@ -101,7 +101,7 @@ static void test_LDAP(void) skip("server is down\n"); break; } - ok(hr == test[i].hr || hr == test[i].hr_ads_open, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); + ok(hr == test[i].hr || hr == test[i].hr_ads_open, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr); if (hr == S_OK) IDispatch_Release(disp);
@@ -112,7 +112,7 @@ static void test_LDAP(void) skip("server is down\n"); break; } - ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); + ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr); if (hr == S_OK) IADs_Release(ads);
@@ -123,7 +123,7 @@ static void test_LDAP(void) skip("server is down\n"); break; } - ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); + ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr); if (hr == S_OK) IDispatch_Release(disp);
@@ -150,17 +150,17 @@ static void test_ParseDisplayName(void) int i;
hr = CoCreateInstance(&CLSID_LDAP, 0, CLSCTX_INPROC_SERVER, &IID_IParseDisplayName, (void **)&parse); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IParseDisplayName_Release(parse);
hr = CoCreateInstance(&CLSID_LDAP, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); hr = IUnknown_QueryInterface(unk, &IID_IParseDisplayName, (void **)&parse); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IUnknown_Release(unk);
hr = CreateBindCtx(0, &bc); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(test); i++) { @@ -174,13 +174,13 @@ static void test_ParseDisplayName(void) skip("server is down\n"); break; } - ok(hr == test[i].hr || hr == test[i].hr_ads_open, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); + ok(hr == test[i].hr || hr == test[i].hr_ads_open, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr); if (hr == S_OK) { - ok(count == lstrlenW(test[i].path), "%d: got %d\n", i, count); + ok(count == lstrlenW(test[i].path), "%d: got %ld\n", i, count);
hr = IMoniker_GetClassID(mk, &clsid); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(IsEqualGUID(&clsid, &CLSID_PointerMoniker), "%d: got %s\n", i, wine_dbgstr_guid(&clsid));
IMoniker_Release(mk); @@ -191,13 +191,13 @@ static void test_ParseDisplayName(void) count = 0xdeadbeef; hr = MkParseDisplayName(bc, test[i].path, &count, &mk); todo_wine_if(i == 0 || i == 1 || i == 11 || i == 12) - ok(hr == test[i].hr, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); + ok(hr == test[i].hr, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr); if (hr == S_OK) { - ok(count == lstrlenW(test[i].path), "%d: got %d\n", i, count); + ok(count == lstrlenW(test[i].path), "%d: got %ld\n", i, count);
hr = IMoniker_GetClassID(mk, &clsid); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(IsEqualGUID(&clsid, &CLSID_PointerMoniker), "%d: got %s\n", i, wine_dbgstr_guid(&clsid));
IMoniker_Release(mk); @@ -240,42 +240,42 @@ static void do_search(const struct search *s) skip("server is down\n"); return; } - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
pref.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE; pref.vValue.dwType = ADSTYPE_INTEGER; pref.vValue.Integer = s->scope; pref.dwStatus = 0xdeadbeef; hr = IDirectorySearch_SetSearchPreference(ds, &pref, 1); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(pref.dwStatus == ADS_STATUS_S_OK, "got %d\n", pref.dwStatus);
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, &sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
res = s->res;
while ((hr = IDirectorySearch_GetNextRow(ds, sh)) != S_ADS_NOMORE_ROWS) { - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
while ((hr = IDirectorySearch_GetNextColumnName(ds, sh, &name)) != S_ADS_NOMORE_COLUMNS) { DWORD i;
- ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(res->name != NULL, "got extra row %s\n", wine_dbgstr_w(name)); ok(!wcscmp(res->name, name), "expected %s, got %s\n", wine_dbgstr_w(res->name), wine_dbgstr_w(name));
memset(&col, 0xde, sizeof(col)); hr = IDirectorySearch_GetColumn(ds, sh, name, &col); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
ok(col.dwADsType == res->type, "got %d for %s\n", col.dwADsType, wine_dbgstr_w(name));
for (i = 0; i < col.dwNumValues; i++) { - ok(col.pADsValues[i].dwType == col.dwADsType, "%u: got %d for %s\n", i, col.pADsValues[i].dwType, wine_dbgstr_w(name)); + ok(col.pADsValues[i].dwType == col.dwADsType, "%lu: got %d for %s\n", i, col.pADsValues[i].dwType, wine_dbgstr_w(name));
ok(res->values[i] != NULL, "expected to have more values for %s\n", wine_dbgstr_w(name)); if (!res->values[i]) break; @@ -295,7 +295,7 @@ static void do_search(const struct search *s) ok(res->name == NULL, "there are more rows in test data: %s\n", wine_dbgstr_w(res->name));
hr = IDirectorySearch_CloseSearchHandle(ds, sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
IDirectorySearch_Release(ds); } @@ -352,7 +352,7 @@ static void test_DirectorySearch(void) LPWSTR name;
hr = ADsGetObject(L"LDAP:", &IID_IDirectorySearch, (void **)&ds); - ok(hr == E_NOINTERFACE, "got %#x\n", hr); + ok(hr == E_NOINTERFACE, "got %#lx\n", hr);
hr = ADsGetObject(L"LDAP://ldap.forumsys.com/rootDSE", &IID_IDirectorySearch, (void **)&ds); if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN)) @@ -360,7 +360,7 @@ static void test_DirectorySearch(void) skip("server is down\n"); return; } - ok(hr == E_NOINTERFACE, "got %#x\n", hr); + ok(hr == E_NOINTERFACE, "got %#lx\n", hr);
hr = ADsGetObject(L"LDAP://ldap.forumsys.com", &IID_IDirectorySearch, (void **)&ds); if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN)) @@ -368,34 +368,34 @@ static void test_DirectorySearch(void) skip("server is down\n"); return; } - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
pref.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE; pref.vValue.dwType = ADSTYPE_INTEGER; pref.vValue.Integer = ADS_SCOPE_BASE; pref.dwStatus = 0xdeadbeef; hr = IDirectorySearch_SetSearchPreference(ds, &pref, 1); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(pref.dwStatus == ADS_STATUS_S_OK, "got %d\n", pref.dwStatus);
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, NULL); - ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr); + ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr);
if (0) /* crashes under XP */ { hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, 1, &sh); - ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr); + ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr); }
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, &sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IDirectorySearch_GetNextColumnName(ds, sh, &name); - ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr); + ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr);
hr = IDirectorySearch_GetPreviousRow(ds, sh); todo_wine - ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr); + ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr);
while (IDirectorySearch_GetNextRow(ds, sh) != S_ADS_NOMORE_ROWS) { @@ -404,7 +404,7 @@ static void test_DirectorySearch(void) DWORD i;
hr = IDirectorySearch_GetColumn(ds, sh, name, &col); - ok(hr == S_OK, "got %#x for column %s\n", hr, wine_dbgstr_w(name)); + ok(hr == S_OK, "got %#lx for column %s\n", hr, wine_dbgstr_w(name));
if (winetest_debug > 1) /* useful to create test arrays */ { @@ -416,51 +416,51 @@ static void test_DirectorySearch(void) }
hr = IDirectorySearch_FreeColumn(ds, &col); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); }
name = (void *)0xdeadbeef; hr = IDirectorySearch_GetNextColumnName(ds, sh, &name); - ok(hr == S_ADS_NOMORE_COLUMNS || broken(hr == S_OK) /* XP */, "got %#x\n", hr); + ok(hr == S_ADS_NOMORE_COLUMNS || broken(hr == S_OK) /* XP */, "got %#lx\n", hr); ok(name == NULL || broken(name && !wcscmp(name, L"ADsPath")) /* XP */, "got %p/%s\n", name, wine_dbgstr_w(name)); }
hr = IDirectorySearch_GetNextRow(ds, sh); - ok(hr == S_ADS_NOMORE_ROWS, "got %#x\n", hr); + ok(hr == S_ADS_NOMORE_ROWS, "got %#lx\n", hr);
name = NULL; hr = IDirectorySearch_GetNextColumnName(ds, sh, &name); todo_wine - ok(hr == S_OK || broken(hr == S_ADS_NOMORE_COLUMNS) /* XP */, "got %#x\n", hr); + ok(hr == S_OK || broken(hr == S_ADS_NOMORE_COLUMNS) /* XP */, "got %#lx\n", hr); todo_wine ok((name && !wcscmp(name, L"ADsPath")) || broken(!name) /* XP */, "got %s\n", wine_dbgstr_w(name)); FreeADsMem(name);
name = (void *)0xdeadbeef; hr = IDirectorySearch_GetNextColumnName(ds, sh, &name); - ok(hr == S_ADS_NOMORE_COLUMNS || broken(hr == S_OK) /* XP */, "got %#x\n", hr); + ok(hr == S_ADS_NOMORE_COLUMNS || broken(hr == S_OK) /* XP */, "got %#lx\n", hr); ok(name == NULL || broken(name && !wcscmp(name, L"ADsPath")) /* XP */, "got %p/%s\n", name, wine_dbgstr_w(name));
if (0) /* crashes under XP */ { hr = IDirectorySearch_GetColumn(ds, sh, NULL, &col); - ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr); + ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr); }
hr = IDirectorySearch_GetFirstRow(ds, sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
memset(&col, 0x55, sizeof(col)); hr = IDirectorySearch_GetColumn(ds, sh, (WCHAR *)L"deadbeef", &col); - ok(hr == E_ADS_COLUMN_NOT_SET, "got %#x\n", hr); + ok(hr == E_ADS_COLUMN_NOT_SET, "got %#lx\n", hr); ok(!col.pszAttrName || broken(col.pszAttrName != NULL) /* XP */, "got %p\n", col.pszAttrName); ok(col.dwADsType == ADSTYPE_INVALID || broken(col.dwADsType != ADSTYPE_INVALID) /* XP */, "got %d\n", col.dwADsType); ok(!col.pADsValues, "got %p\n", col.pADsValues); - ok(!col.dwNumValues, "got %u\n", col.dwNumValues); + ok(!col.dwNumValues, "got %lu\n", col.dwNumValues); ok(!col.hReserved, "got %p\n", col.hReserved);
hr = IDirectorySearch_CloseSearchHandle(ds, sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
IDirectorySearch_Release(ds);
@@ -485,20 +485,20 @@ static void test_DirectoryObject(void) skip("server is down\n"); return; } - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IADsOpenDSObject, (void **)&unk); todo_wine - ok(hr == E_NOINTERFACE, "got %#x\n", hr); + ok(hr == E_NOINTERFACE, "got %#lx\n", hr); if (hr == S_OK) IUnknown_Release(unk); hr = IDirectoryObject_QueryInterface(dirobj, &IID_IDispatch, (void **)&unk); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IUnknown_Release(unk); hr = IDirectoryObject_QueryInterface(dirobj, &IID_IADs, (void **)&unk); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IUnknown_Release(unk); hr = IDirectoryObject_QueryInterface(dirobj, &IID_IDirectorySearch, (void **)&ds); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
pref[0].dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE; pref[0].vValue.dwType = ADSTYPE_INTEGER; @@ -509,40 +509,40 @@ static void test_DirectoryObject(void) pref[1].vValue.Integer = ADS_SECURITY_INFO_OWNER | ADS_SECURITY_INFO_GROUP | ADS_SECURITY_INFO_DACL; pref[1].dwStatus = 0xdeadbeef; hr = IDirectorySearch_SetSearchPreference(ds, pref, ARRAY_SIZE(pref)); - ok(hr == S_ADS_ERRORSOCCURRED, "got %#x\n", hr); + ok(hr == S_ADS_ERRORSOCCURRED, "got %#lx\n", hr); ok(pref[0].dwStatus == ADS_STATUS_S_OK, "got %d\n", pref[0].dwStatus); /* ldap.forumsys.com doesn't support NT security, real ADs DC - does */ ok(pref[1].dwStatus == ADS_STATUS_INVALID_SEARCHPREF, "got %d\n", pref[1].dwStatus);
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, &sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IDirectorySearch_GetNextRow(ds, sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IDirectorySearch_GetColumn(ds, sh, (WCHAR *)L"nTSecurityDescriptor", &col); - ok(hr == E_ADS_COLUMN_NOT_SET, "got %#x\n", hr); + ok(hr == E_ADS_COLUMN_NOT_SET, "got %#lx\n", hr);
hr = IDirectorySearch_CloseSearchHandle(ds, sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
pref[0].dwSearchPref = ADS_SEARCHPREF_TOMBSTONE; pref[0].vValue.dwType = ADSTYPE_BOOLEAN; pref[0].vValue.Integer = 1; pref[0].dwStatus = 0xdeadbeef; hr = IDirectorySearch_SetSearchPreference(ds, pref, 1); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(pref[0].dwStatus == ADS_STATUS_S_OK, "got %d\n", pref[0].dwStatus);
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, &sh); - ok(hr == HRESULT_FROM_WIN32(ERROR_DS_UNAVAILABLE_CRIT_EXTENSION) || broken(hr == S_OK) /* XP */, "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_DS_UNAVAILABLE_CRIT_EXTENSION) || broken(hr == S_OK) /* XP */, "got %#lx\n", hr); if (hr == S_OK) { hr = IDirectorySearch_GetNextRow(ds, sh); - ok(hr == HRESULT_FROM_WIN32(ERROR_DS_UNAVAILABLE_CRIT_EXTENSION), "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_DS_UNAVAILABLE_CRIT_EXTENSION), "got %#lx\n", hr);
hr = IDirectorySearch_CloseSearchHandle(ds, sh); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); }
IDirectorySearch_Release(ds); @@ -554,7 +554,7 @@ START_TEST(ldap) HRESULT hr;
hr = CoInitialize(NULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
test_LDAP(); test_ParseDisplayName(); diff --git a/dlls/adsldp/tests/sysinfo.c b/dlls/adsldp/tests/sysinfo.c index 4e7b0b405a9..419af743e0a 100644 --- a/dlls/adsldp/tests/sysinfo.c +++ b/dlls/adsldp/tests/sysinfo.c @@ -48,7 +48,7 @@ static void test_ComputerName(void) name_size = MAX_COMPUTERNAME_LENGTH + 1; SetLastError(0xdeadbeef); ret = GetComputerNameW(name, &name_size); - ok(ret, "GetComputerName error %u\n", GetLastError()); + ok(ret, "GetComputerName error %lu\n", GetLastError());
/* Distinguished name (rfc1779) is supposed to look like this: * "CN=COMPNAME,CN=Computers,DC=domain,DC=com" @@ -57,23 +57,23 @@ static void test_ComputerName(void) size = 1024; SetLastError(0xdeadbeef); ret = GetComputerObjectNameW(NameFullyQualifiedDN, buf, &size); - ok(ret || GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO, "GetComputerObjectName error %u\n", GetLastError()); + ok(ret || GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO, "GetComputerObjectName error %lu\n", GetLastError()); if (ret) { const WCHAR *p; - ok(size == lstrlenW(buf) + 1, "got %u, expected %u\n", size, lstrlenW(buf) + 1); + ok(size == lstrlenW(buf) + 1, "got %lu, expected %u\n", size, lstrlenW(buf) + 1); ok(!memcmp(buf, cnW, sizeof(cnW)), "got %s\n", wine_dbgstr_w(buf)); - ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %u)\n", wine_dbgstr_w(buf), name_size); + ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %lu)\n", wine_dbgstr_w(buf), name_size); p = wcschr(buf, ','); ok(p != NULL, "delimiter was not found\n"); ok(p && !memcmp(p + 1, ComputersW, sizeof(ComputersW)), "got %s\n", p ? wine_dbgstr_w(p + 1) : wine_dbgstr_w(buf)); }
hr = CoCreateInstance(&CLSID_ADSystemInfo, 0, CLSCTX_ALL, &IID_IADsADSystemInfo, (void **)&sysinfo); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IADsADSystemInfo_get_ComputerName(sysinfo, &bstr); - ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_CANT_ACCESS_DOMAIN_INFO), "got %#x\n", hr); + ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_CANT_ACCESS_DOMAIN_INFO), "got %#lx\n", hr); if (hr == S_OK) { ok(!lstrcmpW(bstr, buf), "got %s, expected %s\n", wine_dbgstr_w(bstr), wine_dbgstr_w(buf)); @@ -98,7 +98,7 @@ static void test_UserName(void) name_size = 256; SetLastError(0xdeadbeef); ret = GetUserNameW(name, &name_size); - ok(ret, "GetUserName error %u\n", GetLastError()); + ok(ret, "GetUserName error %lu\n", GetLastError());
/* Distinguished name (rfc1779) is supposed to look like this: * "CN=username,CN=Users,DC=domain,DC=com" @@ -107,24 +107,24 @@ static void test_UserName(void) size = 1024; SetLastError(0xdeadbeef); ret = GetUserNameExW(NameFullyQualifiedDN, buf, &size); - ok(ret || GetLastError() == ERROR_NONE_MAPPED, "GetUserNameEx error %u\n", GetLastError()); + ok(ret || GetLastError() == ERROR_NONE_MAPPED, "GetUserNameEx error %lu\n", GetLastError()); if (ret) { const WCHAR *p; - ok(size == lstrlenW(buf), "got %u, expected %u\n", size, lstrlenW(buf)); + ok(size == lstrlenW(buf), "got %lu, expected %u\n", size, lstrlenW(buf)); ok(!memcmp(buf, cnW, sizeof(cnW)), "got %s\n", wine_dbgstr_w(buf)); - ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %u)\n", wine_dbgstr_w(buf), name_size); + ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %lu)\n", wine_dbgstr_w(buf), name_size); p = wcschr(buf, ','); ok(p != NULL, "delimiter was not found\n"); ok(p && !memcmp(p + 1, UsersW, sizeof(UsersW)), "got %s\n", p ? wine_dbgstr_w(p + 1) : wine_dbgstr_w(buf)); }
hr = CoCreateInstance(&CLSID_ADSystemInfo, 0, CLSCTX_ALL, &IID_IADsADSystemInfo, (void **)&sysinfo); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IADsADSystemInfo_get_UserName(sysinfo, &bstr); todo_wine - ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NONE_MAPPED), "got %#x\n", hr); + ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NONE_MAPPED), "got %#lx\n", hr); if (hr == S_OK) { ok(!lstrcmpW(bstr, buf), "got %s, expected %s\n", wine_dbgstr_w(bstr), wine_dbgstr_w(buf)); @@ -144,18 +144,18 @@ static void test_sysinfo(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_ADSystemInfo, 0, CLSCTX_ALL, &IID_IUnknown, (void **)&sysinfo); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IADsADSystemInfo_Release(sysinfo);
hr = CoCreateInstance(&CLSID_ADSystemInfo, 0, CLSCTX_ALL, &IID_IADsADSystemInfo, (void **)&sysinfo); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IADsADSystemInfo_QueryInterface(sysinfo, &IID_IDispatch, (void **)&dispatch); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IDispatch_Release(dispatch);
hr = IADsADSystemInfo_get_ComputerName(sysinfo, &bstr); - ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_CANT_ACCESS_DOMAIN_INFO), "got %#x\n", hr); + ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_CANT_ACCESS_DOMAIN_INFO), "got %#lx\n", hr); if (hr != S_OK) { skip("Computer is not part of a domain, skipping the tests\n"); @@ -165,36 +165,36 @@ static void test_sysinfo(void)
hr = IADsADSystemInfo_get_UserName(sysinfo, &bstr); todo_wine - ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NONE_MAPPED), "got %#x\n", hr); + ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NONE_MAPPED), "got %#lx\n", hr); if (hr != S_OK) goto done; SysFreeString(bstr);
hr = IADsADSystemInfo_get_SiteName(sysinfo, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_DomainShortName(sysinfo, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_DomainDNSName(sysinfo, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_ForestDNSName(sysinfo, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_PDCRoleOwner(sysinfo, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_IsNativeMode(sysinfo, &value); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); if (hr == S_OK) ok(value == VARIANT_TRUE, "IsNativeMode: %s\n", value == VARIANT_TRUE ? "yes" : "no");
hr = IADsADSystemInfo_GetAnyDCName(sysinfo, &bstr); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); if (hr == S_OK) SysFreeString(bstr); done: IADsADSystemInfo_Release(sysinfo); @@ -205,7 +205,7 @@ START_TEST(sysinfo) HRESULT hr;
hr = CoInitialize(NULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
test_ComputerName(); test_UserName();
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109040
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/advapi32/tests/Makefile.in | 1 dlls/advapi32/tests/cred.c | 152 +-- dlls/advapi32/tests/crypt.c | 304 +++--- dlls/advapi32/tests/eventlog.c | 234 ++-- dlls/advapi32/tests/lsa.c | 108 +- dlls/advapi32/tests/perf.c | 52 - dlls/advapi32/tests/registry.c | 1610 +++++++++++++++--------------- dlls/advapi32/tests/security.c | 2060 ++++++++++++++++++++------------------- dlls/advapi32/tests/service.c | 658 ++++++------ 9 files changed, 2589 insertions(+), 2590 deletions(-)
diff --git a/dlls/advapi32/tests/Makefile.in b/dlls/advapi32/tests/Makefile.in index 6a5a28d5df7..2e9b007a91f 100644 --- a/dlls/advapi32/tests/Makefile.in +++ b/dlls/advapi32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = advapi32.dll IMPORTS = ole32 advapi32
diff --git a/dlls/advapi32/tests/cred.c b/dlls/advapi32/tests/cred.c index 854f5a92b1f..24815967ac8 100644 --- a/dlls/advapi32/tests/cred.c +++ b/dlls/advapi32/tests/cred.c @@ -51,19 +51,19 @@ static void test_CredReadA(void) SetLastError(0xdeadbeef); ret = pCredReadA(TEST_TARGET_NAME, -1, 0, &cred); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pCredReadA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0xdeadbeef, &cred); ok(!ret && ( GetLastError() == ERROR_INVALID_FLAGS || GetLastError() == ERROR_INVALID_PARAMETER ), - "CredReadA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %d\n", + "CredReadA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pCredReadA(NULL, CRED_TYPE_GENERIC, 0, &cred); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError()); }
@@ -75,7 +75,7 @@ static void test_CredWriteA(void) SetLastError(0xdeadbeef); ret = pCredWriteA(NULL, 0); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
new_cred.Flags = 0; @@ -93,7 +93,7 @@ static void test_CredWriteA(void) SetLastError(0xdeadbeef); ret = pCredWriteA(&new_cred, 0); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
new_cred.TargetName = (char *)TEST_TARGET_NAME; @@ -105,63 +105,63 @@ static void test_CredWriteA(void) { ok(GetLastError() == ERROR_SUCCESS || GetLastError() == ERROR_IO_PENDING, /* Vista */ - "Expected ERROR_IO_PENDING, got %d\n", GetLastError()); + "Expected ERROR_IO_PENDING, got %ld\n", GetLastError()); } else { ok(GetLastError() == ERROR_BAD_USERNAME || GetLastError() == ERROR_NO_SUCH_LOGON_SESSION, /* Vista */ "CredWrite with username without domain should return ERROR_BAD_USERNAME" - "or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError()); + "or ERROR_NO_SUCH_LOGON_SESSION not %ld\n", GetLastError()); }
new_cred.UserName = NULL; SetLastError(0xdeadbeef); ret = pCredWriteA(&new_cred, 0); ok(!ret && GetLastError() == ERROR_BAD_USERNAME, - "CredWriteA with NULL username should have failed with ERROR_BAD_USERNAME instead of %d\n", + "CredWriteA with NULL username should have failed with ERROR_BAD_USERNAME instead of %ld\n", GetLastError());
new_cred.UserName = (char *)"winetest"; new_cred.Persist = CRED_PERSIST_LOCAL_MACHINE; SetLastError(0xdeadbeef); ret = pCredWriteA(&new_cred, 0); - ok(ret || broken(!ret), "CredWriteA failed with error %u\n", GetLastError()); + ok(ret || broken(!ret), "CredWriteA failed with error %lu\n", GetLastError()); if (ret) { ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_DOMAIN_PASSWORD, 0); - ok(ret, "CredDeleteA failed with error %u\n", GetLastError()); + ok(ret, "CredDeleteA failed with error %lu\n", GetLastError()); } new_cred.Type = CRED_TYPE_GENERIC; SetLastError(0xdeadbeef); ret = pCredWriteA(&new_cred, 0); - ok(ret || broken(!ret), "CredWriteA failed with error %u\n", GetLastError()); + ok(ret || broken(!ret), "CredWriteA failed with error %lu\n", GetLastError()); if (ret) { ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0); - ok(ret, "CredDeleteA failed with error %u\n", GetLastError()); + ok(ret, "CredDeleteA failed with error %lu\n", GetLastError()); } new_cred.Persist = CRED_PERSIST_SESSION; ret = pCredWriteA(&new_cred, 0); - ok(ret, "CredWriteA failed with error %u\n", GetLastError()); + ok(ret, "CredWriteA failed with error %lu\n", GetLastError());
ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0); - ok(ret, "CredDeleteA failed with error %u\n", GetLastError()); + ok(ret, "CredDeleteA failed with error %lu\n", GetLastError());
new_cred.Type = CRED_TYPE_DOMAIN_PASSWORD; SetLastError(0xdeadbeef); ret = pCredWriteA(&new_cred, 0); - ok(ret || broken(!ret), "CredWriteA failed with error %u\n", GetLastError()); + ok(ret || broken(!ret), "CredWriteA failed with error %lu\n", GetLastError()); if (ret) { ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_DOMAIN_PASSWORD, 0); - ok(ret, "CredDeleteA failed with error %u\n", GetLastError()); + ok(ret, "CredDeleteA failed with error %lu\n", GetLastError()); } new_cred.UserName = NULL; SetLastError(0xdeadbeef); ret = pCredWriteA(&new_cred, 0); ok(!ret, "CredWriteA succeeded\n"); - ok(GetLastError() == ERROR_BAD_USERNAME, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_BAD_USERNAME, "got %lu\n", GetLastError()); }
static void test_CredDeleteA(void) @@ -171,13 +171,13 @@ static void test_CredDeleteA(void) SetLastError(0xdeadbeef); ret = pCredDeleteA(TEST_TARGET_NAME, -1, 0); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredDeleteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "CredDeleteA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0xdeadbeef); ok(!ret && ( GetLastError() == ERROR_INVALID_FLAGS || GetLastError() == ERROR_INVALID_PARAMETER /* Vista */ ), - "CredDeleteA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %d\n", + "CredDeleteA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError()); }
@@ -208,7 +208,7 @@ if(0) SetLastError(0xdeadbeef); ret = pCredReadDomainCredentialsA(NULL, 0, &count, &creds); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredReadDomainCredentialsA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "CredReadDomainCredentialsA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); @@ -216,7 +216,7 @@ if(0) count = 2; ret = pCredReadDomainCredentialsA(&info, 0, &count, &creds); ok(!ret && GetLastError() == ERROR_NOT_FOUND, - "CredReadDomainCredentialsA should have failed with ERROR_NOT_FOUND instead of %d\n", + "CredReadDomainCredentialsA should have failed with ERROR_NOT_FOUND instead of %ld\n", GetLastError()); ok(count ==0 && creds == NULL, "CredReadDomainCredentialsA must not return any result\n");
@@ -227,7 +227,7 @@ if(0) ok(!ret, "CredReadDomainCredentialsA should have failed\n"); ok(GetLastError() == ERROR_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */ - "Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %d\n", + "Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
info.DnsServerName = NULL; @@ -237,7 +237,7 @@ if(0) ok(!ret, "CredReadDomainCredentialsA should have failed\n"); ok(GetLastError() == ERROR_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */ - "Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %d\n", + "Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError()); }
@@ -246,14 +246,14 @@ static void check_blob(int line, DWORD cred_type, PCREDENTIALA cred) if (cred_type == CRED_TYPE_DOMAIN_PASSWORD) { todo_wine - ok_(__FILE__, line)(cred->CredentialBlobSize == 0, "expected CredentialBlobSize of 0 but got %d\n", cred->CredentialBlobSize); + ok_(__FILE__, line)(cred->CredentialBlobSize == 0, "expected CredentialBlobSize of 0 but got %ld\n", cred->CredentialBlobSize); todo_wine ok_(__FILE__, line)(!cred->CredentialBlob, "expected NULL credentials but got %p\n", cred->CredentialBlob); } else { DWORD size=sizeof(TEST_PASSWORD); - ok_(__FILE__, line)(cred->CredentialBlobSize == size, "expected CredentialBlobSize of %u but got %u\n", size, cred->CredentialBlobSize); + ok_(__FILE__, line)(cred->CredentialBlobSize == size, "expected CredentialBlobSize of %lu but got %lu\n", size, cred->CredentialBlobSize); ok_(__FILE__, line)(cred->CredentialBlob != NULL, "CredentialBlob should be present\n"); if (cred->CredentialBlob) ok_(__FILE__, line)(!memcmp(cred->CredentialBlob, TEST_PASSWORD, size), "wrong CredentialBlob\n"); @@ -283,7 +283,7 @@ static void test_generic(void)
ret = pCredWriteA(&new_cred, 0); ok(ret || broken(GetLastError() == ERROR_NO_SUCH_LOGON_SESSION), - "CredWriteA failed with error %d\n", GetLastError()); + "CredWriteA failed with error %ld\n", GetLastError()); if (!ret) { skip("couldn't write generic credentials, skipping tests\n"); @@ -291,7 +291,7 @@ static void test_generic(void) }
ret = pCredEnumerateA(NULL, 0, &count, &creds); - ok(ret, "CredEnumerateA failed with error %d\n", GetLastError()); + ok(ret, "CredEnumerateA failed with error %ld\n", GetLastError());
for (i = 0; i < count; i++) { @@ -299,12 +299,12 @@ static void test_generic(void) { ok(creds[i]->Type == CRED_TYPE_GENERIC || creds[i]->Type == CRED_TYPE_DOMAIN_PASSWORD, /* Vista */ - "expected creds[%d]->Type CRED_TYPE_GENERIC or CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type); - ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags); - ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%d]->Comment "Comment" but got "%s"\n", i, creds[i]->Comment); + "expected creds[%ld]->Type CRED_TYPE_GENERIC or CRED_TYPE_DOMAIN_PASSWORD but got %ld\n", i, creds[i]->Type); + ok(!creds[i]->Flags, "expected creds[%ld]->Flags 0 but got 0x%lx\n", i, creds[i]->Flags); + ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%ld]->Comment "Comment" but got "%s"\n", i, creds[i]->Comment); check_blob(__LINE__, creds[i]->Type, creds[i]); - ok(creds[i]->Persist, "expected creds[%d]->Persist CRED_PERSIST_ENTERPRISE but got %d\n", i, creds[i]->Persist); - ok(!strcmp(creds[i]->UserName, "winetest"), "expected creds[%d]->UserName "winetest" but got "%s"\n", i, creds[i]->UserName); + ok(creds[i]->Persist, "expected creds[%ld]->Persist CRED_PERSIST_ENTERPRISE but got %ld\n", i, creds[i]->Persist); + ok(!strcmp(creds[i]->UserName, "winetest"), "expected creds[%ld]->UserName "winetest" but got "%s"\n", i, creds[i]->UserName); found = TRUE; } } @@ -312,11 +312,11 @@ static void test_generic(void) ok(found, "credentials not found\n");
ret = pCredReadA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0, &cred); - ok(ret, "CredReadA failed with error %d\n", GetLastError()); + ok(ret, "CredReadA failed with error %ld\n", GetLastError()); pCredFree(cred);
ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0); - ok(ret, "CredDeleteA failed with error %d\n", GetLastError()); + ok(ret, "CredDeleteA failed with error %ld\n", GetLastError()); }
static void test_domain_password(DWORD cred_type) @@ -346,21 +346,21 @@ static void test_domain_password(DWORD cred_type) "or are disabled. Skipping\n"); return; } - ok(ret, "CredWriteA failed with error %d\n", GetLastError()); + ok(ret, "CredWriteA failed with error %ld\n", GetLastError());
ret = pCredEnumerateA(NULL, 0, &count, &creds); - ok(ret, "CredEnumerateA failed with error %d\n", GetLastError()); + ok(ret, "CredEnumerateA failed with error %ld\n", GetLastError());
for (i = 0; i < count; i++) { if (creds[i]->TargetName && !strcmp(creds[i]->TargetName, TEST_TARGET_NAME)) { - ok(creds[i]->Type == cred_type, "expected creds[%d]->Type CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type); - ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags); - ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%d]->Comment "Comment" but got "%s"\n", i, creds[i]->Comment); + ok(creds[i]->Type == cred_type, "expected creds[%ld]->Type CRED_TYPE_DOMAIN_PASSWORD but got %ld\n", i, creds[i]->Type); + ok(!creds[i]->Flags, "expected creds[%ld]->Flags 0 but got 0x%lx\n", i, creds[i]->Flags); + ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%ld]->Comment "Comment" but got "%s"\n", i, creds[i]->Comment); check_blob(__LINE__, cred_type, creds[i]); - ok(creds[i]->Persist, "expected creds[%d]->Persist CRED_PERSIST_ENTERPRISE but got %d\n", i, creds[i]->Persist); - ok(!strcmp(creds[i]->UserName, "test\winetest"), "expected creds[%d]->UserName "winetest" but got "%s"\n", i, creds[i]->UserName); + ok(creds[i]->Persist, "expected creds[%ld]->Persist CRED_PERSIST_ENTERPRISE but got %ld\n", i, creds[i]->Persist); + ok(!strcmp(creds[i]->UserName, "test\winetest"), "expected creds[%ld]->UserName "winetest" but got "%s"\n", i, creds[i]->UserName); found = TRUE; } } @@ -368,7 +368,7 @@ static void test_domain_password(DWORD cred_type) ok(found, "credentials not found\n");
ret = pCredReadA(TEST_TARGET_NAME, cred_type, 0, &cred); - ok(ret, "CredReadA failed with error %d\n", GetLastError()); + ok(ret, "CredReadA failed with error %ld\n", GetLastError()); if (ret) /* don't check the values of cred, if CredReadA failed. */ { check_blob(__LINE__, cred_type, cred); @@ -376,7 +376,7 @@ static void test_domain_password(DWORD cred_type) }
ret = pCredDeleteA(TEST_TARGET_NAME, cred_type, 0); - ok(ret, "CredDeleteA failed with error %d\n", GetLastError()); + ok(ret, "CredDeleteA failed with error %ld\n", GetLastError()); }
static void test_CredMarshalCredentialA(void) @@ -397,7 +397,7 @@ static void test_CredMarshalCredentialA(void) ret = pCredMarshalCredentialA( 0, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
memset( cert.rgbHashOfCert, 0, sizeof(cert.rgbHashOfCert) ); cert.cbSize = sizeof(cert); @@ -405,28 +405,28 @@ static void test_CredMarshalCredentialA(void) ret = pCredMarshalCredentialA( 0, &cert, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
str = (char *)0xdeadbeef; SetLastError( 0xdeadbeef ); ret = pCredMarshalCredentialA( 0, &cert, &str ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error ); ok( str == (char *)0xdeadbeef, "got %p\n", str );
SetLastError( 0xdeadbeef ); ret = pCredMarshalCredentialA( CertCredential, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
if (0) { /* crash */ SetLastError( 0xdeadbeef ); ret = pCredMarshalCredentialA( CertCredential, &cert, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error ); }
cert.cbSize = 0; @@ -435,13 +435,13 @@ static void test_CredMarshalCredentialA(void) ret = pCredMarshalCredentialA( CertCredential, &cert, &str ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error ); ok( str == (char *)0xdeadbeef, "got %p\n", str );
cert.cbSize = sizeof(cert) + 4; str = NULL; ret = pCredMarshalCredentialA( CertCredential, &cert, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str ); pCredFree( str ); @@ -450,7 +450,7 @@ static void test_CredMarshalCredentialA(void) cert.rgbHashOfCert[0] = 2; str = NULL; ret = pCredMarshalCredentialA( CertCredential, &cert, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@BCAAAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str ); pCredFree( str ); @@ -458,7 +458,7 @@ static void test_CredMarshalCredentialA(void) cert.rgbHashOfCert[0] = 255; str = NULL; ret = pCredMarshalCredentialA( CertCredential, &cert, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@B-DAAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str ); pCredFree( str ); @@ -467,7 +467,7 @@ static void test_CredMarshalCredentialA(void) cert.rgbHashOfCert[1] = 1; str = NULL; ret = pCredMarshalCredentialA( CertCredential, &cert, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@BBEAAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str ); pCredFree( str ); @@ -477,7 +477,7 @@ static void test_CredMarshalCredentialA(void) cert.rgbHashOfCert[2] = 1; str = NULL; ret = pCredMarshalCredentialA( CertCredential, &cert, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@BBEQAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str ); pCredFree( str ); @@ -489,7 +489,7 @@ static void test_CredMarshalCredentialA(void) cert.rgbHashOfCert[3] = 'e'; str = NULL; ret = pCredMarshalCredentialA( CertCredential, &cert, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@BXlmblBAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str ); pCredFree( str ); @@ -497,7 +497,7 @@ static void test_CredMarshalCredentialA(void) memset( cert.rgbHashOfCert, 0xff, sizeof(cert.rgbHashOfCert) ); str = NULL; ret = pCredMarshalCredentialA( CertCredential, &cert, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@B--------------------------P" ), "got %s\n", str ); pCredFree( str ); @@ -508,7 +508,7 @@ static void test_CredMarshalCredentialA(void) ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error ); ok( str == (char *)0xdeadbeef, "got %p\n", str );
username.UserName = emptyW; @@ -517,13 +517,13 @@ static void test_CredMarshalCredentialA(void) ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error ); ok( str == (char *)0xdeadbeef, "got %p\n", str );
username.UserName = tW; str = NULL; ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@CCAAAAA0BA" ), "got %s\n", str ); pCredFree( str ); @@ -531,7 +531,7 @@ static void test_CredMarshalCredentialA(void) username.UserName = teW; str = NULL; ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@CEAAAAA0BQZAA" ), "got %s\n", str ); pCredFree( str ); @@ -539,7 +539,7 @@ static void test_CredMarshalCredentialA(void) username.UserName = tesW; str = NULL; ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@CGAAAAA0BQZAMHA" ), "got %s\n", str ); pCredFree( str ); @@ -547,7 +547,7 @@ static void test_CredMarshalCredentialA(void) username.UserName = testW; str = NULL; ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@CIAAAAA0BQZAMHA0BA" ), "got %s\n", str ); pCredFree( str ); @@ -555,7 +555,7 @@ static void test_CredMarshalCredentialA(void) username.UserName = test1W; str = NULL; ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( str != NULL, "str not set\n" ); ok( !lstrcmpA( str, "@@CKAAAAA0BQZAMHA0BQMAA" ), "got %s\n", str ); pCredFree( str ); @@ -627,14 +627,14 @@ static void test_CredUnmarshalCredentialA(void) ret = pCredUnmarshalCredentialA( NULL, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
cert = NULL; SetLastError( 0xdeadbeef ); ret = pCredUnmarshalCredentialA( NULL, NULL, (void **)&cert ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
type = 0; cert = NULL; @@ -642,20 +642,20 @@ static void test_CredUnmarshalCredentialA(void) ret = pCredUnmarshalCredentialA( NULL, &type, (void **)&cert ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
if (0) { /* crash */ SetLastError( 0xdeadbeef ); ret = pCredUnmarshalCredentialA( "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA", &type, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); ret = pCredUnmarshalCredentialA( "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA", NULL, (void **)&cert ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error ); }
for (i = 0; i < ARRAY_SIZE(tests); i++) @@ -667,7 +667,7 @@ static void test_CredUnmarshalCredentialA(void) error = GetLastError(); if (tests[i].unmarshaled) { - ok(ret, "[%u] unexpected failure %u\n", i, error); + ok(ret, "[%u] unexpected failure %lu\n", i, error); ok(type == tests[i].type, "[%u] got %u\n", i, type); ok(p != NULL, "[%u] returned pointer is NULL\n", i); if (tests[i].type == CertCredential) @@ -675,7 +675,7 @@ static void test_CredUnmarshalCredentialA(void) cert = p; hash = tests[i].unmarshaled; ok(cert->cbSize == sizeof(*cert), - "[%u] wrong size %u\n", i, cert->cbSize); + "[%u] wrong size %lu\n", i, cert->cbSize); for (j = 0; j < sizeof(cert->rgbHashOfCert); j++) ok(cert->rgbHashOfCert[j] == hash[j], "[%u] wrong data\n", i); } @@ -690,7 +690,7 @@ static void test_CredUnmarshalCredentialA(void) else { ok(!ret, "[%u] unexpected success\n", i); - ok(error == ERROR_INVALID_PARAMETER, "[%u] got %u\n", i, error); + ok(error == ERROR_INVALID_PARAMETER, "[%u] got %lu\n", i, error); ok(type == tests[i].type, "[%u] got %u\n", i, type); ok(p == NULL, "[%u] returned pointer is not NULL\n", i); } @@ -752,11 +752,11 @@ static void test_CredIsMarshaledCredentialA(void) SetLastError(0xdeadbeef); res = pCredIsMarshaledCredentialA(ptr[i]); if (expected) - ok(res != FALSE, "%d: got %d and %u for %s (expected TRUE)\n", i, res, GetLastError(), ptr[i]); + ok(res != FALSE, "%d: got %d and %lu for %s (expected TRUE)\n", i, res, GetLastError(), ptr[i]); else { /* Windows returns ERROR_INVALID_PARAMETER here, but that's not documented */ - ok(!res, "%d: got %d and %u for %s (expected FALSE)\n", i, res, GetLastError(), ptr[i]); + ok(!res, "%d: got %d and %lu for %s (expected FALSE)\n", i, res, GetLastError(), ptr[i]); } } } @@ -789,10 +789,10 @@ START_TEST(cred) BOOL ret; DWORD i; ret = pCredGetSessionTypes(CRED_TYPE_MAXIMUM, persists); - ok(ret, "CredGetSessionTypes failed with error %d\n", GetLastError()); - ok(persists[0] == CRED_PERSIST_NONE, "persists[0] = %u instead of CRED_PERSIST_NONE\n", persists[0]); + ok(ret, "CredGetSessionTypes failed with error %ld\n", GetLastError()); + ok(persists[0] == CRED_PERSIST_NONE, "persists[0] = %lu instead of CRED_PERSIST_NONE\n", persists[0]); for (i=0; i < CRED_TYPE_MAXIMUM; i++) - ok(persists[i] <= CRED_PERSIST_ENTERPRISE, "bad value for persists[%u]: %u\n", i, persists[i]); + ok(persists[i] <= CRED_PERSIST_ENTERPRISE, "bad value for persists[%lu]: %lu\n", i, persists[i]); } else memset(persists, CRED_PERSIST_ENTERPRISE, sizeof(persists)); diff --git a/dlls/advapi32/tests/crypt.c b/dlls/advapi32/tests/crypt.c index 6df47cd626b..449dad35ed6 100644 --- a/dlls/advapi32/tests/crypt.c +++ b/dlls/advapi32/tests/crypt.c @@ -72,7 +72,7 @@ static void init_environment(void) CryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_NEWKEYSET); } ret = CryptReleaseContext(hProv, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
/* Ensure that container "wine_test_keyset" does exist in default PROV_RSA_FULL type provider */ if (!CryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, 0)) @@ -80,13 +80,13 @@ static void init_environment(void) CryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); } ret = CryptReleaseContext(hProv, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
/* Ensure that container "wine_test_bad_keyset" does not exist. */ if (CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, 0)) { ret = CryptReleaseContext(hProv, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -101,7 +101,7 @@ static void clean_up_environment(void) if (CryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0)) { ret = CryptReleaseContext(hProv, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
CryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -110,7 +110,7 @@ static void clean_up_environment(void) if (CryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, 0)) { ret = CryptReleaseContext(hProv, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
CryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -119,7 +119,7 @@ static void clean_up_environment(void) if (CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, 0)) { ret = CryptReleaseContext(hProv, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -137,47 +137,47 @@ static void test_CryptReleaseContext(void) SetLastError(0xdeadbeef); ret = CryptReleaseContext(0, 0); ok(!ret, "CryptReleaseContext succeeded unexpectedly\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = CryptReleaseContext(0, ~0); ok(!ret, "CryptReleaseContext succeeded unexpectedly\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
/* Additional refcount */
ret = CryptAcquireContextA(&prov, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
ret = CryptContextAddRef(prov, NULL, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
ret = CryptContextAddRef(0, NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError()); ret = CryptContextAddRef(0xdeadbeef, NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
ret = CryptReleaseContext(prov, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
/* Nonzero flags, which allow release nonetheless */
SetLastError(0xdeadbeef); ret = CryptReleaseContext(prov, ~0); ok(!ret, "CryptReleaseContext succeeded unexpectedly\n"); - ok(GetLastError() == NTE_BAD_FLAGS, "got %u\n", GetLastError()); + ok(GetLastError() == NTE_BAD_FLAGS, "got %lu\n", GetLastError());
/* Obsolete provider */
SetLastError(0xdeadbeef); ret = CryptReleaseContext(prov, 0); ok(!ret, "CryptReleaseContext succeeded unexpectedly\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = CryptReleaseContext(prov, ~0); ok(!ret, "CryptReleaseContext succeeded unexpectedly\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError()); }
static void test_acquire_context(void) @@ -191,19 +191,19 @@ static void test_acquire_context(void) * but since this is likely to change between CSP versions, we don't check * this. Please don't change the order of tests. */ result = CryptAcquireContextA(&hProv, NULL, NULL, 0, 0); - ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%d\n", GetLastError()); + ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%ld\n", GetLastError()); result = CryptAcquireContextA(&hProv, NULL, NULL, 1000, 0); - ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%d\n", GetLastError()); + ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%ld\n", GetLastError());
result = CryptAcquireContextA(&hProv, NULL, NULL, NON_DEF_PROV_TYPE, 0); - ok(!result && GetLastError()==NTE_PROV_TYPE_NOT_DEF, "%d\n", GetLastError()); + ok(!result && GetLastError()==NTE_PROV_TYPE_NOT_DEF, "%ld\n", GetLastError()); result = CryptAcquireContextA(&hProv, szKeySet, szNonExistentProv, PROV_RSA_FULL, 0); - ok(!result && GetLastError()==NTE_KEYSET_NOT_DEF, "%d\n", GetLastError()); + ok(!result && GetLastError()==NTE_KEYSET_NOT_DEF, "%ld\n", GetLastError());
result = CryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, NON_DEF_PROV_TYPE, 0); - ok(!result && GetLastError()==NTE_PROV_TYPE_NO_MATCH, "%d\n", GetLastError()); + ok(!result && GetLastError()==NTE_PROV_TYPE_NO_MATCH, "%ld\n", GetLastError());
if (0) @@ -212,7 +212,7 @@ if (0) result = TRUE, GetLastError() == ERROR_INVALID_PARAMETER */ SetLastError(0xdeadbeef); result = CryptAcquireContextA(NULL, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d/%d\n", result, GetLastError()); + ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d/%ld\n", result, GetLastError()); } /* Last not least, try to really acquire a context. */ @@ -224,12 +224,12 @@ if (0) GLE == ERROR_SUCCESS || GLE == ERROR_RING2_STACK_IN_USE || GLE == NTE_FAIL || - GLE == ERROR_NOT_LOGGED_ON), "%d/%d\n", result, GLE); + GLE == ERROR_NOT_LOGGED_ON), "%d/%ld\n", result, GLE);
if (hProv) { result = CryptReleaseContext(hProv, 0); - ok(result, "got %u\n", GetLastError()); + ok(result, "got %lu\n", GetLastError()); }
/* Try again, witch an empty ("\0") szProvider parameter */ @@ -241,12 +241,12 @@ if (0) GLE == ERROR_SUCCESS || GLE == ERROR_RING2_STACK_IN_USE || GLE == NTE_FAIL || - GLE == ERROR_NOT_LOGGED_ON), "%d/%d\n", result, GetLastError()); + GLE == ERROR_NOT_LOGGED_ON), "%d/%ld\n", result, GetLastError());
if (hProv) { result = CryptReleaseContext(hProv, 0); - ok(result, "got %u\n", GetLastError()); + ok(result, "got %lu\n", GetLastError()); } }
@@ -271,203 +271,203 @@ static void test_incorrect_api_usage(void)
result = CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
/* Looks like native handles are just pointers. */ ok(!!*(void **)hProv, "Got zero *(void **)hProv.\n");
result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash); - ok (result, "%d\n", GetLastError()); + ok (result, "%ld\n", GetLastError()); if (!result) return;
result = CryptDeriveKey(0, CALG_RC4, hHash, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC4, 0, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptHashData(0, &temp, 1, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptGenKey(hProv, CALG_RC4, 0, &hKey); - ok (result, "%d\n", GetLastError()); + ok (result, "%ld\n", GetLastError()); if (!result) return;
result = pCryptHashSessionKey(hHash, 0, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = pCryptHashSessionKey(0, hKey, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDestroyHash(hHash); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError());
result = CryptDestroyHash(0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptCreateHash(0xdeadbeef, CALG_SHA, 0, 0, &hHash); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptCreateHash(0, CALG_SHA, 0, 0, &hHash); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptGenKey(0, CALG_RC4, 0, &hKey); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1; result = CryptDecrypt(hKey, 0, TRUE, 0, &temp, &dwLen); - ok (result, "%d\n", GetLastError()); + ok (result, "%ld\n", GetLastError()); result = CryptDecrypt(hKey, 0xdeadbeef, TRUE, 0, &temp, &dwLen); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError()); result = CryptDecrypt(0, 0, TRUE, 0, &temp, &dwLen); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError()); result = CryptDecrypt(0xdeadbeef, 0, TRUE, 0, &temp, &dwLen); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptEncrypt(hKey, 0, TRUE, 0, &temp, &dwLen, sizeof(temp)); - ok (result, "%d\n", GetLastError()); + ok (result, "%ld\n", GetLastError()); result = CryptEncrypt(hKey, 0xdeadbeef, TRUE, 0, &temp, &dwLen, sizeof(temp)); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError()); result = CryptEncrypt(0, 0, TRUE, 0, &temp, &dwLen, sizeof(temp)); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError()); result = CryptEncrypt(0xdeadbeef, 0, TRUE, 0, &temp, &dwLen, sizeof(temp)); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1; result = CryptExportKey(hKey, 0xdeadbeef, 0, 0, &temp, &dwLen); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDestroyKey(hKey); - ok (result, "%d\n", GetLastError()); + ok (result, "%ld\n", GetLastError());
result = CryptGenKey(hProv, CALG_RC4, 0, &hKey2); - ok (result, "%d\n", GetLastError()); + ok (result, "%ld\n", GetLastError()); if (!result) return;
result = CryptDestroyKey(hKey2); - ok (result, "%d\n", GetLastError()); + ok (result, "%ld\n", GetLastError());
result = CryptDestroyKey(0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwTemp = CRYPT_MODE_ECB; result = CryptSetKeyParam(hKey2, KP_MODE, (BYTE*)&dwTemp, sizeof(DWORD)); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
hProv2 = 0xdeadbeef; result = CryptAcquireContextA(&hProv2, szBadKeySet, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - ok (result, "%d\n", GetLastError()); - ok (hProv2 == 0, "%ld\n", hProv2); + ok (result, "%ld\n", GetLastError()); + ok (hProv2 == 0, "%Id\n", hProv2); if (!result) return;
result = CryptReleaseContext(hProv, 0); - ok(result, "got %u\n", GetLastError()); + ok(result, "got %lu\n", GetLastError()); if (!result) return;
result = pCryptGenRandom(0, 1, &temp); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = pCryptGenRandom(hProv, 1, &temp); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptContextAddRef(hProv, NULL, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1; result = CryptDecrypt(hKey, 0, TRUE, 0, &temp, &dwLen); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1; result = CryptEncrypt(hKey, 0, TRUE, 0, &temp, &dwLen, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC4, hHash, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = pCryptDuplicateHash(hHash, NULL, 0, &hHash2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDuplicateKey(hKey, NULL, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1; result = CryptExportKey(hKey, 0, 0, 0, &temp, &dwLen); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptGenKey(hProv, CALG_RC4, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1; result = CryptGetHashParam(hHash, 0, &temp, &dwLen, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1; result = CryptGetKeyParam(hKey, 0, &temp, &dwLen, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1; result = CryptGetProvParam(hProv, 0, &temp, &dwLen, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptGetUserKey(0, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptGetUserKey(hProv, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptHashData(hHash, &temp, 1, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = pCryptHashSessionKey(hHash, hKey, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptImportKey(hProv, &temp, 1, 0, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
if (pCryptSignHashW) { dwLen = 1; result = pCryptSignHashW(hHash, 0, NULL, 0, &temp, &dwLen); ok (!result && (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError()); + GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%ld\n", GetLastError()); result = pCryptSignHashW(hHash, 0, NULL, 0, &temp, &dwLen); ok (!result && (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError()); + GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%ld\n", GetLastError()); } else win_skip("CryptSignHashW is not available\n");
result = CryptSetKeyParam(hKey, 0, &temp, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptSetHashParam(hHash, 0, &temp, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptSetProvParam(0, 0, &temp, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptSetProvParam(hProv, 0, &temp, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
if (pCryptVerifySignatureW) { result = pCryptVerifySignatureW(hHash, &temp, 1, hKey, NULL, 0); ok (!result && (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError()); + GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%ld\n", GetLastError()); } else win_skip("CryptVerifySignatureW is not available\n");
result = CryptDestroyHash(hHash); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDestroyKey(hKey); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError()); }
static const BYTE privKey[] = { @@ -518,51 +518,51 @@ static void test_verify_sig(void) return; } ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); ret = CryptAcquireContextA(&prov, szKeySet, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); if (!ret && GetLastError() == NTE_EXISTS) ret = CryptAcquireContextA(&prov, szKeySet, NULL, PROV_RSA_FULL, 0); - ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContextA failed: %08lx\n", GetLastError()); ret = CryptImportKey(prov, (LPBYTE)privKey, sizeof(privKey), 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptImportKey failed: %08lx\n", GetLastError()); ret = CryptCreateHash(prov, CALG_MD5, 0, 0, &hash); - ok(ret, "CryptCreateHash failed: %08x\n", GetLastError()); + ok(ret, "CryptCreateHash failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(hash, NULL, 0, 0, NULL, 0); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(0, NULL, 0, key, NULL, 0); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(hash, NULL, 0, key, NULL, 0); ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || GetLastError() == ERROR_INVALID_PARAMETER), - "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n", + "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(hash, NULL, sizeof(bogus), key, NULL, 0); ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || GetLastError() == ERROR_INVALID_PARAMETER), - "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n", + "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(hash, bogus, 0, key, NULL, 0); ok(!ret && GetLastError() == NTE_BAD_SIGNATURE, - "Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError()); + "Expected NTE_BAD_SIGNATURE, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(hash, bogus, sizeof(bogus), key, NULL, 0); ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || broken(GetLastError() == NTE_BAD_HASH_STATE /* older NT4 */)), - "Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError()); + "Expected NTE_BAD_SIGNATURE, got %08lx\n", GetLastError()); CryptDestroyKey(key); CryptDestroyHash(hash);
ret = CryptReleaseContext(prov, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); }
static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvName, @@ -626,11 +626,11 @@ static void test_enum_providers(void) /* check pdwReserved flag for NULL */ result = pCryptEnumProvidersA(dwIndex, ¬Null, 0, &type, NULL, &providerLen); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); + ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%ld\n", GetLastError()); /* check dwFlags == 0 */ result = pCryptEnumProvidersA(dwIndex, NULL, notZeroFlags, &type, NULL, &providerLen); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "%d\n", GetLastError()); + ok(!result && GetLastError()==NTE_BAD_FLAGS, "%ld\n", GetLastError()); /* alloc provider to half the size required * cbName holds the size required */ @@ -639,7 +639,7 @@ static void test_enum_providers(void) return;
result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen); - ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %d\n", + ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %ld\n", ERROR_MORE_DATA, GetLastError());
LocalFree(provider); @@ -657,7 +657,7 @@ static void test_enum_providers(void) * ERROR_NO_MORE_ITEMS */ for (count = 0; count < provCount + 1; count++) result = pCryptEnumProvidersA(count, NULL, 0, &type, NULL, &providerLen); - ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %i, got %d\n", + ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %i, got %ld\n", ERROR_NO_MORE_ITEMS, GetLastError()); /* check expected versus actual values returned */ @@ -668,20 +668,20 @@ static void test_enum_providers(void) providerLen = -1; result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen); - ok(result, "expected TRUE, got %d\n", result); - ok(type==dwType, "expected %d, got %d\n", dwType, type); + ok(result, "expected TRUE, got %ld\n", result); + ok(type==dwType, "expected %ld, got %ld\n", dwType, type); if (pszProvName) ok(!strcmp(pszProvName, provider), "expected %s, got %s\n", pszProvName, provider); - ok(cbName==providerLen, "expected %d, got %d\n", cbName, providerLen); + ok(cbName==providerLen, "expected %ld, got %ld\n", cbName, providerLen);
providerLen = -1000; provider[0] = 0; result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen); - ok(result, "expected TRUE, got %d\n", result); - ok(type==dwType, "expected %d, got %d\n", dwType, type); + ok(result, "expected TRUE, got %ld\n", result); + ok(type==dwType, "expected %ld, got %ld\n", dwType, type); if (pszProvName) ok(!strcmp(pszProvName, provider), "expected %s, got %s\n", pszProvName, provider); - ok(cbName==providerLen, "expected %d, got %d\n", cbName, providerLen); + ok(cbName==providerLen, "expected %ld, got %ld\n", cbName, providerLen);
LocalFree(pszProvName); LocalFree(provider); @@ -779,12 +779,12 @@ static void test_enum_provider_types(void)
/* check pdwReserved for NULL */ result = pCryptEnumProviderTypesA(index, ¬Null, 0, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", + ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* check dwFlags == zero */ result = pCryptEnumProviderTypesA(index, NULL, notZeroFlags, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected ERROR_INVALID_PARAMETER, got %d\n", + ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* This test fails under Win2k SP4: @@ -799,7 +799,7 @@ static void test_enum_provider_types(void)
SetLastError(0xdeadbeef); result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %d/%d\n", + ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %ld/%ld\n", result, GetLastError());
LocalFree(typeName); @@ -812,28 +812,28 @@ static void test_enum_provider_types(void) while(pCryptEnumProviderTypesA(typeCount++, NULL, 0, &provType, NULL, &typeNameSize)) ; typeCount--; - ok(typeCount==dwTypeCount, "expected %d, got %d\n", dwTypeCount, typeCount); + ok(typeCount==dwTypeCount, "expected %ld, got %ld\n", dwTypeCount, typeCount);
/* loop past the actual number of provider types to get the error * ERROR_NO_MORE_ITEMS */ for (typeCount = 0; typeCount < dwTypeCount + 1; typeCount++) result = pCryptEnumProviderTypesA(typeCount, NULL, 0, &provType, NULL, &typeNameSize); - ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", + ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %ld\n", GetLastError());
/* check expected versus actual values returned */ result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, NULL, &typeNameSize); - ok(result && typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize); + ok(result && typeNameSize==cbTypeName, "expected %ld, got %ld\n", cbTypeName, typeNameSize); if (!(typeName = LocalAlloc(LMEM_ZEROINIT, typeNameSize))) goto cleanup;
typeNameSize = 0xdeadbeef; result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize); - ok(result, "expected TRUE, got %d\n", result); - ok(provType==dwProvType, "expected %d, got %d\n", dwProvType, provType); + ok(result, "expected TRUE, got %ld\n", result); + ok(provType==dwProvType, "expected %ld, got %ld\n", dwProvType, provType); if (pszTypeName) ok(!strcmp(pszTypeName, typeName), "expected %s, got %s\n", pszTypeName, typeName); - ok(typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize); + ok(typeNameSize==cbTypeName, "expected %ld, got %ld\n", cbTypeName, typeNameSize);
LocalFree(typeName); cleanup: @@ -920,13 +920,13 @@ static void test_get_default_provider(void) /* check pdwReserved for NULL */ result = pCryptGetDefaultProviderA(provType, ¬Null, flags, provName, &provNameSize); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %d\n", + ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %ld\n", ERROR_INVALID_PARAMETER, GetLastError()); /* check for invalid flag */ flags = 0xdeadbeef; result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected %d, got %d\n", + ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected %ld, got %ld\n", NTE_BAD_FLAGS, GetLastError()); flags = CRYPT_MACHINE_DEFAULT; @@ -935,7 +935,7 @@ static void test_get_default_provider(void) result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize); ok(!result && (GetLastError() == NTE_BAD_PROV_TYPE || GetLastError() == ERROR_INVALID_PARAMETER), - "expected NTE_BAD_PROV_TYPE or ERROR_INVALID_PARAMETER, got %d/%d\n", + "expected NTE_BAD_PROV_TYPE or ERROR_INVALID_PARAMETER, got %ld/%ld\n", result, GetLastError()); provType = PROV_RSA_FULL; @@ -948,14 +948,14 @@ static void test_get_default_provider(void) return; result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize); - ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %d\n", + ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %ld\n", ERROR_MORE_DATA, GetLastError()); LocalFree(provName); /* check expected versus actual values returned */ result = pCryptGetDefaultProviderA(provType, NULL, flags, NULL, &provNameSize); - ok(result && provNameSize==cbProvName, "expected %d, got %d\n", cbProvName, provNameSize); + ok(result && provNameSize==cbProvName, "expected %ld, got %ld\n", cbProvName, provNameSize); provNameSize = cbProvName; if (!(provName = LocalAlloc(LMEM_ZEROINIT, provNameSize))) @@ -963,10 +963,10 @@ static void test_get_default_provider(void) provNameSize = 0xdeadbeef; result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize); - ok(result, "expected TRUE, got %d\n", result); + ok(result, "expected TRUE, got %ld\n", result); if(pszProvName) ok(!strcmp(pszProvName, provName), "expected %s, got %s\n", pszProvName, provName); - ok(provNameSize==cbProvName, "expected %d, got %d\n", cbProvName, provNameSize); + ok(provNameSize==cbProvName, "expected %ld, got %ld\n", cbProvName, provNameSize);
LocalFree(pszProvName); LocalFree(provName); @@ -994,11 +994,11 @@ static void test_set_provider_ex(void) if (!(curProvName = LocalAlloc(LMEM_ZEROINIT, curlen))) return; result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, curProvName, &curlen); - ok(result, "%d\n", GetLastError()); + ok(result, "%ld\n", GetLastError());
/* check pdwReserved for NULL */ result = pCryptSetProviderExA(MS_DEF_PROV_A, PROV_RSA_FULL, ¬Null, CRYPT_MACHINE_DEFAULT); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %d\n", + ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %ld\n", ERROR_INVALID_PARAMETER, GetLastError());
/* remove the default provider and then set it to MS_DEF_PROV/PROV_RSA_FULL */ @@ -1007,31 +1007,31 @@ static void test_set_provider_ex(void) if (!result) { ok( GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == ERROR_INVALID_PARAMETER), - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); skip("Not enough rights to remove the default provider\n"); LocalFree(curProvName); return; }
result = pCryptSetProviderExA(MS_DEF_PROV_A, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT); - ok(result, "%d\n", GetLastError()); + ok(result, "%ld\n", GetLastError()); /* call CryptGetDefaultProvider to see if they match */ result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, NULL, &cbProvName); - ok(result, "%d\n", GetLastError()); + ok(result, "%ld\n", GetLastError()); if (!(pszProvName = LocalAlloc(LMEM_ZEROINIT, cbProvName))) goto reset;
result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, pszProvName, &cbProvName); ok(result && !strcmp(MS_DEF_PROV_A, pszProvName), "expected %s, got %s\n", MS_DEF_PROV_A, pszProvName); - ok(result && cbProvName==(strlen(MS_DEF_PROV_A) + 1), "expected %i, got %d\n", (lstrlenA(MS_DEF_PROV_A) + 1), cbProvName); + ok(result && cbProvName==(strlen(MS_DEF_PROV_A) + 1), "expected %i, got %ld\n", (lstrlenA(MS_DEF_PROV_A) + 1), cbProvName);
LocalFree(pszProvName);
reset: /* Set the provider back to its original */ result = pCryptSetProviderExA(curProvName, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT); - ok(result, "%d\n", GetLastError()); + ok(result, "%ld\n", GetLastError()); LocalFree(curProvName); }
@@ -1059,7 +1059,7 @@ static void test_machine_guid(void) { restoreGuid = TRUE; r = RegDeleteValueA(key, "MachineGuid"); - ok(!r || broken(r == ERROR_ACCESS_DENIED) /*win8*/, "RegDeleteValueA failed: %d\n", r); + ok(!r || broken(r == ERROR_ACCESS_DENIED) /*win8*/, "RegDeleteValueA failed: %ld\n", r); if (r == ERROR_ACCESS_DENIED) { skip("broken virtualization on HKLM\Software\Microsoft\Cryptography\n"); @@ -1068,14 +1068,14 @@ static void test_machine_guid(void) } } else - ok(r == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", + ok(r == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n", r); /* Create and release a provider */ ret = CryptAcquireContextA(&hCryptProv, szKeySet, NULL, PROV_RSA_FULL, 0); ok(ret || broken(!ret && GetLastError() == NTE_KEYSET_ENTRY_BAD /* NT4 */), - "CryptAcquireContextA failed: %08x\n", GetLastError()); + "CryptAcquireContextA failed: %08lx\n", GetLastError()); ret = CryptReleaseContext(hCryptProv, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
if (restoreGuid) RegSetValueExA(key, "MachineGuid", 0, REG_SZ, (const BYTE *)originalGuid, @@ -1105,7 +1105,7 @@ static void test_rc2_keylen(void) SetLastError(0xdeadbeef); ret = CryptAcquireContextA(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContext error %u\n", GetLastError()); + ok(ret, "CryptAcquireContext error %lu\n", GetLastError()); if (ret) { key_blob.header.bType = PLAINTEXTKEYBLOB; @@ -1122,18 +1122,18 @@ static void test_rc2_keylen(void) /* CRYPT_IPSEC_HMAC_KEY is not supported on W2K and lower */ ok(ret || broken(!ret && GetLastError() == NTE_BAD_FLAGS), - "CryptImportKey error %08x\n", GetLastError()); + "CryptImportKey error %08lx\n", GetLastError()); if (ret) CryptDestroyKey(hkey);
ret = CryptReleaseContext(provider, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); }
SetLastError(0xdeadbeef); ret = CryptAcquireContextA(&provider, NULL, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContext error %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext error %08lx\n", GetLastError());
if (ret) { @@ -1145,7 +1145,7 @@ static void test_rc2_keylen(void) GetLastError() == NTE_BAD_LEN || /* Win7 */ GetLastError() == NTE_BAD_TYPE || /* W2K */ GetLastError() == NTE_PERM), /* Win9x, WinMe and NT4 */ - "unexpected error %08x\n", GetLastError()); + "unexpected error %08lx\n", GetLastError()); /* but importing an 56-bit (7-byte) key does.. */ key_blob.key_size = 7; SetLastError(0xdeadbeef); @@ -1154,7 +1154,7 @@ static void test_rc2_keylen(void) ok(ret || broken(!ret && GetLastError() == NTE_BAD_TYPE) || /* W2K */ broken(!ret && GetLastError() == NTE_PERM), /* Win9x, WinMe and NT4 */ - "CryptAcquireContext error %08x\n", GetLastError()); + "CryptAcquireContext error %08lx\n", GetLastError()); if (ret) CryptDestroyKey(hkey); /* as does importing a 16-byte key with the base provider when @@ -1167,18 +1167,18 @@ static void test_rc2_keylen(void) /* CRYPT_IPSEC_HMAC_KEY is not supported on W2K and lower */ ok(ret || broken(!ret && GetLastError() == NTE_BAD_FLAGS), - "CryptImportKey error %08x\n", GetLastError()); + "CryptImportKey error %08lx\n", GetLastError()); if (ret) CryptDestroyKey(hkey);
ret = CryptReleaseContext(provider, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); }
key_blob.key_size = sizeof(key); SetLastError(0xdeadbeef); ret = CryptAcquireContextA(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContext error %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext error %08lx\n", GetLastError());
if (ret) { @@ -1190,7 +1190,7 @@ static void test_rc2_keylen(void) 0, CRYPT_IPSEC_HMAC_KEY, &hkey); ok(ret || broken(!ret && GetLastError() == NTE_BAD_FLAGS), - "CryptImportKey error %08x\n", GetLastError()); + "CryptImportKey error %08lx\n", GetLastError()); if (ret) CryptDestroyKey(hkey);
@@ -1203,12 +1203,12 @@ static void test_rc2_keylen(void) 0, CRYPT_IPSEC_HMAC_KEY, &hkey); ok(ret || broken(!ret && GetLastError() == NTE_BAD_FLAGS), - "CryptImportKey error %08x\n", GetLastError()); + "CryptImportKey error %08lx\n", GetLastError()); if (ret) CryptDestroyKey(hkey);
ret = CryptReleaseContext(provider, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); } }
@@ -1231,7 +1231,7 @@ static void test_SystemFunction036(void) { SetLastError(0xdeadbeef); ret = pSystemFunction036(NULL, 5); - trace("ret = %d, GetLastError() = %d\n", ret, GetLastError()); + trace("ret = %d, GetLastError() = %ld\n", ret, GetLastError()); }
ret = pSystemFunction036(&test, 0); @@ -1250,29 +1250,29 @@ static void test_container_sd(void)
ret = CryptAcquireContextA(&prov, "winetest", "Microsoft Enhanced Cryptographic Provider v1.0", PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_NEWKEYSET); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
len = 0; SetLastError(0xdeadbeef); ret = CryptGetProvParam(prov, PP_KEYSET_SEC_DESCR, NULL, &len, OWNER_SECURITY_INFORMATION); err = GetLastError(); - ok(ret, "got %u\n", err); - ok(err == ERROR_INSUFFICIENT_BUFFER || broken(err == ERROR_INVALID_PARAMETER), "got %u\n", err); + ok(ret, "got %lu\n", err); + ok(err == ERROR_INSUFFICIENT_BUFFER || broken(err == ERROR_INVALID_PARAMETER), "got %lu\n", err); ok(len, "expected len > 0\n");
sd = HeapAlloc(GetProcessHeap(), 0, len); ret = CryptGetProvParam(prov, PP_KEYSET_SEC_DESCR, (BYTE *)sd, &len, OWNER_SECURITY_INFORMATION); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); HeapFree(GetProcessHeap(), 0, sd);
ret = CryptReleaseContext(prov, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
prov = 0xdeadbeef; ret = CryptAcquireContextA(&prov, "winetest", "Microsoft Enhanced Cryptographic Provider v1.0", PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_DELETEKEYSET); - ok(ret, "got %u\n", GetLastError()); - ok(prov == 0, "got %ld\n", prov); + ok(ret, "got %lu\n", GetLastError()); + ok(prov == 0, "got %Id\n", prov); }
START_TEST(crypt) diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 7e66e9ad8d7..793addf3d29 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -70,7 +70,7 @@ static BOOL create_backup(const char *filename) win_skip( "Can't open event log\n" ); return FALSE; } - ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); + ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
DeleteFileA(filename); rc = BackupEventLogA(handle, filename); @@ -80,12 +80,12 @@ static BOOL create_backup(const char *filename) CloseEventLog(handle); return FALSE; } - ok(rc, "BackupEventLogA failed, le=%u\n", GetLastError()); + ok(rc, "BackupEventLogA failed, le=%lu\n", GetLastError()); CloseEventLog(handle);
attribs = GetFileAttributesA(filename); todo_wine - ok(attribs != INVALID_FILE_ATTRIBUTES, "Expected a backup file attribs=%#x le=%u\n", attribs, GetLastError()); + ok(attribs != INVALID_FILE_ATTRIBUTES, "Expected a backup file attribs=%#lx le=%lu\n", attribs, GetLastError()); return TRUE; }
@@ -99,46 +99,46 @@ static void test_open_close(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_NOACCESS, /* W2K */ - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); handle = OpenEventLogA(NULL, NULL); ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); handle = OpenEventLogA("IDontExist", NULL); ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); handle = OpenEventLogA("IDontExist", "deadbeef"); ok(handle == NULL, "Didn't expect a handle\n"); ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */ - "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError()); + "Expected RPC_S_SERVER_UNAVAILABLE, got %ld\n", GetLastError());
/* This one opens the Application log */ handle = OpenEventLogA(NULL, "deadbeef"); - ok(handle != NULL, "Expected a handle : %d\n", GetLastError()); + ok(handle != NULL, "Expected a handle : %ld\n", GetLastError()); ret = CloseEventLog(handle); - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); /* Close a second time */ SetLastError(0xdeadbeef); ret = CloseEventLog(handle); todo_wine { ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); }
/* Empty servername should be read as local server */ handle = OpenEventLogA("", "Application"); - ok(handle != NULL, "Expected a handle : %d\n", GetLastError()); + ok(handle != NULL, "Expected a handle : %ld\n", GetLastError()); CloseEventLog(handle);
handle = OpenEventLogA(NULL, "Application"); - ok(handle != NULL, "Expected a handle : %d\n", GetLastError()); + ok(handle != NULL, "Expected a handle : %ld\n", GetLastError()); CloseEventLog(handle); }
@@ -159,47 +159,47 @@ static void test_info(void) SetLastError(0xdeadbeef); ret = pGetEventLogInformation(NULL, 1, NULL, 0, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_LEVEL, "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_LEVEL, "Expected ERROR_INVALID_LEVEL, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetEventLogInformation(NULL, EVENTLOG_FULL_INFO, NULL, 0, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
handle = OpenEventLogA(NULL, "Application"); - ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); + ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); + ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, &needed); ok(!ret, "Expected failure\n"); - ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); + ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, efi, 0, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); + ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); needed = 0xdeadbeef; efi->dwFull = 0xdeadbeef; ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, efi, 0, &needed); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %ld\n", needed); ok(efi->dwFull == 0xdeadbeef, "Expected no change to the dwFull member\n");
/* Not that we care, but on success last error is set to ERROR_IO_PENDING */ efi->dwFull = 0xdeadbeef; needed = sizeof(buffer); ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, efi, needed, &needed); - ok(ret, "Expected success : %d\n", GetLastError()); - ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed); - ok(efi->dwFull == 0 || efi->dwFull == 1, "Expected 0 (not full) or 1 (full), got %d\n", efi->dwFull); + ok(ret, "Expected success : %ld\n", GetLastError()); + ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %ld\n", needed); + ok(efi->dwFull == 0 || efi->dwFull == 1, "Expected 0 (not full) or 1 (full), got %ld\n", efi->dwFull);
CloseEventLog(handle); } @@ -214,26 +214,26 @@ static void test_count(void) SetLastError(0xdeadbeef); ret = GetNumberOfEventLogRecords(NULL, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); count = 0xdeadbeef; ret = GetNumberOfEventLogRecords(NULL, &count); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); ok(count == 0xdeadbeef, "Expected count to stay unchanged\n");
handle = OpenEventLogA(NULL, "Application"); - ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); + ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetNumberOfEventLogRecords(handle, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
count = 0xdeadbeef; ret = GetNumberOfEventLogRecords(handle, &count); - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); ok(count != 0xdeadbeef, "Expected the number of records\n");
CloseEventLog(handle); @@ -243,14 +243,14 @@ static void test_count(void) { handle = OpenBackupEventLogA(NULL, backup); todo_wine - ok(handle != NULL, "Expected a handle, le=%d\n", GetLastError()); + ok(handle != NULL, "Expected a handle, le=%ld\n", GetLastError());
/* Does GetNumberOfEventLogRecords work with backup eventlogs? */ count = 0xdeadbeef; ret = GetNumberOfEventLogRecords(handle, &count); todo_wine { - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); ok(count != 0xdeadbeef, "Expected the number of records\n"); }
@@ -269,13 +269,13 @@ static void test_oldest(void) SetLastError(0xdeadbeef); ret = GetOldestEventLogRecord(NULL, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); oldest = 0xdeadbeef; ret = GetOldestEventLogRecord(NULL, &oldest); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); ok(oldest == 0xdeadbeef, "Expected oldest to stay unchanged\n");
handle = OpenEventLogA(NULL, "Application"); @@ -284,16 +284,16 @@ static void test_oldest(void) win_skip( "Can't open event log\n" ); return; } - ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); + ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetOldestEventLogRecord(handle, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
oldest = 0xdeadbeef; ret = GetOldestEventLogRecord(handle, &oldest); - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); ok(oldest != 0xdeadbeef, "Expected the number of the oldest record\n");
CloseEventLog(handle); @@ -310,7 +310,7 @@ static void test_oldest(void) ret = GetOldestEventLogRecord(handle, &oldest); todo_wine { - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); ok(oldest != 0xdeadbeef, "Expected the number of the oldest record\n"); }
@@ -329,7 +329,7 @@ static void test_backup(void) SetLastError(0xdeadbeef); ret = BackupEventLogA(NULL, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = BackupEventLogA(NULL, backup); @@ -342,12 +342,12 @@ static void test_backup(void) win_skip( "Can't open event log\n" ); return; } - ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); + ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = BackupEventLogA(handle, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ret = BackupEventLogA(handle, backup); if (!ret && GetLastError() == ERROR_PRIVILEGE_NOT_HELD) @@ -356,7 +356,7 @@ static void test_backup(void) CloseEventLog(handle); return; } - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); todo_wine ok(GetFileAttributesA(backup) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n");
@@ -366,7 +366,7 @@ static void test_backup(void) todo_wine { ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "Expected ERROR_ALREADY_EXISTS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "Expected ERROR_ALREADY_EXISTS, got %ld\n", GetLastError()); }
CloseEventLog(handle); @@ -379,7 +379,7 @@ static void test_backup(void) ret = BackupEventLogA(handle, backup2); todo_wine { - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); ok(GetFileAttributesA(backup2) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n"); }
@@ -399,7 +399,7 @@ static void test_read(void) ret = ReadEventLogA(NULL, 0, 0, NULL, 0, NULL, NULL); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
read = 0xdeadbeef; SetLastError(0xdeadbeef); @@ -407,7 +407,7 @@ static void test_read(void) ok(!ret, "Expected failure\n"); ok(read == 0xdeadbeef, "Expected 'read' parameter to remain unchanged\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
needed = 0xdeadbeef; SetLastError(0xdeadbeef); @@ -415,26 +415,26 @@ static void test_read(void) ok(!ret, "Expected failure\n"); ok(needed == 0xdeadbeef, "Expected 'needed' parameter to remain unchanged\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* 'read' and 'needed' are only filled when the needed buffer size is passed back or when the call succeeds */ SetLastError(0xdeadbeef); ret = ReadEventLogA(NULL, 0, 0, NULL, 0, &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, NULL, 0, NULL, NULL); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, NULL, 0, &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
buf = NULL; SetLastError(0xdeadbeef); @@ -442,7 +442,7 @@ static void test_read(void) 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); SetLastError(0xdeadbeef); @@ -450,7 +450,7 @@ static void test_read(void) 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, buf);
handle = OpenEventLogA(NULL, "Application"); @@ -459,7 +459,7 @@ static void test_read(void) win_skip( "Can't open event log\n" ); return; } - ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); + ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
/* Show that we need the proper dwFlags with a (for the rest) proper call */ buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); @@ -468,40 +468,40 @@ static void test_read(void) ret = ReadEventLogA(handle, 0, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ | EVENTLOG_BACKWARDS_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ | EVENTLOG_FORWARDS_READ | EVENTLOG_BACKWARDS_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ | EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); ok(!ret, "Expected failure\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, buf);
@@ -524,7 +524,7 @@ static void test_read(void) ok(!ret, "Expected failure\n"); ok(read == 0, "Expected no bytes read\n"); ok(needed > sizeof(EVENTLOGRECORD), "Expected the needed buffersize to be bigger than sizeof(EVENTLOGRECORD)\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* Read the first record */ toread = needed; @@ -532,7 +532,7 @@ static void test_read(void) read = needed = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, toread, &read, &needed); - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); ok(read == toread || broken(read < toread), /* NT4 wants a buffer size way bigger than just 1 record */ "Expected the requested size to be read\n"); @@ -552,7 +552,7 @@ static void test_openbackup(void) SetLastError(0xdeadbeef); handle = OpenBackupEventLogA(NULL, NULL); ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); handle = OpenBackupEventLogA(NULL, "idontexist.evt"); @@ -560,19 +560,19 @@ static void test_openbackup(void) ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE, - "got %d\n", GetLastError()); + "got %ld\n", GetLastError());
SetLastError(0xdeadbeef); handle = OpenBackupEventLogA("IDontExist", NULL); ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); handle = OpenBackupEventLogA("IDontExist", "idontexist.evt"); ok(handle == NULL, "Didn't expect a handle\n"); ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */ - "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError()); + "Expected RPC_S_SERVER_UNAVAILABLE, got %ld\n", GetLastError());
/* Make a backup eventlog to work with */ if (create_backup(backup)) @@ -589,7 +589,7 @@ static void test_openbackup(void) ok(handle == NULL, "Didn't expect a handle\n"); ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */ - "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError()); + "Expected RPC_S_SERVER_UNAVAILABLE, got %ld\n", GetLastError());
/* Empty servername should be read as local server */ handle = OpenBackupEventLogA("", backup); @@ -619,7 +619,7 @@ static void test_openbackup(void) GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT, /* Vista and Win7 */ - "got %d\n", GetLastError()); + "got %ld\n", GetLastError()); CloseEventLog(handle); DeleteFileA(backup);
@@ -632,7 +632,7 @@ static void test_openbackup(void) ok(GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT || GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE, - "got %d\n", GetLastError()); + "got %ld\n", GetLastError()); CloseEventLog(handle); DeleteFileA(backup); } @@ -647,7 +647,7 @@ static void test_clear(void) SetLastError(0xdeadbeef); ret = ClearEventLogA(NULL, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
/* Make a backup eventlog to work with */ if (!create_backup(backup)) @@ -656,7 +656,7 @@ static void test_clear(void) SetLastError(0xdeadbeef); ret = ClearEventLogA(NULL, backup); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
handle = OpenBackupEventLogA(NULL, backup); todo_wine @@ -671,19 +671,19 @@ static void test_clear(void) */ ok(GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_ACCESS_DENIED, /* Vista+ */ - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
/* Show that ClearEventLog only works for real eventlogs. */ SetLastError(0xdeadbeef); ret = ClearEventLogA(handle, backup2); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); ok(GetFileAttributesA(backup2) == INVALID_FILE_ATTRIBUTES, "Expected no backup file\n");
SetLastError(0xdeadbeef); ret = ClearEventLogA(handle, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
CloseEventLog(handle); todo_wine @@ -832,7 +832,7 @@ static void test_readwrite(void) { win_skip("Win7 fails when using incorrect event types\n"); ret = ReportEventA(handle, 0, 0, 0, NULL, 0, 0, NULL, NULL); - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); } else { @@ -840,7 +840,7 @@ static void test_readwrite(void) DWORD read, needed = 0; EVENTLOGRECORD *record;
- ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError());
/* Needed to catch earlier Vista (with no ServicePack for example) */ buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); @@ -891,22 +891,22 @@ static void test_readwrite(void) ret = ReportEventA(handle, read_write[i].evt_type, read_write[i].evt_cat, read_write[i].evt_id, run_sidtests ? user : NULL, read_write[i].evt_numstrings, 0, read_write[i].evt_strings, NULL); - ok(ret, "Expected ReportEvent success : %d\n", GetLastError()); + ok(ret, "Expected ReportEvent success : %ld\n", GetLastError());
count = 0xdeadbeef; SetLastError(0xdeadbeef); ret = GetNumberOfEventLogRecords(handle, &count); - ok(ret, "Expected GetNumberOfEventLogRecords success : %d\n", GetLastError()); + ok(ret, "Expected GetNumberOfEventLogRecords success : %ld\n", GetLastError()); todo_wine - ok(count == (i + 1), "Expected %d records, got %d\n", i + 1, count); + ok(count == (i + 1), "Expected %ld records, got %ld\n", i + 1, count);
oldest = 0xdeadbeef; ret = GetOldestEventLogRecord(handle, &oldest); - ok(ret, "Expected GetOldestEventLogRecord success : %d\n", GetLastError()); + ok(ret, "Expected GetOldestEventLogRecord success : %ld\n", GetLastError()); todo_wine ok(oldest == 1 || (oldest > 1 && oldest != 0xdeadbeef), /* Vista SP1+, W2K8 and Win7 */ - "Expected oldest to be 1 or higher, got %d\n", oldest); + "Expected oldest to be 1 or higher, got %ld\n", oldest); if (oldest > 1 && oldest != 0xdeadbeef) on_vista = TRUE;
@@ -915,15 +915,15 @@ static void test_readwrite(void) ret = CloseEventLog(handle); else ret = DeregisterEventSource(handle); - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); }
handle = OpenEventLogA(NULL, eventlogname); count = 0xdeadbeef; ret = GetNumberOfEventLogRecords(handle, &count); - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError()); todo_wine - ok(count == i, "Expected %d records, got %d\n", i, count); + ok(count == i, "Expected %ld records, got %ld\n", i, count); CloseEventLog(handle);
if (count == 0) @@ -954,7 +954,7 @@ static void test_readwrite(void)
/* Read all events from our created eventlog, one by one */ handle = OpenEventLogA(NULL, eventlogname); - ok(handle != NULL, "Failed to open Event Log, got %d\n", GetLastError()); + ok(handle != NULL, "Failed to open Event Log, got %ld\n", GetLastError()); i = 0; for (;;) { @@ -974,26 +974,26 @@ static void test_readwrite(void) if (!ret && GetLastError() != ERROR_INSUFFICIENT_BUFFER) { HeapFree(GetProcessHeap(), 0, buf); - ok(GetLastError() == ERROR_HANDLE_EOF, "record %d, got %d\n", i, GetLastError()); + ok(GetLastError() == ERROR_HANDLE_EOF, "record %ld, got %ld\n", i, GetLastError()); break; }
buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed); ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, needed, &read, &needed); - ok(ret, "Expected success: %d\n", GetLastError()); + ok(ret, "Expected success: %ld\n", GetLastError());
record = (EVENTLOGRECORD *)buf;
ok(record->Length == read, - "Expected %d, got %d\n", read, record->Length); + "Expected %ld, got %ld\n", read, record->Length); ok(record->Reserved == 0x654c664c, - "Expected 0x654c664c, got %d\n", record->Reserved); + "Expected 0x654c664c, got %ld\n", record->Reserved); ok(record->RecordNumber == i + 1 || (on_vista && (record->RecordNumber > i + 1)), - "Expected %d or higher, got %d\n", i + 1, record->RecordNumber); + "Expected %ld or higher, got %ld\n", i + 1, record->RecordNumber); ok(record->EventID == read_write[i].evt_id, - "Expected %d, got %d\n", read_write[i].evt_id, record->EventID); + "Expected %ld, got %ld\n", read_write[i].evt_id, record->EventID); ok(record->EventType == read_write[i].evt_type, "Expected %d, got %d\n", read_write[i].evt_type, record->EventType); ok(record->NumStrings == read_write[i].evt_numstrings, @@ -1028,15 +1028,15 @@ static void test_readwrite(void)
if (run_sidtests) { - ok(record->UserSidLength == sidsize, "Expected %d, got %d\n", sidsize, record->UserSidLength); + ok(record->UserSidLength == sidsize, "Expected %ld, got %ld\n", sidsize, record->UserSidLength); } else { ok(record->StringOffset == record->UserSidOffset, "Expected offsets to be the same\n"); - ok(record->UserSidLength == 0, "Expected 0, got %d\n", record->UserSidLength); + ok(record->UserSidLength == 0, "Expected 0, got %ld\n", record->UserSidLength); }
- ok(record->DataLength == 0, "Expected 0, got %d\n", record->DataLength); + ok(record->DataLength == 0, "Expected 0, got %ld\n", record->DataLength);
ptr = (char *)((BYTE *)buf + record->StringOffset); for (k = 0; k < record->NumStrings; k++) @@ -1055,16 +1055,16 @@ static void test_readwrite(void)
/* Test clearing a real eventlog */ handle = OpenEventLogA(NULL, eventlogname); - ok(handle != NULL, "Failed to open Event Log, got %d\n", GetLastError()); + ok(handle != NULL, "Failed to open Event Log, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ClearEventLogA(handle, NULL); - ok(ret, "Expected success : %d\n", GetLastError()); + ok(ret, "Expected success : %ld\n", GetLastError());
count = 0xdeadbeef; ret = GetNumberOfEventLogRecords(handle, &count); - ok(ret, "Expected success : %d\n", GetLastError()); - ok(count == 0, "Expected an empty eventlog, got %d records\n", count); + ok(ret, "Expected success : %ld\n", GetLastError()); + ok(count == 0, "Expected an empty eventlog, got %ld records\n", count);
CloseEventLog(handle);
@@ -1111,7 +1111,7 @@ static void test_autocreation(void) { char sources_verify[sizeof(eventsources)];
- ok(type == REG_MULTI_SZ, "Expected a REG_MULTI_SZ, got %d\n", type); + ok(type == REG_MULTI_SZ, "Expected a REG_MULTI_SZ, got %ld\n", type);
/* Build the expected string */ memset(sources_verify, 0, sizeof(sources_verify)); @@ -1124,7 +1124,7 @@ static void test_autocreation(void) lstrcpyA(p, eventlogname);
ok(!memcmp(sources, sources_verify, size), - "Expected a correct 'Sources' value (size : %d)\n", size); + "Expected a correct 'Sources' value (size : %ld)\n", size); }
RegCloseKey(eventkey); @@ -1179,13 +1179,13 @@ static void cleanup_eventlog(void) RegDeleteValueA(key, "Sources"); RegCloseKey(key); lret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, winesvc); - ok(lret == ERROR_SUCCESS, "Could not delete the registry tree : %d\n", lret); + ok(lret == ERROR_SUCCESS, "Could not delete the registry tree : %ld\n", lret);
/* A handle to the eventlog is locked by services.exe. We can only * delete the eventlog file after reboot. */ bret = MoveFileExA(eventlogfile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT); - ok(bret, "Expected MoveFileEx to succeed: %d\n", GetLastError()); + ok(bret, "Expected MoveFileEx to succeed: %ld\n", GetLastError()); }
static void test_trace_event_params(void) @@ -1203,25 +1203,25 @@ static void test_trace_event_params(void) }
uret = pEventRegister(NULL, NULL, NULL, ®_handle); - todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventRegister gave wrong error: %#x\n", uret); + todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventRegister gave wrong error: %#lx\n", uret);
uret = pEventRegister(&test_guid, NULL, NULL, NULL); - ok(uret == ERROR_INVALID_PARAMETER, "EventRegister gave wrong error: %#x\n", uret); + ok(uret == ERROR_INVALID_PARAMETER, "EventRegister gave wrong error: %#lx\n", uret);
uret = pEventRegister(&test_guid, NULL, NULL, ®_handle); - ok(uret == ERROR_SUCCESS, "EventRegister gave wrong error: %#x\n", uret); + ok(uret == ERROR_SUCCESS, "EventRegister gave wrong error: %#lx\n", uret);
uret = pEventWriteString(0, 0, 0, emptyW); - todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventWriteString gave wrong error: %#x\n", uret); + todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventWriteString gave wrong error: %#lx\n", uret);
uret = pEventWriteString(reg_handle, 0, 0, NULL); - todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventWriteString gave wrong error: %#x\n", uret); + todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventWriteString gave wrong error: %#lx\n", uret);
uret = pEventUnregister(0); - todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventUnregister gave wrong error: %#x\n", uret); + todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventUnregister gave wrong error: %#lx\n", uret);
uret = pEventUnregister(reg_handle); - ok(uret == ERROR_SUCCESS, "EventUnregister gave wrong error: %#x\n", uret); + ok(uret == ERROR_SUCCESS, "EventUnregister gave wrong error: %#lx\n", uret); }
static void test_start_trace(void) @@ -1248,37 +1248,37 @@ static void test_start_trace(void) todo_wine ok(ret == ERROR_BAD_LENGTH || ret == ERROR_INVALID_PARAMETER, /* XP and 2k3 */ - "Expected ERROR_BAD_LENGTH, got %d\n", ret); + "Expected ERROR_BAD_LENGTH, got %ld\n", ret); properties->Wnode.BufferSize = buffersize;
ret = StartTraceA(&handle, "this name is too long", properties); todo_wine - ok(ret == ERROR_BAD_LENGTH, "Expected ERROR_BAD_LENGTH, got %d\n", ret); + ok(ret == ERROR_BAD_LENGTH, "Expected ERROR_BAD_LENGTH, got %ld\n", ret);
ret = StartTraceA(&handle, sessionname, NULL); todo_wine - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ret = StartTraceA(NULL, sessionname, properties); todo_wine - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
properties->LogFileNameOffset = 1; ret = StartTraceA(&handle, sessionname, properties); todo_wine - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret); properties->LogFileNameOffset = sizeof(EVENT_TRACE_PROPERTIES) + sizeof(sessionname);
properties->LoggerNameOffset = 1; ret = StartTraceA(&handle, sessionname, properties); todo_wine - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret); properties->LoggerNameOffset = sizeof(EVENT_TRACE_PROPERTIES);
properties->LogFileMode = EVENT_TRACE_FILE_MODE_SEQUENTIAL | EVENT_TRACE_FILE_MODE_CIRCULAR; ret = StartTraceA(&handle, sessionname, properties); todo_wine - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret); properties->LogFileMode = EVENT_TRACE_FILE_MODE_NONE; /* XP creates a file we can't delete, so change the filepath to something else */ strcpy((char *)properties + properties->LogFileNameOffset, filepath2); @@ -1286,13 +1286,13 @@ static void test_start_trace(void) properties->Wnode.Guid = SystemTraceControlGuid; ret = StartTraceA(&handle, sessionname, properties); todo_wine - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret); memset(&properties->Wnode.Guid, 0, sizeof(properties->Wnode.Guid));
properties->LogFileNameOffset = 0; ret = StartTraceA(&handle, sessionname, properties); todo_wine - ok(ret == ERROR_BAD_PATHNAME, "Expected ERROR_BAD_PATHNAME, got %d\n", ret); + ok(ret == ERROR_BAD_PATHNAME, "Expected ERROR_BAD_PATHNAME, got %ld\n", ret); properties->LogFileNameOffset = sizeof(EVENT_TRACE_PROPERTIES) + sizeof(sessionname);
ret = StartTraceA(&handle, sessionname, properties); @@ -1301,13 +1301,13 @@ static void test_start_trace(void) skip("need admin rights\n"); goto done; } - ok(ret == ERROR_SUCCESS, "Expected success, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected success, got %ld\n", ret);
ret = StartTraceA(&handle, sessionname, properties); todo_wine ok(ret == ERROR_ALREADY_EXISTS || ret == ERROR_SHARING_VIOLATION, /* 2k3 */ - "Expected ERROR_ALREADY_EXISTS, got %d\n", ret); + "Expected ERROR_ALREADY_EXISTS, got %ld\n", ret);
/* clean up */ ControlTraceA(handle, sessionname, properties, EVENT_TRACE_CONTROL_STOP); diff --git a/dlls/advapi32/tests/lsa.c b/dlls/advapi32/tests/lsa.c index f8c822a7de2..5c00298d41e 100644 --- a/dlls/advapi32/tests/lsa.c +++ b/dlls/advapi32/tests/lsa.c @@ -52,13 +52,13 @@ static void test_lsa(void)
status = LsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle); ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED, - "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status); + "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx\n", status);
/* try a more restricted access mask if necessary */ if (status == STATUS_ACCESS_DENIED) { trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES\n"); status = LsaOpenPolicy( NULL, &object_attributes, POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES, &handle); - ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES) returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES) returned 0x%08lx\n", status); }
if (status == STATUS_SUCCESS) { @@ -73,12 +73,12 @@ static void test_lsa(void) if (status == STATUS_ACCESS_DENIED) skip("Not enough rights to retrieve PolicyAuditEventsInformation\n"); else - ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAuditEventsInformation) failed, returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAuditEventsInformation) failed, returned 0x%08lx\n", status); if (status == STATUS_SUCCESS) LsaFreeMemory(audit_events_info);
status = LsaQueryInformationPolicy(handle, PolicyPrimaryDomainInformation, (void **)&primary_domain_info); - ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyPrimaryDomainInformation) failed, returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyPrimaryDomainInformation) failed, returned 0x%08lx\n", status); if (status == STATUS_SUCCESS) { if (primary_domain_info->Sid) { LPSTR strsid; @@ -105,14 +105,14 @@ static void test_lsa(void) }
status = LsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (void **)&account_domain_info); - ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) failed, returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) failed, returned 0x%08lx\n", status); if (status == STATUS_SUCCESS) LsaFreeMemory(account_domain_info);
/* This isn't supported in NT4 */ status = LsaQueryInformationPolicy(handle, PolicyDnsDomainInformation, (void **)&dns_domain_info); ok(status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER, - "LsaQueryInformationPolicy(PolicyDnsDomainInformation) failed, returned 0x%08x\n", status); + "LsaQueryInformationPolicy(PolicyDnsDomainInformation) failed, returned 0x%08lx\n", status); if (status == STATUS_SUCCESS) { if (dns_domain_info->Sid || !IsEqualGUID(&dns_domain_info->DomainGuid, &GUID_NULL)) { LPSTR strsid = NULL; @@ -159,15 +159,15 @@ static void test_lsa(void)
/* We need a valid SID to pass to LsaEnumerateAccountRights */ ret = OpenProcessToken( GetCurrentProcess(), TOKEN_QUERY, &token ); - ok(ret, "Unable to obtain process token, error %u\n", GetLastError( )); + ok(ret, "Unable to obtain process token, error %lu\n", GetLastError( )); if (ret) { char buffer[64]; DWORD len; TOKEN_USER *token_user = (TOKEN_USER *) buffer; ret = GetTokenInformation( token, TokenUser, (LPVOID) token_user, sizeof(buffer), &len ); - ok(ret || GetLastError( ) == ERROR_INSUFFICIENT_BUFFER, "Unable to obtain token information, error %u\n", GetLastError( )); + ok(ret || GetLastError( ) == ERROR_INSUFFICIENT_BUFFER, "Unable to obtain token information, error %lu\n", GetLastError( )); if (! ret && GetLastError( ) == ERROR_INSUFFICIENT_BUFFER) { - trace("Resizing buffer to %u.\n", len); + trace("Resizing buffer to %lu.\n", len); token_user = LocalAlloc( 0, len ); if (token_user != NULL) ret = GetTokenInformation( token, TokenUser, (LPVOID) token_user, len, &len ); @@ -179,7 +179,7 @@ static void test_lsa(void) rights = (PLSA_UNICODE_STRING) 0xdeadbeaf; rights_count = 0xcafecafe; status = LsaEnumerateAccountRights(handle, token_user->User.Sid, &rights, &rights_count); - ok(status == STATUS_SUCCESS || status == STATUS_OBJECT_NAME_NOT_FOUND, "Unexpected status 0x%x\n", status); + ok(status == STATUS_SUCCESS || status == STATUS_OBJECT_NAME_NOT_FOUND, "Unexpected status 0x%lx\n", status); if (status == STATUS_SUCCESS) LsaFreeMemory( rights ); else @@ -191,7 +191,7 @@ static void test_lsa(void) }
status = LsaClose(handle); - ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status); } }
@@ -208,7 +208,7 @@ static void get_sid_info(PSID psid, LPSTR *user, LPSTR *dom) user_size = dom_size = 257; account[0] = domain[0] = 0; ret = LookupAccountSidA(NULL, psid, account, &user_size, domain, &dom_size, &use); - ok(ret, "LookupAccountSidA failed %u\n", GetLastError()); + ok(ret, "LookupAccountSidA failed %lu\n", GetLastError()); }
static void test_LsaLookupNames2(void) @@ -236,14 +236,14 @@ static void test_LsaLookupNames2(void)
status = LsaOpenPolicy(NULL, &attrs, POLICY_ALL_ACCESS, &handle); ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED, - "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status); + "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx\n", status);
/* try a more restricted access mask if necessary */ if (status == STATUS_ACCESS_DENIED) { trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION\n"); status = LsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &handle); - ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08lx\n", status); } if (status != STATUS_SUCCESS) { @@ -267,10 +267,10 @@ static void test_LsaLookupNames2(void) sids = NULL; domains = NULL; status = LsaLookupNames2(handle, 0, 1, &name[0], &domains, &sids); - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %lx)\n", status); ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); - ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); - ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + ok(sids[0].Flags == 0, "expected 0, got 0x%08lx\n", sids[0].Flags); + ok(domains->Entries == 1, "expected 1, got %lu\n", domains->Entries); get_sid_info(sids[0].Sid, &account, &sid_dom); ok(!strcmp(account, "LOCAL SERVICE"), "expected "LOCAL SERVICE", got "%s"\n", account); ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected "NT AUTHORITY", got "%s"\n", sid_dom); @@ -281,10 +281,10 @@ static void test_LsaLookupNames2(void) sids = NULL; domains = NULL; status = LsaLookupNames2(handle, 0, 1, &name[1], &domains, &sids); - ok(status == STATUS_NONE_MAPPED, "expected STATUS_NONE_MAPPED, got %x)\n", status); + ok(status == STATUS_NONE_MAPPED, "expected STATUS_NONE_MAPPED, got %lx)\n", status); ok(sids[0].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[0].Use); - ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); - ok(domains->Entries == 0, "expected 0, got %u\n", domains->Entries); + ok(sids[0].Flags == 0, "expected 0, got 0x%08lx\n", sids[0].Flags); + ok(domains->Entries == 0, "expected 0, got %lu\n", domains->Entries); LsaFreeMemory(sids); LsaFreeMemory(domains);
@@ -292,10 +292,10 @@ static void test_LsaLookupNames2(void) sids = NULL; domains = NULL; status = LsaLookupNames2(handle, 0, 1, &name[2], &domains, &sids); - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %lx)\n", status); ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); - ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); - ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + ok(sids[0].Flags == 0, "expected 0, got 0x%08lx\n", sids[0].Flags); + ok(domains->Entries == 1, "expected 1, got %lu\n", domains->Entries); get_sid_info(sids[0].Sid, &account, &sid_dom); ok(!strcmp(account, "LOCAL SERVICE"), "expected "LOCAL SERVICE", got "%s"\n", account); ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected "NT AUTHORITY", got "%s"\n", sid_dom); @@ -306,12 +306,12 @@ static void test_LsaLookupNames2(void) sids = NULL; domains = NULL; status = LsaLookupNames2(handle, 0, 3, name, &domains, &sids); - ok(status == STATUS_SOME_NOT_MAPPED, "expected STATUS_SOME_NOT_MAPPED, got %x)\n", status); + ok(status == STATUS_SOME_NOT_MAPPED, "expected STATUS_SOME_NOT_MAPPED, got %lx)\n", status); ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); ok(sids[1].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[1].Use); ok(sids[2].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[2].Use); - ok(sids[0].DomainIndex == 0, "expected 0, got %u\n", sids[0].DomainIndex); - ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + ok(sids[0].DomainIndex == 0, "expected 0, got %lu\n", sids[0].DomainIndex); + ok(domains->Entries == 1, "expected 1, got %lu\n", domains->Entries); LsaFreeMemory(sids); LsaFreeMemory(domains);
@@ -320,15 +320,15 @@ static void test_LsaLookupNames2(void) HeapFree(GetProcessHeap(), 0, name[2].Buffer);
status = LsaClose(handle); - ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status); }
static void check_unicode_string_(int line, const LSA_UNICODE_STRING *string, const WCHAR *expect) { ok_(__FILE__, line)(string->Length == wcslen(string->Buffer) * sizeof(WCHAR), - "expected %u, got %u\n", wcslen(string->Buffer) * sizeof(WCHAR), string->Length); + "expected %Iu, got %u\n", wcslen(string->Buffer) * sizeof(WCHAR), string->Length); ok_(__FILE__, line)(string->MaximumLength == string->Length + sizeof(WCHAR), - "expected %u, got %u\n", string->Length + sizeof(WCHAR), string->MaximumLength); + "expected %Iu, got %u\n", string->Length + sizeof(WCHAR), string->MaximumLength); ok_(__FILE__, line)(!wcsicmp(string->Buffer, expect), "expected %s, got %s\n", debugstr_w(expect), debugstr_w(string->Buffer)); } @@ -351,30 +351,30 @@ static void test_LsaLookupSids(void) PSID sid;
status = LsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &policy); - ok(status == STATUS_SUCCESS, "got 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "got 0x%08lx\n", status);
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &token); - ok(ret, "OpenProcessToken() failed, error %u\n", GetLastError()); + ok(ret, "OpenProcessToken() failed, error %lu\n", GetLastError());
ret = GetTokenInformation(token, TokenUser, user, sizeof(user_buffer), &size); - ok(ret, "GetTokenInformation() failed, error %u\n", GetLastError()); + ok(ret, "GetTokenInformation() failed, error %lu\n", GetLastError());
size = ARRAY_SIZE(computer_name); ret = GetComputerNameW(computer_name, &size); - ok(ret, "GetComputerName() failed, error %u\n", GetLastError()); + ok(ret, "GetComputerName() failed, error %lu\n", GetLastError());
size = ARRAY_SIZE(user_name); ret = GetUserNameW(user_name, &size); - ok(ret, "GetUserName() failed, error %u\n", GetLastError()); + ok(ret, "GetUserName() failed, error %lu\n", GetLastError());
status = LsaLookupSids(policy, 1, &user->User.Sid, &list, &names); - ok(status == STATUS_SUCCESS, "got 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "got 0x%08lx\n", status);
- ok(list->Entries == 1, "got %d\n", list->Entries); + ok(list->Entries == 1, "got %ld\n", list->Entries); check_unicode_string(&list->Domains[0].Name, computer_name);
ok(names[0].Use == SidTypeUser, "got type %u\n", names[0].Use); - ok(!names[0].DomainIndex, "got index %u\n", names[0].DomainIndex); + ok(!names[0].DomainIndex, "got index %lu\n", names[0].DomainIndex); check_unicode_string(&names[0].Name, user_name);
LsaFreeMemory(names); @@ -382,16 +382,16 @@ static void test_LsaLookupSids(void) CloseHandle(token);
ret = ConvertStringSidToSidA("S-1-1-0", &sid); - ok(ret, "ConvertStringSidToSidA() failed, error %u\n", GetLastError()); + ok(ret, "ConvertStringSidToSidA() failed, error %lu\n", GetLastError());
status = LsaLookupSids(policy, 1, &sid, &list, &names); - ok(status == STATUS_SUCCESS, "got 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "got 0x%08lx\n", status);
- ok(list->Entries == 1, "got %d\n", list->Entries); + ok(list->Entries == 1, "got %ld\n", list->Entries); check_unicode_string(&list->Domains[0].Name, L"");
ok(names[0].Use == SidTypeWellKnownGroup, "got type %u\n", names[0].Use); - ok(!names[0].DomainIndex, "got index %u\n", names[0].DomainIndex); + ok(!names[0].DomainIndex, "got index %lu\n", names[0].DomainIndex);
/* The group name gets translated... but not in all locales */ size = ARRAY_SIZE(langW); @@ -413,15 +413,15 @@ static void test_LsaLookupSids(void) FreeSid(sid);
ret = ConvertStringSidToSidA("S-1-1234-5678-1234-5678", &sid); - ok(ret, "ConvertStringSidToSidA() failed, error %u\n", GetLastError()); + ok(ret, "ConvertStringSidToSidA() failed, error %lu\n", GetLastError());
status = LsaLookupSids(policy, 1, &sid, &list, &names); - ok(status == STATUS_NONE_MAPPED, "got 0x%08x\n", status); + ok(status == STATUS_NONE_MAPPED, "got 0x%08lx\n", status);
- ok(!list->Entries, "got %d\n", list->Entries); + ok(!list->Entries, "got %ld\n", list->Entries);
ok(names[0].Use == SidTypeUnknown, "got type %u\n", names[0].Use); - ok(names[0].DomainIndex == -1, "got index %u\n", names[0].DomainIndex); + ok(names[0].DomainIndex == -1, "got index %lu\n", names[0].DomainIndex); check_unicode_string(&names[0].Name, L"S-1-1234-5678-1234-5678");
LsaFreeMemory(names); @@ -429,7 +429,7 @@ static void test_LsaLookupSids(void) FreeSid(sid);
status = LsaClose(policy); - ok(status == STATUS_SUCCESS, "got 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "got 0x%08lx\n", status); }
static void test_LsaLookupPrivilegeName(void) @@ -444,24 +444,24 @@ static void test_LsaLookupPrivilegeName(void) attrs.Length = sizeof(attrs);
status = LsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &policy); - ok(status == STATUS_SUCCESS, "Failed to open policy, %#x.\n", status); + ok(status == STATUS_SUCCESS, "Failed to open policy, %#lx.\n", status);
name = (void *)0xdeadbeef; status = LsaLookupPrivilegeName(policy, NULL, &name); - ok(status != STATUS_SUCCESS, "Unexpected status %#x.\n", status); + ok(status != STATUS_SUCCESS, "Unexpected status %#lx.\n", status); ok(name == (void *)0xdeadbeef, "Unexpected name pointer.\n");
name = (void *)0xdeadbeef; luid.HighPart = 1; luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE; status = LsaLookupPrivilegeName(policy, &luid, &name); - ok(status == STATUS_NO_SUCH_PRIVILEGE, "Unexpected status %#x.\n", status); + ok(status == STATUS_NO_SUCH_PRIVILEGE, "Unexpected status %#lx.\n", status); ok(name == NULL, "Unexpected name pointer.\n");
luid.HighPart = 0; luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE; status = LsaLookupPrivilegeName(policy, &luid, &name); - ok(status == 0, "got %#x.\n", status); + ok(status == 0, "got %#lx.\n", status); LsaFreeMemory(name); }
@@ -481,11 +481,11 @@ static void test_LsaGetUserName(void)
size = ARRAY_SIZE(user); ret = GetUserNameW(user, &size); - ok(ret, "GetUserName error %u\n", GetLastError()); + ok(ret, "GetUserName error %lu\n", GetLastError());
size = ARRAY_SIZE(computer); ret = GetComputerNameW(computer, &size); - ok(ret, "GetComputerName error %u\n", GetLastError()); + ok(ret, "GetComputerName error %lu\n", GetLastError());
if (0) /* crashes under Windows */ status = pLsaGetUserName(NULL, NULL); @@ -494,12 +494,12 @@ static void test_LsaGetUserName(void) status = pLsaGetUserName(NULL, &lsa_domain);
status = pLsaGetUserName(&lsa_user, NULL); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); check_unicode_string(lsa_user, user); LsaFreeMemory(lsa_user);
status = pLsaGetUserName(&lsa_user, &lsa_domain); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(!lstrcmpW(user, lsa_user->Buffer), "%s != %s\n", wine_dbgstr_w(user), wine_dbgstr_wn(lsa_user->Buffer, lsa_user->Length/sizeof(WCHAR))); check_unicode_string(lsa_user, user); check_unicode_string(lsa_domain, computer); diff --git a/dlls/advapi32/tests/perf.c b/dlls/advapi32/tests/perf.c index a0862e65ea4..fc07a09d327 100644 --- a/dlls/advapi32/tests/perf.c +++ b/dlls/advapi32/tests/perf.c @@ -64,26 +64,26 @@ void test_provider_init(void)
prov = (HANDLE)0xdeadbeef; ret = PerfStartProvider(NULL, test_provider_callback, &prov); - ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %u.\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %lu.\n", ret); ok(prov == (HANDLE)0xdeadbeef, "Got unexpected prov %p.\n", prov);
prov = (HANDLE)0xdeadbeef; ret = PerfStartProvider(&test_guid, test_provider_callback, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %u.\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %lu.\n", ret); ok(prov == (HANDLE)0xdeadbeef, "Got unexpected prov %p.\n", prov);
prov = (HANDLE)0xdeadbeef; ret = PerfStartProvider(&test_guid, test_provider_callback, &prov); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret); ok(prov != (HANDLE)0xdeadbeef, "Provider handle is not set.\n");
prov2 = prov; ret = PerfStartProvider(&test_guid, test_provider_callback, &prov2); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret); ok(prov2 != prov, "Got the same provider handle.\n");
ret = PerfStopProvider(prov2); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret);
if (0) { @@ -93,7 +93,7 @@ void test_provider_init(void)
/* Provider handle is a pointer and not a kernel object handle. */ bret = DuplicateHandle(GetCurrentProcess(), prov, GetCurrentProcess(), &prov2, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(!bret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected bret %d, err %u.\n", bret, GetLastError()); + ok(!bret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected bret %d, err %lu.\n", bret, GetLastError()); bret = IsBadWritePtr(prov, 8); ok(!bret, "Handle does not point to the data.\n");
@@ -102,14 +102,14 @@ void test_provider_init(void) pc_template.counterset.NumCounters = 0; pc_template.counterset.InstanceType = PERF_COUNTERSET_SINGLE_INSTANCE; ret = PerfSetCounterSetInfo(prov, &pc_template.counterset, sizeof(pc_template.counterset)); - ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %u.\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %lu.\n", ret);
pc_template.counterset.CounterSetGuid = test_set_guid; pc_template.counterset.ProviderGuid = test_guid; pc_template.counterset.NumCounters = 2; pc_template.counterset.InstanceType = PERF_COUNTERSET_SINGLE_INSTANCE; ret = PerfSetCounterSetInfo(prov, &pc_template.counterset, sizeof(pc_template)); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret);
pc_template.counterset.CounterSetGuid = test_set_guid2; /* Looks like ProviderGuid doesn't need to match provider. */ @@ -117,50 +117,50 @@ void test_provider_init(void) pc_template.counterset.NumCounters = 1; pc_template.counterset.InstanceType = PERF_COUNTERSET_SINGLE_INSTANCE; ret = PerfSetCounterSetInfo(prov, &pc_template.counterset, sizeof(pc_template)); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret);
ret = PerfSetCounterSetInfo(prov, &pc_template.counterset, sizeof(pc_template)); - ok(ret == ERROR_ALREADY_EXISTS, "Got unexpected ret %u.\n", ret); + ok(ret == ERROR_ALREADY_EXISTS, "Got unexpected ret %lu.\n", ret);
SetLastError(0xdeadbeef); instance = PerfCreateInstance(prov, NULL, L"1", 1); ok(!instance, "Got unexpected instance %p.\n", instance); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %lu.\n", GetLastError());
SetLastError(0xdeadbeef); instance = PerfCreateInstance(prov, &test_guid, L"1", 1); ok(!instance, "Got unexpected instance %p.\n", instance); - ok(GetLastError() == ERROR_NOT_FOUND, "Got unexpected error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_FOUND, "Got unexpected error %lu.\n", GetLastError());
SetLastError(0xdeadbeef); instance = PerfCreateInstance(prov, &test_guid, NULL, 1); ok(!instance, "Got unexpected instance %p.\n", instance); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %lu.\n", GetLastError());
SetLastError(0xdeadbeef); instance = PerfCreateInstance(prov, &test_set_guid, L"11", 1); ok(!!instance, "Got NULL instance.\n"); - ok(GetLastError() == 0xdeadbeef, "Got unexpected error %u.\n", GetLastError()); - ok(instance->InstanceId == 1, "Got unexpected InstanceId %u.\n", instance->InstanceId); - ok(instance->InstanceNameSize == 6, "Got unexpected InstanceNameSize %u.\n", instance->InstanceNameSize); + ok(GetLastError() == 0xdeadbeef, "Got unexpected error %lu.\n", GetLastError()); + ok(instance->InstanceId == 1, "Got unexpected InstanceId %lu.\n", instance->InstanceId); + ok(instance->InstanceNameSize == 6, "Got unexpected InstanceNameSize %lu.\n", instance->InstanceNameSize); ok(IsEqualGUID(&instance->CounterSetGuid, &test_set_guid), "Got unexpected guid %s.\n", debugstr_guid(&instance->CounterSetGuid));
ok(instance->InstanceNameOffset == sizeof(*instance) + sizeof(UINT64) * 2, - "Got unexpected InstanceNameOffset %u.\n", instance->InstanceNameOffset); + "Got unexpected InstanceNameOffset %lu.\n", instance->InstanceNameOffset); ok(!lstrcmpW((WCHAR *)((BYTE *)instance + instance->InstanceNameOffset), L"11"), "Got unexpected instance name %s.\n", debugstr_w((WCHAR *)((BYTE *)instance + instance->InstanceNameOffset))); size = ((sizeof(*instance) + sizeof(UINT64) * 2 + instance->InstanceNameSize) + 7) & ~7; - ok(size == instance->dwSize, "Got unexpected size %u, instance->dwSize %u.\n", size, instance->dwSize); + ok(size == instance->dwSize, "Got unexpected size %lu, instance->dwSize %lu.\n", size, instance->dwSize);
ret = PerfSetCounterRefValue(prov, instance, 1, &counter1); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret); ret = PerfSetCounterRefValue(prov, instance, 2, &counter2); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret);
ret = PerfSetCounterRefValue(prov, instance, 0, &counter2); - ok(ret == ERROR_NOT_FOUND, "Got unexpected ret %u.\n", ret); + ok(ret == ERROR_NOT_FOUND, "Got unexpected ret %lu.\n", ret);
ok(*(void **)(instance + 1) == &counter1, "Got unexpected counter value %p.\n", *(void **)(instance + 1)); @@ -168,24 +168,24 @@ void test_provider_init(void) "Got unexpected counter value %p.\n", *(void **)(instance + 1));
ret = PerfDeleteInstance(prov, instance); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret);
ret = PerfStopProvider(prov); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret);
memset( &prov_context, 0, sizeof(prov_context) ); prov = (HANDLE)0xdeadbeef; ret = PerfStartProviderEx( &test_guid, &prov_context, &prov ); - ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %u.\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %lu.\n", ret); ok(prov == (HANDLE)0xdeadbeef, "Got unexpected prov %p.\n", prov);
prov_context.ContextSize = sizeof(prov_context) + 1; ret = PerfStartProviderEx( &test_guid, &prov_context, &prov ); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret); ok(prov != (HANDLE)0xdeadbeef, "Provider handle is not set.\n");
ret = PerfStopProvider(prov); - ok(!ret, "Got unexpected ret %u.\n", ret); + ok(!ret, "Got unexpected ret %lu.\n", ret); }
START_TEST(perf) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index af4ed1e8465..6152a313803 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -134,7 +134,7 @@ static void setup_main_key(void) if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\Wine\Test", &hkey_main )) delete_key( hkey_main );
ret = RegCreateKeyA( HKEY_CURRENT_USER, "Software\Wine\Test", &hkey_main ); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); }
static void check_user_privs(void) @@ -143,7 +143,7 @@ static void check_user_privs(void) HKEY hkey = (HKEY)0xdeadbeef;
ret = RegOpenKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WRITE, &hkey); - ok(ret == ERROR_SUCCESS || ret == ERROR_ACCESS_DENIED, "expected success or access denied, got %i\n", ret); + ok(ret == ERROR_SUCCESS || ret == ERROR_ACCESS_DENIED, "expected success or access denied, got %li\n", ret); if (ret == ERROR_SUCCESS) { ok(hkey != NULL, "RegOpenKeyExA succeeded but returned NULL hkey\n"); @@ -174,32 +174,32 @@ static void _test_hkey_main_Value_A(int line, LPCSTR name, LPCSTR string, SetLastError(0xdeadbeef); ret = RegQueryValueExA(hkey_main, name, NULL, &type, NULL, &cbData); GLE = GetLastError(); - lok(ret == ERROR_SUCCESS, "RegQueryValueExA/1 failed: %d, GLE=%d\n", ret, GLE); + lok(ret == ERROR_SUCCESS, "RegQueryValueExA/1 failed: %ld, GLE=%ld\n", ret, GLE); /* It is wrong for the Ansi version to not be implemented */ - ok(GLE == 0xdeadbeef, "RegQueryValueExA set GLE = %u\n", GLE); + ok(GLE == 0xdeadbeef, "RegQueryValueExA set GLE = %lu\n", GLE); if(GLE == ERROR_CALL_NOT_IMPLEMENTED) return;
str_byte_len = (string ? lstrlenA(string) : 0) + 1; - lok(type == REG_SZ, "RegQueryValueExA/1 returned type %d\n", type); - lok(cbData == full_byte_len, "cbData=%d instead of %d or %d\n", cbData, full_byte_len, str_byte_len); + lok(type == REG_SZ, "RegQueryValueExA/1 returned type %ld\n", type); + lok(cbData == full_byte_len, "cbData=%ld instead of %ld or %ld\n", cbData, full_byte_len, str_byte_len);
value = HeapAlloc(GetProcessHeap(), 0, cbData+1); memset(value, 0xbd, cbData+1); type=0xdeadbeef; ret = RegQueryValueExA(hkey_main, name, NULL, &type, value, &cbData); GLE = GetLastError(); - lok(ret == ERROR_SUCCESS, "RegQueryValueExA/2 failed: %d, GLE=%d\n", ret, GLE); + lok(ret == ERROR_SUCCESS, "RegQueryValueExA/2 failed: %ld, GLE=%ld\n", ret, GLE); if (!string) { /* When cbData == 0, RegQueryValueExA() should not modify the buffer */ - lok(*value == 0xbd, "RegQueryValueExA overflowed: cbData=%u *value=%02x\n", cbData, *value); + lok(*value == 0xbd, "RegQueryValueExA overflowed: cbData=%lu *value=%02x\n", cbData, *value); } else { - lok(memcmp(value, string, cbData) == 0, "RegQueryValueExA/2 failed: %s/%d != %s/%d\n", + lok(memcmp(value, string, cbData) == 0, "RegQueryValueExA/2 failed: %s/%ld != %s/%ld\n", debugstr_an((char*)value, cbData), cbData, debugstr_an(string, full_byte_len), full_byte_len); - lok(*(value+cbData) == 0xbd, "RegQueryValueExA/2 overflowed at offset %u: %02x != bd\n", cbData, *(value+cbData)); + lok(*(value+cbData) == 0xbd, "RegQueryValueExA/2 overflowed at offset %lu: %02x != bd\n", cbData, *(value+cbData)); } HeapFree(GetProcessHeap(), 0, value); } @@ -219,16 +219,16 @@ static void _test_hkey_main_Value_W(int line, LPCWSTR name, LPCWSTR string, SetLastError(0xdeadbeef); ret = RegQueryValueExW(hkey_main, name, NULL, &type, NULL, &cbData); GLE = GetLastError(); - lok(ret == ERROR_SUCCESS, "RegQueryValueExW/1 failed: %d, GLE=%d\n", ret, GLE); + lok(ret == ERROR_SUCCESS, "RegQueryValueExW/1 failed: %ld, GLE=%ld\n", ret, GLE); if(GLE == ERROR_CALL_NOT_IMPLEMENTED) { win_skip("RegQueryValueExW() is not implemented\n"); return; }
- lok(type == REG_SZ, "RegQueryValueExW/1 returned type %d\n", type); + lok(type == REG_SZ, "RegQueryValueExW/1 returned type %ld\n", type); lok(cbData == full_byte_len, - "cbData=%d instead of %d\n", cbData, full_byte_len); + "cbData=%ld instead of %ld\n", cbData, full_byte_len);
/* Give enough space to overflow by one WCHAR */ value = HeapAlloc(GetProcessHeap(), 0, cbData+2); @@ -236,16 +236,16 @@ static void _test_hkey_main_Value_W(int line, LPCWSTR name, LPCWSTR string, type=0xdeadbeef; ret = RegQueryValueExW(hkey_main, name, NULL, &type, value, &cbData); GLE = GetLastError(); - lok(ret == ERROR_SUCCESS, "RegQueryValueExW/2 failed: %d, GLE=%d\n", ret, GLE); + lok(ret == ERROR_SUCCESS, "RegQueryValueExW/2 failed: %ld, GLE=%ld\n", ret, GLE); if (string) { - lok(memcmp(value, string, cbData) == 0, "RegQueryValueExW failed: %s/%d != %s/%d\n", + lok(memcmp(value, string, cbData) == 0, "RegQueryValueExW failed: %s/%ld != %s/%ld\n", wine_dbgstr_wn((WCHAR*)value, cbData / sizeof(WCHAR)), cbData, wine_dbgstr_wn(string, full_byte_len / sizeof(WCHAR)), full_byte_len); } /* This implies that when cbData == 0, RegQueryValueExW() should not modify the buffer */ - lok(*(value+cbData) == 0xbd, "RegQueryValueExW/2 overflowed at %u: %02x != bd\n", cbData, *(value+cbData)); - lok(*(value+cbData+1) == 0xbd, "RegQueryValueExW/2 overflowed at %u+1: %02x != bd\n", cbData, *(value+cbData+1)); + lok(*(value+cbData) == 0xbd, "RegQueryValueExW/2 overflowed at %lu: %02x != bd\n", cbData, *(value+cbData)); + lok(*(value+cbData+1) == 0xbd, "RegQueryValueExW/2 overflowed at %lu+1: %02x != bd\n", cbData, *(value+cbData+1)); HeapFree(GetProcessHeap(), 0, value); }
@@ -271,65 +271,65 @@ static void test_set_value(void) { /* Crashes on NT4, Windows 2000 and XP SP1 */ ret = RegSetValueA(hkey_main, NULL, REG_SZ, NULL, 0); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", ret); }
ret = RegSetValueA(hkey_main, NULL, REG_SZ, string1A, sizeof(string1A)); - ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(NULL, string1A, sizeof(string1A)); test_hkey_main_Value_W(NULL, string1W, sizeof(string1W));
/* RegSetValueA ignores the size passed in */ ret = RegSetValueA(hkey_main, NULL, REG_SZ, string1A, 4); - ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(NULL, string1A, sizeof(string1A)); test_hkey_main_Value_W(NULL, string1W, sizeof(string1W));
/* stops at first null */ ret = RegSetValueA(hkey_main, NULL, REG_SZ, string2A, sizeof(string2A)); - ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(NULL, substring2A, sizeof(substring2A)); test_hkey_main_Value_W(NULL, substring2W, sizeof(substring2W));
/* only REG_SZ is supported on NT*/ ret = RegSetValueA(hkey_main, NULL, REG_BINARY, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "got %d (expected ERROR_INVALID_PARAMETER)\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld (expected ERROR_INVALID_PARAMETER)\n", ret);
ret = RegSetValueA(hkey_main, NULL, REG_EXPAND_SZ, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "got %d (expected ERROR_INVALID_PARAMETER)\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld (expected ERROR_INVALID_PARAMETER)\n", ret);
ret = RegSetValueA(hkey_main, NULL, REG_MULTI_SZ, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "got %d (expected ERROR_INVALID_PARAMETER)\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld (expected ERROR_INVALID_PARAMETER)\n", ret);
/* Test RegSetValueExA with a 'zero-byte' string (as Office 2003 does). * Surprisingly enough we're supposed to get zero bytes out of it. */ ret = RegSetValueExA(hkey_main, name1A, 0, REG_SZ, (const BYTE *)emptyA, 0); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name1A, NULL, 0); test_hkey_main_Value_W(name1W, NULL, 0);
/* test RegSetValueExA with an empty string */ ret = RegSetValueExA(hkey_main, name1A, 0, REG_SZ, (const BYTE *)emptyA, sizeof(emptyA)); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name1A, emptyA, sizeof(emptyA)); test_hkey_main_Value_W(name1W, emptyW, sizeof(emptyW));
/* test RegSetValueExA with off-by-one size */ ret = RegSetValueExA(hkey_main, name1A, 0, REG_SZ, (const BYTE *)string1A, sizeof(string1A)-sizeof(string1A[0])); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); test_hkey_main_Value_W(name1W, string1W, sizeof(string1W));
/* test RegSetValueExA with normal string */ ret = RegSetValueExA(hkey_main, name1A, 0, REG_SZ, (const BYTE *)string1A, sizeof(string1A)); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); test_hkey_main_Value_W(name1W, string1W, sizeof(string1W));
/* test RegSetValueExA with intrazeroed string */ ret = RegSetValueExA(hkey_main, name2A, 0, REG_SZ, (const BYTE *)string2A, sizeof(string2A)); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name2A, string2A, sizeof(string2A)); test_hkey_main_Value_W(name2W, string2W, sizeof(string2W));
@@ -337,79 +337,79 @@ static void test_set_value(void) { /* Crashes on NT4, Windows 2000 and XP SP1 */ ret = RegSetValueW(hkey_main, NULL, REG_SZ, NULL, 0); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", ret);
RegSetValueExA(hkey_main, name2A, 0, REG_SZ, (const BYTE *)1, 1); RegSetValueExA(hkey_main, name2A, 0, REG_DWORD, (const BYTE *)1, 1); }
ret = RegSetValueW(hkey_main, NULL, REG_SZ, string1W, sizeof(string1W)); - ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(NULL, string1A, sizeof(string1A)); test_hkey_main_Value_W(NULL, string1W, sizeof(string1W));
ret = RegSetValueW(hkey_main, name1W, REG_SZ, string1W, sizeof(string1W)); - ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); test_hkey_main_Value_W(name1W, string1W, sizeof(string1W));
/* RegSetValueW ignores the size passed in */ ret = RegSetValueW(hkey_main, NULL, REG_SZ, string1W, 4 * sizeof(string1W[0])); - ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(NULL, string1A, sizeof(string1A)); test_hkey_main_Value_W(NULL, string1W, sizeof(string1W));
/* stops at first null */ ret = RegSetValueW(hkey_main, NULL, REG_SZ, string2W, sizeof(string2W)); - ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(NULL, substring2A, sizeof(substring2A)); test_hkey_main_Value_W(NULL, substring2W, sizeof(substring2W));
/* only REG_SZ is supported */ ret = RegSetValueW(hkey_main, NULL, REG_BINARY, string2W, sizeof(string2W)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %ld\n", ret); ret = RegSetValueW(hkey_main, NULL, REG_EXPAND_SZ, string2W, sizeof(string2W)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %ld\n", ret); ret = RegSetValueW(hkey_main, NULL, REG_MULTI_SZ, string2W, sizeof(string2W)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %ld\n", ret);
/* test RegSetValueExW with off-by-one size */ ret = RegSetValueExW(hkey_main, name1W, 0, REG_SZ, (const BYTE *)string1W, sizeof(string1W)-sizeof(string1W[0])); - ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); test_hkey_main_Value_W(name1W, string1W, sizeof(string1W));
/* test RegSetValueExW with normal string */ ret = RegSetValueExW(hkey_main, name1W, 0, REG_SZ, (const BYTE *)string1W, sizeof(string1W)); - ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); test_hkey_main_Value_W(name1W, string1W, sizeof(string1W));
/* test RegSetValueExW with intrazeroed string */ ret = RegSetValueExW(hkey_main, name2W, 0, REG_SZ, (const BYTE *)string2W, sizeof(string2W)); - ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %ld, GLE=%ld\n", ret, GetLastError()); test_hkey_main_Value_A(name2A, string2A, sizeof(string2A)); test_hkey_main_Value_W(name2W, string2W, sizeof(string2W));
/* test RegSetValueExW with data = 1 */ ret = RegSetValueExW(hkey_main, name2W, 0, REG_SZ, (const BYTE *)1, 1); - ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %ld, GLE=%ld\n", ret, GetLastError()); ret = RegSetValueExW(hkey_main, name2W, 0, REG_DWORD, (const BYTE *)1, 1); - ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %ld, GLE=%ld\n", ret, GetLastError());
if (pRegGetValueA) /* avoid a crash on Windows 2000 */ { ret = RegSetValueExW(hkey_main, NULL, 0, REG_SZ, NULL, 4); - ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %ld, GLE=%ld\n", ret, GetLastError());
ret = RegSetValueExW(hkey_main, NULL, 0, REG_SZ, NULL, 0); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = RegSetValueExW(hkey_main, NULL, 0, REG_DWORD, NULL, 4); - ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %d, GLE=%d\n", ret, GetLastError()); + ok(ret == ERROR_NOACCESS, "RegSetValueExW should have failed with ERROR_NOACCESS: %ld, GLE=%ld\n", ret, GetLastError());
ret = RegSetValueExW(hkey_main, NULL, 0, REG_DWORD, NULL, 0); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret); }
/* RegSetKeyValue */ @@ -421,29 +421,29 @@ static void test_set_value(void) HKEY subkey;
ret = pRegSetKeyValueW(hkey_main, NULL, name1W, REG_SZ, (const BYTE*)string2W, sizeof(string2W)); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret); test_hkey_main_Value_A(name1A, string2A, sizeof(string2A)); test_hkey_main_Value_W(name1W, string2W, sizeof(string2W));
ret = pRegSetKeyValueW(hkey_main, L"subkey", name1W, REG_SZ, string1W, sizeof(string1W)); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = RegOpenKeyExW(hkey_main, L"subkey", 0, KEY_QUERY_VALUE, &subkey); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret); type = len = 0; ret = RegQueryValueExW(subkey, name1W, 0, &type, NULL, &len); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); - ok(len == sizeof(string1W), "got %d\n", len); - ok(type == REG_SZ, "got type %d\n", type); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret); + ok(len == sizeof(string1W), "got %ld\n", len); + ok(type == REG_SZ, "got type %ld\n", type);
ret = pRegSetKeyValueW(hkey_main, L"subkey", name1W, REG_SZ, NULL, 0); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = pRegSetKeyValueW(hkey_main, L"subkey", name1W, REG_SZ, NULL, 4); - ok(ret == ERROR_NOACCESS, "got %d\n", ret); + ok(ret == ERROR_NOACCESS, "got %ld\n", ret);
ret = pRegSetKeyValueW(hkey_main, L"subkey", name1W, REG_DWORD, NULL, 4); - ok(ret == ERROR_NOACCESS, "got %d\n", ret); + ok(ret == ERROR_NOACCESS, "got %ld\n", ret);
RegCloseKey(subkey); } @@ -482,18 +482,18 @@ static void test_enum_value(void)
/* create the working key for new 'Test' value */ res = RegCreateKeyA( hkey_main, "TestKey", &test_key ); - ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res); + ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res);
/* check NULL data with zero length */ res = RegSetValueExA( test_key, "Test", 0, REG_SZ, NULL, 0 ); if (GetVersion() & 0x80000000) - ok( res == ERROR_INVALID_PARAMETER, "RegSetValueExA returned %d\n", res ); + ok( res == ERROR_INVALID_PARAMETER, "RegSetValueExA returned %ld\n", res ); else - ok( !res, "RegSetValueExA returned %d\n", res ); + ok( !res, "RegSetValueExA returned %ld\n", res ); res = RegSetValueExA( test_key, "Test", 0, REG_EXPAND_SZ, NULL, 0 ); - ok( ERROR_SUCCESS == res, "RegSetValueExA returned %d\n", res ); + ok( ERROR_SUCCESS == res, "RegSetValueExA returned %ld\n", res ); res = RegSetValueExA( test_key, "Test", 0, REG_BINARY, NULL, 0 ); - ok( ERROR_SUCCESS == res, "RegSetValueExA returned %d\n", res ); + ok( ERROR_SUCCESS == res, "RegSetValueExA returned %ld\n", res );
/* test reading the value and data without setting them */ val_count = 20; @@ -502,10 +502,10 @@ static void test_enum_value(void) strcpy( value, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res ); - ok( val_count == 4, "val_count set to %d instead of 4\n", val_count ); - ok( data_count == 0, "data_count set to %d instead of 0\n", data_count ); - ok( type == REG_BINARY, "type %d is not REG_BINARY\n", type ); + ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res ); + ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count ); + ok( data_count == 0, "data_count set to %ld instead of 0\n", data_count ); + ok( type == REG_BINARY, "type %ld is not REG_BINARY\n", type ); ok( !strcmp( value, "Test" ), "value is '%s' instead of Test\n", value ); ok( !strcmp( data, "xxxxxxxxxx" ), "data is '%s' instead of xxxxxxxxxx\n", data );
@@ -515,15 +515,15 @@ static void test_enum_value(void) wcscpy( valueW, L"xxxxxxxx" ); wcscpy( dataW, L"xxxxxxxx" ); res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res ); - ok( val_count == 4, "val_count set to %d instead of 4\n", val_count ); - ok( data_count == 0, "data_count set to %d instead of 0\n", data_count ); - ok( type == REG_BINARY, "type %d is not REG_BINARY\n", type ); + ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res ); + ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count ); + ok( data_count == 0, "data_count set to %ld instead of 0\n", data_count ); + ok( type == REG_BINARY, "type %ld is not REG_BINARY\n", type ); ok( !wcscmp( valueW, L"Test" ), "value is not 'Test'\n" ); ok( !wcscmp( dataW, L"xxxxxxxx" ), "data is not 'xxxxxxxx'\n" );
res = RegSetValueExA( test_key, "Test", 0, REG_SZ, (const BYTE *)"foobar", 7 ); - ok( res == 0, "RegSetValueExA failed error %d\n", res ); + ok( res == 0, "RegSetValueExA failed error %ld\n", res );
/* overflow both name and data */ val_count = 2; @@ -532,11 +532,11 @@ static void test_enum_value(void) strcpy( value, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 2, "val_count set to %d\n", val_count ); + ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); + ok( val_count == 2, "val_count set to %ld\n", val_count ); /* Chinese, Japanese, and Korean editions of Windows 10 sometimes set data_count to a higher value */ - ok( data_count == 7 || broken( data_count > 7 ), "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( data_count == 7 || broken( data_count > 7 ), "data_count set to %ld instead of 7\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value ); ok( !strcmp( data, "xxxxxxxxxx" ), "data set to '%s'\n", data );
@@ -547,17 +547,17 @@ static void test_enum_value(void) strcpy( value, "xxxxxxxxxx" ); memset( data, 'x', sizeof(data) ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 3, "val_count set to %d\n", val_count ); + ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); + ok( val_count == 3, "val_count set to %ld\n", val_count ); /* Chinese, Japanese, and Korean editions of Windows 10 sometimes set data_count to a higher value */ - ok( data_count == 7 || broken( data_count > 7 ), "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( data_count == 7 || broken( data_count > 7 ), "data_count set to %ld instead of 7\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); /* v5.1.2600.0 (XP Home and Professional) does not touch value or data in this case */ ok( !strcmp( value, "Te" ) || !strcmp( value, "xxxxxxxxxx" ), "value set to '%s' instead of 'Te' or 'xxxxxxxxxx'\n", value ); ok( !strcmp( data, "foobar" ) || !strcmp( data, "xxxxxxx" ) || broken( data_count > 7 && strspn( data, "x" ) == data_count && data[data_count] == 0 ), - "data set to '%s' instead of 'foobar' or x's, data_count=%u\n", data, data_count ); + "data set to '%s' instead of 'foobar' or x's, data_count=%lu\n", data, data_count );
/* overflow empty name */ val_count = 0; @@ -566,16 +566,16 @@ static void test_enum_value(void) strcpy( value, "xxxxxxxxxx" ); memset( data, 'x', sizeof(data) ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 0, "val_count set to %d\n", val_count ); + ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); + ok( val_count == 0, "val_count set to %ld\n", val_count ); /* Chinese, Japanese, and Korean editions of Windows 10 sometimes set data_count to a higher value */ - ok( data_count == 7 || broken( data_count > 7 ), "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( data_count == 7 || broken( data_count > 7 ), "data_count set to %ld instead of 7\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value ); /* v5.1.2600.0 (XP Home and Professional) does not touch data in this case */ ok( !strcmp( data, "foobar" ) || !strcmp( data, "xxxxxxx" ) || broken( data_count > 7 && strspn( data, "x" ) == data_count && data[data_count] == 0 ), - "data set to '%s' instead of 'foobar' or x's, data_count=%u\n", data, data_count ); + "data set to '%s' instead of 'foobar' or x's, data_count=%lu\n", data, data_count );
/* overflow data */ val_count = 20; @@ -584,10 +584,10 @@ static void test_enum_value(void) strcpy( value, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 20, "val_count set to %d\n", val_count ); - ok( data_count == 7, "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); + ok( val_count == 20, "val_count set to %ld\n", val_count ); + ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value ); ok( !strcmp( data, "xxxxxxxxxx" ), "data set to '%s'\n", data );
@@ -598,10 +598,10 @@ static void test_enum_value(void) strcpy( value, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res ); - ok( val_count == 4, "val_count set to %d instead of 4\n", val_count ); - ok( data_count == 7, "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res ); + ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count ); + ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); ok( !strcmp( value, "Test" ), "value is '%s' instead of Test\n", value ); ok( !strcmp( data, "foobar" ), "data is '%s' instead of foobar\n", data );
@@ -612,7 +612,7 @@ static void test_enum_value(void) type = 1234; strcpy( data, "xxxxxxxxxx" ); res = RegEnumValueA( test_key, 0, NULL, NULL, NULL, &type, (BYTE*)data, &data_count ); - ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", res ); + ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", res );
/* no value parameter */ val_count = 20; @@ -620,7 +620,7 @@ static void test_enum_value(void) type = 1234; strcpy( data, "xxxxxxxxxx" ); res = RegEnumValueA( test_key, 0, NULL, &val_count, NULL, &type, (BYTE*)data, &data_count ); - ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", res ); + ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", res );
/* no val_count parameter */ data_count = 20; @@ -628,7 +628,7 @@ static void test_enum_value(void) strcpy( value, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" ); res = RegEnumValueA( test_key, 0, value, NULL, NULL, &type, (BYTE*)data, &data_count ); - ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", res ); + ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", res ); }
/* Unicode tests */ @@ -640,7 +640,7 @@ static void test_enum_value(void) win_skip("RegSetValueExW is not implemented\n"); goto cleanup; } - ok( res == 0, "RegSetValueExW failed error %d\n", res ); + ok( res == 0, "RegSetValueExW failed error %ld\n", res );
/* overflow both name and data */ val_count = 2; @@ -649,10 +649,10 @@ static void test_enum_value(void) wcscpy( valueW, L"xxxxxxxx" ); wcscpy( dataW, L"xxxxxxxx" ); res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 2, "val_count set to %d\n", val_count ); - ok( data_count == 7*sizeof(WCHAR), "data_count set to %d instead of 7*sizeof(WCHAR)\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); + ok( val_count == 2, "val_count set to %ld\n", val_count ); + ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); ok( !wcscmp( valueW, L"xxxxxxxx" ), "value modified\n" ); ok( !wcscmp( dataW, L"xxxxxxxx" ), "data modified\n" );
@@ -663,10 +663,10 @@ static void test_enum_value(void) wcscpy( valueW, L"xxxxxxxx" ); wcscpy( dataW, L"xxxxxxxx" ); res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 3, "val_count set to %d\n", val_count ); - ok( data_count == 7*sizeof(WCHAR), "data_count set to %d instead of 7*sizeof(WCHAR)\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); + ok( val_count == 3, "val_count set to %ld\n", val_count ); + ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); ok( !wcscmp( valueW, L"xxxxxxxx" ), "value modified\n" ); ok( !wcscmp( dataW, L"xxxxxxxx" ), "data modified\n" );
@@ -677,10 +677,10 @@ static void test_enum_value(void) wcscpy( valueW, L"xxxxxxxx" ); wcscpy( dataW, L"xxxxxxxx" ); res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 4, "val_count set to %d instead of 4\n", val_count ); - ok( data_count == 7*sizeof(WCHAR), "data_count set to %d instead of 7*sizeof(WCHAR)\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); + ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count ); + ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); ok( !wcscmp( valueW, L"Test" ), "value is not 'Test'\n" ); ok( !wcscmp( dataW, L"xxxxxxxx" ), "data modified\n" );
@@ -691,10 +691,10 @@ static void test_enum_value(void) wcscpy( valueW, L"xxxxxxxx" ); wcscpy( dataW, L"xxxxxxxx" ); res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res ); - ok( val_count == 4, "val_count set to %d instead of 4\n", val_count ); - ok( data_count == 7*sizeof(WCHAR), "data_count set to %d instead of 7*sizeof(WCHAR)\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); + ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res ); + ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count ); + ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)\n", data_count ); + ok( type == REG_SZ, "type %ld is not REG_SZ\n", type ); ok( !wcscmp( valueW, L"Test" ), "value is not 'Test'\n" ); ok( !wcscmp( dataW, L"foobar" ), "data is not 'foobar'\n" );
@@ -705,7 +705,7 @@ static void test_enum_value(void) type = 1234; wcscpy( dataW, L"xxxxxxxx" ); res = RegEnumValueW( test_key, 0, NULL, NULL, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", res ); + ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", res );
/* no valueW parameter */ val_count = 20; @@ -713,7 +713,7 @@ static void test_enum_value(void) type = 1234; wcscpy( dataW, L"xxxxxxxx" ); res = RegEnumValueW( test_key, 0, NULL, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", res ); + ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", res );
/* no val_count parameter */ data_count = 20; @@ -721,7 +721,7 @@ static void test_enum_value(void) wcscpy( valueW, L"xxxxxxxx" ); wcscpy( dataW, L"xxxxxxxx" ); res = RegEnumValueW( test_key, 0, valueW, NULL, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", res ); + ok( res == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", res ); }
cleanup: @@ -736,24 +736,24 @@ static void test_query_value_ex(void)
size = sizeof(buffer); ret = RegQueryValueExA(hkey_main, "TP1_SZ", NULL, &type, NULL, &size); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - ok(size == strlen(sTestpath1) + 1, "(%d,%d)\n", (DWORD)strlen(sTestpath1) + 1, size); - ok(type == REG_SZ, "type %d is not REG_SZ\n", type); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + ok(size == strlen(sTestpath1) + 1, "(%ld,%ld)\n", (DWORD)strlen(sTestpath1) + 1, size); + ok(type == REG_SZ, "type %ld is not REG_SZ\n", type);
type = 0xdeadbeef; size = 0xdeadbeef; ret = RegQueryValueExA(HKEY_CLASSES_ROOT, "Nonexistent Value", NULL, &type, NULL, &size); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); - ok(size == 0, "size should have been set to 0 instead of %d\n", size); + ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n", ret); + ok(size == 0, "size should have been set to 0 instead of %ld\n", size);
size = sizeof(buffer); ret = RegQueryValueExA(HKEY_CLASSES_ROOT, "Nonexistent Value", NULL, &type, buffer, &size); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); - ok(size == sizeof(buffer), "size shouldn't have been changed to %d\n", size); + ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n", ret); + ok(size == sizeof(buffer), "size shouldn't have been changed to %ld\n", size);
size = 4; ret = RegQueryValueExA(hkey_main, "BIN32", NULL, &size, buffer, &size); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); }
static void test_get_value(void) @@ -774,133 +774,133 @@ static void test_get_value(void)
/* Invalid parameter */ ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD, &type, &dw, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "ret=%d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "ret=%ld\n", ret);
/* Query REG_DWORD using RRF_RT_REG_DWORD (ok) */ size = type = dw = 0xdeadbeef; ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD, &type, &dw, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); - ok(dw == 0x12345678, "dw=%d\n", dw); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); + ok(size == 4, "size=%ld\n", size); + ok(type == REG_DWORD, "type=%ld\n", type); + ok(dw == 0x12345678, "dw=%ld\n", dw);
/* Check RRF_SUBKEY_WOW64*KEY validation on a case without a subkey */ ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6464KEY | RRF_SUBKEY_WOW6432KEY, NULL, NULL, NULL); ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS), /* Before Win10 */ - "ret=%d\n", ret); + "ret=%ld\n", ret); ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6464KEY, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6432KEY, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret);
/* Query by subkey-name */ ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\Wine\Test", "DWORD", RRF_RT_REG_DWORD, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret);
/* Check RRF_SUBKEY_WOW64*KEY validation on a case with a subkey */ ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\Wine\Test", "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6464KEY | RRF_SUBKEY_WOW6432KEY, NULL, NULL, NULL); ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS), /* Before Win10 */ - "ret=%d\n", ret); + "ret=%ld\n", ret); ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\Wine\Test", "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6464KEY, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\Wine\Test", "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6432KEY, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret);
/* Query REG_DWORD using RRF_RT_REG_BINARY (restricted) */ size = type = dw = 0xdeadbeef; ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_BINARY, &type, &dw, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); + ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%ld\n", ret); /* Although the function failed all values are retrieved */ - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); - ok(dw == 0x12345678, "dw=%d\n", dw); + ok(size == 4, "size=%ld\n", size); + ok(type == REG_DWORD, "type=%ld\n", type); + ok(dw == 0x12345678, "dw=%ld\n", dw);
/* Test RRF_ZEROONFAILURE */ type = dw = 0xdeadbeef; size = 4; ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_SZ|RRF_ZEROONFAILURE, &type, &dw, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); + ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%ld\n", ret); /* Again all values are retrieved ... */ - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); + ok(size == 4, "size=%ld\n", size); + ok(type == REG_DWORD, "type=%ld\n", type); /* ... except the buffer, which is zeroed out */ - ok(dw == 0, "dw=%d\n", dw); + ok(dw == 0, "dw=%ld\n", dw);
/* Test RRF_ZEROONFAILURE with a NULL buffer... */ type = size = 0xbadbeef; ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_SZ|RRF_ZEROONFAILURE, &type, NULL, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); + ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%ld\n", ret); + ok(size == 4, "size=%ld\n", size); + ok(type == REG_DWORD, "type=%ld\n", type);
/* Query REG_DWORD using RRF_RT_DWORD (ok) */ size = type = dw = 0xdeadbeef; ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_DWORD, &type, &dw, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); - ok(dw == 0x12345678, "dw=%d\n", dw); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); + ok(size == 4, "size=%ld\n", size); + ok(type == REG_DWORD, "type=%ld\n", type); + ok(dw == 0x12345678, "dw=%ld\n", dw);
/* Query 32-bit REG_BINARY using RRF_RT_DWORD (ok) */ size = type = dw = 0xdeadbeef; ret = pRegGetValueA(hkey_main, NULL, "BIN32", RRF_RT_DWORD, &type, &dw, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == 4, "size=%d\n", size); - ok(type == REG_BINARY, "type=%d\n", type); - ok(dw == 0x12345678, "dw=%d\n", dw); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); + ok(size == 4, "size=%ld\n", size); + ok(type == REG_BINARY, "type=%ld\n", type); + ok(dw == 0x12345678, "dw=%ld\n", dw);
/* Query 64-bit REG_BINARY using RRF_RT_DWORD (type mismatch) */ qw[0] = qw[1] = size = type = 0xdeadbeef; ret = pRegGetValueA(hkey_main, NULL, "BIN64", RRF_RT_DWORD, &type, qw, &size); - ok(ret == ERROR_DATATYPE_MISMATCH, "ret=%d\n", ret); - ok(size == 8, "size=%d\n", size); - ok(type == REG_BINARY, "type=%d\n", type); + ok(ret == ERROR_DATATYPE_MISMATCH, "ret=%ld\n", ret); + ok(size == 8, "size=%ld\n", size); + ok(type == REG_BINARY, "type=%ld\n", type); ok(qw[0] == 0x12345678 && - qw[1] == 0x87654321, "qw={%d,%d}\n", qw[0], qw[1]); + qw[1] == 0x87654321, "qw={%ld,%ld}\n", qw[0], qw[1]);
/* Query 64-bit REG_BINARY using 32-bit buffer (buffer too small) */ type = dw = 0xdeadbeef; size = 4; ret = pRegGetValueA(hkey_main, NULL, "BIN64", RRF_RT_REG_BINARY, &type, &dw, &size); - ok(ret == ERROR_MORE_DATA, "ret=%d\n", ret); - ok(dw == 0xdeadbeef, "dw=%d\n", dw); - ok(size == 8, "size=%d\n", size); + ok(ret == ERROR_MORE_DATA, "ret=%ld\n", ret); + ok(dw == 0xdeadbeef, "dw=%ld\n", dw); + ok(size == 8, "size=%ld\n", size);
/* Query 64-bit REG_BINARY using RRF_RT_QWORD (ok) */ qw[0] = qw[1] = size = type = 0xdeadbeef; ret = pRegGetValueA(hkey_main, NULL, "BIN64", RRF_RT_QWORD, &type, qw, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == 8, "size=%d\n", size); - ok(type == REG_BINARY, "type=%d\n", type); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); + ok(size == 8, "size=%ld\n", size); + ok(type == REG_BINARY, "type=%ld\n", type); ok(qw[0] == 0x12345678 && - qw[1] == 0x87654321, "qw={%d,%d}\n", qw[0], qw[1]); + qw[1] == 0x87654321, "qw={%ld,%ld}\n", qw[0], qw[1]);
/* Query REG_SZ using RRF_RT_REG_SZ (ok) */ buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); + ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%ld\n", lstrlenA(sTestpath1), size); + ok(type == REG_SZ, "type=%ld\n", type); ok(!strcmp(sTestpath1, buf), "sTestpath="%s" buf="%s"\n", sTestpath1, buf);
/* Query REG_SZ using RRF_RT_REG_SZ and no buffer (ok) */ type = 0xdeadbeef; size = 0; ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ, &type, NULL, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ ok(size == strlen(sTestpath1)+1 || broken(size == strlen(sTestpath1)+2), - "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); + "strlen(sTestpath1)=%d size=%ld\n", lstrlenA(sTestpath1), size); + ok(type == REG_SZ, "type=%ld\n", type);
/* Query REG_SZ using RRF_RT_REG_SZ on a zero-byte value (ok) */ strcpy(buf, sTestpath1); type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP1_ZB_SZ", RRF_RT_REG_SZ, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ ok(size == 0 || size == 1, /* win2k3 */ - "size=%d\n", size); - ok(type == REG_SZ, "type=%d\n", type); + "size=%ld\n", size); + ok(type == REG_SZ, "type=%ld\n", type); ok(!strcmp(sTestpath1, buf) || !strcmp(buf, ""), "Expected "%s" or "", got "%s"\n", sTestpath1, buf); @@ -908,73 +908,73 @@ static void test_get_value(void) /* Query REG_SZ using RRF_RT_REG_SZ|RRF_NOEXPAND (ok) */ buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ|RRF_NOEXPAND, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); + ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%ld\n", lstrlenA(sTestpath1), size); + ok(type == REG_SZ, "type=%ld\n", type); ok(!strcmp(sTestpath1, buf), "sTestpath="%s" buf="%s"\n", sTestpath1, buf);
/* Query REG_EXPAND_SZ using RRF_RT_REG_SZ and no buffer (ok, expands) */ size = 0; ret = pRegGetValueA(hkey_main, NULL, "TP2_EXP_SZ", RRF_RT_REG_SZ, NULL, NULL, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); ok((size == strlen(expanded2)+1) || /* win2k3 SP1 */ (size == strlen(expanded2)+2) || /* win2k3 SP2 */ (size == strlen(sTestpath2)+1), - "strlen(expanded2)=%d, strlen(sTestpath2)=%d, size=%d\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size); + "strlen(expanded2)=%d, strlen(sTestpath2)=%d, size=%ld\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size);
/* Query REG_EXPAND_SZ using RRF_RT_REG_SZ (ok, expands) */ buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_SZ, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath1 length + 1 here. */ ok(size == strlen(expanded)+1 || broken(size == strlen(sTestpath1)+1), - "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); + "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%ld\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); + ok(type == REG_SZ, "type=%ld\n", type); ok(!strcmp(expanded, buf), "expanded="%s" buf="%s"\n", expanded, buf);
/* Query REG_EXPAND_SZ using RRF_RT_REG_SZ (ok, expands a lot) */ buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP2_EXP_SZ", RRF_RT_REG_SZ, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath2 length + 1 here. */ ok(size == strlen(expanded2)+1 || broken(size == strlen(sTestpath2)+1), - "strlen(expanded2)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size); - ok(type == REG_SZ, "type=%d\n", type); + "strlen(expanded2)=%d, strlen(sTestpath1)=%d, size=%ld\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size); + ok(type == REG_SZ, "type=%ld\n", type); ok(!strcmp(expanded2, buf), "expanded2="%s" buf="%s"\n", expanded2, buf);
/* Query REG_EXPAND_SZ using RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND (ok, doesn't expand) */ buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - ok(type == REG_EXPAND_SZ, "type=%d\n", type); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); + ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%ld\n", lstrlenA(sTestpath1), size); + ok(type == REG_EXPAND_SZ, "type=%ld\n", type); ok(!strcmp(sTestpath1, buf), "sTestpath="%s" buf="%s"\n", sTestpath1, buf);
/* Query REG_EXPAND_SZ using RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND and no buffer (ok, doesn't expand) */ size = 0xbadbeef; ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND, NULL, NULL, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ ok(size == strlen(sTestpath1)+1 || broken(size == strlen(sTestpath1)+2), - "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); + "strlen(sTestpath1)=%d size=%ld\n", lstrlenA(sTestpath1), size);
/* Query REG_EXPAND_SZ using RRF_RT_REG_SZ|RRF_NOEXPAND (type mismatch) */ ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_SZ|RRF_NOEXPAND, NULL, NULL, NULL); - ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); + ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%ld\n", ret);
/* Query REG_EXPAND_SZ using RRF_RT_REG_EXPAND_SZ (not allowed without RRF_NOEXPAND) */ ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ, NULL, NULL, NULL); /* before win8: ERROR_INVALID_PARAMETER, win8: ERROR_UNSUPPORTED_TYPE */ - ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_UNSUPPORTED_TYPE, "ret=%ld\n", ret);
/* Query REG_EXPAND_SZ using RRF_RT_ANY */ buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_ANY, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "ret=%ld\n", ret); /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath1 length + 1 here. */ ok(size == strlen(expanded)+1 || broken(size == strlen(sTestpath1)+1), - "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); + "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%ld\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); + ok(type == REG_SZ, "type=%ld\n", type); ok(!strcmp(expanded, buf), "expanded="%s" buf="%s"\n", expanded, buf); }
@@ -994,20 +994,20 @@ static void test_reg_open_key(void)
/* successful open */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\Test", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != NULL, "expected hkResult != NULL\n"); hkPreserve = hkResult;
/* open same key twice */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\Test", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != hkPreserve, "expected hkResult != hkPreserve\n"); ok(hkResult != NULL, "hkResult != NULL\n"); RegCloseKey(hkResult);
/* trailing slashes */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\Test\\", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); RegCloseKey(hkResult);
/* open nonexistent key @@ -1015,13 +1015,13 @@ static void test_reg_open_key(void) */ hkResult = hkPreserve; ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\Nonexistent", &hkResult); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n", ret); ok(hkResult == NULL, "expected hkResult == NULL\n");
/* open the same nonexistent key again to make sure the key wasn't created */ hkResult = hkPreserve; ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\Nonexistent", &hkResult); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n", ret); ok(hkResult == NULL, "expected hkResult == NULL\n");
/* send in NULL lpSubKey @@ -1029,13 +1029,13 @@ static void test_reg_open_key(void) */ hkResult = hkPreserve; ret = RegOpenKeyA(HKEY_CURRENT_USER, NULL, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult == HKEY_CURRENT_USER, "expected hkResult == HKEY_CURRENT_USER\n");
/* send empty-string in lpSubKey */ hkResult = hkPreserve; ret = RegOpenKeyA(HKEY_CURRENT_USER, "", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult == HKEY_CURRENT_USER, "expected hkResult == HKEY_CURRENT_USER\n");
/* send in NULL lpSubKey and NULL hKey @@ -1043,7 +1043,7 @@ static void test_reg_open_key(void) */ hkResult = hkPreserve; ret = RegOpenKeyA(NULL, NULL, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult == NULL, "expected hkResult == NULL\n");
/* only send NULL hKey @@ -1052,73 +1052,73 @@ static void test_reg_open_key(void) hkResult = hkPreserve; ret = RegOpenKeyA(NULL, "Software\Wine\Test", &hkResult); ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 95 returns BADKEY */ - "expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); + "expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld\n", ret); ok(hkResult == hkPreserve, "expected hkResult == hkPreserve\n");
/* send in NULL hkResult */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\Test", NULL); - ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ret = RegOpenKeyA(HKEY_CURRENT_USER, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ret = RegOpenKeyA(NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
/* beginning backslash character */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "\Software\Wine\Test", &hkResult); ok(ret == ERROR_BAD_PATHNAME || /* NT/2k/XP */ broken(ret == ERROR_SUCCESS), /* wow64 */ - "expected ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d\n", ret); + "expected ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %ld\n", ret); if (!ret) RegCloseKey(hkResult);
hkResult = NULL; ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, "\clsid", 0, KEY_QUERY_VALUE, &hkResult); ok(ret == ERROR_SUCCESS || /* 2k/XP */ ret == ERROR_BAD_PATHNAME, /* NT */ - "expected ERROR_SUCCESS, ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d\n", ret); + "expected ERROR_SUCCESS, ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %ld\n", ret); RegCloseKey(hkResult);
/* NULL or empty subkey of special root */ hkResult = NULL; ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, NULL, 0, KEY_QUERY_VALUE, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult == HKEY_CLASSES_ROOT, "expected hkResult == HKEY_CLASSES_ROOT\n");
hkResult = NULL; ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, "", 0, KEY_QUERY_VALUE, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult == HKEY_CLASSES_ROOT, "expected hkResult == HKEY_CLASSES_ROOT\n");
hkResult = NULL; ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, "\", 0, KEY_QUERY_VALUE, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != HKEY_CLASSES_ROOT, "expected hkResult to be a new key\n"); ok(!RegCloseKey(hkResult), "got invalid hkey\n");
/* empty subkey of existing handle */ hkResult = hkPreserve; ret = RegOpenKeyExA(hkPreserve, "", 0, KEY_QUERY_VALUE, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != hkPreserve, "expected hkResult != hkPreserve\n"); ok(!RegCloseKey(hkResult), "got invalid hkey\n");
/* NULL subkey of existing handle */ hkResult = hkPreserve; ret = RegOpenKeyExA(hkPreserve, NULL, 0, KEY_QUERY_VALUE, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != hkPreserve, "expected hkResult != hkPreserve\n"); ok(!RegCloseKey(hkResult), "got invalid hkey\n");
/* empty subkey of NULL */ hkResult = hkPreserve; ret = RegOpenKeyExW(NULL, L"", 0, KEY_QUERY_VALUE, &hkResult); - ok(ret == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", ret); ok(hkResult == NULL || broken(hkResult == hkPreserve /* Windows XP */), "expected hkResult == NULL\n");
hkResult = hkPreserve; ret = RegOpenKeyExA(NULL, "", 0, KEY_QUERY_VALUE, &hkResult); - ok(ret == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", ret); ok(hkResult == hkPreserve, "expected hkResult == hkPreserve\n");
RegCloseKey(hkPreserve); @@ -1127,13 +1127,13 @@ static void test_reg_open_key(void) hkResult = NULL; ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_32KEY, &hkResult); ok((ret == ERROR_SUCCESS && hkResult != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), - "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); + "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%lu)\n", ret); RegCloseKey(hkResult);
hkResult = NULL; ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_64KEY, &hkResult); ok((ret == ERROR_SUCCESS && hkResult != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), - "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); + "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%lu)\n", ret); RegCloseKey(hkResult);
/* check special HKEYs on 64bit @@ -1143,28 +1143,28 @@ static void test_reg_open_key(void) { /* HKEY_CURRENT_USER */ ret = RegOpenKeyA(UlongToHandle(HandleToUlong(HKEY_CURRENT_USER)), "Software", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != NULL, "expected hkResult != NULL\n"); RegCloseKey(hkResult);
ret = RegOpenKeyA((HKEY)(HandleToUlong(HKEY_CURRENT_USER) | (ULONG64)1 << 32), "Software", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != NULL, "expected hkResult != NULL\n"); RegCloseKey(hkResult);
ret = RegOpenKeyA((HKEY)(HandleToUlong(HKEY_CURRENT_USER) | (ULONG64)0xdeadbeef << 32), "Software", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != NULL, "expected hkResult != NULL\n"); RegCloseKey(hkResult);
ret = RegOpenKeyA((HKEY)(HandleToUlong(HKEY_CURRENT_USER) | (ULONG64)0xffffffff << 32), "Software", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != NULL, "expected hkResult != NULL\n"); RegCloseKey(hkResult);
/* HKEY_LOCAL_MACHINE */ ret = RegOpenKeyA((HKEY)(HandleToUlong(HKEY_LOCAL_MACHINE) | (ULONG64)0xdeadbeef << 32), "Software", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ok(hkResult != NULL, "expected hkResult != NULL\n"); RegCloseKey(hkResult); } @@ -1183,24 +1183,24 @@ static void test_reg_open_key(void) KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &hkRoot32, NULL); if (limited_user) ok(ret == ERROR_ACCESS_DENIED && hkRoot32 == NULL, - "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); + "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%lu)\n", ret); else ok(ret == ERROR_SUCCESS && hkRoot32 != NULL, - "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); + "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%lu)\n", ret);
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &hkRoot64, NULL); if (limited_user) ok(ret == ERROR_ACCESS_DENIED && hkRoot64 == NULL, - "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); + "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%lu)\n", ret); else ok(ret == ERROR_SUCCESS && hkRoot64 != NULL, - "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); + "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%lu)\n", ret);
bRet = AllocateAndInitializeSid(&sid_authority, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &world_sid); ok(bRet == TRUE, - "Expected AllocateAndInitializeSid to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + "Expected AllocateAndInitializeSid to return TRUE, got %d, last error %lu\n", bRet, GetLastError());
access.grfAccessPermissions = GENERIC_ALL | STANDARD_RIGHTS_ALL; access.grfAccessMode = SET_ACCESS; @@ -1213,16 +1213,16 @@ static void test_reg_open_key(void)
ret = SetEntriesInAclA(1, &access, NULL, &key_acl); ok(ret == ERROR_SUCCESS, - "Expected SetEntriesInAclA to return ERROR_SUCCESS, got %u, last error %u\n", ret, GetLastError()); + "Expected SetEntriesInAclA to return ERROR_SUCCESS, got %lu, last error %lu\n", ret, GetLastError());
sd = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH); bRet = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); ok(bRet == TRUE, - "Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + "Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %lu\n", bRet, GetLastError());
bRet = SetSecurityDescriptorDacl(sd, TRUE, key_acl, FALSE); ok(bRet == TRUE, - "Expected SetSecurityDescriptorDacl to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + "Expected SetSecurityDescriptorDacl to return TRUE, got %d, last error %lu\n", bRet, GetLastError());
if (limited_user) { @@ -1234,22 +1234,22 @@ static void test_reg_open_key(void)
error = RegSetKeySecurity(hkRoot64, DACL_SECURITY_INFORMATION, sd); ok(error == ERROR_SUCCESS, - "Expected RegSetKeySecurity to return success, got error %u\n", error); + "Expected RegSetKeySecurity to return success, got error %lu\n", error);
error = RegSetKeySecurity(hkRoot32, DACL_SECURITY_INFORMATION, sd); ok(error == ERROR_SUCCESS, - "Expected RegSetKeySecurity to return success, got error %u\n", error); + "Expected RegSetKeySecurity to return success, got error %lu\n", error);
hkResult = NULL; ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine", 0, KEY_WOW64_64KEY | KEY_READ, &hkResult); ok(ret == ERROR_SUCCESS && hkResult != NULL, - "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); + "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%lu)\n", ret); RegCloseKey(hkResult);
hkResult = NULL; ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine", 0, KEY_WOW64_32KEY | KEY_READ, &hkResult); ok(ret == ERROR_SUCCESS && hkResult != NULL, - "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); + "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%lu)\n", ret); RegCloseKey(hkResult); }
@@ -1277,11 +1277,11 @@ static void test_reg_create_key(void) SECURITY_DESCRIPTOR *sd;
ret = RegCreateKeyExA(hkey_main, "Subkey1", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); + ok(!ret, "RegCreateKeyExA failed with error %ld\n", ret); /* should succeed: all versions of Windows ignore the access rights * to the parent handle */ ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey2, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); + ok(!ret, "RegCreateKeyExA failed with error %ld\n", ret);
/* clean up */ RegDeleteKeyA(hkey2, ""); @@ -1291,16 +1291,16 @@ static void test_reg_create_key(void)
/* test creation of volatile keys */ ret = RegCreateKeyExA(hkey_main, "Volatile", 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey1, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); + ok(!ret, "RegCreateKeyExA failed with error %ld\n", ret); ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey2, NULL); - ok(ret == ERROR_CHILD_MUST_BE_VOLATILE, "RegCreateKeyExA failed with error %d\n", ret); + ok(ret == ERROR_CHILD_MUST_BE_VOLATILE, "RegCreateKeyExA failed with error %ld\n", ret); if (!ret) RegCloseKey( hkey2 ); ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey2, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); + ok(!ret, "RegCreateKeyExA failed with error %ld\n", ret); RegCloseKey(hkey2); /* should succeed if the key already exists */ ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey2, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); + ok(!ret, "RegCreateKeyExA failed with error %ld\n", ret);
/* clean up */ RegDeleteKeyA(hkey2, ""); @@ -1311,16 +1311,16 @@ static void test_reg_create_key(void) /* beginning backslash character */ ret = RegCreateKeyExA(hkey_main, "\Subkey3", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL); if (!(GetVersion() & 0x80000000)) - ok(ret == ERROR_BAD_PATHNAME, "expected ERROR_BAD_PATHNAME, got %d\n", ret); + ok(ret == ERROR_BAD_PATHNAME, "expected ERROR_BAD_PATHNAME, got %ld\n", ret); else { - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); + ok(!ret, "RegCreateKeyExA failed with error %ld\n", ret); RegDeleteKeyA(hkey1, ""); RegCloseKey(hkey1); }
/* trailing backslash characters */ ret = RegCreateKeyExA(hkey_main, "Subkey4\\", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL); - ok(ret == ERROR_SUCCESS, "RegCreateKeyExA failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS, "RegCreateKeyExA failed with error %ld\n", ret); RegDeleteKeyA(hkey1, ""); RegCloseKey(hkey1);
@@ -1328,13 +1328,13 @@ static void test_reg_create_key(void) hkey1 = NULL; ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL); ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), - "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); + "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%lu)\n", ret); RegCloseKey(hkey1);
hkey1 = NULL; ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_64KEY, NULL, &hkey1, NULL); ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), - "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); + "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%lu)\n", ret); RegCloseKey(hkey1);
/* Try using WOW64 flags when opening a key with a DACL set to verify that @@ -1351,24 +1351,24 @@ static void test_reg_create_key(void) KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &hkRoot32, NULL); if (limited_user) ok(ret == ERROR_ACCESS_DENIED && hkRoot32 == NULL, - "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%d)\n", ret); + "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%ld)\n", ret); else ok(ret == ERROR_SUCCESS && hkRoot32 != NULL, - "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%d)\n", ret); + "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%ld)\n", ret);
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &hkRoot64, NULL); if (limited_user) ok(ret == ERROR_ACCESS_DENIED && hkRoot64 == NULL, - "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%d)\n", ret); + "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%ld)\n", ret); else ok(ret == ERROR_SUCCESS && hkRoot64 != NULL, - "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%d)\n", ret); + "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%ld)\n", ret);
bRet = AllocateAndInitializeSid(&sid_authority, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &world_sid); ok(bRet == TRUE, - "Expected AllocateAndInitializeSid to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + "Expected AllocateAndInitializeSid to return TRUE, got %d, last error %lu\n", bRet, GetLastError());
access.grfAccessPermissions = GENERIC_ALL | STANDARD_RIGHTS_ALL; access.grfAccessMode = SET_ACCESS; @@ -1381,16 +1381,16 @@ static void test_reg_create_key(void)
dwRet = SetEntriesInAclA(1, &access, NULL, &key_acl); ok(dwRet == ERROR_SUCCESS, - "Expected SetEntriesInAclA to return ERROR_SUCCESS, got %u, last error %u\n", dwRet, GetLastError()); + "Expected SetEntriesInAclA to return ERROR_SUCCESS, got %lu, last error %lu\n", dwRet, GetLastError());
sd = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH); bRet = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); ok(bRet == TRUE, - "Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + "Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %lu\n", bRet, GetLastError());
bRet = SetSecurityDescriptorDacl(sd, TRUE, key_acl, FALSE); ok(bRet == TRUE, - "Expected SetSecurityDescriptorDacl to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + "Expected SetSecurityDescriptorDacl to return TRUE, got %d, last error %lu\n", bRet, GetLastError());
if (limited_user) { @@ -1400,24 +1400,24 @@ static void test_reg_create_key(void) { ret = RegSetKeySecurity(hkRoot64, DACL_SECURITY_INFORMATION, sd); ok(ret == ERROR_SUCCESS, - "Expected RegSetKeySecurity to return success, got error %u\n", ret); + "Expected RegSetKeySecurity to return success, got error %lu\n", ret);
ret = RegSetKeySecurity(hkRoot32, DACL_SECURITY_INFORMATION, sd); ok(ret == ERROR_SUCCESS, - "Expected RegSetKeySecurity to return success, got error %u\n", ret); + "Expected RegSetKeySecurity to return success, got error %lu\n", ret);
hkey1 = NULL; ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_64KEY | KEY_READ, NULL, &hkey1, NULL); ok(ret == ERROR_SUCCESS && hkey1 != NULL, - "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); + "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%lu)\n", ret); RegCloseKey(hkey1);
hkey1 = NULL; ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_32KEY | KEY_READ, NULL, &hkey1, NULL); ok(ret == ERROR_SUCCESS && hkey1 != NULL, - "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); + "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%lu)\n", ret); RegCloseKey(hkey1); }
@@ -1439,19 +1439,19 @@ static void test_reg_close_key(void) * hkHandle remains changed after call to RegCloseKey */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\Test", &hkHandle); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(hkHandle); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
/* try to close the key twice */ ret = RegCloseKey(hkHandle); /* Windows 95 doesn't mind. */ ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_SUCCESS, - "expected ERROR_INVALID_HANDLE or ERROR_SUCCESS, got %d\n", ret); + "expected ERROR_INVALID_HANDLE or ERROR_SUCCESS, got %ld\n", ret);
/* try to close a NULL handle */ ret = RegCloseKey(NULL); ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 95 returns BADKEY */ - "expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); + "expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld\n", ret);
/* Check to see if we didn't potentially close our main handle, which could happen on win98 as * win98 doesn't give a new handle when the same key is opened. @@ -1485,15 +1485,15 @@ static void test_reg_delete_key(void) ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_ACCESS_DENIED || ret == ERROR_BADKEY, /* Win95 */ - "ret=%d\n", ret); + "ret=%ld\n", ret);
ret = RegCreateKeyA(hkey_main, "deleteme", &key); - ok(ret == ERROR_SUCCESS, "Could not create key, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Could not create key, got %ld\n", ret); ret = RegDeleteKeyA(key, ""); - ok(ret == ERROR_SUCCESS, "RegDeleteKeyA failed, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "RegDeleteKeyA failed, got %ld\n", ret); RegCloseKey(key); ret = RegOpenKeyA(hkey_main, "deleteme", &key); - ok(ret == ERROR_FILE_NOT_FOUND, "Key was not deleted, got %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "Key was not deleted, got %ld\n", ret); RegCloseKey(key); }
@@ -1543,7 +1543,7 @@ static void test_reg_save_key(void) }
ret = RegSaveKeyA(hkey_main, "saved_key", NULL); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
set_privileges(SE_BACKUP_NAME, FALSE); } @@ -1561,12 +1561,12 @@ static void test_reg_load_key(void) }
ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", "saved_key"); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
set_privileges(SE_RESTORE_NAME, FALSE);
ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &hkHandle); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
RegCloseKey(hkHandle); } @@ -1587,18 +1587,18 @@ static void test_reg_unload_key(void) }
ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Test", 0, KEY_READ, &key); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
/* try to unload though the key handle is live */ pRtlInitUnicodeString(&key_name, L"\REGISTRY\Machine\Test"); InitializeObjectAttributes(&attr, &key_name, OBJ_CASE_INSENSITIVE, NULL, NULL); status = pNtUnloadKey(&attr); - ok(status == STATUS_CANNOT_DELETE, "expected STATUS_CANNOT_DELETE, got %08x\n", status); + ok(status == STATUS_CANNOT_DELETE, "expected STATUS_CANNOT_DELETE, got %08lx\n", status);
RegCloseKey(key);
ret = RegUnLoadKeyA(HKEY_LOCAL_MACHINE, "Test"); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
set_privileges(SE_RESTORE_NAME, FALSE);
@@ -1621,7 +1621,7 @@ static void test_regconnectregistry( void)
SetLastError(0xdeadbeef); ret = GetComputerNameA(compName, &len); - ok( ret, "GetComputerName failed err = %d\n", GetLastError()); + ok( ret, "GetComputerName failed err = %ld\n", GetLastError()); if( !ret) return;
lstrcpyA(netwName, "\\"); @@ -1631,14 +1631,14 @@ static void test_regconnectregistry( void) ok( !retl || retl == ERROR_DLL_INIT_FAILED || retl == ERROR_BAD_NETPATH, /* some win2k */ - "RegConnectRegistryA failed err = %d\n", retl); + "RegConnectRegistryA failed err = %ld\n", retl); if( !retl) RegCloseKey( hkey);
retl = RegConnectRegistryA( netwName, HKEY_LOCAL_MACHINE, &hkey); ok( !retl || retl == ERROR_DLL_INIT_FAILED || retl == ERROR_BAD_NETPATH, /* some win2k */ - "RegConnectRegistryA failed err = %d\n", retl); + "RegConnectRegistryA failed err = %ld\n", retl); if( !retl) RegCloseKey( hkey);
SetLastError(0xdeadbeef); @@ -1649,12 +1649,12 @@ static void test_regconnectregistry( void) return; }
- ok( schnd != NULL, "OpenSCManagerA failed err = %d\n", GetLastError()); + ok( schnd != NULL, "OpenSCManagerA failed err = %ld\n", GetLastError()); CloseServiceHandle( schnd);
SetLastError(0xdeadbeef); schnd = OpenSCManagerA( netwName, NULL, GENERIC_READ); - ok( schnd != NULL, "OpenSCManagerA failed err = %d\n", GetLastError()); + ok( schnd != NULL, "OpenSCManagerA failed err = %ld\n", GetLastError()); CloseServiceHandle( schnd);
} @@ -1667,10 +1667,10 @@ static void test_reg_query_value(void) LONG size, ret;
ret = RegCreateKeyA(hkey_main, "subkey", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegSetValueA(subkey, NULL, REG_SZ, "data", 4); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* try an invalid hkey */ SetLastError(0xdeadbeef); @@ -1679,58 +1679,58 @@ static void test_reg_query_value(void) ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY || /* Windows 98 returns BADKEY */ ret == ERROR_ACCESS_DENIED, /* non-admin winxp */ - "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a NULL hkey */ SetLastError(0xdeadbeef); size = MAX_PATH; ret = RegQueryValueA(NULL, "subkey", val, &size); ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 98 returns BADKEY */ - "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a NULL value */ size = MAX_PATH; ret = RegQueryValueA(hkey_main, "subkey", NULL, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(size == 5, "Expected 5, got %d\n", size); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); + ok(size == 5, "Expected 5, got %ld\n", size);
/* try a NULL size */ SetLastError(0xdeadbeef); val[0] = '\0'; ret = RegQueryValueA(hkey_main, "subkey", val, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!val[0], "Expected val to be untouched, got %s\n", val);
/* try a NULL value and size */ ret = RegQueryValueA(hkey_main, "subkey", NULL, NULL); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* try a size too small */ SetLastError(0xdeadbeef); val[0] = '\0'; size = 1; ret = RegQueryValueA(hkey_main, "subkey", val, &size); - ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!val[0], "Expected val to be untouched, got %s\n", val); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
/* successfully read the value using 'subkey' */ size = MAX_PATH; ret = RegQueryValueA(hkey_main, "subkey", val, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!lstrcmpA(val, "data"), "Expected 'data', got '%s'\n", val); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
/* successfully read the value using the subkey key */ size = MAX_PATH; ret = RegQueryValueA(subkey, NULL, val, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!lstrcmpA(val, "data"), "Expected 'data', got '%s'\n", val); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
/* unicode - try size too small */ SetLastError(0xdeadbeef); @@ -1742,38 +1742,38 @@ static void test_reg_query_value(void) win_skip("RegQueryValueW is not implemented\n"); goto cleanup; } - ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!valW[0], "Expected valW to be untouched\n"); - ok(size == 10, "Got wrong size: %d\n", size); + ok(size == 10, "Got wrong size: %ld\n", size);
/* unicode - try size in WCHARS */ SetLastError(0xdeadbeef); size = ARRAY_SIZE(valW); ret = RegQueryValueW(subkey, NULL, valW, &size); - ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %ld\n", ret); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!valW[0], "Expected valW to be untouched\n"); - ok(size == 10, "Got wrong size: %d\n", size); + ok(size == 10, "Got wrong size: %ld\n", size);
/* unicode - successfully read the value */ size = sizeof(valW); ret = RegQueryValueW(subkey, NULL, valW, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!lstrcmpW(valW, L"data"), "Got wrong value\n"); - ok(size == 10, "Got wrong size: %d\n", size); + ok(size == 10, "Got wrong size: %ld\n", size);
/* unicode - set the value without a NULL terminator */ ret = RegSetValueW(subkey, NULL, REG_SZ, L"data", 8); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* unicode - read the unterminated value, value is terminated for us */ memset(valW, 'a', sizeof(valW)); size = sizeof(valW); ret = RegQueryValueW(subkey, NULL, valW, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!lstrcmpW(valW, L"data"), "Got wrong value\n"); - ok(size == 10, "Got wrong size: %d\n", size); + ok(size == 10, "Got wrong size: %ld\n", size);
cleanup: RegDeleteKeyA(subkey, ""); @@ -1799,134 +1799,134 @@ static void test_reg_query_info(void) FILETIME lastwrite;
ret = RegCreateKeyExA(hkey_main, "subkey", 0, subkey_class, 0, KEY_ALL_ACCESS, NULL, &subkey, NULL); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* all parameters NULL */ ret = RegQueryInfoKeyA(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_HANDLE, "ret = %d\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "ret = %ld\n", ret);
ret = RegQueryInfoKeyW(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_HANDLE, "ret = %d\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "ret = %ld\n", ret);
/* not requesting any information */ ret = RegQueryInfoKeyA(subkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret);
ret = RegQueryInfoKeyW(subkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret);
/* class without length is invalid */ memset(classbuffer, 0x55, sizeof(classbuffer)); ret = RegQueryInfoKeyA(subkey, classbuffer, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "ret = %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "ret = %ld\n", ret); ok(classbuffer[0] == 0x55, "classbuffer[0] = 0x%x\n", classbuffer[0]);
memset(classbufferW, 0x55, sizeof(classbufferW)); ret = RegQueryInfoKeyW(subkey, classbufferW, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "ret = %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "ret = %ld\n", ret); ok(classbufferW[0] == 0x5555, "classbufferW[0] = 0x%x\n", classbufferW[0]);
/* empty key */ sdlen = classlen =0; ret = RegQueryInfoKeyA(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen); - ok(subkeys == 0, "subkeys = %u\n", subkeys); - ok(maxsubkeylen == 0, "maxsubkeylen = %u\n", maxsubkeylen); - ok(maxclasslen == 0, "maxclasslen = %u\n", maxclasslen); - ok(values == 0, "values = %u\n", values); - ok(maxvaluenamelen == 0, "maxvaluenamelen = %u\n", maxvaluenamelen); - ok(maxvaluelen == 0, "maxvaluelen = %u\n", maxvaluelen); - todo_wine ok(sdlen != 0, "sdlen = %u\n", sdlen); - ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime); - ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(classlen == strlen(subkey_class), "classlen = %lu\n", classlen); + ok(subkeys == 0, "subkeys = %lu\n", subkeys); + ok(maxsubkeylen == 0, "maxsubkeylen = %lu\n", maxsubkeylen); + ok(maxclasslen == 0, "maxclasslen = %lu\n", maxclasslen); + ok(values == 0, "values = %lu\n", values); + ok(maxvaluenamelen == 0, "maxvaluenamelen = %lu\n", maxvaluenamelen); + ok(maxvaluelen == 0, "maxvaluelen = %lu\n", maxvaluelen); + todo_wine ok(sdlen != 0, "sdlen = %lu\n", sdlen); + ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %lu\n", lastwrite.dwLowDateTime); + ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %lu\n", lastwrite.dwHighDateTime);
sdlen = classlen = 0; ret = RegQueryInfoKeyW(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen); - ok(subkeys == 0, "subkeys = %u\n", subkeys); - ok(maxsubkeylen == 0, "maxsubkeylen = %u\n", maxsubkeylen); - ok(maxclasslen == 0, "maxclasslen = %u\n", maxclasslen); - ok(values == 0, "values = %u\n", values); - ok(maxvaluenamelen == 0, "maxvaluenamelen = %u\n", maxvaluenamelen); - ok(maxvaluelen == 0, "maxvaluelen = %u\n", maxvaluelen); - todo_wine ok(sdlen != 0, "sdlen = %u\n", sdlen); - ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime); - ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(classlen == strlen(subkey_class), "classlen = %lu\n", classlen); + ok(subkeys == 0, "subkeys = %lu\n", subkeys); + ok(maxsubkeylen == 0, "maxsubkeylen = %lu\n", maxsubkeylen); + ok(maxclasslen == 0, "maxclasslen = %lu\n", maxclasslen); + ok(values == 0, "values = %lu\n", values); + ok(maxvaluenamelen == 0, "maxvaluenamelen = %lu\n", maxvaluenamelen); + ok(maxvaluelen == 0, "maxvaluelen = %lu\n", maxvaluelen); + todo_wine ok(sdlen != 0, "sdlen = %lu\n", sdlen); + ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %lu\n", lastwrite.dwLowDateTime); + ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %lu\n", lastwrite.dwHighDateTime);
ret = RegCreateKeyExA(subkey, "subsubkey", 0, subsubkey_class, 0, KEY_ALL_ACCESS, NULL, &subsubkey, NULL); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegSetValueExA(subkey, NULL, 0, REG_SZ, (const BYTE*)"data", 5); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* with subkey & default value */ sdlen = classlen = 0; ret = RegQueryInfoKeyA(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen); - ok(subkeys == 1, "subkeys = %u\n", subkeys); - ok(maxsubkeylen == strlen("subsubkey"), "maxsubkeylen = %u\n", maxsubkeylen); - ok(maxclasslen == strlen(subsubkey_class), "maxclasslen = %u\n", maxclasslen); - ok(values == 1, "values = %u\n", values); - ok(maxvaluenamelen == 0, "maxvaluenamelen = %u\n", maxvaluenamelen); - ok(maxvaluelen == sizeof("data") * sizeof(WCHAR), "maxvaluelen = %u\n", maxvaluelen); - todo_wine ok(sdlen != 0, "sdlen = %u\n", sdlen); - ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime); - ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(classlen == strlen(subkey_class), "classlen = %lu\n", classlen); + ok(subkeys == 1, "subkeys = %lu\n", subkeys); + ok(maxsubkeylen == strlen("subsubkey"), "maxsubkeylen = %lu\n", maxsubkeylen); + ok(maxclasslen == strlen(subsubkey_class), "maxclasslen = %lu\n", maxclasslen); + ok(values == 1, "values = %lu\n", values); + ok(maxvaluenamelen == 0, "maxvaluenamelen = %lu\n", maxvaluenamelen); + ok(maxvaluelen == sizeof("data") * sizeof(WCHAR), "maxvaluelen = %lu\n", maxvaluelen); + todo_wine ok(sdlen != 0, "sdlen = %lu\n", sdlen); + ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %lu\n", lastwrite.dwLowDateTime); + ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %lu\n", lastwrite.dwHighDateTime);
sdlen = classlen = 0; ret = RegQueryInfoKeyW(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen); - ok(subkeys == 1, "subkeys = %u\n", subkeys); - ok(maxsubkeylen == strlen("subsubkey"), "maxsubkeylen = %u\n", maxsubkeylen); - ok(maxclasslen == strlen(subsubkey_class), "maxclasslen = %u\n", maxclasslen); - ok(values == 1, "values = %u\n", values); - ok(maxvaluenamelen == 0, "maxvaluenamelen = %u\n", maxvaluenamelen); - ok(maxvaluelen == sizeof("data") * sizeof(WCHAR), "maxvaluelen = %u\n", maxvaluelen); - todo_wine ok(sdlen != 0, "sdlen = %u\n", sdlen); - ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime); - ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(classlen == strlen(subkey_class), "classlen = %lu\n", classlen); + ok(subkeys == 1, "subkeys = %lu\n", subkeys); + ok(maxsubkeylen == strlen("subsubkey"), "maxsubkeylen = %lu\n", maxsubkeylen); + ok(maxclasslen == strlen(subsubkey_class), "maxclasslen = %lu\n", maxclasslen); + ok(values == 1, "values = %lu\n", values); + ok(maxvaluenamelen == 0, "maxvaluenamelen = %lu\n", maxvaluenamelen); + ok(maxvaluelen == sizeof("data") * sizeof(WCHAR), "maxvaluelen = %lu\n", maxvaluelen); + todo_wine ok(sdlen != 0, "sdlen = %lu\n", sdlen); + ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %lu\n", lastwrite.dwLowDateTime); + ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %lu\n", lastwrite.dwHighDateTime);
ret = RegSetValueExA(subkey, "value one", 0, REG_SZ, (const BYTE*)"first value data", 17); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegSetValueExA(subkey, "value 2", 0, REG_SZ, (const BYTE*)"second value data", 18); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* with named value */ classlen = 0; ret = RegQueryInfoKeyA(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(values == 3, "values = %u\n", values); - ok(maxvaluenamelen == strlen("value one"), "maxvaluenamelen = %u\n", maxvaluenamelen); - ok(maxvaluelen == sizeof("second value data") * sizeof(WCHAR), "maxvaluelen = %u\n", maxvaluelen); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(values == 3, "values = %lu\n", values); + ok(maxvaluenamelen == strlen("value one"), "maxvaluenamelen = %lu\n", maxvaluenamelen); + ok(maxvaluelen == sizeof("second value data") * sizeof(WCHAR), "maxvaluelen = %lu\n", maxvaluelen);
classlen = 0; ret = RegQueryInfoKeyW(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(values == 3, "values = %u\n", values); - ok(maxvaluenamelen == strlen("value one"), "maxvaluenamelen = %u\n", maxvaluenamelen); - ok(maxvaluelen == sizeof("second value data") * sizeof(WCHAR), "maxvaluelen = %u\n", maxvaluelen); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(values == 3, "values = %lu\n", values); + ok(maxvaluenamelen == strlen("value one"), "maxvaluenamelen = %lu\n", maxvaluenamelen); + ok(maxvaluelen == sizeof("second value data") * sizeof(WCHAR), "maxvaluelen = %lu\n", maxvaluelen);
/* class name with zero size buffer */ memset(classbuffer, 0x55, sizeof(classbuffer)); classlen = 0; ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); ok(classlen == strlen(subkey_class) /* win2k */ || - classlen == 0, "classlen = %u\n", classlen); + classlen == 0, "classlen = %lu\n", classlen); memset(expectbuffer, 0x55, sizeof(expectbuffer)); ok(!memcmp(classbuffer, expectbuffer, sizeof(classbuffer)), "classbuffer was modified\n");
memset(classbufferW, 0x55, sizeof(classbufferW)); classlen = 0; ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); ok(classlen == strlen(subkey_class) /* win2k */ || - classlen == 0, "classlen = %u\n", classlen); + classlen == 0, "classlen = %lu\n", classlen); memset(expectbufferW, 0x55, sizeof(expectbufferW)); ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), "classbufferW was modified\n");
@@ -1934,8 +1934,8 @@ static void test_reg_query_info(void) memset(classbuffer, 0x55, sizeof(classbuffer)); classlen = 1; ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_MORE_DATA, "ret = %d\n", ret); - ok(classlen == 0, "classlen = %u\n", classlen); + ok(ret == ERROR_MORE_DATA, "ret = %ld\n", ret); + ok(classlen == 0, "classlen = %lu\n", classlen); memset(expectbuffer, 0x55, sizeof(expectbuffer)); expectbuffer[0] = 0; ok(!memcmp(classbuffer, expectbuffer, sizeof(classbuffer)), "classbuffer was modified\n"); @@ -1944,9 +1944,9 @@ static void test_reg_query_info(void) classlen = 1; ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); /* failure-code changed to ERROR_MORE_DATA in recent win10 */ - ok((ret == ERROR_INSUFFICIENT_BUFFER) || (ret == ERROR_MORE_DATA), "ret = %d\n", ret); + ok((ret == ERROR_INSUFFICIENT_BUFFER) || (ret == ERROR_MORE_DATA), "ret = %ld\n", ret); ok(classlen == 0 /* win8 */ || - classlen == strlen(subkey_class), "classlen = %u\n", classlen); + classlen == strlen(subkey_class), "classlen = %lu\n", classlen); memset(expectbufferW, 0x55, sizeof(expectbufferW)); ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), "classbufferW was modified\n");
@@ -1954,8 +1954,8 @@ static void test_reg_query_info(void) memset(classbuffer, 0x55, sizeof(classbuffer)); classlen = sizeof(subkey_class) - 1; ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_MORE_DATA, "ret = %d\n", ret); - ok(classlen == sizeof(subkey_class) - 2, "classlen = %u\n", classlen); + ok(ret == ERROR_MORE_DATA, "ret = %ld\n", ret); + ok(classlen == sizeof(subkey_class) - 2, "classlen = %lu\n", classlen); memset(expectbuffer, 0x55, sizeof(expectbuffer)); strcpy(expectbuffer, subkey_class); expectbuffer[sizeof(subkey_class) - 2] = 0; @@ -1967,9 +1967,9 @@ static void test_reg_query_info(void) memset(classbufferW, 0x55, sizeof(classbufferW)); classlen = sizeof(subkey_class) - 1; ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret); + ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %ld\n", ret); ok(classlen == sizeof(subkey_class) - 2 /* win8 */ || - classlen == strlen(subkey_class), "classlen = %u\n", classlen); + classlen == strlen(subkey_class), "classlen = %lu\n", classlen); memset(expectbufferW, 0x55, sizeof(expectbufferW)); ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), "classbufferW was modified\n");
@@ -1977,8 +1977,8 @@ static void test_reg_query_info(void) memset(classbuffer, 0x55, sizeof(classbuffer)); classlen = sizeof(subkey_class); ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == sizeof(subkey_class) - 1, "classlen = %u\n", classlen); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(classlen == sizeof(subkey_class) - 1, "classlen = %lu\n", classlen); memset(expectbuffer, 0x55, sizeof(expectbuffer)); strcpy(expectbuffer, subkey_class); ok(!memcmp(classbuffer, expectbuffer, sizeof(classbuffer)), @@ -1988,8 +1988,8 @@ static void test_reg_query_info(void) memset(classbuffer, 0x55, sizeof(classbuffer)); classlen = 0xdeadbeef; ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == sizeof(subkey_class) - 1, "classlen = %u\n", classlen); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(classlen == sizeof(subkey_class) - 1, "classlen = %lu\n", classlen); memset(expectbuffer, 0x55, sizeof(expectbuffer)); strcpy(expectbuffer, subkey_class); ok(!memcmp(classbuffer, expectbuffer, sizeof(classbuffer)), @@ -1999,8 +1999,8 @@ static void test_reg_query_info(void) memset(classbufferW, 0x55, sizeof(classbufferW)); classlen = sizeof(subkey_class); ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == sizeof(subkey_class) - 1, "classlen = %u\n", classlen); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(classlen == sizeof(subkey_class) - 1, "classlen = %lu\n", classlen); memset(expectbufferW, 0x55, sizeof(expectbufferW)); lstrcpyW(expectbufferW, subkey_classW); ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), @@ -2010,8 +2010,8 @@ static void test_reg_query_info(void) memset(classbufferW, 0x55, sizeof(classbufferW)); classlen = 0xdeadbeef; ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == sizeof(subkey_class) - 1, "classlen = %u\n", classlen); + ok(ret == ERROR_SUCCESS, "ret = %ld\n", ret); + ok(classlen == sizeof(subkey_class) - 1, "classlen = %lu\n", classlen); memset(expectbufferW, 0x55, sizeof(expectbufferW)); lstrcpyW(expectbufferW, subkey_classW); ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), @@ -2034,68 +2034,68 @@ static void test_string_termination(void) DWORD insize, outsize, nsize;
ret = RegCreateKeyA(hkey_main, "string_termination", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* Off-by-one RegSetValueExA -> adds a trailing '\0'! */ insize=sizeof(string)-1; ret = RegSetValueExA(subkey, "stringtest", 0, REG_SZ, (BYTE*)string, insize); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", ret); + ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %ld\n", ret); outsize=insize; ret = RegQueryValueExA(subkey, "stringtest", NULL, NULL, buffer, &outsize); - ok(ret == ERROR_MORE_DATA, "RegQueryValueExA returned: %d\n", ret); + ok(ret == ERROR_MORE_DATA, "RegQueryValueExA returned: %ld\n", ret);
/* Off-by-two RegSetValueExA -> no trailing '\0' */ insize=sizeof(string)-2; ret = RegSetValueExA(subkey, "stringtest", 0, REG_SZ, (BYTE*)string, insize); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", ret); + ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %ld\n", ret); outsize=0; ret = RegQueryValueExA(subkey, "stringtest", NULL, NULL, NULL, &outsize); - ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", ret); - ok(outsize == insize, "wrong size %u != %u\n", outsize, insize); + ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", ret); + ok(outsize == insize, "wrong size %lu != %lu\n", outsize, insize);
/* RegQueryValueExA may return a string with no trailing '\0' */ outsize=insize; memset(buffer, 0xbd, sizeof(buffer)); ret = RegQueryValueExA(subkey, "stringtest", NULL, NULL, buffer, &outsize); - ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", ret); - ok(outsize == insize, "wrong size: %u != %u\n", outsize, insize); - ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%u != %s\n", + ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", ret); + ok(outsize == insize, "wrong size: %lu != %lu\n", outsize, insize); + ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%lu != %s\n", debugstr_an((char*)buffer, outsize), outsize, string); - ok(buffer[insize] == 0xbd, "buffer overflow at %u %02x\n", insize, buffer[insize]); + ok(buffer[insize] == 0xbd, "buffer overflow at %lu %02x\n", insize, buffer[insize]);
/* RegQueryValueExA adds a trailing '\0' if there is room */ outsize=insize+1; memset(buffer, 0xbd, sizeof(buffer)); ret = RegQueryValueExA(subkey, "stringtest", NULL, NULL, buffer, &outsize); - ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", ret); - ok(outsize == insize, "wrong size: %u != %u\n", outsize, insize); - ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%u != %s\n", + ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", ret); + ok(outsize == insize, "wrong size: %lu != %lu\n", outsize, insize); + ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%lu != %s\n", debugstr_an((char*)buffer, outsize), outsize, string); - ok(buffer[insize] == 0, "buffer overflow at %u %02x\n", insize, buffer[insize]); + ok(buffer[insize] == 0, "buffer overflow at %lu %02x\n", insize, buffer[insize]);
/* RegEnumValueA may return a string with no trailing '\0' */ outsize=insize; memset(buffer, 0xbd, sizeof(buffer)); nsize=sizeof(name); ret = RegEnumValueA(subkey, 0, name, &nsize, NULL, NULL, buffer, &outsize); - ok(ret == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", ret); + ok(ret == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", ret); ok(strcmp(name, "stringtest") == 0, "wrong name: %s\n", name); - ok(outsize == insize, "wrong size: %u != %u\n", outsize, insize); - ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%u != %s\n", + ok(outsize == insize, "wrong size: %lu != %lu\n", outsize, insize); + ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%lu != %s\n", debugstr_an((char*)buffer, outsize), outsize, string); - ok(buffer[insize] == 0xbd, "buffer overflow at %u %02x\n", insize, buffer[insize]); + ok(buffer[insize] == 0xbd, "buffer overflow at %lu %02x\n", insize, buffer[insize]);
/* RegEnumValueA adds a trailing '\0' if there is room */ outsize=insize+1; memset(buffer, 0xbd, sizeof(buffer)); nsize=sizeof(name); ret = RegEnumValueA(subkey, 0, name, &nsize, NULL, NULL, buffer, &outsize); - ok(ret == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", ret); + ok(ret == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", ret); ok(strcmp(name, "stringtest") == 0, "wrong name: %s\n", name); - ok(outsize == insize, "wrong size: %u != %u\n", outsize, insize); - ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%u != %s\n", + ok(outsize == insize, "wrong size: %lu != %lu\n", outsize, insize); + ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%lu != %s\n", debugstr_an((char*)buffer, outsize), outsize, string); - ok(buffer[insize] == 0, "buffer overflow at %u %02x\n", insize, buffer[insize]); + ok(buffer[insize] == 0, "buffer overflow at %lu %02x\n", insize, buffer[insize]);
RegDeleteKeyA(subkey, ""); RegCloseKey(subkey); @@ -2115,82 +2115,82 @@ static void test_reg_copy_tree(void) }
ret = RegCreateKeyA(hkey_main, "src", &src); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCreateKeyA(hkey_main, "dst", &dst); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* Copy nonexistent subkey */ ret = pRegCopyTreeA(src, "nonexistent_subkey", dst); - ok(ret == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", ret);
/* Create test keys and values */ ret = RegSetValueA(src, NULL, REG_SZ, "data", 4); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegSetValueExA(src, "value", 0, REG_SZ, (const BYTE *)"data2", 5); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegCreateKeyA(src, "subkey2", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegSetValueA(subkey, NULL, REG_SZ, "data3", 5); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegSetValueExA(subkey, "value", 0, REG_SZ, (const BYTE *)"data4", 5); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegCreateKeyA(src, "subkey3", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
/* Copy subkey */ ret = pRegCopyTreeA(src, "subkey2", dst); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
size = MAX_PATH; ret = RegQueryValueA(dst, NULL, buffer, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!strcmp(buffer, "data3"), "Expected 'data3', got '%s'\n", buffer);
dwsize = MAX_PATH; ret = RegQueryValueExA(dst, "value", NULL, &type, (BYTE *)buffer, &dwsize); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); + ok(type == REG_SZ, "Expected REG_SZ, got %lu\n", type); ok(!strcmp(buffer, "data4"), "Expected 'data4', got '%s'\n", buffer);
/* Copy full tree */ ret = pRegCopyTreeA(src, NULL, dst); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
size = MAX_PATH; ret = RegQueryValueA(dst, NULL, buffer, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!strcmp(buffer, "data"), "Expected 'data', got '%s'\n", buffer);
dwsize = MAX_PATH; ret = RegQueryValueExA(dst, "value", NULL, &type, (BYTE *)buffer, &dwsize); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); + ok(type == REG_SZ, "Expected REG_SZ, got %lu\n", type); ok(!strcmp(buffer, "data2"), "Expected 'data2', got '%s'\n", buffer);
ret = RegOpenKeyA(dst, "subkey2", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); size = MAX_PATH; ret = RegQueryValueA(subkey, NULL, buffer, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!strcmp(buffer, "data3"), "Expected 'data3', got '%s'\n", buffer); dwsize = MAX_PATH; ret = RegQueryValueExA(subkey, "value", NULL, &type, (BYTE *)buffer, &dwsize); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); + ok(type == REG_SZ, "Expected REG_SZ, got %lu\n", type); ok(!strcmp(buffer, "data4"), "Expected 'data4', got '%s'\n", buffer); ret = RegCloseKey(subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegOpenKeyA(dst, "subkey3", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
delete_key(src); delete_key(dst); @@ -2209,18 +2209,18 @@ static void test_reg_delete_tree(void) }
ret = RegCreateKeyA(hkey_main, "subkey", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCreateKeyA(subkey, "subkey2", &subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegSetValueA(subkey, NULL, REG_SZ, "data", 4); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegSetValueA(subkey2, NULL, REG_SZ, "data2", 5); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = pRegDeleteTreeA(subkey, "subkey2"); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(RegOpenKeyA(subkey, "subkey2", &subkey2), "subkey2 was not deleted\n"); size = MAX_PATH; @@ -2228,30 +2228,30 @@ static void test_reg_delete_tree(void) "Default value of subkey no longer present\n");
ret = RegCreateKeyA(subkey, "subkey2", &subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = pRegDeleteTreeA(hkey_main, "subkey\subkey2"); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(RegOpenKeyA(subkey, "subkey2", &subkey2), "subkey2 was not deleted\n"); ok(!RegQueryValueA(subkey, NULL, buffer, &size), "Default value of subkey no longer present\n");
ret = RegCreateKeyA(subkey, "subkey2", &subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCreateKeyA(subkey, "subkey3", &subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegSetValueA(subkey, NULL, REG_SZ, "data", 4); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegSetValueExA(subkey, "value", 0, REG_SZ, (const BYTE *)"data2", 5); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = pRegDeleteTreeA(subkey, NULL); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!RegOpenKeyA(hkey_main, "subkey", &subkey), "subkey was deleted\n"); ok(RegOpenKeyA(subkey, "subkey2", &subkey2), @@ -2267,23 +2267,23 @@ static void test_reg_delete_tree(void) ok(RegQueryValueExA(subkey, "value", NULL, &type, (BYTE *)buffer, &dwsize), "Value is still present\n"); ret = RegCloseKey(subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegOpenKeyA(hkey_main, "subkey", &subkey); ok(ret == ERROR_SUCCESS, "subkey was deleted\n"); ret = pRegDeleteTreeA(subkey, ""); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ret = RegCloseKey(subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegOpenKeyA(hkey_main, "subkey", &subkey); ok(ret == ERROR_SUCCESS, "subkey was deleted\n"); ret = RegCloseKey(subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret);
ret = pRegDeleteTreeA(hkey_main, "not-here"); ok(ret == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", ret); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", ret); }
static void test_rw_order(void) @@ -2313,7 +2313,7 @@ static void test_rw_order(void)
ok(!RegQueryInfoKeyA(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &values, &value_name_max_len, NULL, NULL, NULL), "RegQueryInfoKeyA failed\n"); - ok(values == 4, "Expected 4 values, got %u\n", values); + ok(values == 4, "Expected 4 values, got %lu\n", values);
/* Value enumeration preserves RegSetValueEx call order */ value_len = 2; @@ -2357,103 +2357,103 @@ static void test_symlinks(void)
err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK, KEY_ALL_ACCESS, NULL, &link, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed: %lu\n", err );
/* REG_SZ is not allowed */ err = RegSetValueExA( link, "SymbolicLinkValue", 0, REG_SZ, (BYTE *)"foobar", sizeof("foobar") ); - ok( err == ERROR_ACCESS_DENIED, "RegSetValueEx wrong error %u\n", err ); + ok( err == ERROR_ACCESS_DENIED, "RegSetValueEx wrong error %lu\n", err ); err = RegSetValueExA( link, "SymbolicLinkValue", 0, REG_LINK, (BYTE *)target, target_len - sizeof(WCHAR) ); - ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %lu\n", err ); /* other values are not allowed */ err = RegSetValueExA( link, "link", 0, REG_LINK, (BYTE *)target, target_len - sizeof(WCHAR) ); - ok( err == ERROR_ACCESS_DENIED, "RegSetValueEx wrong error %u\n", err ); + ok( err == ERROR_ACCESS_DENIED, "RegSetValueEx wrong error %lu\n", err );
/* try opening the target through the link */
err = RegOpenKeyA( hkey_main, "link", &key ); - ok( err == ERROR_FILE_NOT_FOUND, "RegOpenKey wrong error %u\n", err ); + ok( err == ERROR_FILE_NOT_FOUND, "RegOpenKey wrong error %lu\n", err );
err = RegCreateKeyExA( hkey_main, "target", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %lu\n", err );
dw = 0xbeef; err = RegSetValueExA( key, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); - ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %lu\n", err ); RegCloseKey( key );
err = RegOpenKeyA( hkey_main, "link", &key ); - ok( err == ERROR_SUCCESS, "RegOpenKey failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegOpenKey failed error %lu\n", err );
len = sizeof(buffer); err = RegQueryValueExA( key, "value", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegOpenKey failed error %u\n", err ); - ok( len == sizeof(DWORD), "wrong len %u\n", len ); + ok( err == ERROR_SUCCESS, "RegOpenKey failed error %lu\n", err ); + ok( len == sizeof(DWORD), "wrong len %lu\n", len );
len = sizeof(buffer); err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_FILE_NOT_FOUND, "RegQueryValueEx wrong error %u\n", err ); + ok( err == ERROR_FILE_NOT_FOUND, "RegQueryValueEx wrong error %lu\n", err );
/* REG_LINK can be created in non-link keys */ err = RegSetValueExA( key, "SymbolicLinkValue", 0, REG_LINK, (BYTE *)target, target_len - sizeof(WCHAR) ); - ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %lu\n", err ); len = sizeof(buffer); err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); - ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); + ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %lu\n", err ); + ok( len == target_len - sizeof(WCHAR), "wrong len %lu\n", len ); err = RegDeleteValueA( key, "SymbolicLinkValue" ); - ok( err == ERROR_SUCCESS, "RegDeleteValue failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegDeleteValue failed error %lu\n", err );
RegCloseKey( key );
err = RegCreateKeyExA( hkey_main, "link", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %lu\n", err );
len = sizeof(buffer); err = RegQueryValueExA( key, "value", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); - ok( len == sizeof(DWORD), "wrong len %u\n", len ); + ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %lu\n", err ); + ok( len == sizeof(DWORD), "wrong len %lu\n", len );
err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_FILE_NOT_FOUND, "RegQueryValueEx wrong error %u\n", err ); + ok( err == ERROR_FILE_NOT_FOUND, "RegQueryValueEx wrong error %lu\n", err ); RegCloseKey( key );
/* now open the symlink itself */
err = RegOpenKeyExA( hkey_main, "link", REG_OPTION_OPEN_LINK, KEY_ALL_ACCESS, &key ); - ok( err == ERROR_SUCCESS, "RegOpenKeyEx failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegOpenKeyEx failed error %lu\n", err ); len = sizeof(buffer); err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); - ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); + ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %lu\n", err ); + ok( len == target_len - sizeof(WCHAR), "wrong len %lu\n", len ); RegCloseKey( key );
err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_OPEN_LINK, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %lu\n", err ); len = sizeof(buffer); err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); - ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); + ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %lu\n", err ); + ok( len == target_len - sizeof(WCHAR), "wrong len %lu\n", len ); RegCloseKey( key );
err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_ALREADY_EXISTS, "RegCreateKeyEx wrong error %u\n", err ); + ok( err == ERROR_ALREADY_EXISTS, "RegCreateKeyEx wrong error %lu\n", err );
err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK | REG_OPTION_OPEN_LINK, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_ALREADY_EXISTS, "RegCreateKeyEx wrong error %u\n", err ); + ok( err == ERROR_ALREADY_EXISTS, "RegCreateKeyEx wrong error %lu\n", err );
err = RegDeleteKeyA( hkey_main, "target" ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed error %u\n", err ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed error %lu\n", err );
err = RegDeleteKeyA( hkey_main, "link" ); - ok( err == ERROR_FILE_NOT_FOUND, "RegDeleteKey wrong error %u\n", err ); + ok( err == ERROR_FILE_NOT_FOUND, "RegDeleteKey wrong error %lu\n", err );
status = pNtDeleteKey( link ); - ok( !status, "NtDeleteKey failed: 0x%08x\n", status ); + ok( !status, "NtDeleteKey failed: 0x%08lx\n", status ); RegCloseKey( link );
HeapFree( GetProcessHeap(), 0, target ); @@ -2467,13 +2467,13 @@ static DWORD get_key_value( HKEY root, const char *name, DWORD flags )
err = RegCreateKeyExA( root, name, 0, NULL, 0, flags | KEY_ALL_ACCESS, NULL, &key, NULL ); if (err == ERROR_FILE_NOT_FOUND) return 0; - ok( err == ERROR_SUCCESS, "%08x: RegCreateKeyEx failed: %u\n", flags, err ); + ok( err == ERROR_SUCCESS, "%08lx: RegCreateKeyEx failed: %lu\n", flags, err );
err = RegQueryValueExA( key, "value", NULL, &type, (BYTE *)&dw, &len ); if (err == ERROR_FILE_NOT_FOUND) dw = 0; else - ok( err == ERROR_SUCCESS, "%08x: RegQueryValueEx failed: %u\n", flags, err ); + ok( err == ERROR_SUCCESS, "%08lx: RegQueryValueEx failed: %lu\n", flags, err ); RegCloseKey( key ); return dw; } @@ -2481,7 +2481,7 @@ static DWORD get_key_value( HKEY root, const char *name, DWORD flags ) static void _check_key_value( int line, HANDLE root, const char *name, DWORD flags, DWORD expect ) { DWORD dw = get_key_value( root, name, flags ); - ok_(__FILE__,line)( dw == expect, "%08x: wrong value %u/%u\n", flags, dw, expect ); + ok_(__FILE__,line)( dw == expect, "%08lx: wrong value %lu/%lu\n", flags, dw, expect ); } #define check_key_value(root,name,flags,expect) _check_key_value( __LINE__, root, name, flags, expect )
@@ -2510,43 +2510,43 @@ static void test_redirection(void)
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &root64, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &root32, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wine\Winetest", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key64, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wine\Winetest", 0, NULL, 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key32, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
dw = 64; err = RegSetValueExA( key64, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); - ok( err == ERROR_SUCCESS, "RegSetValueExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegSetValueExA failed: %lu\n", err );
dw = 32; err = RegSetValueExA( key32, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); - ok( err == ERROR_SUCCESS, "RegSetValueExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegSetValueExA failed: %lu\n", err );
dw = 0; len = sizeof(dw); err = RegQueryValueExA( key32, "value", NULL, &type, (BYTE *)&dw, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueExA failed: %u\n", err ); - ok( dw == 32, "wrong value %u\n", dw ); + ok( err == ERROR_SUCCESS, "RegQueryValueExA failed: %lu\n", err ); + ok( dw == 32, "wrong value %lu\n", dw );
dw = 0; len = sizeof(dw); err = RegQueryValueExA( key64, "value", NULL, &type, (BYTE *)&dw, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueExA failed: %u\n", err ); - ok( dw == 64, "wrong value %u\n", dw ); + ok( err == ERROR_SUCCESS, "RegQueryValueExA failed: %lu\n", err ); + ok( dw == 64, "wrong value %lu\n", dw );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
if (ptr_size == 32) { @@ -2580,20 +2580,20 @@ static void test_redirection(void) { err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); dw = get_key_value( key, "Wine\Winetest", 0 ); - ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); + ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw ); check_key_value( key, "Wine\Winetest", KEY_WOW64_64KEY, 64 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_32KEY, 32 ); check_key_value( key, "Wow6432Node\Wine\Winetest", 0, 32 ); dw = get_key_value( key, "Wow6432Node\Wine\Winetest", KEY_WOW64_64KEY ); - ok( dw == 32 || broken(dw == 64) /* xp64 */, "wrong value %u\n", dw ); + ok( dw == 32 || broken(dw == 64) /* xp64 */, "wrong value %lu\n", dw ); check_key_value( key, "Wow6432Node\Wine\Winetest", KEY_WOW64_32KEY, 32 ); RegCloseKey( key );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Wine\Winetest", 0, 32 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_32KEY, 32 ); @@ -2606,20 +2606,20 @@ static void test_redirection(void) { err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Wine\Winetest", 0, 64 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_64KEY, 64 ); dw = get_key_value( key, "Wine\Winetest", KEY_WOW64_32KEY ); - todo_wine ok( dw == 32, "wrong value %u\n", dw ); + todo_wine ok( dw == 32, "wrong value %lu\n", dw ); check_key_value( key, "Wow6432Node\Wine\Winetest", 0, 32 ); RegCloseKey( key );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Wine\Winetest", 0, 32 ); dw = get_key_value( key, "Wine\Winetest", KEY_WOW64_64KEY ); - ok( dw == 32 || broken(dw == 64) /* vista */, "wrong value %u\n", dw ); + ok( dw == 32 || broken(dw == 64) /* vista */, "wrong value %lu\n", dw ); check_key_value( key, "Wine\Winetest", KEY_WOW64_32KEY, 32 ); RegCloseKey( key ); } @@ -2644,7 +2644,7 @@ static void test_redirection(void)
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wow6432Node", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Wine\Winetest", 0, 32 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_32KEY, 32 ); @@ -2654,16 +2654,16 @@ static void test_redirection(void) { err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wow6432Node", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); dw = get_key_value( key, "Wine\Winetest", 0 ); - ok( dw == (is_vista ? 64 : 32) || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); + ok( dw == (is_vista ? 64 : 32) || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw ); check_key_value( key, "Wine\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_32KEY, 32 ); RegCloseKey( key );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wow6432Node", 0, NULL, 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Wine\Winetest", 0, 32 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Wine\Winetest", KEY_WOW64_32KEY, 32 ); @@ -2672,7 +2672,7 @@ static void test_redirection(void)
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wow6432Node\Wine", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Winetest", 0, 32 ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); @@ -2682,16 +2682,16 @@ static void test_redirection(void) { err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wow6432Node\Wine", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); dw = get_key_value( key, "Winetest", 0 ); - ok( dw == 32 || (is_vista && dw == 64), "wrong value %u\n", dw ); + ok( dw == 32 || (is_vista && dw == 64), "wrong value %lu\n", dw ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); RegCloseKey( key );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wow6432Node\Wine", 0, NULL, 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Winetest", 0, 32 ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); @@ -2700,29 +2700,29 @@ static void test_redirection(void)
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Winetest", 0, ptr_size ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : ptr_size ); dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY ); todo_wine_if (ptr_size != 32) - ok( dw == 32, "wrong value %u\n", dw ); + ok( dw == 32, "wrong value %lu\n", dw ); RegCloseKey( key );
if (ptr_size == 32) { err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); dw = get_key_value( key, "Winetest", 0 ); - ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); + ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, 64 ); dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY ); - todo_wine ok( dw == 32, "wrong value %u\n", dw ); + todo_wine ok( dw == 32, "wrong value %lu\n", dw ); RegCloseKey( key );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Winetest", 0, 32 ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); @@ -2732,18 +2732,18 @@ static void test_redirection(void) if (pRegDeleteKeyExA) { err = pRegDeleteKeyExA( key32, "", KEY_WOW64_32KEY, 0 ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %lu\n", err ); err = pRegDeleteKeyExA( key64, "", KEY_WOW64_64KEY, 0 ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %lu\n", err ); pRegDeleteKeyExA( key64, "", KEY_WOW64_64KEY, 0 ); pRegDeleteKeyExA( root64, "", KEY_WOW64_64KEY, 0 ); } else { err = RegDeleteKeyA( key32, "" ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %lu\n", err ); err = RegDeleteKeyA( key64, "" ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %lu\n", err ); RegDeleteKeyA( key64, "" ); RegDeleteKeyA( root64, "" ); } @@ -2754,17 +2754,17 @@ static void test_redirection(void)
/* open key in native bit mode */ err = RegOpenKeyExA(HKEY_CLASSES_ROOT, "Interface", 0, KEY_ALL_ACCESS, &native); - ok(err == ERROR_SUCCESS, "got %i\n", err); + ok(err == ERROR_SUCCESS, "got %li\n", err);
pRegDeleteKeyExA(native, "AWineTest", 0, 0);
/* write subkey in opposite bit mode */ err = RegOpenKeyExA(HKEY_CLASSES_ROOT, "Interface", 0, KEY_ALL_ACCESS | opposite, &op_key); - ok(err == ERROR_SUCCESS, "got %i\n", err); + ok(err == ERROR_SUCCESS, "got %li\n", err);
err = RegCreateKeyExA(op_key, "AWineTest", 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &key, NULL); - ok(err == ERROR_SUCCESS || err == ERROR_ACCESS_DENIED, "got %i\n", err); + ok(err == ERROR_SUCCESS || err == ERROR_ACCESS_DENIED, "got %li\n", err); if(err != ERROR_SUCCESS){ win_skip("Can't write to registry\n"); RegCloseKey(op_key); @@ -2777,10 +2777,10 @@ static void test_redirection(void) err = RegOpenKeyExA(native, "AWineTest", 0, KEY_ALL_ACCESS, &key); ok(err == ERROR_FILE_NOT_FOUND || broken(err == ERROR_SUCCESS), /* before Win7, HKCR is reflected instead of redirected */ - "got %i\n", err); + "got %li\n", err);
err = pRegDeleteKeyExA(op_key, "AWineTest", opposite, 0); - ok(err == ERROR_SUCCESS, "got %i\n", err); + ok(err == ERROR_SUCCESS, "got %li\n", err);
RegCloseKey(op_key); RegCloseKey(native); @@ -2814,7 +2814,7 @@ static void test_classesroot(void) KEY_QUERY_VALUE|KEY_SET_VALUE, &hkcr ); todo_wine ok(res == ERROR_SUCCESS || broken(res == ERROR_FILE_NOT_FOUND /* WinNT */), - "test key not found in hkcr: %d\n", res); + "test key not found in hkcr: %ld\n", res); if (res) { skip("HKCR key merging not supported\n"); @@ -2827,38 +2827,38 @@ static void test_classesroot(void)
/* set a value in user's classes */ res = RegSetValueExA(hkey, "val1", 0, REG_SZ, (const BYTE *)"user", sizeof("user")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* try to find the value in hkcr */ res = RegQueryValueExA(hkcr, "val1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer );
/* modify the value in hkcr */ res = RegSetValueExA(hkcr, "val1", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* check if the value is also modified in user's classes */ res = RegQueryValueExA(hkey, "val1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld, GLE=%lx\n", res, GetLastError()); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer );
/* set a value in hkcr */ res = RegSetValueExA(hkcr, "val0", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* try to find the value in user's classes */ res = RegQueryValueExA(hkey, "val0", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer );
/* modify the value in user's classes */ res = RegSetValueExA(hkey, "val0", 0, REG_SZ, (const BYTE *)"user", sizeof("user")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* check if the value is also modified in hkcr */ res = RegQueryValueExA(hkcr, "val0", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld, GLE=%lx\n", res, GetLastError()); ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer );
/* cleanup */ @@ -2886,7 +2886,7 @@ static void test_classesroot(void) res = RegOpenKeyExA( HKEY_CLASSES_ROOT, "WineTestCls", 0, KEY_QUERY_VALUE|KEY_SET_VALUE, &hkcr ); ok(res == ERROR_SUCCESS, - "test key not found in hkcr: %d\n", res); + "test key not found in hkcr: %ld\n", res); ok(IS_HKCR(hkcr), "hkcr mask not set in %p\n", hkcr); if (res) { @@ -2897,20 +2897,20 @@ static void test_classesroot(void)
/* set a value in hklm classes */ res = RegSetValueExA(hklm, "val2", 0, REG_SZ, (const BYTE *)"hklm", sizeof("hklm")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* try to find the value in hkcr */ res = RegQueryValueExA(hkcr, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "hklm" ), "value set to '%s'\n", buffer );
/* modify the value in hkcr */ res = RegSetValueExA(hkcr, "val2", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* check that the value is modified in hklm classes */ res = RegQueryValueExA(hklm, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld, GLE=%lx\n", res, GetLastError()); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer );
if (RegCreateKeyExA( HKEY_CURRENT_USER, "Software\Classes\WineTestCls", 0, NULL, 0, @@ -2921,40 +2921,40 @@ static void test_classesroot(void) res = RegOpenKeyExA( HKEY_CLASSES_ROOT, "WineTestCls", 0, KEY_QUERY_VALUE|KEY_SET_VALUE, &hkcr ); ok(res == ERROR_SUCCESS, - "test key not found in hkcr: %d\n", res); + "test key not found in hkcr: %ld\n", res); ok(IS_HKCR(hkcr), "hkcr mask not set in %p\n", hkcr);
/* set a value in user's classes */ res = RegSetValueExA(hkey, "val2", 0, REG_SZ, (const BYTE *)"user", sizeof("user")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* try to find the value in hkcr */ res = RegQueryValueExA(hkcr, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer );
/* modify the value in hklm */ res = RegSetValueExA(hklm, "val2", 0, REG_SZ, (const BYTE *)"hklm", sizeof("hklm")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* check that the value is not overwritten in hkcr or user's classes */ res = RegQueryValueExA(hkcr, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); res = RegQueryValueExA(hkey, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld, GLE=%lx\n", res, GetLastError()); ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer );
/* modify the value in hkcr */ res = RegSetValueExA(hkcr, "val2", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* check that the value is overwritten in hklm and user's classes */ res = RegQueryValueExA(hkcr, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer ); res = RegQueryValueExA(hkey, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld, GLE=%lx\n", res, GetLastError()); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer );
/* create a subkey in hklm */ @@ -2963,25 +2963,25 @@ static void test_classesroot(void) ok(!IS_HKCR(hklmsub1), "hkcr mask set in %p\n", hklmsub1); /* try to open that subkey in hkcr */ res = RegOpenKeyExA( hkcr, "subkey1", 0, KEY_QUERY_VALUE|KEY_SET_VALUE, &hkcrsub1 ); - ok(res == ERROR_SUCCESS, "test key not found in hkcr: %d\n", res); + ok(res == ERROR_SUCCESS, "test key not found in hkcr: %ld\n", res); ok(IS_HKCR(hkcrsub1), "hkcr mask not set in %p\n", hkcrsub1);
/* set a value in hklm classes */ res = RegSetValueExA(hklmsub1, "subval1", 0, REG_SZ, (const BYTE *)"hklm", sizeof("hklm")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* try to find the value in hkcr */ res = RegQueryValueExA(hkcrsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "hklm" ), "value set to '%s'\n", buffer );
/* modify the value in hkcr */ res = RegSetValueExA(hkcrsub1, "subval1", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* check that the value is modified in hklm classes */ res = RegQueryValueExA(hklmsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld, GLE=%lx\n", res, GetLastError()); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer );
/* create a subkey in user's classes */ @@ -2991,35 +2991,35 @@ static void test_classesroot(void)
/* set a value in user's classes */ res = RegSetValueExA(hkeysub1, "subval1", 0, REG_SZ, (const BYTE *)"user", sizeof("user")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* try to find the value in hkcr */ res = RegQueryValueExA(hkcrsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer );
/* modify the value in hklm */ res = RegSetValueExA(hklmsub1, "subval1", 0, REG_SZ, (const BYTE *)"hklm", sizeof("hklm")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* check that the value is not overwritten in hkcr or user's classes */ res = RegQueryValueExA(hkcrsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); res = RegQueryValueExA(hkeysub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld, GLE=%lx\n", res, GetLastError()); ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer );
/* modify the value in hkcr */ res = RegSetValueExA(hkcrsub1, "subval1", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* check that the value is not overwritten in hklm, but in user's classes */ res = RegQueryValueExA(hklmsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "hklm" ), "value set to '%s'\n", buffer ); res = RegQueryValueExA(hkeysub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld, GLE=%lx\n", res, GetLastError()); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer );
/* new subkey in hkcr */ @@ -3027,19 +3027,19 @@ static void test_classesroot(void) KEY_QUERY_VALUE|KEY_SET_VALUE, NULL, &hkcrsub2, NULL )) return; ok(IS_HKCR(hkcrsub2), "hkcr mask not set in %p\n", hkcrsub2); res = RegSetValueExA(hkcrsub2, "subval1", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld, GLE=%lx\n", res, GetLastError());
/* try to open that new subkey in user's classes and hklm */ res = RegOpenKeyExA( hkey, "subkey2", 0, KEY_QUERY_VALUE|KEY_SET_VALUE, &hklmsub2 ); - ok(res != ERROR_SUCCESS, "test key found in user's classes: %d\n", res); + ok(res != ERROR_SUCCESS, "test key found in user's classes: %ld\n", res); hklmsub2 = 0; res = RegOpenKeyExA( hklm, "subkey2", 0, KEY_QUERY_VALUE|KEY_SET_VALUE, &hklmsub2 ); - ok(res == ERROR_SUCCESS, "test key not found in hklm: %d\n", res); + ok(res == ERROR_SUCCESS, "test key not found in hklm: %ld\n", res); ok(!IS_HKCR(hklmsub2), "hkcr mask set in %p\n", hklmsub2);
/* check that the value is present in hklm */ res = RegQueryValueExA(hklmsub2, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", res); ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer );
/* cleanup */ @@ -3048,23 +3048,23 @@ static void test_classesroot(void)
/* delete subkey1 from hkcr (should point at user's classes) */ res = RegDeleteKeyA(hkcr, "subkey1"); - ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %ld\n", res);
/* confirm key was removed in hkey but not hklm */ res = RegOpenKeyExA(hkey, "subkey1", 0, KEY_READ, &hkeysub1); - ok(res == ERROR_FILE_NOT_FOUND, "test key found in user's classes: %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "test key found in user's classes: %ld\n", res); res = RegOpenKeyExA(hklm, "subkey1", 0, KEY_READ, &hklmsub1); - ok(res == ERROR_SUCCESS, "test key not found in hklm: %d\n", res); + ok(res == ERROR_SUCCESS, "test key not found in hklm: %ld\n", res); ok(!IS_HKCR(hklmsub1), "hkcr mask set in %p\n", hklmsub1);
/* delete subkey1 from hkcr again (which should now point at hklm) */ res = RegDeleteKeyA(hkcr, "subkey1"); - ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %ld\n", res);
/* confirm hkey was removed in hklm */ RegCloseKey( hklmsub1 ); res = RegOpenKeyExA(hklm, "subkey1", 0, KEY_READ, &hklmsub1); - ok(res == ERROR_FILE_NOT_FOUND, "test key found in hklm: %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "test key found in hklm: %ld\n", res);
/* final cleanup */ delete_key( hkey ); @@ -3110,7 +3110,7 @@ static void test_classesroot_enum(void) res = RegOpenKeyA( HKEY_CLASSES_ROOT, "WineTestCls", &hkcr ); todo_wine ok(res == ERROR_SUCCESS || broken(res == ERROR_FILE_NOT_FOUND /* WinNT */), - "test key not found in hkcr: %d\n", res); + "test key not found in hkcr: %ld\n", res); if (res) { skip("HKCR key merging not supported\n"); @@ -3120,35 +3120,35 @@ static void test_classesroot_enum(void) }
res = RegSetValueExA( hkcu, "X", 0, REG_SZ, (const BYTE *) "AA", 3 ); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld\n", res); res = RegSetValueExA( hkcu, "Y", 0, REG_SZ, (const BYTE *) "B", 2 ); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld\n", res); res = RegCreateKeyA( hkcu, "A", &hkcusub[0] ); - ok(res == ERROR_SUCCESS, "RegCreateKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKeyA failed: %ld\n", res); res = RegCreateKeyA( hkcu, "B", &hkcusub[1] ); - ok(res == ERROR_SUCCESS, "RegCreateKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKeyA failed: %ld\n", res);
/* test on values in HKCU */ size = sizeof(buffer); res = RegEnumValueA( hkcr, 0, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", res ); ok(!strcmp( buffer, "X" ), "expected 'X', got '%s'\n", buffer); size = sizeof(buffer); res = RegEnumValueA( hkcr, 1, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", res ); ok(!strcmp( buffer, "Y" ), "expected 'Y', got '%s'\n", buffer); size = sizeof(buffer); res = RegEnumValueA( hkcr, 2, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", res ); + ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %ld\n", res );
res = RegEnumKeyA( hkcr, 0, buffer, size ); - ok(res == ERROR_SUCCESS, "RegEnumKey failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumKey failed: %ld\n", res ); ok(!strcmp( buffer, "A" ), "expected 'A', got '%s'\n", buffer); res = RegEnumKeyA( hkcr, 1, buffer, size ); - ok(res == ERROR_SUCCESS, "RegEnumKey failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumKey failed: %ld\n", res ); ok(!strcmp( buffer, "B" ), "expected 'B', got '%s'\n", buffer); res = RegEnumKeyA( hkcr, 2, buffer, size ); - ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", res ); + ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %ld\n", res );
/* prepare test env in HKLM */ if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\Classes\WineTestCls", &hklm )) @@ -3172,42 +3172,42 @@ static void test_classesroot_enum(void) }
res = RegSetValueExA( hklm, "X", 0, REG_SZ, (const BYTE *) "AB", 3 ); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld\n", res); res = RegSetValueExA( hklm, "Z", 0, REG_SZ, (const BYTE *) "C", 2 ); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %ld\n", res); res = RegCreateKeyA( hklm, "A", &hklmsub[0] ); - ok(res == ERROR_SUCCESS, "RegCreateKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKeyA failed: %ld\n", res); res = RegCreateKeyA( hklm, "C", &hklmsub[1] ); - ok(res == ERROR_SUCCESS, "RegCreateKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegCreateKeyA failed: %ld\n", res);
/* test on values/keys in both HKCU and HKLM */ size = sizeof(buffer); res = RegEnumValueA( hkcr, 0, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", res ); ok(!strcmp( buffer, "X" ), "expected 'X', got '%s'\n", buffer); size = sizeof(buffer); res = RegEnumValueA( hkcr, 1, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", res ); ok(!strcmp( buffer, "Y" ), "expected 'Y', got '%s'\n", buffer); size = sizeof(buffer); res = RegEnumValueA( hkcr, 2, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", res ); ok(!strcmp( buffer, "Z" ), "expected 'Z', got '%s'\n", buffer); size = sizeof(buffer); res = RegEnumValueA( hkcr, 3, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", res ); + ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %ld\n", res );
res = RegEnumKeyA( hkcr, 0, buffer, size ); - ok(res == ERROR_SUCCESS, "RegEnumKey failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumKey failed: %ld\n", res ); ok(!strcmp( buffer, "A" ), "expected 'A', got '%s'\n", buffer); res = RegEnumKeyA( hkcr, 1, buffer, size ); - ok(res == ERROR_SUCCESS, "RegEnumKey failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumKey failed: %ld\n", res ); ok(!strcmp( buffer, "B" ), "expected 'B', got '%s'\n", buffer); res = RegEnumKeyA( hkcr, 2, buffer, size ); - ok(res == ERROR_SUCCESS, "RegEnumKey failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumKey failed: %ld\n", res ); ok(!strcmp( buffer, "C" ), "expected 'C', got '%s'\n", buffer); res = RegEnumKeyA( hkcr, 3, buffer, size ); - ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", res ); + ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %ld\n", res );
/* delete values/keys from HKCU to test only on HKLM */ RegCloseKey( hkcusub[0] ); @@ -3219,40 +3219,40 @@ static void test_classesroot_enum(void) res = RegEnumValueA( hkcr, 0, buffer, &size, NULL, NULL, NULL, NULL ); ok(res == ERROR_KEY_DELETED || res == ERROR_NO_SYSTEM_RESOURCES, /* Windows XP */ - "expected ERROR_KEY_DELETED, got %d\n", res); + "expected ERROR_KEY_DELETED, got %ld\n", res); size = sizeof(buffer); res = RegEnumKeyA( hkcr, 0, buffer, size ); ok(res == ERROR_KEY_DELETED || res == ERROR_NO_SYSTEM_RESOURCES, /* Windows XP */ - "expected ERROR_KEY_DELETED, got %d\n", res); + "expected ERROR_KEY_DELETED, got %ld\n", res);
/* reopen HKCR handle */ RegCloseKey( hkcr ); res = RegOpenKeyA( HKEY_CLASSES_ROOT, "WineTestCls", &hkcr ); - ok(res == ERROR_SUCCESS, "test key not found in hkcr: %d\n", res); + ok(res == ERROR_SUCCESS, "test key not found in hkcr: %ld\n", res); if (res) goto cleanup;
/* test on values/keys in HKLM */ size = sizeof(buffer); res = RegEnumValueA( hkcr, 0, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", res ); ok(!strcmp( buffer, "X" ), "expected 'X', got '%s'\n", buffer); size = sizeof(buffer); res = RegEnumValueA( hkcr, 1, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumValueA failed: %ld\n", res ); ok(!strcmp( buffer, "Z" ), "expected 'Z', got '%s'\n", buffer); size = sizeof(buffer); res = RegEnumValueA( hkcr, 2, buffer, &size, NULL, NULL, NULL, NULL ); - ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", res ); + ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %ld\n", res );
res = RegEnumKeyA( hkcr, 0, buffer, size ); - ok(res == ERROR_SUCCESS, "RegEnumKey failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumKey failed: %ld\n", res ); ok(!strcmp( buffer, "A" ), "expected 'A', got '%s'\n", buffer); res = RegEnumKeyA( hkcr, 1, buffer, size ); - ok(res == ERROR_SUCCESS, "RegEnumKey failed: %d\n", res ); + ok(res == ERROR_SUCCESS, "RegEnumKey failed: %ld\n", res ); ok(!strcmp( buffer, "C" ), "expected 'C', got '%s'\n", buffer); res = RegEnumKeyA( hkcr, 2, buffer, size ); - ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", res ); + ok(res == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %ld\n", res );
cleanup: RegCloseKey( hklmsub[0] ); @@ -3268,28 +3268,28 @@ static void test_classesroot_mask(void) LSTATUS res;
res = RegOpenKeyA( HKEY_CLASSES_ROOT, "CLSID", &hkey ); - ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %ld\n", res); todo_wine ok(IS_HKCR(hkey) || broken(!IS_HKCR(hkey)) /* WinNT */, "hkcr mask not set in %p\n", hkey); RegCloseKey( hkey );
res = RegOpenKeyA( HKEY_CURRENT_USER, "Software", &hkey ); - ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %ld\n", res); ok(!IS_HKCR(hkey), "hkcr mask set in %p\n", hkey); RegCloseKey( hkey );
res = RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software", &hkey ); - ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %ld\n", res); ok(!IS_HKCR(hkey), "hkcr mask set in %p\n", hkey); RegCloseKey( hkey );
res = RegOpenKeyA( HKEY_USERS, ".Default", &hkey ); - ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %ld\n", res); ok(!IS_HKCR(hkey), "hkcr mask set in %p\n", hkey); RegCloseKey( hkey );
res = RegOpenKeyA( HKEY_CURRENT_CONFIG, "Software", &hkey ); - ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %d\n", res); + ok(res == ERROR_SUCCESS, "RegOpenKeyA failed: %ld\n", res); ok(!IS_HKCR(hkey), "hkcr mask set in %p\n", hkey); RegCloseKey( hkey ); } @@ -3309,31 +3309,31 @@ static void test_deleted_key(void) val_count = sizeof(value); type = 0; res = RegEnumValueA( hkey, 0, value, &val_count, NULL, &type, 0, 0 ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %li\n", res);
res = RegEnumKeyA( hkey, 0, value, sizeof(value) ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %li\n", res);
val_count = sizeof(value); type = 0; res = RegQueryValueExA( hkey, "test", NULL, &type, (BYTE *)value, &val_count ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %li\n", res);
res = RegSetValueExA( hkey, "test", 0, REG_SZ, (const BYTE*)"value", 6); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %li\n", res);
res = RegOpenKeyA( hkey, "test", &hkey2 ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %li\n", res); if (res == 0) RegCloseKey( hkey2 );
res = RegCreateKeyA( hkey, "test", &hkey2 ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %li\n", res); if (res == 0) RegCloseKey( hkey2 );
res = RegFlushKey( hkey ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %li\n", res);
RegCloseKey( hkey );
@@ -3346,38 +3346,38 @@ static void test_delete_value(void) char longname[401];
res = RegSetValueExA( hkey_main, "test", 0, REG_SZ, (const BYTE*)"value", 6 ); - ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %i\n", res); + ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %li\n", res);
res = RegQueryValueExA( hkey_main, "test", NULL, NULL, NULL, NULL); - ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %i\n", res); + ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %li\n", res);
res = RegDeleteValueA( hkey_main, "test" ); - ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %i\n", res); + ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %li\n", res);
res = RegQueryValueExA( hkey_main, "test", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "expect ERROR_FILE_NOT_FOUND, got %i\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "expect ERROR_FILE_NOT_FOUND, got %li\n", res);
res = RegDeleteValueA( hkey_main, "test" ); - ok(res == ERROR_FILE_NOT_FOUND, "expect ERROR_FILE_NOT_FOUND, got %i\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "expect ERROR_FILE_NOT_FOUND, got %li\n", res);
memset(longname, 'a', 400); longname[400] = 0; res = RegDeleteValueA( hkey_main, longname ); ok(res == ERROR_FILE_NOT_FOUND || broken(res == ERROR_MORE_DATA), /* nt4, win2k */ - "expect ERROR_FILE_NOT_FOUND, got %i\n", res); + "expect ERROR_FILE_NOT_FOUND, got %li\n", res);
/* Default registry value */ res = RegSetValueExA(hkey_main, "", 0, REG_SZ, (const BYTE *)"value", 6); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res);
res = RegQueryValueExA(hkey_main, "", NULL, NULL, NULL, NULL); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res);
res = RegDeleteValueA(hkey_main, "" ); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res);
res = RegQueryValueExA(hkey_main, "", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n", res); }
static void test_delete_key_value(void) @@ -3392,52 +3392,52 @@ static void test_delete_key_value(void) }
ret = pRegDeleteKeyValueA(NULL, NULL, NULL); - ok(ret == ERROR_INVALID_HANDLE, "got %d\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %ld\n", ret);
ret = pRegDeleteKeyValueA(hkey_main, NULL, NULL); - ok(ret == ERROR_FILE_NOT_FOUND, "got %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "got %ld\n", ret);
ret = RegSetValueExA(hkey_main, "test", 0, REG_SZ, (const BYTE*)"value", 6); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = RegQueryValueExA(hkey_main, "test", NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
/* NULL subkey name means delete from open key */ ret = pRegDeleteKeyValueA(hkey_main, NULL, "test"); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = RegQueryValueExA(hkey_main, "test", NULL, NULL, NULL, NULL); - ok(ret == ERROR_FILE_NOT_FOUND, "got %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "got %ld\n", ret);
/* now with real subkey */ ret = RegCreateKeyExA(hkey_main, "Subkey1", 0, NULL, 0, KEY_WRITE|KEY_READ, NULL, &subkey, NULL); - ok(!ret, "failed with error %d\n", ret); + ok(!ret, "failed with error %ld\n", ret);
ret = RegSetValueExA(subkey, "test", 0, REG_SZ, (const BYTE*)"value", 6); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = RegQueryValueExA(subkey, "test", NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = pRegDeleteKeyValueA(hkey_main, "Subkey1", "test"); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = RegQueryValueExA(subkey, "test", NULL, NULL, NULL, NULL); - ok(ret == ERROR_FILE_NOT_FOUND, "got %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "got %ld\n", ret);
/* Default registry value */ ret = RegSetValueExA(subkey, "", 0, REG_SZ, (const BYTE *)"value", 6); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegQueryValueExA(subkey, "", NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
ret = pRegDeleteKeyValueA(hkey_main, "Subkey1", "" ); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegQueryValueExA(subkey, "", NULL, NULL, NULL, NULL); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n", ret);
RegDeleteKeyA(subkey, ""); RegCloseKey(subkey); @@ -3450,7 +3450,7 @@ static void test_RegOpenCurrentUser(void)
key = HKEY_CURRENT_USER; ret = RegOpenCurrentUser(KEY_READ, &key); - ok(!ret, "got %d, error %d\n", ret, GetLastError()); + ok(!ret, "got %ld, error %ld\n", ret, GetLastError()); ok(key != HKEY_CURRENT_USER, "got %p\n", key); RegCloseKey(key); } @@ -3468,7 +3468,7 @@ static DWORD WINAPI notify_change_thread(void *arg)
ret = RegNotifyChangeKeyValue(data->key, TRUE, REG_NOTIFY_CHANGE_NAME|data->flags, data->event, TRUE); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); return 0; }
@@ -3482,56 +3482,56 @@ static void test_RegNotifyChangeKeyValue(void) LONG ret;
event = CreateEventW(NULL, FALSE, TRUE, NULL); - ok(event != NULL, "CreateEvent failed, error %u\n", GetLastError()); + ok(event != NULL, "CreateEvent failed, error %lu\n", GetLastError()); ret = RegCreateKeyA(hkey_main, "TestKey", &key); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegNotifyChangeKeyValue(key, TRUE, REG_NOTIFY_CHANGE_NAME|REG_NOTIFY_CHANGE_LAST_SET, event, TRUE); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", dwret);
ret = RegCreateKeyA(key, "SubKey", &subkey); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", dwret);
/* watching deeper keys */ ret = RegNotifyChangeKeyValue(key, TRUE, REG_NOTIFY_CHANGE_NAME|REG_NOTIFY_CHANGE_LAST_SET, event, TRUE); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", dwret);
ret = RegCreateKeyA(subkey, "SubKey", &subsubkey); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", dwret);
/* watching deeper values */ ret = RegNotifyChangeKeyValue(key, TRUE, REG_NOTIFY_CHANGE_NAME|REG_NOTIFY_CHANGE_LAST_SET, event, TRUE); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", dwret);
ret = RegSetValueA(subsubkey, NULL, REG_SZ, "SubSubKeyValue", 0); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", dwret);
/* don't watch deeper values */ RegCloseKey(key); ret = RegOpenKeyA(hkey_main, "TestKey", &key); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegNotifyChangeKeyValue(key, FALSE, REG_NOTIFY_CHANGE_NAME|REG_NOTIFY_CHANGE_LAST_SET, event, TRUE); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", dwret);
ret = RegSetValueA(subsubkey, NULL, REG_SZ, "SubSubKeyValueNEW", 0); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", dwret);
RegDeleteKeyA(subkey, "SubKey"); RegDeleteKeyA(key, "SubKey"); @@ -3541,7 +3541,7 @@ static void test_RegNotifyChangeKeyValue(void)
/* test same thread with REG_NOTIFY_THREAD_AGNOSTIC */ ret = RegOpenKeyA(hkey_main, "TestKey", &key); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ret = RegNotifyChangeKeyValue(key, TRUE, REG_NOTIFY_CHANGE_NAME|REG_NOTIFY_THREAD_AGNOSTIC, event, TRUE); if (ret == ERROR_INVALID_PARAMETER) @@ -3553,9 +3553,9 @@ static void test_RegNotifyChangeKeyValue(void) }
ret = RegCreateKeyA(key, "SubKey", &subkey); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", dwret);
RegDeleteKeyA(key, "SubKey"); RegCloseKey(subkey); @@ -3563,7 +3563,7 @@ static void test_RegNotifyChangeKeyValue(void)
/* test different thread without REG_NOTIFY_THREAD_AGNOSTIC */ ret = RegOpenKeyA(hkey_main, "TestKey", &key); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
data.key = key; data.flags = 0; @@ -3577,12 +3577,12 @@ static void test_RegNotifyChangeKeyValue(void) Wine already behaves as if the flag is set */ dwret = WaitForSingleObject(event, 0); todo_wine - ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", dwret); RegCloseKey(key);
/* test different thread with REG_NOTIFY_THREAD_AGNOSTIC */ ret = RegOpenKeyA(hkey_main, "TestKey", &key); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
data.flags = REG_NOTIFY_THREAD_AGNOSTIC; thread = CreateThread(NULL, 0, notify_change_thread, &data, 0, NULL); @@ -3590,13 +3590,13 @@ static void test_RegNotifyChangeKeyValue(void) CloseHandle(thread);
dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", dwret);
ret = RegCreateKeyA(key, "SubKey", &subkey); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
dwret = WaitForSingleObject(event, 0); - ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %lu\n", dwret);
RegDeleteKeyA(key, "SubKey"); RegDeleteKeyA(key, ""); @@ -3705,18 +3705,18 @@ static void test_performance_keys(void)
size = 0; ret = RegQueryValueExA(keys[i], names[j], NULL, NULL, NULL, &size); - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - ok(!size, "got size %u\n", size); + ok(ret == ERROR_MORE_DATA, "got %lu\n", ret); + ok(!size, "got size %lu\n", size);
size = 10; ret = RegQueryValueExA(keys[i], names[j], NULL, NULL, buffer, &size); - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); + ok(ret == ERROR_MORE_DATA, "got %lu\n", ret); todo_wine - ok(size == 10, "got size %u\n", size); + ok(size == 10, "got size %lu\n", size);
size = buffer_size; ret = RegQueryValueExA(keys[i], names[j], NULL, NULL, NULL, &size); - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); + ok(ret == ERROR_MORE_DATA, "got %lu\n", ret);
QueryPerformanceCounter(&perftime1); NtQuerySystemTime(&systime1); @@ -3724,9 +3724,9 @@ static void test_performance_keys(void) size = buffer_size; type = 0xdeadbeef; ret = RegQueryValueExA(keys[i], names[j], NULL, &type, buffer, &size); - ok(!ret, "got %u\n", ret); - ok(type == REG_BINARY, "got type %u\n", type); - ok(size >= sizeof(PERF_DATA_BLOCK) && size < buffer_size, "got size %u\n", size); + ok(!ret, "got %lu\n", ret); + ok(type == REG_BINARY, "got type %lu\n", type); + ok(size >= sizeof(PERF_DATA_BLOCK) && size < buffer_size, "got size %lu\n", size);
QueryPerformanceCounter(&perftime2); NtQuerySystemTime(&systime2); @@ -3734,19 +3734,19 @@ static void test_performance_keys(void) data = buffer; ok(!wcsncmp(data->Signature, L"PERF", 4), "got signature %s\n", debugstr_wn(data->Signature, 4)); - ok(data->LittleEndian == 1, "got endianness %u\n", data->LittleEndian); - ok(data->Version == 1, "got version %u\n", data->Version); - ok(data->Revision == 1, "got version %u\n", data->Revision); - ok(data->TotalByteLength == size, "expected size %u, got %u\n", + ok(data->LittleEndian == 1, "got endianness %lu\n", data->LittleEndian); + ok(data->Version == 1, "got version %lu\n", data->Version); + ok(data->Revision == 1, "got version %lu\n", data->Revision); + ok(data->TotalByteLength == size, "expected size %lu, got %lu\n", size, data->TotalByteLength);
expect_size = sizeof(PERF_DATA_BLOCK) + data->SystemNameLength; expect_size = (expect_size + 7) & ~7;
- ok(data->HeaderLength == expect_size, "expected header size %u, got %u\n", + ok(data->HeaderLength == expect_size, "expected header size %lu, got %lu\n", expect_size, data->HeaderLength); /* todo: test objects... */ - todo_wine ok(data->DefaultObject == 238, "got default object %u\n", data->DefaultObject); + todo_wine ok(data->DefaultObject == 238, "got default object %lu\n", data->DefaultObject);
ok(data->PerfTime.QuadPart >= perftime1.QuadPart && data->PerfTime.QuadPart <= perftime2.QuadPart, @@ -3764,10 +3764,10 @@ static void test_performance_keys(void) "got times %I64u, %I64u, %I64u\n", systime1.QuadPart, file_time.l, systime2.QuadPart);
ok(data->SystemNameLength == (sysname_len + 1) * sizeof(WCHAR), - "expected name len %u, got %u\n", + "expected name len %Iu, got %lu\n", (sysname_len + 1) * sizeof(WCHAR), data->SystemNameLength); ok(data->SystemNameOffset == sizeof(PERF_DATA_BLOCK), - "got name offset %u\n", data->SystemNameOffset); + "got name offset %lu\n", data->SystemNameOffset); ok(!wcscmp(sysname, (const WCHAR *)(data + 1)), "expected name %s, got %s\n", debugstr_w(sysname), debugstr_w((const WCHAR *)(data + 1)));
@@ -3778,40 +3778,40 @@ static void test_performance_keys(void)
size = 0xdeadbeef; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, NULL, NULL, &size); - ok(!ret, "got %u\n", ret); - ok(size > 0 && size < 0xdeadbeef, "got size %u\n", size); + ok(!ret, "got %lu\n", ret); + ok(size > 0 && size < 0xdeadbeef, "got size %lu\n", size);
type = 0xdeadbeef; size = 0; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, &type, buffer, &size); - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - ok(size > 0, "got size %u\n", size); + ok(ret == ERROR_MORE_DATA, "got %lu\n", ret); + ok(size > 0, "got size %lu\n", size);
type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, &type, buffer, &size); - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(!ret, "got %lu\n", ret); + ok(type == REG_MULTI_SZ, "got type %lu\n", type); test_counter_values(buffer, keys[i]);
type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "cOuNtErwine", NULL, &type, buffer, &size); - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(!ret, "got %lu\n", ret); + ok(type == REG_MULTI_SZ, "got type %lu\n", type); test_counter_values(buffer, keys[i]);
size = 0; ret = RegQueryValueExW(keys[i], L"cOuNtEr", NULL, NULL, NULL, &size); - ok(!ret, "got %u\n", ret); - ok(size > 0, "got size %u\n", size); + ok(!ret, "got %lu\n", ret); + ok(size > 0, "got size %lu\n", size);
bufferW = malloc(size);
type = 0xdeadbeef; ret = RegQueryValueExW(keys[i], L"cOuNtEr", NULL, &type, bufferW, &size); - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(!ret, "got %lu\n", ret); + ok(type == REG_MULTI_SZ, "got type %lu\n", type); WideCharToMultiByte(CP_ACP, 0, bufferW, size / sizeof(WCHAR), buffer, buffer_size, NULL, NULL); test_counter_values(buffer, keys[i]);
@@ -3819,14 +3819,14 @@ static void test_performance_keys(void)
size = 0xdeadbeef; ret = RegQueryValueExA(keys[i], "hElP", NULL, NULL, NULL, &size); - ok(!ret, "got %u\n", ret); - ok(size > 0 && size < 0xdeadbeef, "got size %u\n", size); + ok(!ret, "got %lu\n", ret); + ok(size > 0 && size < 0xdeadbeef, "got size %lu\n", size);
type = 0xdeadbeef; size = 0; ret = RegQueryValueExA(keys[i], "hElP", NULL, &type, buffer, &size); - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - ok(size > 0, "got size %u\n", size); + ok(ret == ERROR_MORE_DATA, "got %lu\n", ret); + ok(size > 0, "got size %lu\n", size);
type = 0xdeadbeef; size = buffer_size; @@ -3836,92 +3836,92 @@ static void test_performance_keys(void) type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "hElPwine", NULL, &type, buffer, &size); - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(!ret, "got %lu\n", ret); + ok(type == REG_MULTI_SZ, "got type %lu\n", type); test_help_values(buffer, keys[i]);
size = 0; ret = RegQueryValueExW(keys[i], L"hElP", NULL, NULL, NULL, &size); - ok(!ret, "got %u\n", ret); - ok(size > 0, "got size %u\n", size); + ok(!ret, "got %lu\n", ret); + ok(size > 0, "got size %lu\n", size);
bufferW = malloc(size);
type = 0xdeadbeef; ret = RegQueryValueExW(keys[i], L"hElP", NULL, &type, bufferW, &size); - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(!ret, "got %lu\n", ret); + ok(type == REG_MULTI_SZ, "got type %lu\n", type); WideCharToMultiByte(CP_ACP, 0, bufferW, size / sizeof(WCHAR), buffer, buffer_size, NULL, NULL); test_help_values(buffer, keys[i]);
/* test other registry APIs */
ret = RegOpenKeyA(keys[i], NULL, &key); - todo_wine ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + todo_wine ok(ret == ERROR_INVALID_HANDLE, "got %lu\n", ret);
ret = RegOpenKeyA(keys[i], "Global", &key); - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %lu\n", ret);
ret = RegOpenKeyExA(keys[i], "Global", 0, KEY_READ, &key); - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %lu\n", ret);
size = 0; ret = RegQueryValueA(keys[i], "Global", NULL, (LONG *)&size); - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %lu\n", ret);
ret = RegSetValueA(keys[i], "Global", REG_SZ, "dummy", 5); - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %lu\n", ret);
key_count = 0x900ddeed; ret = RegQueryInfoKeyA(keys[i], NULL, NULL, NULL, &key_count, NULL, NULL, &value_count, NULL, NULL, NULL, NULL); - todo_wine ok(!ret, "got %u\n", ret); - todo_wine ok(!key_count, "got %u subkeys\n", key_count); - todo_wine ok(value_count == 2, "got %u values\n", value_count); + todo_wine ok(!ret, "got %lu\n", ret); + todo_wine ok(!key_count, "got %lu subkeys\n", key_count); + todo_wine ok(value_count == 2, "got %lu values\n", value_count);
size = buffer_size; ret = RegEnumValueA(keys[i], 0, buffer, &size, NULL, NULL, NULL, NULL); - todo_wine ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - ok(size == buffer_size, "got size %u\n", size); + todo_wine ok(ret == ERROR_MORE_DATA, "got %lu\n", ret); + ok(size == buffer_size, "got size %lu\n", size);
ret = RegCloseKey(keys[i]); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret);
ret = RegCloseKey(keys[i]); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret);
winetest_pop_context(); }
ret = RegSetValueExA(HKEY_PERFORMANCE_DATA, "Global", 0, REG_SZ, (const BYTE *)"dummy", 5); - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %lu\n", ret);
ret = RegSetValueExA(HKEY_PERFORMANCE_TEXT, "Global", 0, REG_SZ, (const BYTE *)"dummy", 5); - todo_wine ok(ret == ERROR_BADKEY, "got %u\n", ret); + todo_wine ok(ret == ERROR_BADKEY, "got %lu\n", ret);
ret = RegSetValueExA(HKEY_PERFORMANCE_NLSTEXT, "Global", 0, REG_SZ, (const BYTE *)"dummy", 5); - todo_wine ok(ret == ERROR_BADKEY, "got %u\n", ret); + todo_wine ok(ret == ERROR_BADKEY, "got %lu\n", ret);
if (pRegSetKeyValueW) { ret = pRegSetKeyValueW(HKEY_PERFORMANCE_DATA, NULL, L"Global", REG_SZ, L"dummy", 10); - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %lu\n", ret);
ret = pRegSetKeyValueW(HKEY_PERFORMANCE_TEXT, NULL, L"Global", REG_SZ, L"dummy", 10); - todo_wine ok(ret == ERROR_BADKEY, "got %u\n", ret); + todo_wine ok(ret == ERROR_BADKEY, "got %lu\n", ret);
ret = pRegSetKeyValueW(HKEY_PERFORMANCE_NLSTEXT, NULL, L"Global", REG_SZ, L"dummy", 10); - todo_wine ok(ret == ERROR_BADKEY, "got %u\n", ret); + todo_wine ok(ret == ERROR_BADKEY, "got %lu\n", ret); }
ret = RegEnumKeyA(HKEY_PERFORMANCE_DATA, 0, buffer, buffer_size); - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %lu\n", ret);
ret = RegEnumKeyA(HKEY_PERFORMANCE_TEXT, 0, buffer, buffer_size); - todo_wine ok(ret == ERROR_NO_MORE_ITEMS, "got %u\n", ret); + todo_wine ok(ret == ERROR_NO_MORE_ITEMS, "got %lu\n", ret);
ret = RegEnumKeyA(HKEY_PERFORMANCE_NLSTEXT, 0, buffer, buffer_size); - todo_wine ok(ret == ERROR_NO_MORE_ITEMS, "got %u\n", ret); + todo_wine ok(ret == ERROR_NO_MORE_ITEMS, "got %lu\n", ret);
free(buffer); } @@ -3942,22 +3942,22 @@ static void test_perflib_key(void)
ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows NT\CurrentVersion\Perflib", 0, KEY_READ, &perflib_key); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret);
ret = RegOpenKeyExA(perflib_key, "009", 0, KEY_READ, &key); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret); /* English always returns TEXT; most other languages return NLSTEXT, but * some (e.g. Hindi) return TEXT */ ok(key == HKEY_PERFORMANCE_TEXT || key == HKEY_PERFORMANCE_NLSTEXT, "got key %p\n", key);
ret = RegCloseKey(key); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret);
RtlInitUnicodeString(&string, L"009"); InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, perflib_key, NULL); ret = NtOpenKey((HANDLE *)&key, KEY_ALL_ACCESS, &attr); ok(ret == STATUS_PREDEFINED_HANDLE || ret == STATUS_ACCESS_DENIED - || ret == STATUS_SUCCESS /* Win < 7 */, "got %#x\n", ret); + || ret == STATUS_SUCCESS /* Win < 7 */, "got %#lx\n", ret); if (ret == STATUS_PREDEFINED_HANDLE) ok(!is_special_key(key), "expected a normal handle, got %p\n", key); else if (ret == STATUS_SUCCESS) @@ -3972,42 +3972,42 @@ static void test_perflib_key(void) buffer = malloc(buffer_size);
ret = NtQueryKey(key, KeyFullInformation, buffer, buffer_size, &size); - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = NtEnumerateKey(key, 0, KeyFullInformation, buffer, buffer_size, &size); - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
RtlInitUnicodeString(&string, L"counter"); ret = NtQueryValueKey(key, &string, KeyValuePartialInformation, buffer, buffer_size, &size); - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = NtEnumerateValueKey(key, 0, KeyValuePartialInformation, buffer, buffer_size, &size); - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = NtSetValueKey(key, &string, 0, REG_SZ, "test", 5); - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = NtDeleteValueKey(key, &string); - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = NtDeleteKey(key); - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
RtlInitUnicodeString(&string, L"subkey"); InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, key, NULL); ret = NtOpenKey((HANDLE *)&key2, KEY_READ, &attr); if (is_special_key(key)) - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret); else ok(ret == STATUS_OBJECT_NAME_NOT_FOUND - || broken(ret == STATUS_INVALID_HANDLE) /* WoW64 */, "got %#x\n", ret); + || broken(ret == STATUS_INVALID_HANDLE) /* WoW64 */, "got %#lx\n", ret);
ret = NtCreateKey((HANDLE *)&key2, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL); if (is_special_key(key)) - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret); else ok(!ret || broken(ret == STATUS_ACCESS_DENIED) /* w8adm */ - || broken(ret == STATUS_INVALID_HANDLE) /* WoW64 */, "got %#x\n", ret); + || broken(ret == STATUS_INVALID_HANDLE) /* WoW64 */, "got %#lx\n", ret); if (!ret) { NtDeleteKey(key2); @@ -4017,9 +4017,9 @@ static void test_perflib_key(void) /* it's a real handle, though */ ret = NtQueryObject(key, ObjectNameInformation, buffer, buffer_size, &size); if (is_special_key(key)) - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret); else - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret); if (!ret) { name_info = (OBJECT_NAME_INFORMATION *)buffer; @@ -4029,21 +4029,21 @@ static void test_perflib_key(void)
ret = NtClose(key); if (is_special_key(key)) - ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret); else - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret);
for (l = 0; l < ARRAY_SIZE(knames); l++) { - winetest_push_context("%d", l); + winetest_push_context("%ld", l); todo_wine_if(l == 1) { ret = RegOpenKeyExA(perflib_key, knames[l], 0, KEY_READ, &key); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret); if (is_special_key(key)) { size = buffer_size; ret = RegQueryValueExA(key, "counter", NULL, NULL, (BYTE *)buffer, &size); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret); if (!ret) { char *str; @@ -4066,7 +4066,7 @@ static void test_perflib_key(void) }
ret = RegCloseKey(key); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret); } winetest_pop_context(); } @@ -4089,22 +4089,22 @@ static void test_perflib_key(void)
size = buffer_size; ret = RegQueryValueExA(key, "counter", NULL, NULL, (BYTE *)buffer, &size); - todo_wine ok(ret == ERROR_FILE_NOT_FOUND, "got %u\n", ret); + todo_wine ok(ret == ERROR_FILE_NOT_FOUND, "got %lu\n", ret);
ret = RegCloseKey(key); - todo_wine ok(!ret, "got %u\n", ret); + todo_wine ok(!ret, "got %lu\n", ret); } /* else some languages don't have their own key. The keys are not really * usable anyway so assume it does not really matter. */
ret = RegCloseKey(perflib_key); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret);
RtlInitUnicodeString(&string, L"\Registry\PerfData"); InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, NULL, NULL); ret = NtOpenKey((HANDLE *)&key, KEY_READ, &attr); - ok(ret == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", ret); + ok(ret == STATUS_OBJECT_NAME_NOT_FOUND, "got %#lx\n", ret);
free(buffer); } @@ -4161,11 +4161,11 @@ static void test_RegLoadMUIString(void) ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows NT\CurrentVersion\Time Zones\UTC", 0, KEY_READ, &hkey); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
size = ARRAY_SIZE(buf); ret = RegQueryValueExA(hkey, tz_value, NULL, &type, (BYTE *)buf, &size); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret); ok(buf[0] == '@', "got %s\n", buf);
/* setup MUI string for tests */ @@ -4197,48 +4197,48 @@ static void test_RegLoadMUIString(void)
size = 0xdeadbeef; ret = pRegLoadMUIStringW(hkey, tz_valueW, NULL, 0, &size, 0, NULL); - ok(ret == ERROR_MORE_DATA, "got %d, expected ERROR_MORE_DATA\n", ret); - ok(size == text_size, "got %u, expected %u\n", size, text_size); + ok(ret == ERROR_MORE_DATA, "got %ld, expected ERROR_MORE_DATA\n", ret); + ok(size == text_size, "got %lu, expected %lu\n", size, text_size);
memset(bufW, 0xff, sizeof(bufW)); ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, sizeof(WCHAR)+1, &size, 0, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "got %d, expected ERROR_INVALID_PARAMETER\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld, expected ERROR_INVALID_PARAMETER\n", ret); ok(bufW[0] == 0xffff, "got 0x%04x, expected 0xffff\n", bufW[0]);
size = 0xdeadbeef; memset(bufW, 0xff, sizeof(bufW)); ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, sizeof(WCHAR)*2, &size, 0, NULL); - ok(ret == ERROR_MORE_DATA, "got %d, expected ERROR_MORE_DATA\n", ret); + ok(ret == ERROR_MORE_DATA, "got %ld, expected ERROR_MORE_DATA\n", ret); ok(size == text_size || broken(size == text_size + sizeof(WCHAR) /* vista */), - "got %u, expected %u\n", size, text_size); + "got %lu, expected %lu\n", size, text_size); ok(bufW[0] == 0xffff, "got 0x%04x, expected 0xffff\n", bufW[0]);
memset(bufW, 0xff, sizeof(bufW)); ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, sizeof(WCHAR)*2, &size, REG_MUI_STRING_TRUNCATE, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "got %d, expected ERROR_INVALID_PARAMETER\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld, expected ERROR_INVALID_PARAMETER\n", ret); ok(bufW[0] == 0xffff, "got 0x%04x, expected 0xffff\n", bufW[0]);
memset(bufW, 0xff, sizeof(bufW)); ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, sizeof(WCHAR)*2, NULL, 0xdeadbeef, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "got %d, expected ERROR_INVALID_PARAMETER\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld, expected ERROR_INVALID_PARAMETER\n", ret); ok(bufW[0] == 0xffff, "got 0x%04x, expected 0xffff\n", bufW[0]);
memset(bufW, 0xff, sizeof(bufW)); ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, sizeof(WCHAR)*2, NULL, REG_MUI_STRING_TRUNCATE, NULL); - ok(ret == ERROR_SUCCESS, "got %d, expected ERROR_SUCCESS\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld, expected ERROR_SUCCESS\n", ret); ok(bufW[0] == textW[0], "got 0x%04x, expected 0x%04x\n", bufW[0], textW[0]); ok(bufW[1] == 0, "got 0x%04x, expected nul\n", bufW[1]);
size = 0xdeadbeef; memset(bufW, 0xff, sizeof(bufW)); ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, ARRAY_SIZE(bufW), &size, 0, NULL); - ok(ret == ERROR_SUCCESS, "got %d, expected ERROR_SUCCESS\n", ret); - ok(size == text_size, "got %u, expected %u\n", size, text_size); + ok(ret == ERROR_SUCCESS, "got %ld, expected ERROR_SUCCESS\n", ret); + ok(size == text_size, "got %lu, expected %lu\n", size, text_size); ok(!memcmp(textW, bufW, size), "got %s, expected %s\n", wine_dbgstr_wn(bufW, size / sizeof(WCHAR)), wine_dbgstr_wn(textW, text_size / sizeof(WCHAR)));
ret = pRegLoadMUIStringA(hkey, tz_value, buf, ARRAY_SIZE(buf), &size, 0, NULL); - ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret); + ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %ld, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
/* change the current directory to other than system32 directory */ SetCurrentDirectoryA("\"); @@ -4246,19 +4246,19 @@ static void test_RegLoadMUIString(void) size = 0xdeadbeef; memset(bufW, 0xff, sizeof(bufW)); ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, ARRAY_SIZE(bufW), &size, 0, sysdirW); - ok(ret == ERROR_SUCCESS, "got %d, expected ERROR_SUCCESS\n", ret); - ok(size == text_size, "got %u, expected %u\n", size, text_size); + ok(ret == ERROR_SUCCESS, "got %ld, expected ERROR_SUCCESS\n", ret); + ok(size == text_size, "got %lu, expected %lu\n", size, text_size); ok(!memcmp(textW, bufW, size), "got %s, expected %s\n", wine_dbgstr_wn(bufW, size / sizeof(WCHAR)), wine_dbgstr_wn(textW, text_size / sizeof(WCHAR)));
ret = pRegLoadMUIStringA(hkey, tz_value, buf, ARRAY_SIZE(buf), &size, 0, sysdir); - ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret); + ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %ld, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, ARRAY_SIZE(bufW), &size, 0, NULL); - ok(ret == ERROR_FILE_NOT_FOUND, "got %d, expected ERROR_FILE_NOT_FOUND\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "got %ld, expected ERROR_FILE_NOT_FOUND\n", ret);
ret = pRegLoadMUIStringA(hkey, tz_value, buf, ARRAY_SIZE(buf), &size, 0, NULL); - ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret); + ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %ld, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
RegCloseKey(hkey);
@@ -4280,7 +4280,7 @@ static void test_RegLoadMUIString(void) size = test_case[i].value ? strlen(test_case[i].value) + 1 : 0; ret = RegSetValueExA(hkey_main, tz_value, 0, test_case[i].type, (const BYTE *)test_case[i].value, size); - ok(ret == ERROR_SUCCESS, "[%2u] got %d\n", i, ret); + ok(ret == ERROR_SUCCESS, "[%2u] got %ld\n", i, ret);
size = 0xdeadbeef; memset(bufW, 0xff, sizeof(bufW)); @@ -4290,10 +4290,10 @@ static void test_RegLoadMUIString(void) ok(ret == test_case[i].expected || broken(test_case[i].value[0] == '%' && ret == ERROR_SUCCESS /* vista */) || broken(test_case[i].broken_ret && ret == test_case[i].broken_ret /* vista */), - "[%2u] expected %d, got %d\n", i, test_case[i].expected, ret); + "[%2u] expected %ld, got %ld\n", i, test_case[i].expected, ret); if (ret == ERROR_SUCCESS && test_case[i].expected == ERROR_SUCCESS) { - ok(size == text_size, "[%2u] got %u, expected %u\n", i, size, text_size); + ok(size == text_size, "[%2u] got %lu, expected %lu\n", i, size, text_size); ok(!memcmp(bufW, textW, size), "[%2u] got %s, expected %s\n", i, wine_dbgstr_wn(bufW, size/sizeof(WCHAR)), wine_dbgstr_wn(textW, text_size/sizeof(WCHAR))); @@ -4338,29 +4338,29 @@ static void test_EnumDynamicTimeZoneInformation(void) SetLastError(0xdeadbeef); ret = pEnumDynamicTimeZoneInformation(0, NULL); gle = GetLastError(); - ok(gle == 0xdeadbeef, "got 0x%x\n", gle); - ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret); + ok(gle == 0xdeadbeef, "got 0x%lx\n", gle); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
memset(&bogus_dtzi, 0xcc, sizeof(bogus_dtzi)); memset(&dtzi, 0xcc, sizeof(dtzi)); SetLastError(0xdeadbeef); ret = pEnumDynamicTimeZoneInformation(-1, &dtzi); gle = GetLastError(); - ok(gle == 0xdeadbeef, "got 0x%x\n", gle); - ok(ret == ERROR_NO_MORE_ITEMS, "got %d\n", ret); + ok(gle == 0xdeadbeef, "got 0x%lx\n", gle); + ok(ret == ERROR_NO_MORE_ITEMS, "got %ld\n", ret); ok(!memcmp(&dtzi, &bogus_dtzi, sizeof(dtzi)), "mismatch\n");
status = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows NT\CurrentVersion\Time Zones", 0, KEY_ENUMERATE_SUB_KEYS|KEY_QUERY_VALUE, &key); - ok(status == ERROR_SUCCESS, "got %d\n", status); + ok(status == ERROR_SUCCESS, "got %ld\n", status); index = 0; while (!(status = RegEnumKeyW(key, index, keyname, ARRAY_SIZE(keyname)))) { winetest_push_context("%s" , wine_dbgstr_w(keyname)); subkey = NULL; status = RegOpenKeyExW(key, keyname, 0, KEY_QUERY_VALUE, &subkey); - ok(status == ERROR_SUCCESS, "got %d\n", status); + ok(status == ERROR_SUCCESS, "got %ld\n", status);
memset(&dtzi, 0xcc, sizeof(dtzi)); SetLastError(0xdeadbeef); @@ -4370,8 +4370,8 @@ static void test_EnumDynamicTimeZoneInformation(void) ok(gle == ERROR_SUCCESS || gle == ERROR_RESOURCE_TYPE_NOT_FOUND /* Win10 1809 32-bit */ || gle == ERROR_MUI_FILE_NOT_FOUND /* Win10 1809 64-bit */, - "got 0x%x\n", gle); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + "got 0x%lx\n", gle); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret); ok(!lstrcmpW(dtzi.TimeZoneKeyName, keyname), "expected %s, got %s\n", wine_dbgstr_w(keyname), wine_dbgstr_w(dtzi.TimeZoneKeyName));
@@ -4380,7 +4380,7 @@ static void test_EnumDynamicTimeZoneInformation(void) size = sizeof(name); memset(name, 0, sizeof(name)); status = pRegGetValueW(subkey, NULL, L"Std", RRF_RT_REG_SZ, NULL, name, &size); - ok(status == ERROR_SUCCESS, "status %d Std %s\n", status, + ok(status == ERROR_SUCCESS, "status %ld Std %s\n", status, wine_dbgstr_w(name)); ok(*name, "Std name is empty\n"); if (pRegLoadMUIStringW) @@ -4388,7 +4388,7 @@ static void test_EnumDynamicTimeZoneInformation(void) size = sizeof(name); memset(name, 0, sizeof(name)); status = pRegLoadMUIStringW(subkey, L"MUI_Std", name, size, &size, 0, sysdir); - ok(status == ERROR_SUCCESS, "status %d MUI_Std %s\n", + ok(status == ERROR_SUCCESS, "status %ld MUI_Std %s\n", status, wine_dbgstr_w(name)); ok(*name, "MUI_Std name is empty\n"); } @@ -4398,7 +4398,7 @@ static void test_EnumDynamicTimeZoneInformation(void) size = sizeof(name); memset(name, 0, sizeof(name)); status = pRegGetValueW(subkey, NULL, L"Dlt", RRF_RT_REG_SZ, NULL, name, &size); - ok(status == ERROR_SUCCESS, "status %d %s Dlt %s\n", + ok(status == ERROR_SUCCESS, "status %ld %s Dlt %s\n", status, wine_dbgstr_w(keyname), wine_dbgstr_w(name)); ok(*name, "Dlt name is empty\n"); if (pRegLoadMUIStringW) @@ -4406,7 +4406,7 @@ static void test_EnumDynamicTimeZoneInformation(void) size = sizeof(name); memset(name, 0, sizeof(name)); status = pRegLoadMUIStringW(subkey, L"MUI_Dlt", name, size, &size, 0, sysdir); - ok(status == ERROR_SUCCESS, "status %d %s MUI_Dlt %s\n", + ok(status == ERROR_SUCCESS, "status %ld %s MUI_Dlt %s\n", status, wine_dbgstr_w(keyname), wine_dbgstr_w(name)); ok(*name, "MUI_Dlt name is empty\n"); } @@ -4416,7 +4416,7 @@ static void test_EnumDynamicTimeZoneInformation(void) size = sizeof(name); memset(name, 0, sizeof(name)); status = pRegGetValueW(subkey, NULL, L"Display", RRF_RT_REG_SZ, NULL, name, &size); - ok(status == ERROR_SUCCESS, "status %d %s Display %s\n", + ok(status == ERROR_SUCCESS, "status %ld %s Display %s\n", status, wine_dbgstr_w(keyname), wine_dbgstr_w(name)); ok(*name, "Display name is empty\n"); if (pRegLoadMUIStringW) @@ -4428,7 +4428,7 @@ static void test_EnumDynamicTimeZoneInformation(void) ok((status == ERROR_SUCCESS && *name) || broken(status == ERROR_RESOURCE_TYPE_NOT_FOUND) /* Win10 1809 32-bit */ || broken(status == ERROR_MUI_FILE_NOT_FOUND) /* Win10 1809 64-bit */, - "status %d MUI_Display %s\n", status, wine_dbgstr_w(name)); + "status %ld MUI_Display %s\n", status, wine_dbgstr_w(name)); } } else @@ -4441,13 +4441,13 @@ static void test_EnumDynamicTimeZoneInformation(void)
size = sizeof(tz_data); status = pRegGetValueW(key, keyname, L"TZI", RRF_RT_REG_BINARY, NULL, &tz_data, &size); - ok(status == ERROR_SUCCESS, "got %d\n", status); + ok(status == ERROR_SUCCESS, "got %ld\n", status);
- ok(dtzi.Bias == tz_data.bias, "expected %d, got %d\n", + ok(dtzi.Bias == tz_data.bias, "expected %ld, got %ld\n", tz_data.bias, dtzi.Bias); - ok(dtzi.StandardBias == tz_data.std_bias, "expected %d, got %d\n", + ok(dtzi.StandardBias == tz_data.std_bias, "expected %ld, got %ld\n", tz_data.std_bias, dtzi.StandardBias); - ok(dtzi.DaylightBias == tz_data.dlt_bias, "expected %d, got %d\n", + ok(dtzi.DaylightBias == tz_data.dlt_bias, "expected %ld, got %ld\n", tz_data.dlt_bias, dtzi.DaylightBias);
ok(!memcmp(&dtzi.StandardDate, &tz_data.std_date, sizeof(dtzi.StandardDate)), @@ -4462,14 +4462,14 @@ static void test_EnumDynamicTimeZoneInformation(void) RegCloseKey(subkey); index++; } - ok(status == ERROR_NO_MORE_ITEMS, "got %d\n", status); + ok(status == ERROR_NO_MORE_ITEMS, "got %ld\n", status);
memset(&dtzi, 0xcc, sizeof(dtzi)); SetLastError(0xdeadbeef); ret = pEnumDynamicTimeZoneInformation(index, &dtzi); gle = GetLastError(); - ok(gle == 0xdeadbeef, "got 0x%x\n", gle); - ok(ret == ERROR_NO_MORE_ITEMS, "got %d\n", ret); + ok(gle == 0xdeadbeef, "got 0x%lx\n", gle); + ok(ret == ERROR_NO_MORE_ITEMS, "got %ld\n", ret); ok(!memcmp(&dtzi, &bogus_dtzi, sizeof(dtzi)), "mismatch\n");
RegCloseKey(key); diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index e0a86acd5df..135a45f7727 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -126,7 +126,7 @@ static const char* debugstr_sid(PSID sid) const char *res;
if (!ConvertSidToStringSidA(sid, &sidstr)) - res = wine_dbg_sprintf("ConvertSidToStringSidA failed le=%u", GetLastError()); + res = wine_dbg_sprintf("ConvertSidToStringSidA failed le=%lu", GetLastError()); else { res = __wine_dbg_strdup(sidstr); @@ -193,7 +193,7 @@ static SECURITY_DESCRIPTOR* test_get_security_descriptor(HANDLE handle, int line ret = GetKernelObjectSecurity(handle, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, NULL, 0, &needed); ok_(__FILE__, line)(!ret, "GetKernelObjectSecurity should fail\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok_(__FILE__, line)(needed != 0xdeadbeef, "GetKernelObjectSecurity should return required buffer length\n");
length = needed; @@ -203,8 +203,8 @@ static SECURITY_DESCRIPTOR* test_get_security_descriptor(HANDLE handle, int line SetLastError(0xdeadbeef); ret = GetKernelObjectSecurity(handle, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, sd, length, &needed); - ok_(__FILE__, line)(ret, "GetKernelObjectSecurity error %d\n", GetLastError()); - ok_(__FILE__, line)(needed == length || needed == 0 /* file, pipe */, "GetKernelObjectSecurity should return %u instead of %u\n", length, needed); + ok_(__FILE__, line)(ret, "GetKernelObjectSecurity error %ld\n", GetLastError()); + ok_(__FILE__, line)(needed == length || needed == 0 /* file, pipe */, "GetKernelObjectSecurity should return %lu instead of %lu\n", length, needed); return sd; }
@@ -218,7 +218,7 @@ static void test_owner_equal(HANDLE Handle, PSID expected, int line) queriedSD = test_get_security_descriptor( Handle, line );
res = GetSecurityDescriptorOwner(queriedSD, &owner, &owner_defaulted); - ok_(__FILE__, line)(res, "GetSecurityDescriptorOwner failed with error %d\n", GetLastError()); + ok_(__FILE__, line)(res, "GetSecurityDescriptorOwner failed with error %ld\n", GetLastError());
ok_(__FILE__, line)(EqualSid(owner, expected), "Owner SIDs are not equal %s != %s\n", debugstr_sid(owner), debugstr_sid(expected)); @@ -237,7 +237,7 @@ static void test_group_equal(HANDLE Handle, PSID expected, int line) queriedSD = test_get_security_descriptor( Handle, line );
res = GetSecurityDescriptorGroup(queriedSD, &group, &group_defaulted); - ok_(__FILE__, line)(res, "GetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + ok_(__FILE__, line)(res, "GetSecurityDescriptorGroup failed with error %ld\n", GetLastError());
ok_(__FILE__, line)(EqualSid(group, expected), "Group SIDs are not equal %s != %s\n", debugstr_sid(group), debugstr_sid(expected)); @@ -321,45 +321,45 @@ static void test_ConvertStringSidToSid(void) if( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) return; ok( GetLastError() == ERROR_INVALID_PARAMETER, - "expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n", + "expected GetLastError() is ERROR_INVALID_PARAMETER, got %ld\n", GetLastError() );
r = ConvertStringSidToSidA( refs[0].refStr, NULL ); ok( !r && GetLastError() == ERROR_INVALID_PARAMETER, - "expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n", + "expected GetLastError() is ERROR_INVALID_PARAMETER, got %ld\n", GetLastError() );
r = ConvertStringSidToSidA( NULL, &psid ); ok( !r && GetLastError() == ERROR_INVALID_PARAMETER, - "expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n", + "expected GetLastError() is ERROR_INVALID_PARAMETER, got %ld\n", GetLastError() );
r = ConvertStringSidToSidA( noSubAuthStr, &psid ); ok( !r, "expected failure with no sub authorities\n" ); ok( GetLastError() == ERROR_INVALID_SID, - "expected GetLastError() is ERROR_INVALID_SID, got %d\n", + "expected GetLastError() is ERROR_INVALID_SID, got %ld\n", GetLastError() );
r = ConvertStringSidToSidA( "WDandmorecharacters", &psid ); ok( !r, "expected failure with too many characters\n" ); ok( GetLastError() == ERROR_INVALID_SID, - "expected GetLastError() is ERROR_INVALID_SID, got %d\n", + "expected GetLastError() is ERROR_INVALID_SID, got %ld\n", GetLastError() );
r = ConvertStringSidToSidA( "WD)", &psid ); ok( !r, "expected failure with too many characters\n" ); ok( GetLastError() == ERROR_INVALID_SID, - "expected GetLastError() is ERROR_INVALID_SID, got %d\n", + "expected GetLastError() is ERROR_INVALID_SID, got %ld\n", GetLastError() );
ok(ConvertStringSidToSidA("S-1-5-21-93476-23408-4576", &psid), "ConvertStringSidToSidA failed\n"); pisid = psid; ok(pisid->SubAuthorityCount == 4, "Invalid sub authority count - expected 4, got %d\n", pisid->SubAuthorityCount); - ok(pisid->SubAuthority[0] == 21, "Invalid subauthority 0 - expected 21, got %d\n", pisid->SubAuthority[0]); - ok(pisid->SubAuthority[3] == 4576, "Invalid subauthority 0 - expected 4576, got %d\n", pisid->SubAuthority[3]); + ok(pisid->SubAuthority[0] == 21, "Invalid subauthority 0 - expected 21, got %ld\n", pisid->SubAuthority[0]); + ok(pisid->SubAuthority[3] == 4576, "Invalid subauthority 0 - expected 4576, got %ld\n", pisid->SubAuthority[3]); LocalFree(str); LocalFree(psid);
@@ -386,7 +386,7 @@ static void test_ConvertStringSidToSid(void) !memcmp( pisid->IdentifierAuthority.Value, refs[i].auth.Value, sizeof(refs[i].auth) ), "string sid %s didn't parse to expected value\n" - "(got 0x%04x%08x, expected 0x%04x%08x)\n", + "(got 0x%04x%08lx, expected 0x%04x%08lx)\n", refs[i].refStr, MAKEWORD( pisid->IdentifierAuthority.Value[1], pisid->IdentifierAuthority.Value[0] ), @@ -625,17 +625,17 @@ static void test_allocateLuid(void) return;
ok(ret, - "AllocateLocallyUniqueId failed: %d\n", GetLastError()); + "AllocateLocallyUniqueId failed: %ld\n", GetLastError()); ret = pAllocateLocallyUniqueId(&luid2); ok( ret, - "AllocateLocallyUniqueId failed: %d\n", GetLastError()); + "AllocateLocallyUniqueId failed: %ld\n", GetLastError()); ok(luid1.LowPart > SE_MAX_WELL_KNOWN_PRIVILEGE || luid1.HighPart != 0, "AllocateLocallyUniqueId returned a well-known LUID\n"); ok(luid1.LowPart != luid2.LowPart || luid1.HighPart != luid2.HighPart, "AllocateLocallyUniqueId returned non-unique LUIDs\n"); ret = pAllocateLocallyUniqueId(NULL); ok( !ret && GetLastError() == ERROR_NOACCESS, - "AllocateLocallyUniqueId(NULL) didn't return ERROR_NOACCESS: %d\n", + "AllocateLocallyUniqueId(NULL) didn't return ERROR_NOACCESS: %ld\n", GetLastError()); }
@@ -661,18 +661,18 @@ static void test_lookupPrivilegeName(void) luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE; ret = pLookupPrivilegeNameA(NULL, &luid, NULL, &cchName); ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupPrivilegeNameA didn't fail with ERROR_INSUFFICIENT_BUFFER: %d\n", + "LookupPrivilegeNameA didn't fail with ERROR_INSUFFICIENT_BUFFER: %ld\n", GetLastError()); ok(cchName == strlen("SeCreateTokenPrivilege") + 1, "LookupPrivilegeNameA returned an incorrect required length for\n" - "SeCreateTokenPrivilege (got %d, expected %d)\n", cchName, + "SeCreateTokenPrivilege (got %ld, expected %d)\n", cchName, lstrlenA("SeCreateTokenPrivilege") + 1); /* check a known value and its returned length on success */ cchName = sizeof(buf); ok(pLookupPrivilegeNameA(NULL, &luid, buf, &cchName) && cchName == strlen("SeCreateTokenPrivilege"), "LookupPrivilegeNameA returned an incorrect output length for\n" - "SeCreateTokenPrivilege (got %d, expected %d)\n", cchName, + "SeCreateTokenPrivilege (got %ld, expected %d)\n", cchName, (int)strlen("SeCreateTokenPrivilege")); /* check known values */ for (i = SE_MIN_WELL_KNOWN_PRIVILEGE; i <= SE_MAX_WELL_KNOWN_PRIVILEGE; i++) @@ -681,14 +681,14 @@ static void test_lookupPrivilegeName(void) cchName = sizeof(buf); ret = pLookupPrivilegeNameA(NULL, &luid, buf, &cchName); ok( ret || GetLastError() == ERROR_NO_SUCH_PRIVILEGE, - "LookupPrivilegeNameA(0.%d) failed: %d\n", i, GetLastError()); + "LookupPrivilegeNameA(0.%ld) failed: %ld\n", i, GetLastError()); } /* check a bogus LUID */ luid.LowPart = 0xdeadbeef; cchName = sizeof(buf); ret = pLookupPrivilegeNameA(NULL, &luid, buf, &cchName); ok( !ret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE, - "LookupPrivilegeNameA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %d\n", + "LookupPrivilegeNameA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %ld\n", GetLastError()); /* check on a bogus system */ luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE; @@ -696,7 +696,7 @@ static void test_lookupPrivilegeName(void) ret = pLookupPrivilegeNameA("b0gu5.Nam3", &luid, buf, &cchName); ok( !ret && (GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR) /* w2k8 */, - "LookupPrivilegeNameA didn't fail with RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR: %d\n", + "LookupPrivilegeNameA didn't fail with RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR: %ld\n", GetLastError()); }
@@ -755,22 +755,22 @@ static void test_lookupPrivilegeValue(void) ret = pLookupPrivilegeValueA("b0gu5.Nam3", "SeCreateTokenPrivilege", &luid); ok( !ret && (GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR) /* w2k8 */, - "LookupPrivilegeValueA didn't fail with RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR: %d\n", + "LookupPrivilegeValueA didn't fail with RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR: %ld\n", GetLastError()); /* check a NULL string */ ret = pLookupPrivilegeValueA(NULL, 0, &luid); ok( !ret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE, - "LookupPrivilegeValueA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %d\n", + "LookupPrivilegeValueA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %ld\n", GetLastError()); /* check a bogus privilege name */ ret = pLookupPrivilegeValueA(NULL, "SeBogusPrivilege", &luid); ok( !ret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE, - "LookupPrivilegeValueA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %d\n", + "LookupPrivilegeValueA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %ld\n", GetLastError()); /* check case insensitive */ ret = pLookupPrivilegeValueA(NULL, "sEcREATEtOKENpRIVILEGE", &luid); ok( ret, - "LookupPrivilegeValueA(NULL, sEcREATEtOKENpRIVILEGE, &luid) failed: %d\n", + "LookupPrivilegeValueA(NULL, sEcREATEtOKENpRIVILEGE, &luid) failed: %ld\n", GetLastError()); for (i = 0; i < ARRAY_SIZE(privs); i++) { @@ -816,13 +816,13 @@ static void test_FileSecurity(void) SetLastError(0xdeadbeef); rc = CreateDirectoryA (path, NULL); ok (rc || GetLastError() == ERROR_ALREADY_EXISTS, "CreateDirectoryA " - "failed for '%s' with %d\n", path, GetLastError()); + "failed for '%s' with %ld\n", path, GetLastError());
strcat (strcpy (file, path), "\ess"); SetLastError(0xdeadbeef); fh = CreateFileA (file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); ok (fh != INVALID_HANDLE_VALUE, "CreateFileA " - "failed for '%s' with %d\n", file, GetLastError()); + "failed for '%s' with %ld\n", file, GetLastError()); CloseHandle (fh);
/* For the temporary file ... */ @@ -838,8 +838,8 @@ static void test_FileSecurity(void) ok (!rc, "GetFileSecurityA " "was expected to fail for '%s'\n", file); ok (GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetFileSecurityA " - "returned %d; expected ERROR_INSUFFICIENT_BUFFER\n", GetLastError()); - ok (retSize > sizeof (SECURITY_DESCRIPTOR), "GetFileSecurityA returned size %d\n", retSize); + "returned %ld; expected ERROR_INSUFFICIENT_BUFFER\n", GetLastError()); + ok (retSize > sizeof (SECURITY_DESCRIPTOR), "GetFileSecurityA returned size %ld\n", retSize);
sdSize = retSize; sd = HeapAlloc (GetProcessHeap (), 0, sdSize); @@ -849,16 +849,16 @@ static void test_FileSecurity(void) SetLastError(0xdeadbeef); rc = GetFileSecurityA (file, request, sd, sdSize, &retSize); ok (rc, "GetFileSecurityA " - "was not expected to fail '%s': %d\n", file, GetLastError()); + "was not expected to fail '%s': %ld\n", file, GetLastError()); ok (retSize == sdSize || broken(retSize == 0), /* NT4 */ - "GetFileSecurityA returned size %d; expected %d\n", retSize, sdSize); + "GetFileSecurityA returned size %ld; expected %ld\n", retSize, sdSize);
/* Use it to set security descriptor */ SetLastError(0xdeadbeef); rc = pSetFileSecurityA (file, request, sd); ok (rc, "SetFileSecurityA " - "was not expected to fail '%s': %d\n", file, GetLastError()); + "was not expected to fail '%s': %ld\n", file, GetLastError());
HeapFree (GetProcessHeap (), 0, sd);
@@ -871,8 +871,8 @@ static void test_FileSecurity(void) ok (!rc, "GetFileSecurityA " "was expected to fail for '%s'\n", path); ok (GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetFileSecurityA " - "returned %d; expected ERROR_INSUFFICIENT_BUFFER\n", GetLastError()); - ok (retSize > sizeof (SECURITY_DESCRIPTOR), "GetFileSecurityA returned size %d\n", retSize); + "returned %ld; expected ERROR_INSUFFICIENT_BUFFER\n", GetLastError()); + ok (retSize > sizeof (SECURITY_DESCRIPTOR), "GetFileSecurityA returned size %ld\n", retSize);
sdSize = retSize; sd = HeapAlloc (GetProcessHeap (), 0, sdSize); @@ -882,16 +882,16 @@ static void test_FileSecurity(void) SetLastError(0xdeadbeef); rc = GetFileSecurityA (path, request, sd, sdSize, &retSize); ok (rc, "GetFileSecurityA " - "was not expected to fail '%s': %d\n", path, GetLastError()); + "was not expected to fail '%s': %ld\n", path, GetLastError()); ok (retSize == sdSize || broken(retSize == 0), /* NT4 */ - "GetFileSecurityA returned size %d; expected %d\n", retSize, sdSize); + "GetFileSecurityA returned size %ld; expected %ld\n", retSize, sdSize);
/* Use it to set security descriptor */ SetLastError(0xdeadbeef); rc = pSetFileSecurityA (path, request, sd); ok (rc, "SetFileSecurityA " - "was not expected to fail '%s': %d\n", path, GetLastError()); + "was not expected to fail '%s': %ld\n", path, GetLastError()); HeapFree (GetProcessHeap (), 0, sd);
/* Old test */ @@ -900,7 +900,7 @@ static void test_FileSecurity(void) rc = GetFileSecurityA (wintmpdir, OWNER_SECURITY_INFORMATION, NULL, 0, &sdSize); ok (!rc, "GetFileSecurityA should fail for not existing directories/files\n"); ok (GetLastError() == ERROR_FILE_NOT_FOUND, - "last error ERROR_FILE_NOT_FOUND expected, got %d\n", GetLastError()); + "last error ERROR_FILE_NOT_FOUND expected, got %ld\n", GetLastError());
cleanup: /* Remove temporary file and directory */ @@ -910,245 +910,245 @@ cleanup: /* Test file access permissions for a file with FILE_ATTRIBUTE_ARCHIVE */ SetLastError(0xdeadbeef); rc = GetTempPathA(sizeof(wintmpdir), wintmpdir); - ok(rc, "GetTempPath error %d\n", GetLastError()); + ok(rc, "GetTempPath error %ld\n", GetLastError());
SetLastError(0xdeadbeef); rc = GetTempFileNameA(wintmpdir, "tmp", 0, file); - ok(rc, "GetTempFileName error %d\n", GetLastError()); + ok(rc, "GetTempFileName error %ld\n", GetLastError());
rc = GetFileAttributesA(file); rc &= ~(FILE_ATTRIBUTE_NOT_CONTENT_INDEXED|FILE_ATTRIBUTE_COMPRESSED); - ok(rc == FILE_ATTRIBUTE_ARCHIVE, "expected FILE_ATTRIBUTE_ARCHIVE got %#x\n", rc); + ok(rc == FILE_ATTRIBUTE_ARCHIVE, "expected FILE_ATTRIBUTE_ARCHIVE got %#lx\n", rc);
rc = GetFileSecurityA(file, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, NULL, 0, &sdSize); ok(!rc, "GetFileSecurity should fail\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "expected ERROR_INSUFFICIENT_BUFFER got %d\n", GetLastError()); - ok(sdSize > sizeof(SECURITY_DESCRIPTOR), "got sd size %d\n", sdSize); + "expected ERROR_INSUFFICIENT_BUFFER got %ld\n", GetLastError()); + ok(sdSize > sizeof(SECURITY_DESCRIPTOR), "got sd size %ld\n", sdSize);
sd = HeapAlloc(GetProcessHeap (), 0, sdSize); retSize = 0xdeadbeef; SetLastError(0xdeadbeef); rc = GetFileSecurityA(file, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, sd, sdSize, &retSize); - ok(rc, "GetFileSecurity error %d\n", GetLastError()); - ok(retSize == sdSize || broken(retSize == 0) /* NT4 */, "expected %d, got %d\n", sdSize, retSize); + ok(rc, "GetFileSecurity error %ld\n", GetLastError()); + ok(retSize == sdSize || broken(retSize == 0) /* NT4 */, "expected %ld, got %ld\n", sdSize, retSize);
SetLastError(0xdeadbeef); rc = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, TRUE, &token); ok(!rc, "OpenThreadToken should fail\n"); - ok(GetLastError() == ERROR_NO_TOKEN, "expected ERROR_NO_TOKEN, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NO_TOKEN, "expected ERROR_NO_TOKEN, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); rc = ImpersonateSelf(SecurityIdentification); - ok(rc, "ImpersonateSelf error %d\n", GetLastError()); + ok(rc, "ImpersonateSelf error %ld\n", GetLastError());
SetLastError(0xdeadbeef); rc = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, TRUE, &token); - ok(rc, "OpenThreadToken error %d\n", GetLastError()); + ok(rc, "OpenThreadToken error %ld\n", GetLastError());
SetLastError(0xdeadbeef); rc = RevertToSelf(); - ok(rc, "RevertToSelf error %d\n", GetLastError()); + ok(rc, "RevertToSelf error %ld\n", GetLastError());
priv_set_len = sizeof(priv_set); granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_READ_DATA, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_READ_DATA, "expected FILE_READ_DATA, got %#x\n", granted); + ok(granted == FILE_READ_DATA, "expected FILE_READ_DATA, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_WRITE_DATA, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_WRITE_DATA, "expected FILE_WRITE_DATA, got %#x\n", granted); + ok(granted == FILE_WRITE_DATA, "expected FILE_WRITE_DATA, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_EXECUTE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_EXECUTE, "expected FILE_EXECUTE, got %#x\n", granted); + ok(granted == FILE_EXECUTE, "expected FILE_EXECUTE, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, DELETE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == DELETE, "expected DELETE, got %#x\n", granted); + ok(granted == DELETE, "expected DELETE, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_DELETE_CHILD, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_DELETE_CHILD, "expected FILE_DELETE_CHILD, got %#x\n", granted); + ok(granted == FILE_DELETE_CHILD, "expected FILE_DELETE_CHILD, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, 0x1ff, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == 0x1ff, "expected 0x1ff, got %#x\n", granted); + ok(granted == 0x1ff, "expected 0x1ff, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_ALL_ACCESS, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", granted); + ok(granted == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#lx\n", granted);
SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, 0xffffffff, &mapping, &priv_set, &priv_set_len, &granted, &status); ok(!rc, "AccessCheck should fail\n"); - ok(GetLastError() == ERROR_GENERIC_NOT_MAPPED, "expected ERROR_GENERIC_NOT_MAPPED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_GENERIC_NOT_MAPPED, "expected ERROR_GENERIC_NOT_MAPPED, got %ld\n", GetLastError());
/* Test file access permissions for a file with FILE_ATTRIBUTE_READONLY */ SetLastError(0xdeadbeef); fh = CreateFileA(file, FILE_READ_DATA, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_READONLY, 0); - ok(fh != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(fh != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); retSize = 0xdeadbeef; SetLastError(0xdeadbeef); rc = WriteFile(fh, "1", 1, &retSize, NULL); ok(!rc, "WriteFile should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - ok(retSize == 0, "expected 0, got %d\n", retSize); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); + ok(retSize == 0, "expected 0, got %ld\n", retSize); CloseHandle(fh);
rc = GetFileAttributesA(file); rc &= ~(FILE_ATTRIBUTE_NOT_CONTENT_INDEXED|FILE_ATTRIBUTE_COMPRESSED); todo_wine ok(rc == (FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY), - "expected FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY got %#x\n", rc); + "expected FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY got %#lx\n", rc);
SetLastError(0xdeadbeef); rc = SetFileAttributesA(file, FILE_ATTRIBUTE_ARCHIVE); - ok(rc, "SetFileAttributes error %d\n", GetLastError()); + ok(rc, "SetFileAttributes error %ld\n", GetLastError()); SetLastError(0xdeadbeef); rc = DeleteFileA(file); - ok(rc, "DeleteFile error %d\n", GetLastError()); + ok(rc, "DeleteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); fh = CreateFileA(file, FILE_READ_DATA, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_READONLY, 0); - ok(fh != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(fh != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); retSize = 0xdeadbeef; SetLastError(0xdeadbeef); rc = WriteFile(fh, "1", 1, &retSize, NULL); ok(!rc, "WriteFile should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - ok(retSize == 0, "expected 0, got %d\n", retSize); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); + ok(retSize == 0, "expected 0, got %ld\n", retSize); CloseHandle(fh);
rc = GetFileAttributesA(file); rc &= ~(FILE_ATTRIBUTE_NOT_CONTENT_INDEXED|FILE_ATTRIBUTE_COMPRESSED); ok(rc == (FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY), - "expected FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY got %#x\n", rc); + "expected FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY got %#lx\n", rc);
retSize = 0xdeadbeef; SetLastError(0xdeadbeef); rc = GetFileSecurityA(file, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, sd, sdSize, &retSize); - ok(rc, "GetFileSecurity error %d\n", GetLastError()); - ok(retSize == sdSize || broken(retSize == 0) /* NT4 */, "expected %d, got %d\n", sdSize, retSize); + ok(rc, "GetFileSecurity error %ld\n", GetLastError()); + ok(retSize == sdSize || broken(retSize == 0) /* NT4 */, "expected %ld, got %ld\n", sdSize, retSize);
priv_set_len = sizeof(priv_set); granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_READ_DATA, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_READ_DATA, "expected FILE_READ_DATA, got %#x\n", granted); + ok(granted == FILE_READ_DATA, "expected FILE_READ_DATA, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_WRITE_DATA, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); todo_wine { ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_WRITE_DATA, "expected FILE_WRITE_DATA, got %#x\n", granted); + ok(granted == FILE_WRITE_DATA, "expected FILE_WRITE_DATA, got %#lx\n", granted); } granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_EXECUTE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_EXECUTE, "expected FILE_EXECUTE, got %#x\n", granted); + ok(granted == FILE_EXECUTE, "expected FILE_EXECUTE, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, DELETE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == DELETE, "expected DELETE, got %#x\n", granted); + ok(granted == DELETE, "expected DELETE, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, WRITE_OWNER, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == WRITE_OWNER, "expected WRITE_OWNER, got %#x\n", granted); + ok(granted == WRITE_OWNER, "expected WRITE_OWNER, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, SYNCHRONIZE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == SYNCHRONIZE, "expected SYNCHRONIZE, got %#x\n", granted); + ok(granted == SYNCHRONIZE, "expected SYNCHRONIZE, got %#lx\n", granted);
granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_DELETE_CHILD, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); todo_wine { ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_DELETE_CHILD, "expected FILE_DELETE_CHILD, got %#x\n", granted); + ok(granted == FILE_DELETE_CHILD, "expected FILE_DELETE_CHILD, got %#lx\n", granted); } granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, 0x1ff, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); todo_wine { ok(status == 1, "expected 1, got %d\n", status); - ok(granted == 0x1ff, "expected 0x1ff, got %#x\n", granted); + ok(granted == 0x1ff, "expected 0x1ff, got %#lx\n", granted); } granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, FILE_ALL_ACCESS, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(rc, "AccessCheck error %ld\n", GetLastError()); todo_wine { ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", granted); + ok(granted == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#lx\n", granted); } SetLastError(0xdeadbeef); rc = DeleteFileA(file); ok(!rc, "DeleteFile should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); rc = SetFileAttributesA(file, FILE_ATTRIBUTE_ARCHIVE); - ok(rc, "SetFileAttributes error %d\n", GetLastError()); + ok(rc, "SetFileAttributes error %ld\n", GetLastError()); SetLastError(0xdeadbeef); rc = DeleteFileA(file); - ok(rc, "DeleteFile error %d\n", GetLastError()); + ok(rc, "DeleteFile error %ld\n", GetLastError());
CloseHandle(token); HeapFree(GetProcessHeap(), 0, sd); @@ -1196,38 +1196,38 @@ static void test_AccessCheck(void) HeapFree(GetProcessHeap(), 0, Acl); return; } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); + ok(res, "InitializeAcl failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid( &SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdminSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &UsersSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
SecurityDescriptor = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH);
res = InitializeSecurityDescriptor(SecurityDescriptor, SECURITY_DESCRIPTOR_REVISION); - ok(res, "InitializeSecurityDescriptor failed with error %d\n", GetLastError()); + ok(res, "InitializeSecurityDescriptor failed with error %ld\n", GetLastError());
res = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE); - ok(res, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorDacl failed with error %ld\n", GetLastError());
PrivSetLen = FIELD_OFFSET(PRIVILEGE_SET, Privilege[16]); PrivSet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, PrivSetLen); PrivSet->PrivilegeCount = 16;
res = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &ProcessToken); - ok(res, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(res, "OpenProcessToken failed with error %ld\n", GetLastError());
pRtlAdjustPrivilege(SE_SECURITY_PRIVILEGE, FALSE, TRUE, &Enabled);
res = DuplicateToken(ProcessToken, SecurityImpersonation, &Token); - ok(res, "DuplicateToken failed with error %d\n", GetLastError()); + ok(res, "DuplicateToken failed with error %ld\n", GetLastError());
/* SD without owner/group */ SetLastError(0xdeadbeef); @@ -1236,15 +1236,15 @@ static void test_AccessCheck(void) PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_INVALID_SECURITY_DESCR, "AccessCheck should have " - "failed with ERROR_INVALID_SECURITY_DESCR, instead of %d\n", err); + "failed with ERROR_INVALID_SECURITY_DESCR, instead of %ld\n", err); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
/* Set owner and group */ res = SetSecurityDescriptorOwner(SecurityDescriptor, AdminSid, FALSE); - ok(res, "SetSecurityDescriptorOwner failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorOwner failed with error %ld\n", GetLastError()); res = SetSecurityDescriptorGroup(SecurityDescriptor, UsersSid, TRUE); - ok(res, "SetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorGroup failed with error %ld\n", GetLastError());
/* Generic access mask */ SetLastError(0xdeadbeef); @@ -1253,7 +1253,7 @@ static void test_AccessCheck(void) PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_GENERIC_NOT_MAPPED, "AccessCheck should have failed " - "with ERROR_GENERIC_NOT_MAPPED, instead of %d\n", err); + "with ERROR_GENERIC_NOT_MAPPED, instead of %ld\n", err); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1264,7 +1264,7 @@ static void test_AccessCheck(void) NULL, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have failed " - "with ERROR_NOACCESS, instead of %d\n", err); + "with ERROR_NOACCESS, instead of %ld\n", err); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1275,7 +1275,7 @@ static void test_AccessCheck(void) PrivSet, NULL, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have failed " - "with ERROR_NOACCESS, instead of %d\n", err); + "with ERROR_NOACCESS, instead of %ld\n", err); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1286,19 +1286,19 @@ static void test_AccessCheck(void) NULL, NULL, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have failed " - "with ERROR_NOACCESS, instead of %d\n", err); + "with ERROR_NOACCESS, instead of %ld\n", err); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
/* sd with no dacl present */ Access = AccessStatus = 0x1abe11ed; ret = SetSecurityDescriptorDacl(SecurityDescriptor, FALSE, NULL, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(ret, "SetSecurityDescriptorDacl failed with error %ld\n", GetLastError()); ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); ok(AccessStatus && (Access == KEY_READ), - "AccessCheck failed to grant access with error %d\n", + "AccessCheck failed to grant access with error %ld\n", GetLastError());
/* sd with no dacl present - no privilegeset buffer */ @@ -1308,7 +1308,7 @@ static void test_AccessCheck(void) NULL, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have failed " - "with ERROR_NOACCESS, instead of %d\n", err); + "with ERROR_NOACCESS, instead of %ld\n", err); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1323,12 +1323,12 @@ static void test_AccessCheck(void) NULL, &ntPrivSetLen, &Access, &ntAccessStatus); err = GetLastError(); ok(ntret == STATUS_ACCESS_VIOLATION, - "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %x\n", ntret); + "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %lx\n", ntret); ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); + "NtAccessCheck shouldn't set last error, got %ld\n", err); ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n"); - ok(ntPrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", ntPrivSetLen); + ok(ntPrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", ntPrivSetLen);
/* Generic access mask - no returnlength */ SetLastError(0xdeadbeef); @@ -1337,9 +1337,9 @@ static void test_AccessCheck(void) PrivSet, NULL, &Access, &ntAccessStatus); err = GetLastError(); ok(ntret == STATUS_ACCESS_VIOLATION, - "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %x\n", ntret); + "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %lx\n", ntret); ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); + "NtAccessCheck shouldn't set last error, got %ld\n", err); ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1350,9 +1350,9 @@ static void test_AccessCheck(void) NULL, NULL, &Access, &ntAccessStatus); err = GetLastError(); ok(ntret == STATUS_ACCESS_VIOLATION, - "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %x\n", ntret); + "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %lx\n", ntret); ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); + "NtAccessCheck shouldn't set last error, got %ld\n", err); ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1364,12 +1364,12 @@ static void test_AccessCheck(void) PrivSet, &ntPrivSetLen, &Access, &ntAccessStatus); err = GetLastError(); ok(ntret == STATUS_GENERIC_NOT_MAPPED, - "NtAccessCheck should have failed with STATUS_GENERIC_NOT_MAPPED, got %x\n", ntret); + "NtAccessCheck should have failed with STATUS_GENERIC_NOT_MAPPED, got %lx\n", ntret); ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); + "NtAccessCheck shouldn't set last error, got %ld\n", err); ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n"); - ok(ntPrivSetLen == 0, "PrivSetLen returns %d\n", ntPrivSetLen); + ok(ntPrivSetLen == 0, "PrivSetLen returns %ld\n", ntPrivSetLen);
/* Generic access mask - insufficient returnlength */ SetLastError(0xdeadbeef); @@ -1379,12 +1379,12 @@ static void test_AccessCheck(void) PrivSet, &ntPrivSetLen, &Access, &ntAccessStatus); err = GetLastError(); ok(ntret == STATUS_GENERIC_NOT_MAPPED, - "NtAccessCheck should have failed with STATUS_GENERIC_NOT_MAPPED, got %x\n", ntret); + "NtAccessCheck should have failed with STATUS_GENERIC_NOT_MAPPED, got %lx\n", ntret); ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); + "NtAccessCheck shouldn't set last error, got %ld\n", err); ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n"); - ok(ntPrivSetLen == sizeof(PRIVILEGE_SET)-1, "PrivSetLen returns %d\n", ntPrivSetLen); + ok(ntPrivSetLen == sizeof(PRIVILEGE_SET)-1, "PrivSetLen returns %ld\n", ntPrivSetLen);
/* Key access mask - zero returnlength */ SetLastError(0xdeadbeef); @@ -1394,12 +1394,12 @@ static void test_AccessCheck(void) PrivSet, &ntPrivSetLen, &Access, &ntAccessStatus); err = GetLastError(); ok(ntret == STATUS_BUFFER_TOO_SMALL, - "NtAccessCheck should have failed with STATUS_BUFFER_TOO_SMALL, got %x\n", ntret); + "NtAccessCheck should have failed with STATUS_BUFFER_TOO_SMALL, got %lx\n", ntret); ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); + "NtAccessCheck shouldn't set last error, got %ld\n", err); ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n"); - ok(ntPrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", ntPrivSetLen); + ok(ntPrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", ntPrivSetLen);
/* Key access mask - insufficient returnlength */ SetLastError(0xdeadbeef); @@ -1409,12 +1409,12 @@ static void test_AccessCheck(void) PrivSet, &ntPrivSetLen, &Access, &ntAccessStatus); err = GetLastError(); ok(ntret == STATUS_BUFFER_TOO_SMALL, - "NtAccessCheck should have failed with STATUS_BUFFER_TOO_SMALL, got %x\n", ntret); + "NtAccessCheck should have failed with STATUS_BUFFER_TOO_SMALL, got %lx\n", ntret); ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); + "NtAccessCheck shouldn't set last error, got %ld\n", err); ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n"); - ok(ntPrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", ntPrivSetLen); + ok(ntPrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", ntPrivSetLen); } else win_skip("NtAccessCheck unavailable. Skipping.\n"); @@ -1422,53 +1422,53 @@ static void test_AccessCheck(void) /* sd with NULL dacl */ Access = AccessStatus = 0x1abe11ed; ret = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, NULL, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(ret, "SetSecurityDescriptorDacl failed with error %ld\n", GetLastError()); ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); ok(AccessStatus && (Access == KEY_READ), - "AccessCheck failed to grant access with error %d\n", + "AccessCheck failed to grant access with error %ld\n", GetLastError()); ret = AccessCheck(SecurityDescriptor, Token, MAXIMUM_ALLOWED, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); ok(AccessStatus && (Access == KEY_ALL_ACCESS), - "AccessCheck failed to grant access with error %d\n", + "AccessCheck failed to grant access with error %ld\n", GetLastError());
/* sd with blank dacl */ ret = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(ret, "SetSecurityDescriptorDacl failed with error %ld\n", GetLastError()); ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); err = GetLastError(); ok(!AccessStatus && err == ERROR_ACCESS_DENIED, "AccessCheck should have failed " - "with ERROR_ACCESS_DENIED, instead of %d\n", err); - ok(!Access, "Should have failed to grant any access, got 0x%08x\n", Access); + "with ERROR_ACCESS_DENIED, instead of %ld\n", err); + ok(!Access, "Should have failed to grant any access, got 0x%08lx\n", Access);
res = AddAccessAllowedAce(Acl, ACL_REVISION, KEY_READ, EveryoneSid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessAllowedAce failed with error %ld\n", GetLastError());
res = AddAccessDeniedAce(Acl, ACL_REVISION, KEY_SET_VALUE, AdminSid); - ok(res, "AddAccessDeniedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessDeniedAce failed with error %ld\n", GetLastError());
/* sd with dacl */ Access = AccessStatus = 0x1abe11ed; ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); ok(AccessStatus && (Access == KEY_READ), - "AccessCheck failed to grant access with error %d\n", + "AccessCheck failed to grant access with error %ld\n", GetLastError());
ret = AccessCheck(SecurityDescriptor, Token, MAXIMUM_ALLOWED, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); ok(AccessStatus, - "AccessCheck failed to grant any access with error %d\n", + "AccessCheck failed to grant any access with error %ld\n", GetLastError()); - trace("AccessCheck with MAXIMUM_ALLOWED got Access 0x%08x\n", Access); + trace("AccessCheck with MAXIMUM_ALLOWED got Access 0x%08lx\n", Access);
/* Null PrivSet with null PrivSetLen pointer */ SetLastError(0xdeadbeef); @@ -1477,7 +1477,7 @@ static void test_AccessCheck(void) NULL, NULL, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have " - "failed with ERROR_NOACCESS, instead of %d\n", err); + "failed with ERROR_NOACCESS, instead of %ld\n", err); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1490,9 +1490,9 @@ static void test_AccessCheck(void) err = GetLastError(); todo_wine ok(!ret && err == ERROR_INSUFFICIENT_BUFFER, "AccessCheck should have " - "failed with ERROR_INSUFFICIENT_BUFFER, instead of %d\n", err); + "failed with ERROR_INSUFFICIENT_BUFFER, instead of %ld\n", err); todo_wine - ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen); + ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1504,8 +1504,8 @@ static void test_AccessCheck(void) 0, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have " - "failed with ERROR_NOACCESS, instead of %d\n", err); - ok(PrivSetLen == 1, "PrivSetLen returns %d\n", PrivSetLen); + "failed with ERROR_NOACCESS, instead of %ld\n", err); + ok(PrivSetLen == 1, "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1517,8 +1517,8 @@ static void test_AccessCheck(void) 0, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have " - "failed with ERROR_NOACCESS, instead of %d\n", err); - ok(PrivSetLen == sizeof(PRIVILEGE_SET) - 1, "PrivSetLen returns %d\n", PrivSetLen); + "failed with ERROR_NOACCESS, instead of %ld\n", err); + ok(PrivSetLen == sizeof(PRIVILEGE_SET) - 1, "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1530,8 +1530,8 @@ static void test_AccessCheck(void) 0, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have " - "failed with ERROR_NOACCESS, instead of %d\n", err); - ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen); + "failed with ERROR_NOACCESS, instead of %ld\n", err); + ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1543,8 +1543,8 @@ static void test_AccessCheck(void) PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_INSUFFICIENT_BUFFER, "AccessCheck should have " - "failed with ERROR_INSUFFICIENT_BUFFER, instead of %d\n", err); - ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen); + "failed with ERROR_INSUFFICIENT_BUFFER, instead of %ld\n", err); + ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1556,8 +1556,8 @@ static void test_AccessCheck(void) PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_INSUFFICIENT_BUFFER, "AccessCheck should have " - "failed with ERROR_INSUFFICIENT_BUFFER, instead of %d\n", err); - ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen); + "failed with ERROR_INSUFFICIENT_BUFFER, instead of %ld\n", err); + ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1570,8 +1570,8 @@ static void test_AccessCheck(void) PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_INSUFFICIENT_BUFFER, "AccessCheck should have " - "failed with ERROR_INSUFFICIENT_BUFFER, instead of %d\n", err); - ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen); + "failed with ERROR_INSUFFICIENT_BUFFER, instead of %ld\n", err); + ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n"); ok(PrivSet->PrivilegeCount == 0xdeadbeef, "buffer contents should not be changed\n"); @@ -1584,11 +1584,11 @@ static void test_AccessCheck(void) ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); - ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); + ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", PrivSetLen); ok(AccessStatus && (Access == KEY_READ), - "AccessCheck failed to grant access with error %d\n", GetLastError()); - ok(PrivSet->PrivilegeCount == 0, "PrivilegeCount returns %d, expects 0\n", + "AccessCheck failed to grant access with error %ld\n", GetLastError()); + ok(PrivSet->PrivilegeCount == 0, "PrivilegeCount returns %ld, expects 0\n", PrivSet->PrivilegeCount);
/* Valid PrivSet with sufficient PrivSetLen */ @@ -1599,12 +1599,12 @@ static void test_AccessCheck(void) ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); todo_wine - ok(PrivSetLen == sizeof(PRIVILEGE_SET) + 1, "PrivSetLen returns %d\n", PrivSetLen); + ok(PrivSetLen == sizeof(PRIVILEGE_SET) + 1, "PrivSetLen returns %ld\n", PrivSetLen); ok(AccessStatus && (Access == KEY_READ), - "AccessCheck failed to grant access with error %d\n", GetLastError()); - ok(PrivSet->PrivilegeCount == 0, "PrivilegeCount returns %d, expects 0\n", + "AccessCheck failed to grant access with error %ld\n", GetLastError()); + ok(PrivSet->PrivilegeCount == 0, "PrivilegeCount returns %ld, expects 0\n", PrivSet->PrivilegeCount);
PrivSetLen = FIELD_OFFSET(PRIVILEGE_SET, Privilege[16]); @@ -1616,7 +1616,7 @@ static void test_AccessCheck(void) 0, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have " - "failed with ERROR_NOACCESS, instead of %d\n", err); + "failed with ERROR_NOACCESS, instead of %ld\n", err); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1625,22 +1625,22 @@ static void test_AccessCheck(void) Access = AccessStatus = 0x1abe11ed; ret = AccessCheck(SecurityDescriptor, Token, KEY_WRITE, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); err = GetLastError(); ok(!AccessStatus && err == ERROR_ACCESS_DENIED, "AccessCheck should have failed " - "with ERROR_ACCESS_DENIED, instead of %d\n", err); - ok(!Access, "Should have failed to grant any access, got 0x%08x\n", Access); + "with ERROR_ACCESS_DENIED, instead of %ld\n", err); + ok(!Access, "Should have failed to grant any access, got 0x%08lx\n", Access);
SetLastError(0xdeadbeef); PrivSet->PrivilegeCount = 16; ret = AccessCheck(SecurityDescriptor, Token, ACCESS_SYSTEM_SECURITY, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); ok(ret && !AccessStatus && GetLastError() == ERROR_PRIVILEGE_NOT_HELD, - "AccessCheck should have failed with ERROR_PRIVILEGE_NOT_HELD, instead of %d\n", + "AccessCheck should have failed with ERROR_PRIVILEGE_NOT_HELD, instead of %ld\n", GetLastError());
ret = ImpersonateLoggedOnUser(Token); - ok(ret, "ImpersonateLoggedOnUser failed with error %d\n", GetLastError()); + ok(ret, "ImpersonateLoggedOnUser failed with error %ld\n", GetLastError()); ret = pRtlAdjustPrivilege(SE_SECURITY_PRIVILEGE, TRUE, TRUE, &Enabled); if (!ret) { @@ -1652,8 +1652,8 @@ static void test_AccessCheck(void) PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_INSUFFICIENT_BUFFER, "AccessCheck should have " - "failed with ERROR_INSUFFICIENT_BUFFER, instead of %d\n", err); - ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen); + "failed with ERROR_INSUFFICIENT_BUFFER, instead of %ld\n", err); + ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1665,8 +1665,8 @@ static void test_AccessCheck(void) PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_INSUFFICIENT_BUFFER, "AccessCheck should have " - "failed with ERROR_INSUFFICIENT_BUFFER, instead of %d\n", err); - ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen); + "failed with ERROR_INSUFFICIENT_BUFFER, instead of %ld\n", err); + ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %ld\n", PrivSetLen); ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, "Access and/or AccessStatus were changed!\n");
@@ -1678,12 +1678,12 @@ static void test_AccessCheck(void) ret = AccessCheck(SecurityDescriptor, Token, ACCESS_SYSTEM_SECURITY, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); ok(ret && AccessStatus && GetLastError() == 0xdeadbeef, - "AccessCheck should have succeeded, error %d\n", + "AccessCheck should have succeeded, error %ld\n", GetLastError()); ok(Access == ACCESS_SYSTEM_SECURITY, - "Access should be equal to ACCESS_SYSTEM_SECURITY instead of 0x%08x\n", + "Access should be equal to ACCESS_SYSTEM_SECURITY instead of 0x%08lx\n", Access); - ok(PrivSet->PrivilegeCount == 1, "PrivilegeCount returns %d, expects 1\n", + ok(PrivSet->PrivilegeCount == 1, "PrivilegeCount returns %ld, expects 1\n", PrivSet->PrivilegeCount);
/* Valid PrivSet with large PrivSetLen */ @@ -1694,23 +1694,23 @@ static void test_AccessCheck(void) ret = AccessCheck(SecurityDescriptor, Token, ACCESS_SYSTEM_SECURITY, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); ok(ret && AccessStatus && GetLastError() == 0xdeadbeef, - "AccessCheck should have succeeded, error %d\n", + "AccessCheck should have succeeded, error %ld\n", GetLastError()); ok(Access == ACCESS_SYSTEM_SECURITY, - "Access should be equal to ACCESS_SYSTEM_SECURITY instead of 0x%08x\n", + "Access should be equal to ACCESS_SYSTEM_SECURITY instead of 0x%08lx\n", Access); - ok(PrivSet->PrivilegeCount == 1, "PrivilegeCount returns %d, expects 1\n", + ok(PrivSet->PrivilegeCount == 1, "PrivilegeCount returns %ld, expects 1\n", PrivSet->PrivilegeCount); } else trace("Couldn't get SE_SECURITY_PRIVILEGE (0x%08x), skipping ACCESS_SYSTEM_SECURITY test\n", ret); ret = RevertToSelf(); - ok(ret, "RevertToSelf failed with error %d\n", GetLastError()); + ok(ret, "RevertToSelf failed with error %ld\n", GetLastError());
/* test INHERIT_ONLY_ACE */ ret = InitializeAcl(Acl, 256, ACL_REVISION); - ok(ret, "InitializeAcl failed with error %d\n", GetLastError()); + ok(ret, "InitializeAcl failed with error %ld\n", GetLastError());
/* NT doesn't have AddAccessAllowedAceEx. Skipping this call/test doesn't influence * the next ones. @@ -1718,30 +1718,30 @@ static void test_AccessCheck(void) if (pAddAccessAllowedAceEx) { ret = pAddAccessAllowedAceEx(Acl, ACL_REVISION, INHERIT_ONLY_ACE, KEY_READ, EveryoneSid); - ok(ret, "AddAccessAllowedAceEx failed with error %d\n", GetLastError()); + ok(ret, "AddAccessAllowedAceEx failed with error %ld\n", GetLastError()); } else win_skip("AddAccessAllowedAceEx is not available\n");
ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); + ok(ret, "AccessCheck failed with error %ld\n", GetLastError()); err = GetLastError(); ok(!AccessStatus && err == ERROR_ACCESS_DENIED, "AccessCheck should have failed " - "with ERROR_ACCESS_DENIED, instead of %d\n", err); - ok(!Access, "Should have failed to grant any access, got 0x%08x\n", Access); + "with ERROR_ACCESS_DENIED, instead of %ld\n", err); + ok(!Access, "Should have failed to grant any access, got 0x%08lx\n", Access);
CloseHandle(Token);
res = DuplicateToken(ProcessToken, SecurityAnonymous, &Token); - ok(res, "DuplicateToken failed with error %d\n", GetLastError()); + ok(res, "DuplicateToken failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = AccessCheck(SecurityDescriptor, Token, MAXIMUM_ALLOWED, &Mapping, PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_BAD_IMPERSONATION_LEVEL, "AccessCheck should have failed " - "with ERROR_BAD_IMPERSONATION_LEVEL, instead of %d\n", err); + "with ERROR_BAD_IMPERSONATION_LEVEL, instead of %ld\n", err);
CloseHandle(Token);
@@ -1750,7 +1750,7 @@ static void test_AccessCheck(void) PrivSet, &PrivSetLen, &Access, &AccessStatus); err = GetLastError(); ok(!ret && err == ERROR_NO_IMPERSONATION_TOKEN, "AccessCheck should have failed " - "with ERROR_NO_IMPERSONATION_TOKEN, instead of %d\n", err); + "with ERROR_NO_IMPERSONATION_TOKEN, instead of %ld\n", err);
CloseHandle(ProcessToken);
@@ -1788,40 +1788,40 @@ static void test_token_attr(void) win_skip("OpenProcessToken is not implemented\n"); return; } - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError()); if (ret) { DWORD buf[256]; /* GetTokenInformation wants a dword-aligned buffer */ Size = sizeof(buf); ret = GetTokenInformation(Token, TokenUser,(void*)buf, Size, &Size); - ok(ret, "GetTokenInformation failed with error %d\n", GetLastError()); + ok(ret, "GetTokenInformation failed with error %ld\n", GetLastError()); Size = sizeof(ImpersonationLevel); ret = GetTokenInformation(Token, TokenImpersonationLevel, &ImpersonationLevel, Size, &Size); GLE = GetLastError(); - ok(!ret && (GLE == ERROR_INVALID_PARAMETER), "GetTokenInformation(TokenImpersonationLevel) on primary token should have failed with ERROR_INVALID_PARAMETER instead of %d\n", GLE); + ok(!ret && (GLE == ERROR_INVALID_PARAMETER), "GetTokenInformation(TokenImpersonationLevel) on primary token should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GLE); CloseHandle(Token); }
SetLastError(0xdeadbeef); ret = OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &Token); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError());
/* groups */ /* insufficient buffer length */ SetLastError(0xdeadbeef); Size2 = 0; ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size2); - ok(Size2 > 1, "got %d\n", Size2); + ok(Size2 > 1, "got %ld\n", Size2); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "%d with error %d\n", ret, GetLastError()); + "%d with error %ld\n", ret, GetLastError()); Size2 -= 1; Groups = HeapAlloc(GetProcessHeap(), 0, Size2); memset(Groups, 0xcc, Size2); Size = 0; ret = GetTokenInformation(Token, TokenGroups, Groups, Size2, &Size); - ok(Size > 1, "got %d\n", Size); + ok(Size > 1, "got %ld\n", Size); ok((!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER) || broken(ret) /* wow64 */, - "%d with error %d\n", ret, GetLastError()); + "%d with error %ld\n", ret, GetLastError()); if(!ret) ok(*((BYTE*)Groups) == 0xcc, "buffer altered\n");
@@ -1830,14 +1830,14 @@ static void test_token_attr(void) SetLastError(0xdeadbeef); ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "GetTokenInformation(TokenGroups) %s with error %d\n", + "GetTokenInformation(TokenGroups) %s with error %ld\n", ret ? "succeeded" : "failed", GetLastError()); Groups = HeapAlloc(GetProcessHeap(), 0, Size); SetLastError(0xdeadbeef); ret = GetTokenInformation(Token, TokenGroups, Groups, Size, &Size); - ok(ret, "GetTokenInformation(TokenGroups) failed with error %d\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenGroups) failed with error %ld\n", GetLastError()); ok(GetLastError() == 0xdeadbeef, - "GetTokenInformation shouldn't have set last error to %d\n", + "GetTokenInformation shouldn't have set last error to %ld\n", GetLastError()); trace("TokenGroups:\n"); for (i = 0; i < Groups->GroupCount; i++) @@ -1853,24 +1853,24 @@ static void test_token_attr(void) if (ret) { ConvertSidToStringSidA(Groups->Groups[i].Sid, &SidString); - trace("%s, %s\%s use: %d attr: 0x%08x\n", SidString, Domain, Name, SidNameUse, Groups->Groups[i].Attributes); + trace("%s, %s\%s use: %d attr: 0x%08lx\n", SidString, Domain, Name, SidNameUse, Groups->Groups[i].Attributes); LocalFree(SidString); } - else trace("attr: 0x%08x LookupAccountSid failed with error %d\n", Groups->Groups[i].Attributes, GetLastError()); + else trace("attr: 0x%08lx LookupAccountSid failed with error %ld\n", Groups->Groups[i].Attributes, GetLastError()); } HeapFree(GetProcessHeap(), 0, Groups);
/* user */ ret = GetTokenInformation(Token, TokenUser, NULL, 0, &Size); ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); User = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(Token, TokenUser, User, Size, &Size); ok(ret, - "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError());
ConvertSidToStringSidA(User->User.Sid, &SidString); - trace("TokenUser: %s attr: 0x%08x\n", SidString, User->User.Attributes); + trace("TokenUser: %s attr: 0x%08lx\n", SidString, User->User.Attributes); LocalFree(SidString); HeapFree(GetProcessHeap(), 0, User);
@@ -1881,14 +1881,14 @@ static void test_token_attr(void) else { ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenLogonSid) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenLogonSid) failed with error %ld\n", GetLastError()); Groups = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(Token, TokenLogonSid, Groups, Size, &Size); ok(ret, - "GetTokenInformation(TokenLogonSid) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenLogonSid) failed with error %ld\n", GetLastError()); if (ret) { - ok(Groups->GroupCount == 1, "got %d\n", Groups->GroupCount); + ok(Groups->GroupCount == 1, "got %ld\n", Groups->GroupCount); if(Groups->GroupCount == 1) { ConvertSidToStringSidA(Groups->Groups[0].Sid, &SidString); @@ -1907,27 +1907,27 @@ static void test_token_attr(void) /* privileges */ ret = GetTokenInformation(Token, TokenPrivileges, NULL, 0, &Size); ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenPrivileges) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenPrivileges) failed with error %ld\n", GetLastError()); Privileges = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(Token, TokenPrivileges, Privileges, Size, &Size); ok(ret, - "GetTokenInformation(TokenPrivileges) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenPrivileges) failed with error %ld\n", GetLastError()); trace("TokenPrivileges:\n"); for (i = 0; i < Privileges->PrivilegeCount; i++) { CHAR Name[256]; DWORD NameLen = ARRAY_SIZE(Name); LookupPrivilegeNameA(NULL, &Privileges->Privileges[i].Luid, Name, &NameLen); - trace("\t%s, 0x%x\n", Name, Privileges->Privileges[i].Attributes); + trace("\t%s, 0x%lx\n", Name, Privileges->Privileges[i].Attributes); } HeapFree(GetProcessHeap(), 0, Privileges);
ret = DuplicateToken(Token, SecurityAnonymous, &ImpersonationToken); - ok(ret, "DuplicateToken failed with error %d\n", GetLastError()); + ok(ret, "DuplicateToken failed with error %ld\n", GetLastError());
Size = sizeof(ImpersonationLevel); ret = GetTokenInformation(ImpersonationToken, TokenImpersonationLevel, &ImpersonationLevel, Size, &Size); - ok(ret, "GetTokenInformation(TokenImpersonationLevel) failed with error %d\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenImpersonationLevel) failed with error %ld\n", GetLastError()); ok(ImpersonationLevel == SecurityAnonymous, "ImpersonationLevel should have been SecurityAnonymous instead of %d\n", ImpersonationLevel);
CloseHandle(ImpersonationToken); @@ -1935,23 +1935,23 @@ static void test_token_attr(void) /* default dacl */ ret = GetTokenInformation(Token, TokenDefaultDacl, NULL, 0, &Size); ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); + "GetTokenInformation(TokenDefaultDacl) failed with error %lu\n", GetLastError());
Dacl = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size); - ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetTokenInformation(Token, TokenDefaultDacl, NULL, 0); GLE = GetLastError(); ok(!ret, "SetTokenInformation(TokenDefaultDacl) succeeded\n"); - ok(GLE == ERROR_BAD_LENGTH, "expected ERROR_BAD_LENGTH got %u\n", GLE); + ok(GLE == ERROR_BAD_LENGTH, "expected ERROR_BAD_LENGTH got %lu\n", GLE);
SetLastError(0xdeadbeef); ret = SetTokenInformation(Token, TokenDefaultDacl, NULL, Size); GLE = GetLastError(); ok(!ret, "SetTokenInformation(TokenDefaultDacl) succeeded\n"); - ok(GLE == ERROR_NOACCESS, "expected ERROR_NOACCESS got %u\n", GLE); + ok(GLE == ERROR_NOACCESS, "expected ERROR_NOACCESS got %lu\n", GLE);
acl = Dacl->DefaultDacl; Dacl->DefaultDacl = NULL; @@ -1962,18 +1962,18 @@ static void test_token_attr(void) Size2 = 0; Dacl->DefaultDacl = (ACL *)0xdeadbeef; ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size2); - ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %lu\n", GetLastError()); ok(Dacl->DefaultDacl == NULL, "expected NULL, got %p\n", Dacl->DefaultDacl); ok(Size2 == sizeof(TOKEN_DEFAULT_DACL) || broken(Size2 == 2*sizeof(TOKEN_DEFAULT_DACL)), /* WoW64 */ - "got %u expected sizeof(TOKEN_DEFAULT_DACL)\n", Size2); + "got %lu expected sizeof(TOKEN_DEFAULT_DACL)\n", Size2);
Dacl->DefaultDacl = acl; ret = SetTokenInformation(Token, TokenDefaultDacl, Dacl, Size); - ok(ret, "SetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); + ok(ret, "SetTokenInformation(TokenDefaultDacl) failed with error %lu\n", GetLastError());
if (Size2 == sizeof(TOKEN_DEFAULT_DACL)) { ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size2); - ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %lu\n", GetLastError()); } else win_skip("TOKEN_DEFAULT_DACL size too small on WoW64\n");
@@ -1988,7 +1988,7 @@ static void test_GetTokenInformation(void) BOOL ret;
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &token); - ok(ret, "OpenProcessToken failed: %u\n", GetLastError()); + ok(ret, "OpenProcessToken failed: %lu\n", GetLastError());
size = 0; is_app_container = 0xdeadbeef; @@ -1996,10 +1996,10 @@ static void test_GetTokenInformation(void) sizeof(is_app_container), &size); ok(ret || broken(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_FUNCTION), /* pre-win8 */ - "GetTokenInformation failed: %u\n", GetLastError()); + "GetTokenInformation failed: %lu\n", GetLastError()); if(ret) { - ok(size == sizeof(is_app_container), "size = %u\n", size); - ok(!is_app_container, "is_app_container = %x\n", is_app_container); + ok(size == sizeof(is_app_container), "size = %lu\n", size); + ok(!is_app_container, "is_app_container = %lx\n", is_app_container); }
CloseHandle(token); @@ -2015,7 +2015,7 @@ static void test_sid_str(PSID * sid) { char *str_sid; BOOL ret = ConvertSidToStringSidA(sid, &str_sid); - ok(ret, "ConvertSidToStringSidA() failed: %d\n", GetLastError()); + ok(ret, "ConvertSidToStringSidA() failed: %ld\n", GetLastError()); if (ret) { char account[MAX_PATH], domain[MAX_PATH]; @@ -2024,7 +2024,7 @@ static void test_sid_str(PSID * sid) DWORD dom_size = MAX_PATH; ret = LookupAccountSidA (NULL, sid, account, &acc_size, domain, &dom_size, &use); ok(ret || GetLastError() == ERROR_NONE_MAPPED, - "LookupAccountSid(%s) failed: %d\n", str_sid, GetLastError()); + "LookupAccountSid(%s) failed: %ld\n", str_sid, GetLastError()); if (ret) trace(" %s %s\%s %d\n", str_sid, domain, account, use); else if (GetLastError() == ERROR_NONE_MAPPED) @@ -2086,18 +2086,18 @@ static void test_CreateWellKnownSid(void) ret = CreateWellKnownSid(WinInteractiveSid, NULL, NULL, &size); error = GetLastError(); ok(!ret, "CreateWellKnownSid succeeded\n"); - ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", error); + ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", error); ok(size, "expected size > 0\n");
SetLastError(0xdeadbeef); ret = CreateWellKnownSid(WinInteractiveSid, NULL, NULL, &size); error = GetLastError(); ok(!ret, "CreateWellKnownSid succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
sid = HeapAlloc(GetProcessHeap(), 0, size); ret = CreateWellKnownSid(WinInteractiveSid, NULL, sid, &size); - ok(ret, "CreateWellKnownSid failed %u\n", GetLastError()); + ok(ret, "CreateWellKnownSid failed %lu\n", GetLastError()); HeapFree(GetProcessHeap(), 0, sid);
/* a domain sid usually have three subauthorities but we test that CreateWellKnownSid doesn't check it */ @@ -2123,7 +2123,7 @@ static void test_CreateWellKnownSid(void)
cb = sizeof(sid_buffer); ok(CreateWellKnownSid(i, value->without_domain ? NULL : domainsid, sid_buffer, &cb), "Couldn't create well known sid %u\n", i); - expect_eq(GetSidLengthRequired(*GetSidSubAuthorityCount(sid_buffer)), cb, DWORD, "%d"); + expect_eq(GetSidLengthRequired(*GetSidSubAuthorityCount(sid_buffer)), cb, DWORD, "%ld"); ok(IsValidSid(sid_buffer), "The sid is not valid\n"); ok(ConvertSidToStringSidA(sid_buffer, &str), "Couldn't convert SID to string\n"); ok(strcmp(str, value->sid_string) == 0, "%d: SID mismatch - expected %s, got %s\n", i, @@ -2135,7 +2135,7 @@ static void test_CreateWellKnownSid(void) char buf2[SECURITY_MAX_SID_SIZE]; cb = sizeof(buf2); ok(CreateWellKnownSid(i, domainsid, buf2, &cb), "Couldn't create well known sid %u with optional domain\n", i); - expect_eq(GetSidLengthRequired(*GetSidSubAuthorityCount(sid_buffer)), cb, DWORD, "%d"); + expect_eq(GetSidLengthRequired(*GetSidSubAuthorityCount(sid_buffer)), cb, DWORD, "%ld"); ok(memcmp(buf2, sid_buffer, cb) == 0, "SID create with domain is different than without (%u)\n", i); } } @@ -2170,7 +2170,7 @@ static void test_LookupAccountSid(void) ret = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &pUsersSid); ok(ret || (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), - "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
/* not running on NT so give up */ if (!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) @@ -2200,7 +2200,7 @@ static void test_LookupAccountSid(void) ret = LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); ok(!ret, "LookupAccountSidA() Expected FALSE got TRUE\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupAccountSidA() Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + "LookupAccountSidA() Expected ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
/* try a 0 sized account buffer */ acc_sizeA = 0; @@ -2209,7 +2209,7 @@ static void test_LookupAccountSid(void) LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); /* this can fail or succeed depending on OS version but the size will always be returned */ ok(acc_sizeA == real_acc_sizeA + 1, - "LookupAccountSidA() Expected acc_size = %u, got %u\n", + "LookupAccountSidA() Expected acc_size = %lu, got %lu\n", real_acc_sizeA + 1, acc_sizeA);
/* try a 0 sized account buffer */ @@ -2218,7 +2218,7 @@ static void test_LookupAccountSid(void) LookupAccountSidA(NULL, pUsersSid, NULL, &acc_sizeA, domainA, &dom_sizeA, &use); /* this can fail or succeed depending on OS version but the size will always be returned */ ok(acc_sizeA == real_acc_sizeA + 1, - "LookupAccountSid() Expected acc_size = %u, got %u\n", + "LookupAccountSid() Expected acc_size = %lu, got %lu\n", real_acc_sizeA + 1, acc_sizeA);
/* try a small domain buffer */ @@ -2228,7 +2228,7 @@ static void test_LookupAccountSid(void) ret = LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); ok(!ret, "LookupAccountSidA() Expected FALSE got TRUE\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupAccountSidA() Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + "LookupAccountSidA() Expected ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
/* try a 0 sized domain buffer */ dom_sizeA = 0; @@ -2237,7 +2237,7 @@ static void test_LookupAccountSid(void) LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); /* this can fail or succeed depending on OS version but the size will always be returned */ ok(dom_sizeA == real_dom_sizeA + 1, - "LookupAccountSidA() Expected dom_size = %u, got %u\n", + "LookupAccountSidA() Expected dom_size = %lu, got %lu\n", real_dom_sizeA + 1, dom_sizeA);
/* try a 0 sized domain buffer */ @@ -2246,7 +2246,7 @@ static void test_LookupAccountSid(void) LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, NULL, &dom_sizeA, &use); /* this can fail or succeed depending on OS version but the size will always be returned */ ok(dom_sizeA == real_dom_sizeA + 1, - "LookupAccountSidA() Expected dom_size = %u, got %u\n", + "LookupAccountSidA() Expected dom_size = %lu, got %lu\n", real_dom_sizeA + 1, dom_sizeA);
real_acc_sizeW = MAX_PATH; @@ -2260,7 +2260,7 @@ static void test_LookupAccountSid(void) ret = LookupAccountSidA("deepthought", pUsersSid, accountA, &real_acc_sizeA, domainA, &real_dom_sizeA, &use); ok(!ret, "LookupAccountSidA() Expected FALSE got TRUE\n"); ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR /* Vista */, - "LookupAccountSidA() Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %u\n", GetLastError()); + "LookupAccountSidA() Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %lu\n", GetLastError());
/* native windows crashes if domainW or accountW is NULL */
@@ -2271,7 +2271,7 @@ static void test_LookupAccountSid(void) ret = LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, domainW, &dom_sizeW, &use); ok(!ret, "LookupAccountSidW() Expected FALSE got TRUE\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupAccountSidW() Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + "LookupAccountSidW() Expected ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
/* try a 0 sized account buffer */ acc_sizeW = 0; @@ -2280,7 +2280,7 @@ static void test_LookupAccountSid(void) LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, domainW, &dom_sizeW, &use); /* this can fail or succeed depending on OS version but the size will always be returned */ ok(acc_sizeW == real_acc_sizeW + 1, - "LookupAccountSidW() Expected acc_size = %u, got %u\n", + "LookupAccountSidW() Expected acc_size = %lu, got %lu\n", real_acc_sizeW + 1, acc_sizeW);
/* try a 0 sized account buffer */ @@ -2289,7 +2289,7 @@ static void test_LookupAccountSid(void) LookupAccountSidW(NULL, pUsersSid, NULL, &acc_sizeW, domainW, &dom_sizeW, &use); /* this can fail or succeed depending on OS version but the size will always be returned */ ok(acc_sizeW == real_acc_sizeW + 1, - "LookupAccountSidW() Expected acc_size = %u, got %u\n", + "LookupAccountSidW() Expected acc_size = %lu, got %lu\n", real_acc_sizeW + 1, acc_sizeW);
/* try a small domain buffer */ @@ -2299,7 +2299,7 @@ static void test_LookupAccountSid(void) ret = LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, domainW, &dom_sizeW, &use); ok(!ret, "LookupAccountSidW() Expected FALSE got TRUE\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupAccountSidW() Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + "LookupAccountSidW() Expected ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
/* try a 0 sized domain buffer */ dom_sizeW = 0; @@ -2308,7 +2308,7 @@ static void test_LookupAccountSid(void) LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, domainW, &dom_sizeW, &use); /* this can fail or succeed depending on OS version but the size will always be returned */ ok(dom_sizeW == real_dom_sizeW + 1, - "LookupAccountSidW() Expected dom_size = %u, got %u\n", + "LookupAccountSidW() Expected dom_size = %lu, got %lu\n", real_dom_sizeW + 1, dom_sizeW);
/* try a 0 sized domain buffer */ @@ -2317,15 +2317,15 @@ static void test_LookupAccountSid(void) LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, NULL, &dom_sizeW, &use); /* this can fail or succeed depending on OS version but the size will always be returned */ ok(dom_sizeW == real_dom_sizeW + 1, - "LookupAccountSidW() Expected dom_size = %u, got %u\n", + "LookupAccountSidW() Expected dom_size = %lu, got %lu\n", real_dom_sizeW + 1, dom_sizeW);
acc_sizeW = dom_sizeW = use = 0; SetLastError(0xdeadbeef); ret = LookupAccountSidW(NULL, pUsersSid, NULL, &acc_sizeW, NULL, &dom_sizeW, &use); error = GetLastError(); - ok(!ret, "LookupAccountSidW failed %u\n", GetLastError()); - ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", error); + ok(!ret, "LookupAccountSidW failed %lu\n", GetLastError()); + ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", error); ok(acc_sizeW, "expected non-zero account size\n"); ok(dom_sizeW, "expected non-zero domain size\n"); ok(!use, "expected zero use %u\n", use); @@ -2335,9 +2335,9 @@ static void test_LookupAccountSid(void) /* Test LookupAccountSid with Sid retrieved from token information. This assumes this process is running under the account of the current user.*/ ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &hToken); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError()); ret = GetTokenInformation(hToken, TokenUser, NULL, 0, &cbti); - ok(!ret, "GetTokenInformation failed with error %d\n", GetLastError()); + ok(!ret, "GetTokenInformation failed with error %ld\n", GetLastError()); ptiUser = HeapAlloc(GetProcessHeap(), 0, cbti); if (GetTokenInformation(hToken, TokenUser, ptiUser, cbti, &cbti)) { @@ -2369,7 +2369,7 @@ static void test_LookupAccountSid(void) else { if (GetLastError() != ERROR_INVALID_PARAMETER) - trace(" CreateWellKnownSid(%d) failed: %d\n", i, GetLastError()); + trace(" CreateWellKnownSid(%d) failed: %ld\n", i, GetLastError()); else trace(" %d: not supported\n", i); } @@ -2380,20 +2380,20 @@ static void test_LookupAccountSid(void)
status = LsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle); ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED, - "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status); + "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx\n", status);
/* try a more restricted access mask if necessary */ if (status == STATUS_ACCESS_DENIED) { trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION\n"); status = LsaOpenPolicy( NULL, &object_attributes, POLICY_VIEW_LOCAL_INFORMATION, &handle); - ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08lx\n", status); }
if (status == STATUS_SUCCESS) { PPOLICY_ACCOUNT_DOMAIN_INFO info; status = LsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (PVOID*)&info); - ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy() failed, returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy() failed, returned 0x%08lx\n", status); if (status == STATUS_SUCCESS) { ok(info->DomainSid!=0, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) missing SID\n"); @@ -2435,7 +2435,7 @@ static void test_LookupAccountSid(void) }
status = LsaClose(handle); - ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status); } }
@@ -2537,7 +2537,7 @@ static void test_LookupAccountName(void) user_size = UNLEN + 1; SetLastError(0xdeadbeef); ret = GetUserNameA(user_name, &user_size); - ok(ret, "Failed to get user name : %d\n", GetLastError()); + ok(ret, "Failed to get user name : %ld\n", GetLastError());
/* get sizes */ sid_size = 0; @@ -2552,7 +2552,7 @@ static void test_LookupAccountName(void) } ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok(sid_size != 0, "Expected non-zero sid size\n"); ok(domain_size != 0, "Expected non-zero domain size\n"); ok(sid_use == (SID_NAME_USE)0xcafebabe, "Expected 0xcafebabe, got %d\n", sid_use); @@ -2567,11 +2567,11 @@ static void test_LookupAccountName(void) ret = LookupAccountNameA(NULL, user_name, psid, &sid_size, domain, &domain_size, &sid_use); get_sid_info(psid, &account, &sid_dom); ok(ret, "Failed to lookup account name\n"); - ok(sid_size == GetLengthSid(psid), "Expected %d, got %d\n", GetLengthSid(psid), sid_size); + ok(sid_size == GetLengthSid(psid), "Expected %ld, got %ld\n", GetLengthSid(psid), sid_size); ok(!lstrcmpA(account, user_name), "Expected %s, got %s\n", user_name, account); ok(!lstrcmpiA(domain, sid_dom), "Expected %s, got %s\n", sid_dom, domain); - ok(domain_size == domain_save - 1, "Expected %d, got %d\n", domain_save - 1, domain_size); - ok(strlen(domain) == domain_size, "Expected %d, got %d\n", lstrlenA(domain), domain_size); + ok(domain_size == domain_save - 1, "Expected %ld, got %ld\n", domain_save - 1, domain_size); + ok(strlen(domain) == domain_size, "Expected %d, got %ld\n", lstrlenA(domain), domain_size); ok(sid_use == SidTypeUser, "Expected SidTypeUser (%d), got %d\n", SidTypeUser, sid_use); domain_size = domain_save; sid_size = sid_save; @@ -2588,8 +2588,8 @@ static void test_LookupAccountName(void) ok(sid_size != 0, "sid_size was zero\n"); ok(!lstrcmpA(account, "Everyone"), "Expected Everyone, got %s\n", account); ok(!lstrcmpiA(domain, sid_dom), "Expected %s, got %s\n", sid_dom, domain); - ok(domain_size == 0, "Expected 0, got %d\n", domain_size); - ok(strlen(domain) == domain_size, "Expected %d, got %d\n", lstrlenA(domain), domain_size); + ok(domain_size == 0, "Expected 0, got %ld\n", domain_size); + ok(strlen(domain) == domain_size, "Expected %d, got %ld\n", lstrlenA(domain), domain_size); ok(sid_use == SidTypeWellKnownGroup, "Expected SidTypeWellKnownGroup (%d), got %d\n", SidTypeWellKnownGroup, sid_use); domain_size = domain_save; } @@ -2600,9 +2600,9 @@ static void test_LookupAccountName(void) ret = LookupAccountNameA(NULL, user_name, NULL, &sid_size, domain, &domain_size, &sid_use); ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size == sid_save, "Expected %d, got %d\n", sid_save, sid_size); - ok(domain_size == domain_save, "Expected %d, got %d\n", domain_save, domain_size); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(sid_size == sid_save, "Expected %ld, got %ld\n", sid_save, sid_size); + ok(domain_size == domain_save, "Expected %ld, got %ld\n", domain_save, domain_size);
/* try cchReferencedDomainName - 1 */ SetLastError(0xdeadbeef); @@ -2610,9 +2610,9 @@ static void test_LookupAccountName(void) ret = LookupAccountNameA(NULL, user_name, NULL, &sid_size, domain, &domain_size, &sid_use); ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size == sid_save, "Expected %d, got %d\n", sid_save, sid_size); - ok(domain_size == domain_save, "Expected %d, got %d\n", domain_save, domain_size); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(sid_size == sid_save, "Expected %ld, got %ld\n", sid_save, sid_size); + ok(domain_size == domain_save, "Expected %ld, got %ld\n", domain_save, domain_size);
/* NULL ReferencedDomainName with zero domain name size */ SetLastError(0xdeadbeef); @@ -2620,9 +2620,9 @@ static void test_LookupAccountName(void) ret = LookupAccountNameA(NULL, user_name, psid, &sid_size, NULL, &domain_size, &sid_use); ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size == sid_save, "Expected %d, got %d\n", sid_save, sid_size); - ok(domain_size == domain_save, "Expected %d, got %d\n", domain_save, domain_size); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(sid_size == sid_save, "Expected %ld, got %ld\n", sid_save, sid_size); + ok(domain_size == domain_save, "Expected %ld, got %ld\n", domain_save, domain_size);
HeapFree(GetProcessHeap(), 0, psid); HeapFree(GetProcessHeap(), 0, domain); @@ -2639,7 +2639,7 @@ static void test_LookupAccountName(void) { ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok(sid_size != 0, "Expected non-zero sid size\n"); ok(domain_size != 0, "Expected non-zero domain size\n"); ok(sid_use == (SID_NAME_USE)0xcafebabe, "Expected 0xcafebabe, got %d\n", sid_use); @@ -2668,9 +2668,9 @@ static void test_LookupAccountName(void) ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == ERROR_NONE_MAPPED || broken(GetLastError() == ERROR_TRUSTED_RELATIONSHIP_FAILURE), - "Expected ERROR_NONE_MAPPED, got %d\n", GetLastError()); - ok(sid_size == 0, "Expected 0, got %d\n", sid_size); - ok(domain_size == 0, "Expected 0, got %d\n", domain_size); + "Expected ERROR_NONE_MAPPED, got %ld\n", GetLastError()); + ok(sid_size == 0, "Expected 0, got %ld\n", sid_size); + ok(domain_size == 0, "Expected 0, got %ld\n", domain_size);
/* try an invalid system name */ SetLastError(0xdeadbeef); @@ -2679,9 +2679,9 @@ static void test_LookupAccountName(void) ret = LookupAccountNameA("deepthought", NULL, NULL, &sid_size, NULL, &domain_size, &sid_use); ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR /* Vista */, - "Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %d\n", GetLastError()); - ok(sid_size == 0, "Expected 0, got %d\n", sid_size); - ok(domain_size == 0, "Expected 0, got %d\n", domain_size); + "Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %ld\n", GetLastError()); + ok(sid_size == 0, "Expected 0, got %ld\n", sid_size); + ok(domain_size == 0, "Expected 0, got %ld\n", domain_size);
/* try with the computer name as the account name */ domain_size = sizeof(computer_name); @@ -2693,13 +2693,13 @@ static void test_LookupAccountName(void) GetLastError() == ERROR_NONE_MAPPED /* in a domain */ || broken(GetLastError() == ERROR_TRUSTED_DOMAIN_FAILURE) || broken(GetLastError() == ERROR_TRUSTED_RELATIONSHIP_FAILURE)), - "LookupAccountNameA failed: %d\n", GetLastError()); + "LookupAccountNameA failed: %ld\n", GetLastError()); if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { psid = HeapAlloc(GetProcessHeap(), 0, sid_size); domain = HeapAlloc(GetProcessHeap(), 0, domain_size); ret = LookupAccountNameA(NULL, computer_name, psid, &sid_size, domain, &domain_size, &sid_use); - ok(ret, "LookupAccountNameA failed: %d\n", GetLastError()); + ok(ret, "LookupAccountNameA failed: %ld\n", GetLastError()); ok(sid_use == SidTypeDomain || (sid_use == SidTypeUser && ! strcmp(computer_name, user_name)), "expected SidTypeDomain for %s, got %d\n", computer_name, sid_use); HeapFree(GetProcessHeap(), 0, domain); @@ -2767,7 +2767,7 @@ static void test_security_descriptor(void) SetLastError(0xdeadbeef); size = 5; expect_eq(MakeSelfRelativeSD(&sd, buf, &size), FALSE, BOOL, "%d"); - expect_eq(GetLastError(), ERROR_INSUFFICIENT_BUFFER, DWORD, "%u"); + expect_eq(GetLastError(), (DWORD)ERROR_INSUFFICIENT_BUFFER, DWORD, "%lu"); ok(size > 5, "Size not increased\n"); if (size <= 8192) { @@ -2792,17 +2792,17 @@ static void test_security_descriptor(void) "O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)" "(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)" "(AU;NPSA;0x12019f;;;SU)", SDDL_REVISION_1, (void **)&sd_rel, NULL); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
size = 0; ret = MakeSelfRelativeSD(sd_rel, NULL, &size); - todo_wine ok(!ret && GetLastError() == ERROR_BAD_DESCRIPTOR_FORMAT, "got %u\n", GetLastError()); + todo_wine ok(!ret && GetLastError() == ERROR_BAD_DESCRIPTOR_FORMAT, "got %lu\n", GetLastError());
/* convert to absolute form */ size = size_dacl = size_sacl = size_owner = size_group = 0; ret = MakeAbsoluteSD(sd_rel, NULL, &size, NULL, &size_dacl, NULL, &size_sacl, NULL, &size_owner, NULL, &size_group); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError());
sd_abs = HeapAlloc(GetProcessHeap(), 0, size + size_dacl + size_sacl + size_owner + size_group); dacl = (PACL)(sd_abs + 1); @@ -2811,18 +2811,18 @@ static void test_security_descriptor(void) group = (PSID)((char *)owner + size_owner); ret = MakeAbsoluteSD(sd_rel, sd_abs, &size, dacl, &size_dacl, sacl, &size_sacl, owner, &size_owner, group, &size_group); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
size = 0; ret = MakeSelfRelativeSD(sd_abs, NULL, &size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError()); - ok(size == 184, "got %u\n", size); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError()); + ok(size == 184, "got %lu\n", size);
size += 4; sd_rel2 = HeapAlloc(GetProcessHeap(), 0, size); ret = MakeSelfRelativeSD(sd_abs, sd_rel2, &size); - ok(ret, "got %u\n", GetLastError()); - ok(size == 188, "got %u\n", size); + ok(ret, "got %lu\n", GetLastError()); + ok(size == 188, "got %lu\n", size);
HeapFree(GetProcessHeap(), 0, sd_abs); HeapFree(GetProcessHeap(), 0, sd_rel2); @@ -2845,14 +2845,14 @@ static void test_granted_access(HANDLE handle, ACCESS_MASK access,
status = pNtQueryObject( handle, ObjectBasicInformation, &obj_info, sizeof(obj_info), NULL ); - ok_(__FILE__, line)(!status, "NtQueryObject with err: %08x\n", status); + ok_(__FILE__, line)(!status, "NtQueryObject with err: %08lx\n", status); if (alt) ok_(__FILE__, line)(obj_info.GrantedAccess == access || - obj_info.GrantedAccess == alt, "Granted access should be 0x%08x " - "or 0x%08x, instead of 0x%08x\n", access, alt, obj_info.GrantedAccess); + obj_info.GrantedAccess == alt, "Granted access should be 0x%08lx " + "or 0x%08lx, instead of 0x%08lx\n", access, alt, obj_info.GrantedAccess); else ok_(__FILE__, line)(obj_info.GrantedAccess == access, "Granted access should " - "be 0x%08x, instead of 0x%08x\n", access, obj_info.GrantedAccess); + "be 0x%08lx, instead of 0x%08lx\n", access, obj_info.GrantedAccess); }
#define CHECK_SET_SECURITY(o,i,e) \ @@ -2863,10 +2863,10 @@ static void test_granted_access(HANDLE handle, ACCESS_MASK access, res_ = SetKernelObjectSecurity( o, i, SecurityDescriptor ); \ err = GetLastError(); \ if (e == ERROR_SUCCESS) \ - ok(res_, "SetKernelObjectSecurity failed with %d\n", err); \ + ok(res_, "SetKernelObjectSecurity failed with %ld\n", err); \ else \ ok(!res_ && err == e, "SetKernelObjectSecurity should have failed " \ - "with %s, instead of %d\n", #e, err); \ + "with %s, instead of %ld\n", #e, err); \ }while(0)
static void test_process_security(void) @@ -2896,14 +2896,14 @@ static void test_process_security(void) HeapFree(GetProcessHeap(), 0, Acl); return; } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); + ok(res, "InitializeAcl failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid( &SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
/* get owner from the token we might be running as a user not admin */ res = OpenProcessToken( GetCurrentProcess(), MAXIMUM_ALLOWED, &token ); - ok(res, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(res, "OpenProcessToken failed with error %ld\n", GetLastError()); if (!res) { HeapFree(GetProcessHeap(), 0, Acl); @@ -2913,29 +2913,29 @@ static void test_process_security(void) res = GetTokenInformation( token, TokenOwner, NULL, 0, &size ); ok(!res, "Expected failure, got %d\n", res); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
owner = HeapAlloc(GetProcessHeap(), 0, size); res = GetTokenInformation( token, TokenOwner, owner, size, &size ); - ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); + ok(res, "GetTokenInformation failed with error %ld\n", GetLastError()); AdminSid = owner->Owner; test_sid_str(AdminSid);
res = GetTokenInformation( token, TokenPrimaryGroup, NULL, 0, &size ); ok(!res, "Expected failure, got %d\n", res); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
group = HeapAlloc(GetProcessHeap(), 0, size); res = GetTokenInformation( token, TokenPrimaryGroup, group, size, &size ); - ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); + ok(res, "GetTokenInformation failed with error %ld\n", GetLastError()); UsersSid = group->PrimaryGroup; test_sid_str(UsersSid);
acc_size = sizeof(account); dom_size = sizeof(domain); ret = LookupAccountSidA( NULL, UsersSid, account, &acc_size, domain, &dom_size, &use ); - ok(ret, "LookupAccountSid failed with %d\n", ret); + ok(ret, "LookupAccountSid failed with %ld\n", ret); ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use); if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH) skip("Non-English locale (test with hardcoded 'None')\n"); @@ -2945,11 +2945,11 @@ static void test_process_security(void) res = GetTokenInformation( token, TokenUser, NULL, 0, &size ); ok(!res, "Expected failure, got %d\n", res); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
user = HeapAlloc(GetProcessHeap(), 0, size); res = GetTokenInformation( token, TokenUser, user, size, &size ); - ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); + ok(res, "GetTokenInformation failed with error %ld\n", GetLastError()); UserSid = user->User.Sid; test_sid_str(UserSid); ok(EqualPrefixSid(UsersSid, UserSid), "TokenPrimaryGroup Sid and TokenUser Sid don't match.\n"); @@ -2965,16 +2965,16 @@ static void test_process_security(void) }
res = AddAccessDeniedAce(Acl, ACL_REVISION, PROCESS_VM_READ, AdminSid); - ok(res, "AddAccessDeniedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessDeniedAce failed with error %ld\n", GetLastError()); res = AddAccessAllowedAce(Acl, ACL_REVISION, PROCESS_ALL_ACCESS, AdminSid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessAllowedAce failed with error %ld\n", GetLastError());
SecurityDescriptor = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH); res = InitializeSecurityDescriptor(SecurityDescriptor, SECURITY_DESCRIPTOR_REVISION); - ok(res, "InitializeSecurityDescriptor failed with error %d\n", GetLastError()); + ok(res, "InitializeSecurityDescriptor failed with error %ld\n", GetLastError());
event = CreateEventA( NULL, TRUE, TRUE, "test_event" ); - ok(event != NULL, "CreateEvent %d\n", GetLastError()); + ok(event != NULL, "CreateEvent %ld\n", GetLastError());
SecurityDescriptor->Revision = 0; CHECK_SET_SECURITY( event, OWNER_SECURITY_INFORMATION, ERROR_UNKNOWN_REVISION ); @@ -2990,17 +2990,17 @@ static void test_process_security(void)
/* Set owner and group and dacl */ res = SetSecurityDescriptorOwner(SecurityDescriptor, AdminSid, FALSE); - ok(res, "SetSecurityDescriptorOwner failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorOwner failed with error %ld\n", GetLastError()); CHECK_SET_SECURITY( event, OWNER_SECURITY_INFORMATION, ERROR_SUCCESS ); test_owner_equal( event, AdminSid, __LINE__ );
res = SetSecurityDescriptorGroup(SecurityDescriptor, EveryoneSid, FALSE); - ok(res, "SetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorGroup failed with error %ld\n", GetLastError()); CHECK_SET_SECURITY( event, GROUP_SECURITY_INFORMATION, ERROR_SUCCESS ); test_group_equal( event, EveryoneSid, __LINE__ );
res = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE); - ok(res, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorDacl failed with error %ld\n", GetLastError()); CHECK_SET_SECURITY( event, DACL_SECURITY_INFORMATION, ERROR_SUCCESS ); /* setting a dacl should not change the owner or group */ test_owner_equal( event, AdminSid, __LINE__ ); @@ -3009,12 +3009,12 @@ static void test_process_security(void) /* Test again with a different SID in case the previous SID also happens to * be the one that is incorrectly replacing the group. */ res = SetSecurityDescriptorGroup(SecurityDescriptor, UsersSid, FALSE); - ok(res, "SetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorGroup failed with error %ld\n", GetLastError()); CHECK_SET_SECURITY( event, GROUP_SECURITY_INFORMATION, ERROR_SUCCESS ); test_group_equal( event, UsersSid, __LINE__ );
res = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE); - ok(res, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorDacl failed with error %ld\n", GetLastError()); CHECK_SET_SECURITY( event, DACL_SECURITY_INFORMATION, ERROR_SUCCESS ); test_group_equal( event, UsersSid, __LINE__ );
@@ -3030,22 +3030,22 @@ static void test_process_security(void)
ThreadSecurityDescriptor = HeapAlloc( GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH ); res = InitializeSecurityDescriptor( ThreadSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION ); - ok(res, "InitializeSecurityDescriptor failed with error %d\n", GetLastError()); + ok(res, "InitializeSecurityDescriptor failed with error %ld\n", GetLastError());
ThreadAcl = HeapAlloc( GetProcessHeap(), 0, 256 ); res = InitializeAcl( ThreadAcl, 256, ACL_REVISION ); - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); + ok(res, "InitializeAcl failed with error %ld\n", GetLastError()); res = AddAccessDeniedAce( ThreadAcl, ACL_REVISION, THREAD_SET_THREAD_TOKEN, AdminSid ); - ok(res, "AddAccessDeniedAce failed with error %d\n", GetLastError() ); + ok(res, "AddAccessDeniedAce failed with error %ld\n", GetLastError() ); res = AddAccessAllowedAce( ThreadAcl, ACL_REVISION, THREAD_ALL_ACCESS, AdminSid ); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessAllowedAce failed with error %ld\n", GetLastError());
res = SetSecurityDescriptorOwner( ThreadSecurityDescriptor, AdminSid, FALSE ); - ok(res, "SetSecurityDescriptorOwner failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorOwner failed with error %ld\n", GetLastError()); res = SetSecurityDescriptorGroup( ThreadSecurityDescriptor, UsersSid, FALSE ); - ok(res, "SetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorGroup failed with error %ld\n", GetLastError()); res = SetSecurityDescriptorDacl( ThreadSecurityDescriptor, TRUE, ThreadAcl, FALSE ); - ok(res, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(res, "SetSecurityDescriptorDacl failed with error %ld\n", GetLastError());
tsa.nLength = sizeof(tsa); tsa.lpSecurityDescriptor = ThreadSecurityDescriptor; @@ -3053,7 +3053,7 @@ static void test_process_security(void)
/* Doesn't matter what ACL say we should get full access for ourselves */ res = CreateProcessA( NULL, buffer, &psa, &tsa, FALSE, 0, NULL, NULL, &startup, &info ); - ok(res, "CreateProcess with err:%d\n", GetLastError()); + ok(res, "CreateProcess with err:%ld\n", GetLastError()); TEST_GRANTED_ACCESS2( info.hProcess, PROCESS_ALL_ACCESS_NT4, STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL ); TEST_GRANTED_ACCESS2( info.hThread, THREAD_ALL_ACCESS_NT4, @@ -3080,12 +3080,12 @@ static void test_process_security_child(void) DWORD err;
handle = OpenProcess( PROCESS_TERMINATE, FALSE, GetCurrentProcessId() ); - ok(handle != NULL, "OpenProcess(PROCESS_TERMINATE) with err:%d\n", GetLastError()); + ok(handle != NULL, "OpenProcess(PROCESS_TERMINATE) with err:%ld\n", GetLastError()); TEST_GRANTED_ACCESS( handle, PROCESS_TERMINATE );
ret = DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), &handle1, 0, TRUE, DUPLICATE_SAME_ACCESS ); - ok(ret, "duplicating handle err:%d\n", GetLastError()); + ok(ret, "duplicating handle err:%ld\n", GetLastError()); TEST_GRANTED_ACCESS( handle1, PROCESS_TERMINATE );
CloseHandle( handle1 ); @@ -3095,7 +3095,7 @@ static void test_process_security_child(void) &handle1, PROCESS_ALL_ACCESS, TRUE, 0 ); err = GetLastError(); ok(!ret && err == ERROR_ACCESS_DENIED, "duplicating handle should have failed " - "with STATUS_ACCESS_DENIED, instead of err:%d\n", err); + "with STATUS_ACCESS_DENIED, instead of err:%ld\n", err);
CloseHandle( handle );
@@ -3108,7 +3108,7 @@ static void test_process_security_child(void) /* Documented privilege elevation */ ret = DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &handle, 0, TRUE, DUPLICATE_SAME_ACCESS ); - ok(ret, "duplicating handle err:%d\n", GetLastError()); + ok(ret, "duplicating handle err:%ld\n", GetLastError()); TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS_NT4, STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL );
@@ -3117,19 +3117,19 @@ static void test_process_security_child(void) /* Same only explicitly asking for all access rights */ ret = DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &handle, PROCESS_ALL_ACCESS, TRUE, 0 ); - ok(ret, "duplicating handle err:%d\n", GetLastError()); + ok(ret, "duplicating handle err:%ld\n", GetLastError()); TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS_NT4, PROCESS_ALL_ACCESS | PROCESS_QUERY_LIMITED_INFORMATION ); ret = DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), &handle1, PROCESS_VM_READ, TRUE, 0 ); - ok(ret, "duplicating handle err:%d\n", GetLastError()); + ok(ret, "duplicating handle err:%ld\n", GetLastError()); TEST_GRANTED_ACCESS( handle1, PROCESS_VM_READ ); CloseHandle( handle1 ); CloseHandle( handle );
/* Test thread security */ handle = OpenThread( THREAD_TERMINATE, FALSE, GetCurrentThreadId() ); - ok(handle != NULL, "OpenThread(THREAD_TERMINATE) with err:%d\n", GetLastError()); + ok(handle != NULL, "OpenThread(THREAD_TERMINATE) with err:%ld\n", GetLastError()); TEST_GRANTED_ACCESS( handle, PROCESS_TERMINATE ); CloseHandle( handle );
@@ -3161,47 +3161,47 @@ static void test_impersonation_level(void) win_skip("ImpersonateSelf is not implemented\n"); return; } - ok(ret, "ImpersonateSelf(SecurityAnonymous) failed with error %d\n", GetLastError()); + ok(ret, "ImpersonateSelf(SecurityAnonymous) failed with error %ld\n", GetLastError()); ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); ok(!ret, "OpenThreadToken should have failed\n"); error = GetLastError(); - ok(error == ERROR_CANT_OPEN_ANONYMOUS, "OpenThreadToken on anonymous token should have returned ERROR_CANT_OPEN_ANONYMOUS instead of %d\n", error); + ok(error == ERROR_CANT_OPEN_ANONYMOUS, "OpenThreadToken on anonymous token should have returned ERROR_CANT_OPEN_ANONYMOUS instead of %ld\n", error); /* can't perform access check when opening object against an anonymous impersonation token */ todo_wine { error = RegOpenKeyExA(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); ok(error == ERROR_INVALID_HANDLE || error == ERROR_CANT_OPEN_ANONYMOUS || error == ERROR_BAD_IMPERSONATION_LEVEL, - "RegOpenKeyEx failed with %d\n", error); + "RegOpenKeyEx failed with %ld\n", error); } RevertToSelf();
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE, &ProcessToken); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError());
ret = pDuplicateTokenEx(ProcessToken, TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE, NULL, SecurityAnonymous, TokenImpersonation, &Token); - ok(ret, "DuplicateTokenEx failed with error %d\n", GetLastError()); + ok(ret, "DuplicateTokenEx failed with error %ld\n", GetLastError()); /* can't increase the impersonation level */ ret = DuplicateToken(Token, SecurityIdentification, &Token2); error = GetLastError(); ok(!ret && error == ERROR_BAD_IMPERSONATION_LEVEL, - "Duplicating a token and increasing the impersonation level should have failed with ERROR_BAD_IMPERSONATION_LEVEL instead of %d\n", error); + "Duplicating a token and increasing the impersonation level should have failed with ERROR_BAD_IMPERSONATION_LEVEL instead of %ld\n", error); /* we can query anything from an anonymous token, including the user */ ret = GetTokenInformation(Token, TokenUser, NULL, 0, &Size); error = GetLastError(); - ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenUser) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", error); + ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenUser) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %ld\n", error); User = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(Token, TokenUser, User, Size, &Size); - ok(ret, "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, User);
/* PrivilegeCheck fails with SecurityAnonymous level */ ret = GetTokenInformation(Token, TokenPrivileges, NULL, 0, &Size); error = GetLastError(); - ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", error); + ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %ld\n", error); Privileges = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(Token, TokenPrivileges, Privileges, Size, &Size); - ok(ret, "GetTokenInformation(TokenPrivileges) failed with error %d\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenPrivileges) failed with error %ld\n", GetLastError());
PrivilegeSet = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(PRIVILEGE_SET, Privilege[Privileges->PrivilegeCount])); PrivilegeSet->PrivilegeCount = Privileges->PrivilegeCount; @@ -3211,35 +3211,35 @@ static void test_impersonation_level(void)
ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); error = GetLastError(); - ok(!ret && error == ERROR_BAD_IMPERSONATION_LEVEL, "PrivilegeCheck for SecurityAnonymous token should have failed with ERROR_BAD_IMPERSONATION_LEVEL instead of %d\n", error); + ok(!ret && error == ERROR_BAD_IMPERSONATION_LEVEL, "PrivilegeCheck for SecurityAnonymous token should have failed with ERROR_BAD_IMPERSONATION_LEVEL instead of %ld\n", error);
CloseHandle(Token);
ret = ImpersonateSelf(SecurityIdentification); - ok(ret, "ImpersonateSelf(SecurityIdentification) failed with error %d\n", GetLastError()); + ok(ret, "ImpersonateSelf(SecurityIdentification) failed with error %ld\n", GetLastError()); ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); + ok(ret, "OpenThreadToken failed with error %ld\n", GetLastError());
/* can't perform access check when opening object against an identification impersonation token */ error = RegOpenKeyExA(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); todo_wine { ok(error == ERROR_INVALID_HANDLE || error == ERROR_BAD_IMPERSONATION_LEVEL || error == ERROR_ACCESS_DENIED, - "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE, ERROR_BAD_IMPERSONATION_LEVEL or ERROR_ACCESS_DENIED instead of %d\n", error); + "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE, ERROR_BAD_IMPERSONATION_LEVEL or ERROR_ACCESS_DENIED instead of %ld\n", error); } ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); - ok(ret, "PrivilegeCheck for SecurityIdentification failed with error %d\n", GetLastError()); + ok(ret, "PrivilegeCheck for SecurityIdentification failed with error %ld\n", GetLastError()); CloseHandle(Token); RevertToSelf();
ret = ImpersonateSelf(SecurityImpersonation); - ok(ret, "ImpersonateSelf(SecurityImpersonation) failed with error %d\n", GetLastError()); + ok(ret, "ImpersonateSelf(SecurityImpersonation) failed with error %ld\n", GetLastError()); ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); + ok(ret, "OpenThreadToken failed with error %ld\n", GetLastError()); error = RegOpenKeyExA(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); - ok(error == ERROR_SUCCESS, "RegOpenKeyEx should have succeeded instead of failing with %d\n", error); + ok(error == ERROR_SUCCESS, "RegOpenKeyEx should have succeeded instead of failing with %ld\n", error); RegCloseKey(hkey); ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); - ok(ret, "PrivilegeCheck for SecurityImpersonation failed with error %d\n", GetLastError()); + ok(ret, "PrivilegeCheck for SecurityImpersonation failed with error %ld\n", GetLastError()); RevertToSelf();
CloseHandle(Token); @@ -3272,7 +3272,7 @@ static void test_SetEntriesInAclW(void) win_skip("SetEntriesInAclW is not implemented\n"); return; } - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl == NULL || broken(NewAcl != NULL), /* NT4 */ "NewAcl=%p, expected NULL\n", NewAcl); @@ -3286,17 +3286,17 @@ static void test_SetEntriesInAclW(void) HeapFree(GetProcessHeap(), 0, OldAcl); return; } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); + ok(res, "InitializeAcl failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid( &SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &UsersSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
res = AddAccessAllowedAce(OldAcl, ACL_REVISION, KEY_READ, UsersSid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessAllowedAce failed with error %ld\n", GetLastError());
ExplicitAccess.grfAccessPermissions = KEY_WRITE; ExplicitAccess.grfAccessMode = GRANT_ACCESS; @@ -3307,7 +3307,7 @@ static void test_SetEntriesInAclW(void) ExplicitAccess.Trustee.MultipleTrusteeOperation = 0xDEADBEEF; ExplicitAccess.Trustee.pMultipleTrustee = (PVOID)0xDEADBEEF; res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3315,7 +3315,7 @@ static void test_SetEntriesInAclW(void) ExplicitAccess.Trustee.pMultipleTrustee = NULL; ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3328,7 +3328,7 @@ static void test_SetEntriesInAclW(void) ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; ExplicitAccess.Trustee.ptstrName = (LPWSTR)wszEveryone; res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3336,7 +3336,7 @@ static void test_SetEntriesInAclW(void) res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); ok(res == ERROR_INVALID_PARAMETER || broken(res == ERROR_NOT_SUPPORTED), /* NT4 */ - "SetEntriesInAclW failed: %u\n", res); + "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl == NULL || broken(NewAcl != NULL), /* NT4 */ "returned acl wasn't NULL: %p\n", NewAcl); @@ -3346,7 +3346,7 @@ static void test_SetEntriesInAclW(void) res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); ok(res == ERROR_INVALID_PARAMETER || broken(res == ERROR_NOT_SUPPORTED), /* NT4 */ - "SetEntriesInAclW failed: %u\n", res); + "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl == NULL || broken(NewAcl != NULL), /* NT4 */ "returned acl wasn't NULL: %p\n", NewAcl); @@ -3354,7 +3354,7 @@ static void test_SetEntriesInAclW(void) ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; ExplicitAccess.grfAccessMode = SET_ACCESS; res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl); } @@ -3362,7 +3362,7 @@ static void test_SetEntriesInAclW(void) ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; ExplicitAccess.Trustee.ptstrName = (LPWSTR)wszCurrentUser; res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3370,7 +3370,7 @@ static void test_SetEntriesInAclW(void) ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; ExplicitAccess.Trustee.ptstrName = UsersSid; res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3397,7 +3397,7 @@ static void test_SetEntriesInAclA(void) win_skip("SetEntriesInAclA is not implemented\n"); return; } - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl == NULL || broken(NewAcl != NULL), /* NT4 */ "NewAcl=%p, expected NULL\n", NewAcl); @@ -3411,17 +3411,17 @@ static void test_SetEntriesInAclA(void) HeapFree(GetProcessHeap(), 0, OldAcl); return; } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); + ok(res, "InitializeAcl failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid( &SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &UsersSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
res = AddAccessAllowedAce(OldAcl, ACL_REVISION, KEY_READ, UsersSid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessAllowedAce failed with error %ld\n", GetLastError());
ExplicitAccess.grfAccessPermissions = KEY_WRITE; ExplicitAccess.grfAccessMode = GRANT_ACCESS; @@ -3432,7 +3432,7 @@ static void test_SetEntriesInAclA(void) ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; ExplicitAccess.Trustee.pMultipleTrustee = NULL; res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3440,7 +3440,7 @@ static void test_SetEntriesInAclA(void) ExplicitAccess.Trustee.pMultipleTrustee = NULL; ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3453,7 +3453,7 @@ static void test_SetEntriesInAclA(void) ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; ExplicitAccess.Trustee.ptstrName = (LPSTR)szEveryone; res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3461,7 +3461,7 @@ static void test_SetEntriesInAclA(void) res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); ok(res == ERROR_INVALID_PARAMETER || broken(res == ERROR_NOT_SUPPORTED), /* NT4 */ - "SetEntriesInAclA failed: %u\n", res); + "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl == NULL || broken(NewAcl != NULL), /* NT4 */ "returned acl wasn't NULL: %p\n", NewAcl); @@ -3471,7 +3471,7 @@ static void test_SetEntriesInAclA(void) res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); ok(res == ERROR_INVALID_PARAMETER || broken(res == ERROR_NOT_SUPPORTED), /* NT4 */ - "SetEntriesInAclA failed: %u\n", res); + "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl == NULL || broken(NewAcl != NULL), /* NT4 */ "returned acl wasn't NULL: %p\n", NewAcl); @@ -3479,7 +3479,7 @@ static void test_SetEntriesInAclA(void) ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; ExplicitAccess.grfAccessMode = SET_ACCESS; res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl); } @@ -3487,7 +3487,7 @@ static void test_SetEntriesInAclA(void) ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; ExplicitAccess.Trustee.ptstrName = (LPSTR)szCurrentUser; res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3495,7 +3495,7 @@ static void test_SetEntriesInAclA(void) ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; ExplicitAccess.Trustee.ptstrName = UsersSid; res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %lu\n", res); ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl);
@@ -3515,7 +3515,7 @@ static void get_nt_pathW(const char *name, UNICODE_STRING *nameW) pRtlInitAnsiString(&str, name);
status = pRtlAnsiStringToUnicodeString(&strW, &str, TRUE); - ok(!status, "RtlAnsiStringToUnicodeString failed with %08x\n", status); + ok(!status, "RtlAnsiStringToUnicodeString failed with %08lx\n", status);
ret = pRtlDosPathNameToNtPathName_U(strW.Buffer, nameW, NULL, NULL); ok(ret, "RtlDosPathNameToNtPathName_U failed\n"); @@ -3535,7 +3535,7 @@ static void test_inherited_dacl(PACL dacl, PSID admin_sid, PSID user_sid, DWORD
todo_wine_if (todo_count) ok_(__FILE__, line)(acl_size.AceCount == 2, - "GetAclInformation returned unexpected entry count (%d != 2)\n", + "GetAclInformation returned unexpected entry count (%ld != 2)\n", acl_size.AceCount);
if (acl_size.AceCount > 0) @@ -3549,11 +3549,11 @@ static void test_inherited_dacl(PACL dacl, PSID admin_sid, PSID user_sid, DWORD
todo_wine_if (todo_flags) ok_(__FILE__, line)(((ACE_HEADER *)ace)->AceFlags == flags, - "Current User ACE has unexpected flags (0x%x != 0x%x)\n", + "Current User ACE has unexpected flags (0x%x != 0x%lx)\n", ((ACE_HEADER *)ace)->AceFlags, flags);
ok_(__FILE__, line)(ace->Mask == mask, - "Current User ACE has unexpected mask (0x%x != 0x%x)\n", + "Current User ACE has unexpected mask (0x%lx != 0x%lx)\n", ace->Mask, mask); } if (acl_size.AceCount > 1) @@ -3567,11 +3567,11 @@ static void test_inherited_dacl(PACL dacl, PSID admin_sid, PSID user_sid, DWORD
todo_wine_if (todo_flags) ok_(__FILE__, line)(((ACE_HEADER *)ace)->AceFlags == flags, - "Administators Group ACE has unexpected flags (0x%x != 0x%x)\n", + "Administators Group ACE has unexpected flags (0x%x != 0x%lx)\n", ((ACE_HEADER *)ace)->AceFlags, flags);
ok_(__FILE__, line)(ace->Mask == mask, - "Administators Group ACE has unexpected mask (0x%x != 0x%x)\n", + "Administators Group ACE has unexpected mask (0x%lx != 0x%lx)\n", ace->Mask, mask); } } @@ -3615,10 +3615,10 @@ static void test_CreateDirectoryA(void) } bret = GetTokenInformation(token, TokenUser, NULL, 0, &user_size); ok(!bret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); user = HeapAlloc(GetProcessHeap(), 0, user_size); bret = GetTokenInformation(token, TokenUser, user, user_size, &user_size); - ok(bret, "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + ok(bret, "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); CloseHandle( token ); user_sid = ((TOKEN_USER *)user)->User.Sid;
@@ -3642,7 +3642,7 @@ static void test_CreateDirectoryA(void) GetTempPathA(MAX_PATH, tmpdir); lstrcatA(tmpdir, "Please Remove Me"); bret = CreateDirectoryA(tmpdir, &sa); - ok(bret == TRUE, "CreateDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); + ok(bret == TRUE, "CreateDirectoryA(%s) failed err=%ld\n", tmpdir, GetLastError()); HeapFree(GetProcessHeap(), 0, pDacl);
SetLastError(0xdeadbeef); @@ -3654,7 +3654,7 @@ static void test_CreateDirectoryA(void) win_skip("GetNamedSecurityInfoA is not implemented\n"); goto done; } - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); + ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error); test_inherited_dacl(pDacl, admin_sid, user_sid, OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE, 0x1f01ff, FALSE, TRUE, FALSE, __LINE__); LocalFree(pSD); @@ -3665,7 +3665,7 @@ static void test_CreateDirectoryA(void)
hTemp = CreateFileA(tmpfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, NULL); - ok(hTemp != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError()); + ok(hTemp != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError());
error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, @@ -3694,16 +3694,16 @@ static void test_CreateDirectoryA(void) sa.bInheritHandle = TRUE; hTemp = CreateFileA(tmpfile, GENERIC_WRITE, FILE_SHARE_READ, &sa, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, NULL); - ok(hTemp != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError()); + ok(hTemp != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError()); HeapFree(GetProcessHeap(), 0, pDacl);
error = GetSecurityInfo(hTemp, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, (PSID *)&owner, NULL, &pDacl, NULL, &pSD); - ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); + ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %ld\n", error); bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); todo_wine - ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", + ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n", acl_size.AceCount); LocalFree(pSD);
@@ -3711,13 +3711,13 @@ static void test_CreateDirectoryA(void) OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, (PSID *)&owner, NULL, &pDacl, NULL, &pSD); todo_wine - ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); + ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %ld\n", error); if (error == ERROR_SUCCESS) { bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); todo_wine - ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", + ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n", acl_size.AceCount); LocalFree(pSD); } @@ -3737,7 +3737,7 @@ static void test_CreateDirectoryA(void)
status = pNtCreateFile(&hTemp, GENERIC_WRITE | DELETE, &attr, &io, NULL, 0, FILE_SHARE_READ, FILE_CREATE, FILE_DELETE_ON_CLOSE, NULL, 0); - ok(!status, "NtCreateFile failed with %08x\n", status); + ok(!status, "NtCreateFile failed with %08lx\n", status); pRtlFreeUnicodeString(&tmpfileW);
error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, @@ -3772,17 +3772,17 @@ static void test_CreateDirectoryA(void)
status = pNtCreateFile(&hTemp, GENERIC_WRITE | DELETE, &attr, &io, NULL, 0, FILE_SHARE_READ, FILE_CREATE, FILE_DELETE_ON_CLOSE, NULL, 0); - ok(!status, "NtCreateFile failed with %08x\n", status); + ok(!status, "NtCreateFile failed with %08lx\n", status); pRtlFreeUnicodeString(&tmpfileW); HeapFree(GetProcessHeap(), 0, pDacl);
error = GetSecurityInfo(hTemp, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, (PSID *)&owner, NULL, &pDacl, NULL, &pSD); - ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); + ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %ld\n", error); bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); todo_wine - ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", + ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n", acl_size.AceCount); LocalFree(pSD);
@@ -3790,13 +3790,13 @@ static void test_CreateDirectoryA(void) OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, (PSID *)&owner, NULL, &pDacl, NULL, &pSD); todo_wine - ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); + ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %ld\n", error); if (error == ERROR_SUCCESS) { bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); todo_wine - ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", + ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n", acl_size.AceCount); LocalFree(pSD); } @@ -3857,15 +3857,15 @@ static void test_GetNamedSecurityInfoA(void) } bret = GetTokenInformation(token, TokenUser, NULL, 0, &user_size); ok(!bret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); user = HeapAlloc(GetProcessHeap(), 0, user_size); bret = GetTokenInformation(token, TokenUser, user, user_size, &user_size); - ok(bret, "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + ok(bret, "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); CloseHandle( token ); user_sid = ((TOKEN_USER *)user)->User.Sid;
bret = GetWindowsDirectoryA(windows_dir, MAX_PATH); - ok(bret, "GetWindowsDirectory failed with error %d\n", GetLastError()); + ok(bret, "GetWindowsDirectory failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT, @@ -3877,23 +3877,23 @@ static void test_GetNamedSecurityInfoA(void) HeapFree(GetProcessHeap(), 0, user); return; } - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); + ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error);
bret = GetSecurityDescriptorControl(pSD, &control, &revision); - ok(bret, "GetSecurityDescriptorControl failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorControl failed with error %ld\n", GetLastError()); ok((control & (SE_SELF_RELATIVE|SE_DACL_PRESENT)) == (SE_SELF_RELATIVE|SE_DACL_PRESENT) || broken((control & (SE_SELF_RELATIVE|SE_DACL_PRESENT)) == SE_DACL_PRESENT), /* NT4 */ "control (0x%x) doesn't have (SE_SELF_RELATIVE|SE_DACL_PRESENT) flags set\n", control); - ok(revision == SECURITY_DESCRIPTOR_REVISION1, "revision was %d instead of 1\n", revision); + ok(revision == SECURITY_DESCRIPTOR_REVISION1, "revision was %ld instead of 1\n", revision);
isNT4 = (control & (SE_SELF_RELATIVE|SE_DACL_PRESENT)) == SE_DACL_PRESENT;
bret = GetSecurityDescriptorOwner(pSD, &owner, &owner_defaulted); - ok(bret, "GetSecurityDescriptorOwner failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorOwner failed with error %ld\n", GetLastError()); ok(owner != NULL, "owner should not be NULL\n");
bret = GetSecurityDescriptorGroup(pSD, &group, &group_defaulted); - ok(bret, "GetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorGroup failed with error %ld\n", GetLastError()); ok(group != NULL, "group should not be NULL\n"); LocalFree(pSD);
@@ -3908,24 +3908,24 @@ static void test_GetNamedSecurityInfoA(void)
error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT,DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, NULL); - ok(error==ERROR_INVALID_PARAMETER, "GetNamedSecurityInfo failed with error %d\n", error); + ok(error==ERROR_INVALID_PARAMETER, "GetNamedSecurityInfo failed with error %ld\n", error);
pDacl = NULL; error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT,DACL_SECURITY_INFORMATION, NULL, NULL, &pDacl, NULL, &pSD); - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); + ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error); ok(pDacl != NULL, "DACL should not be NULL\n"); LocalFree(pSD);
error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT,OWNER_SECURITY_INFORMATION, NULL, NULL, &pDacl, NULL, NULL); - ok(error==ERROR_INVALID_PARAMETER, "GetNamedSecurityInfo failed with error %d\n", error); + ok(error==ERROR_INVALID_PARAMETER, "GetNamedSecurityInfo failed with error %ld\n", error);
/* Test behavior of SetNamedSecurityInfo with an invalid path */ SetLastError(0xdeadbeef); error = pSetNamedSecurityInfoA(invalid_path, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL); - ok(error == ERROR_FILE_NOT_FOUND, "Unexpected error returned: 0x%x\n", error); + ok(error == ERROR_FILE_NOT_FOUND, "Unexpected error returned: 0x%lx\n", error); ok(GetLastError() == 0xdeadbeef, "Expected last error to remain unchanged.\n");
/* Create security descriptor information and test that it comes back the same */ @@ -3955,7 +3955,7 @@ static void test_GetNamedSecurityInfoA(void) CloseHandle(hTemp); return; } - ok(!error, "SetNamedSecurityInfoA failed with error %d\n", error); + ok(!error, "SetNamedSecurityInfoA failed with error %ld\n", error); SetLastError(0xdeadbeef); error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, &pDacl, NULL, &pSD); @@ -3966,7 +3966,7 @@ static void test_GetNamedSecurityInfoA(void) CloseHandle(hTemp); return; } - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); + ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error);
bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); @@ -3979,7 +3979,7 @@ static void test_GetNamedSecurityInfoA(void) debugstr_sid(&ace->SidStart), debugstr_sid(user_sid)); ok(((ACE_HEADER *)ace)->AceFlags == 0, "Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", + ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask); } if (acl_size.AceCount > 1) @@ -3993,7 +3993,7 @@ static void test_GetNamedSecurityInfoA(void) ok(((ACE_HEADER *)ace)->AceFlags == 0, "Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags); ok(ace->Mask == 0x1f01ff || broken(ace->Mask == GENERIC_ALL) /* win2k */, - "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask); + "Administators Group ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask); } LocalFree(pSD);
@@ -4003,12 +4003,12 @@ static void test_GetNamedSecurityInfoA(void) ok(bret, "Failed to initialize ACL.\n"); error = pSetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, pDacl, NULL); - ok(!error, "SetNamedSecurityInfoA failed with error %d\n", error); + ok(!error, "SetNamedSecurityInfoA failed with error %ld\n", error); HeapFree(GetProcessHeap(), 0, pDacl);
error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, &pDacl, NULL, &pSD); - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); + ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error);
bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); @@ -4023,23 +4023,23 @@ static void test_GetNamedSecurityInfoA(void)
h = CreateFileA(tmpfile, GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(h != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(h != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); CloseHandle(h);
/* test setting NULL DACL */ error = pSetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL); - ok(!error, "SetNamedSecurityInfoA failed with error %d\n", error); + ok(!error, "SetNamedSecurityInfoA failed with error %ld\n", error);
error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, &pDacl, NULL, &pSD); - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); + ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error); todo_wine ok(!pDacl, "pDacl != NULL\n"); LocalFree(pSD);
h = CreateFileA(tmpfile, GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(h != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(h != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); CloseHandle(h);
/* NtSetSecurityObject doesn't inherit DACL entries */ @@ -4051,30 +4051,30 @@ static void test_GetNamedSecurityInfoA(void) bret = SetSecurityDescriptorDacl(pSD, TRUE, pDacl, FALSE); ok(bret, "Failed to add ACL to security descriptor.\n"); status = pNtSetSecurityObject(hTemp, DACL_SECURITY_INFORMATION, pSD); - ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %x\n", status); + ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %lx\n", status);
h = CreateFileA(tmpfile, GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(h == INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(h == INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); CloseHandle(h);
pSetSecurityDescriptorControl(pSD, SE_DACL_AUTO_INHERIT_REQ, SE_DACL_AUTO_INHERIT_REQ); status = pNtSetSecurityObject(hTemp, DACL_SECURITY_INFORMATION, pSD); - ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %x\n", status); + ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %lx\n", status);
h = CreateFileA(tmpfile, GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(h == INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(h == INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); CloseHandle(h);
pSetSecurityDescriptorControl(pSD, SE_DACL_AUTO_INHERIT_REQ|SE_DACL_AUTO_INHERITED, SE_DACL_AUTO_INHERIT_REQ|SE_DACL_AUTO_INHERITED); status = pNtSetSecurityObject(hTemp, DACL_SECURITY_INFORMATION, pSD); - ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %x\n", status); + ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %lx\n", status);
h = CreateFileA(tmpfile, GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(h == INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(h == INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); CloseHandle(h);
/* test if DACL is properly mapped to permission */ @@ -4087,11 +4087,11 @@ static void test_GetNamedSecurityInfoA(void) bret = SetSecurityDescriptorDacl(pSD, TRUE, pDacl, FALSE); ok(bret, "Failed to add ACL to security descriptor.\n"); status = pNtSetSecurityObject(hTemp, DACL_SECURITY_INFORMATION, pSD); - ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %x\n", status); + ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %lx\n", status);
h = CreateFileA(tmpfile, GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(h != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(h != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); CloseHandle(h);
bret = InitializeAcl(pDacl, 100, ACL_REVISION); @@ -4103,11 +4103,11 @@ static void test_GetNamedSecurityInfoA(void) bret = SetSecurityDescriptorDacl(pSD, TRUE, pDacl, FALSE); ok(bret, "Failed to add ACL to security descriptor.\n"); status = pNtSetSecurityObject(hTemp, DACL_SECURITY_INFORMATION, pSD); - ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %x\n", status); + ok(status == ERROR_SUCCESS, "NtSetSecurityObject returned %lx\n", status);
h = CreateFileA(tmpfile, GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(h == INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(h == INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, pDacl); HeapFree(GetProcessHeap(), 0, user); CloseHandle(hTemp); @@ -4118,20 +4118,20 @@ static void test_GetNamedSecurityInfoA(void) error = pGetNamedSecurityInfoA(software_key, SE_REGISTRY_KEY, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &pSD); - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); + ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error);
bret = AllocateAndInitializeSid(&SIDAuthNT, 1, SECURITY_LOCAL_SYSTEM_RID, 0, 0, 0, 0, 0, 0, 0, &localsys_sid); - ok(bret, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(bret, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
bret = GetSecurityDescriptorOwner(pSD, &owner, &owner_defaulted); - ok(bret, "GetSecurityDescriptorOwner failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorOwner failed with error %ld\n", GetLastError()); ok(owner != NULL, "owner should not be NULL\n"); ok(EqualSid(owner, admin_sid) || EqualSid(owner, localsys_sid), "MACHINE\Software owner SID (%s) != Administrators SID (%s) or Local System Sid (%s).\n", debugstr_sid(owner), debugstr_sid(admin_sid), debugstr_sid(localsys_sid));
bret = GetSecurityDescriptorGroup(pSD, &group, &group_defaulted); - ok(bret, "GetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorGroup failed with error %ld\n", GetLastError()); ok(group != NULL, "group should not be NULL\n"); ok(EqualSid(group, admin_sid) || broken(EqualSid(group, system_sid)) /* before Win7 */ || broken(((SID*)group)->SubAuthority[0] == SECURITY_NT_NON_UNIQUE) /* Vista */, @@ -4144,10 +4144,10 @@ static void test_GetNamedSecurityInfoA(void) CreateWellKnownSid(WinBuiltinUsersSid, NULL, users_sid, &sid_size); error = pGetNamedSecurityInfoA(software_key, SE_REGISTRY_KEY, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &pSD); - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); + ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error);
bret = GetSecurityDescriptorDacl(pSD, &dacl_present, &pDacl, &dacl_defaulted); - ok(bret, "GetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorDacl failed with error %ld\n", GetLastError()); ok(dacl_present, "DACL should be present\n"); ok(pDacl && IsValidAcl(pDacl), "GetSecurityDescriptorDacl returned invalid DACL.\n"); bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); @@ -4177,7 +4177,7 @@ static void test_GetNamedSecurityInfoA(void) INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE); ok(ace->Mask == GENERIC_READ || broken(ace->Mask == KEY_READ), /* win 10 */ - "Builtin Users ACE has unexpected mask (0x%x != 0x%x)\n", + "Builtin Users ACE has unexpected mask (0x%lx != 0x%x)\n", ace->Mask, GENERIC_READ); } ok(admins_ace_id != -1, "Builtin Admins ACE not found.\n"); @@ -4194,7 +4194,7 @@ static void test_GetNamedSecurityInfoA(void) || broken(flags == CONTAINER_INHERIT_ACE), /* win 10 */ "Builtin Admins ACE has unexpected flags (0x%x != 0x0)\n", flags); ok(ace->Mask == KEY_ALL_ACCESS || broken(ace->Mask == GENERIC_ALL) /* w2k8 */, - "Builtin Admins ACE has unexpected mask (0x%x != 0x%x)\n", ace->Mask, KEY_ALL_ACCESS); + "Builtin Admins ACE has unexpected mask (0x%lx != 0x%x)\n", ace->Mask, KEY_ALL_ACCESS); }
FreeSid(localsys_sid); @@ -4266,11 +4266,11 @@ static void test_ConvertStringSecurityDescriptor(void) ret = ConvertStringSecurityDescriptorToSecurityDescriptorA( cssd[i].sidstring, cssd[i].revision, &pSD, NULL); GLE = GetLastError(); - ok(ret == cssd[i].ret, "(%02u) Expected %s (%d)\n", i, cssd[i].ret ? "success" : "failure", GLE); + ok(ret == cssd[i].ret, "(%02u) Expected %s (%ld)\n", i, cssd[i].ret ? "success" : "failure", GLE); if (!cssd[i].ret) ok(GLE == cssd[i].GLE || (cssd[i].altGLE && GLE == cssd[i].altGLE), - "(%02u) Unexpected last error %d\n", i, GLE); + "(%02u) Unexpected last error %ld\n", i, GLE); if (ret) LocalFree(pSD); } @@ -4281,50 +4281,50 @@ static void test_ConvertStringSecurityDescriptor(void) NULL, 0xdeadbeef, &pSD, NULL); todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pConvertStringSecurityDescriptorToSecurityDescriptorW( NULL, 0xdeadbeef, &pSD, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ConvertStringSecurityDescriptorToSecurityDescriptorA( "D:(A;;ROB;;;WD)", 0xdeadbeef, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ConvertStringSecurityDescriptorToSecurityDescriptorA( "D:(A;;ROB;;;WD)", SDDL_REVISION_1, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
/* test behaviour with empty strings */ SetLastError(0xdeadbeef); ret = pConvertStringSecurityDescriptorToSecurityDescriptorW( Blank, SDDL_REVISION_1, &pSD, NULL); - ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError()); + ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %ld\n", GetLastError()); LocalFree(pSD);
SetLastError(0xdeadbeef); ret = ConvertStringSecurityDescriptorToSecurityDescriptorA( "D:P(A;;GRGW;;;BA)(A;;GRGW;;;S-1-5-21-0-0-0-1000)S:(ML;;NWNR;;;S-1-16-12288)", SDDL_REVISION_1, &pSD, NULL); ok(ret || broken(!ret && GetLastError() == ERROR_INVALID_DATATYPE) /* win2k */, - "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %u\n", GetLastError()); + "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %lu\n", GetLastError()); if (ret) LocalFree(pSD);
/* empty DACL */ size = 0; SetLastError(0xdeadbeef); ret = ConvertStringSecurityDescriptorToSecurityDescriptorA("D:", SDDL_REVISION_1, &pSD, &size); - ok(ret, "unexpected error %u\n", GetLastError()); - ok(size == sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sizeof(ACL), "got %u\n", size); + ok(ret, "unexpected error %lu\n", GetLastError()); + ok(size == sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sizeof(ACL), "got %lu\n", size); acl = (ACL *)((char *)pSD + sizeof(SECURITY_DESCRIPTOR_RELATIVE)); ok(acl->AclRevision == ACL_REVISION, "got %u\n", acl->AclRevision); ok(!acl->Sbz1, "got %u\n", acl->Sbz1); @@ -4337,8 +4337,8 @@ static void test_ConvertStringSecurityDescriptor(void) size = 0; SetLastError(0xdeadbeef); ret = ConvertStringSecurityDescriptorToSecurityDescriptorA("S:", SDDL_REVISION_1, &pSD, &size); - ok(ret, "unexpected error %u\n", GetLastError()); - ok(size == sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sizeof(ACL), "got %u\n", size); + ok(ret, "unexpected error %lu\n", GetLastError()); + ok(size == sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sizeof(ACL), "got %lu\n", size); acl = (ACL *)((char *)pSD + sizeof(SECURITY_DESCRIPTOR_RELATIVE)); ok(!acl->Sbz1, "got %u\n", acl->Sbz1); ok(acl->AclSize == sizeof(*acl), "got %u\n", acl->AclSize); @@ -4369,12 +4369,12 @@ static void test_ConvertSecurityDescriptorToString(void) * don't replicate this feature so we only test len >= strlen+1. */ #define CHECK_RESULT_AND_FREE(exp_str) \ ok(strcmp(string, (exp_str)) == 0, "String mismatch (expected "%s", got "%s")\n", (exp_str), string); \ - ok(len >= (strlen(exp_str) + 1), "Length mismatch (expected %d, got %d)\n", lstrlenA(exp_str) + 1, len); \ + ok(len >= (strlen(exp_str) + 1), "Length mismatch (expected %d, got %ld)\n", lstrlenA(exp_str) + 1, len); \ LocalFree(string);
#define CHECK_ONE_OF_AND_FREE(exp_str1, exp_str2) \ ok(strcmp(string, (exp_str1)) == 0 || strcmp(string, (exp_str2)) == 0, "String mismatch (expected\n"%s" or\n"%s", got\n"%s")\n", (exp_str1), (exp_str2), string); \ - ok(len >= (strlen(exp_str1) + 1) || len >= (strlen(exp_str2) + 1), "Length mismatch (expected %d or %d, got %d)\n", lstrlenA(exp_str1) + 1, lstrlenA(exp_str2) + 1, len); \ + ok(len >= (strlen(exp_str1) + 1) || len >= (strlen(exp_str2) + 1), "Length mismatch (expected %d or %d, got %ld)\n", lstrlenA(exp_str1) + 1, lstrlenA(exp_str2) + 1, len); \ LocalFree(string);
InitializeSecurityDescriptor(&desc, SECURITY_DESCRIPTOR_REVISION); @@ -4589,26 +4589,26 @@ static void test_PrivateObjectSecurity(void) expect_eq(ctrl, 0x9014, int, "%x");
ret = GetPrivateObjectSecurity(sec, GROUP_SECURITY_INFORMATION, buf, dwDescSize, &retSize); - ok(ret, "GetPrivateObjectSecurity failed (err=%u)\n", GetLastError()); - ok(retSize <= dwDescSize, "Buffer too small (%d vs %d)\n", retSize, dwDescSize); + ok(ret, "GetPrivateObjectSecurity failed (err=%lu)\n", GetLastError()); + ok(retSize <= dwDescSize, "Buffer too small (%ld vs %ld)\n", retSize, dwDescSize); ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(buf, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); CHECK_RESULT_AND_FREE("G:S-1-5-21-93476-23408-4576"); GetSecurityDescriptorControl(buf, &ctrl, &dwRevision); expect_eq(ctrl, 0x8000, int, "%x");
ret = GetPrivateObjectSecurity(sec, GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, buf, dwDescSize, &retSize); - ok(ret, "GetPrivateObjectSecurity failed (err=%u)\n", GetLastError()); - ok(retSize <= dwDescSize, "Buffer too small (%d vs %d)\n", retSize, dwDescSize); + ok(ret, "GetPrivateObjectSecurity failed (err=%lu)\n", GetLastError()); + ok(retSize <= dwDescSize, "Buffer too small (%ld vs %ld)\n", retSize, dwDescSize); ret = pConvertSecurityDescriptorToStringSecurityDescriptorA(buf, SDDL_REVISION_1, sec_info, &string, &len); - ok(ret, "Conversion failed err=%u\n", GetLastError()); + ok(ret, "Conversion failed err=%lu\n", GetLastError()); CHECK_ONE_OF_AND_FREE("G:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)", "G:S-1-5-21-93476-23408-4576D:P(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"); /* Win7 */ GetSecurityDescriptorControl(buf, &ctrl, &dwRevision); expect_eq(ctrl & (~ SE_DACL_PROTECTED), 0x8004, int, "%x");
ret = GetPrivateObjectSecurity(sec, sec_info, buf, dwDescSize, &retSize); - ok(ret, "GetPrivateObjectSecurity failed (err=%u)\n", GetLastError()); - ok(retSize == dwDescSize, "Buffer too small (%d vs %d)\n", retSize, dwDescSize); + ok(ret, "GetPrivateObjectSecurity failed (err=%lu)\n", GetLastError()); + ok(retSize == dwDescSize, "Buffer too small (%ld vs %ld)\n", retSize, dwDescSize); ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(buf, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); CHECK_ONE_OF_AND_FREE("O:SY" "G:S-1-5-21-93476-23408-4576" @@ -4623,7 +4623,7 @@ static void test_PrivateObjectSecurity(void)
SetLastError(0xdeadbeef); ok(GetPrivateObjectSecurity(sec, sec_info, buf, 5, &retSize) == FALSE, "GetPrivateObjectSecurity should have failed\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected error ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected error ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
LocalFree(sec); HeapFree(GetProcessHeap(), 0, buf); @@ -4645,43 +4645,43 @@ static void test_InitializeAcl(void) return; }
- ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InitializeAcl with too small a buffer should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InitializeAcl with too small a buffer should have failed with ERROR_INSUFFICIENT_BUFFER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = InitializeAcl(pAcl, 0xffffffff, ACL_REVISION); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl with too large a buffer should have failed with ERROR_INVALID_PARAMETER instead of %d\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl with too large a buffer should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION1); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl(ACL_REVISION1) should have failed with ERROR_INVALID_PARAMETER instead of %d\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl(ACL_REVISION1) should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", GetLastError());
ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION2); - ok(ret, "InitializeAcl(ACL_REVISION2) failed with error %d\n", GetLastError()); + ok(ret, "InitializeAcl(ACL_REVISION2) failed with error %ld\n", GetLastError());
ret = IsValidAcl(pAcl); - ok(ret, "IsValidAcl failed with error %d\n", GetLastError()); + ok(ret, "IsValidAcl failed with error %ld\n", GetLastError());
ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION3); - ok(ret, "InitializeAcl(ACL_REVISION3) failed with error %d\n", GetLastError()); + ok(ret, "InitializeAcl(ACL_REVISION3) failed with error %ld\n", GetLastError());
ret = IsValidAcl(pAcl); - ok(ret, "IsValidAcl failed with error %d\n", GetLastError()); + ok(ret, "IsValidAcl failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION4); if (GetLastError() != ERROR_INVALID_PARAMETER) { - ok(ret, "InitializeAcl(ACL_REVISION4) failed with error %d\n", GetLastError()); + ok(ret, "InitializeAcl(ACL_REVISION4) failed with error %ld\n", GetLastError());
ret = IsValidAcl(pAcl); - ok(ret, "IsValidAcl failed with error %d\n", GetLastError()); + ok(ret, "IsValidAcl failed with error %ld\n", GetLastError()); } else win_skip("ACL_REVISION4 is not implemented on NT4\n");
SetLastError(0xdeadbeef); ret = InitializeAcl(pAcl, sizeof(buffer), -1); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl(-1) failed with error %d\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl(-1) failed with error %ld\n", GetLastError()); }
static void test_GetSecurityInfo(void) @@ -4724,7 +4724,7 @@ static void test_GetSecurityInfo(void) return; } bret = GetTokenInformation(token, TokenUser, b, l, &l); - ok(bret, "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + ok(bret, "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); CloseHandle( token ); user_sid = ((TOKEN_USER *)b)->User.Sid;
@@ -4746,7 +4746,7 @@ static void test_GetSecurityInfo(void) CloseHandle(obj); return; } - ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret); + ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %ld\n", ret); ok(pSD != NULL, "GetSecurityInfo\n"); ok(owner != NULL, "GetSecurityInfo\n"); ok(group != NULL, "GetSecurityInfo\n"); @@ -4762,7 +4762,7 @@ static void test_GetSecurityInfo(void) ret = GetSecurityInfo(obj, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, &owner, &group, &pDacl, NULL, NULL); - ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret); + ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %ld\n", ret); ok(owner != NULL, "GetSecurityInfo\n"); ok(group != NULL, "GetSecurityInfo\n"); if (pDacl != NULL) @@ -4785,10 +4785,10 @@ static void test_GetSecurityInfo(void) ok(bret, "Failed to add ACL to security descriptor.\n"); ret = pSetSecurityInfo(obj, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, pDacl, NULL); - ok(ret == ERROR_SUCCESS, "SetSecurityInfo returned %d\n", ret); + ok(ret == ERROR_SUCCESS, "SetSecurityInfo returned %ld\n", ret); ret = GetSecurityInfo(obj, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, &pDacl, NULL, &pSD); - ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret); + ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %ld\n", ret); ok(pDacl && IsValidAcl(pDacl), "GetSecurityInfo returned invalid DACL.\n"); bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); @@ -4801,7 +4801,7 @@ static void test_GetSecurityInfo(void) debugstr_sid(&ace->SidStart), debugstr_sid(user_sid)); ok(((ACE_HEADER *)ace)->AceFlags == 0, "Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", + ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask); } if (acl_size.AceCount > 1) @@ -4812,7 +4812,7 @@ static void test_GetSecurityInfo(void) todo_wine ok(bret, "Administators Group ACE (%s) != Administators Group SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(admin_sid)); ok(((ACE_HEADER *)ace)->AceFlags == 0, "Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", + ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask); } LocalFree(pSD); @@ -4835,16 +4835,16 @@ static void test_GetSecurityInfo(void) ret = GetSecurityInfo(GetCurrentProcess(), SE_KERNEL_OBJECT, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &pSD); - ok(!ret, "GetNamedSecurityInfo failed with error %d\n", ret); + ok(!ret, "GetNamedSecurityInfo failed with error %ld\n", ret);
bret = GetSecurityDescriptorOwner(pSD, &owner, &owner_defaulted); - ok(bret, "GetSecurityDescriptorOwner failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorOwner failed with error %ld\n", GetLastError()); ok(owner != NULL, "owner should not be NULL\n"); ok(EqualSid(owner, admin_sid) || EqualSid(owner, user_sid), "Process owner SID != Administrators SID.\n");
bret = GetSecurityDescriptorGroup(pSD, &group, &group_defaulted); - ok(bret, "GetSecurityDescriptorGroup failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorGroup failed with error %ld\n", GetLastError()); ok(group != NULL, "group should not be NULL\n"); ok(EqualSid(group, domain_users_sid), "Process group SID != Domain Users SID.\n"); LocalFree(pSD); @@ -4852,10 +4852,10 @@ static void test_GetSecurityInfo(void) /* Test querying the DACL of a process */ ret = GetSecurityInfo(GetCurrentProcess(), SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &pSD); - ok(!ret, "GetSecurityInfo failed with error %d\n", ret); + ok(!ret, "GetSecurityInfo failed with error %ld\n", ret);
bret = GetSecurityDescriptorDacl(pSD, &dacl_present, &pDacl, &dacl_defaulted); - ok(bret, "GetSecurityDescriptorDacl failed with error %d\n", GetLastError()); + ok(bret, "GetSecurityDescriptorDacl failed with error %ld\n", GetLastError()); ok(dacl_present, "DACL should be present\n"); ok(pDacl && IsValidAcl(pDacl), "GetSecurityDescriptorDacl returned invalid DACL.\n"); bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); @@ -4880,7 +4880,7 @@ static void test_GetSecurityInfo(void) ok(flags == (INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE), "Domain Users ACE has unexpected flags (0x%x != 0x%x)\n", flags, INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE); - ok(ace->Mask == GENERIC_READ, "Domain Users ACE has unexpected mask (0x%x != 0x%x)\n", + ok(ace->Mask == GENERIC_READ, "Domain Users ACE has unexpected mask (0x%lx != 0x%x)\n", ace->Mask, GENERIC_READ); } ok(admins_ace_id != -1 || broken(admins_ace_id == -1) /* xp */, @@ -4892,7 +4892,7 @@ static void test_GetSecurityInfo(void) flags = ((ACE_HEADER *)ace)->AceFlags; ok(flags == 0x0, "Builtin Admins ACE has unexpected flags (0x%x != 0x0)\n", flags); ok(ace->Mask == PROCESS_ALL_ACCESS || broken(ace->Mask == 0x1f0fff) /* win2k */, - "Builtin Admins ACE has unexpected mask (0x%x != 0x%x)\n", ace->Mask, PROCESS_ALL_ACCESS); + "Builtin Admins ACE has unexpected mask (0x%lx != 0x%x)\n", ace->Mask, PROCESS_ALL_ACCESS); } LocalFree(pSD); } @@ -4907,16 +4907,16 @@ static void test_GetSidSubAuthority(void) ok(IsValidSid(psid),"Sid is not valid\n"); SetLastError(0xbebecaca); ok(*GetSidSubAuthorityCount(psid) == 4,"GetSidSubAuthorityCount gave %d expected 4\n", *GetSidSubAuthorityCount(psid)); - ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); + ok(GetLastError() == 0,"GetLastError returned %ld instead of 0\n",GetLastError()); SetLastError(0xbebecaca); - ok(*GetSidSubAuthority(psid,0) == 21,"GetSidSubAuthority gave %d expected 21\n", *GetSidSubAuthority(psid,0)); - ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); + ok(*GetSidSubAuthority(psid,0) == 21,"GetSidSubAuthority gave %ld expected 21\n", *GetSidSubAuthority(psid,0)); + ok(GetLastError() == 0,"GetLastError returned %ld instead of 0\n",GetLastError()); SetLastError(0xbebecaca); - ok(*GetSidSubAuthority(psid,1) == 93476,"GetSidSubAuthority gave %d expected 93476\n", *GetSidSubAuthority(psid,1)); - ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); + ok(*GetSidSubAuthority(psid,1) == 93476,"GetSidSubAuthority gave %ld expected 93476\n", *GetSidSubAuthority(psid,1)); + ok(GetLastError() == 0,"GetLastError returned %ld instead of 0\n",GetLastError()); SetLastError(0xbebecaca); ok(GetSidSubAuthority(psid,4) != NULL,"Expected out of bounds GetSidSubAuthority to return a non-NULL pointer\n"); - ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); + ok(GetLastError() == 0,"GetLastError returned %ld instead of 0\n",GetLastError()); LocalFree(psid); }
@@ -4935,19 +4935,19 @@ static void test_CheckTokenMembership(void) return; } ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &process_token); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError());
ret = DuplicateToken(process_token, SecurityImpersonation, &token); - ok(ret, "DuplicateToken failed with error %d\n", GetLastError()); + ok(ret, "DuplicateToken failed with error %ld\n", GetLastError());
/* groups */ ret = GetTokenInformation(token, TokenGroups, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "GetTokenInformation(TokenGroups) %s with error %d\n", + "GetTokenInformation(TokenGroups) %s with error %ld\n", ret ? "succeeded" : "failed", GetLastError()); token_groups = HeapAlloc(GetProcessHeap(), 0, size); ret = GetTokenInformation(token, TokenGroups, token_groups, size, &size); - ok(ret, "GetTokenInformation(TokenGroups) failed with error %d\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenGroups) failed with error %ld\n", GetLastError());
for (i = 0; i < token_groups->GroupCount; i++) { @@ -4965,19 +4965,19 @@ static void test_CheckTokenMembership(void)
is_member = FALSE; ret = pCheckTokenMembership(token, token_groups->Groups[i].Sid, &is_member); - ok(ret, "CheckTokenMembership failed with error %d\n", GetLastError()); + ok(ret, "CheckTokenMembership failed with error %ld\n", GetLastError()); ok(is_member, "CheckTokenMembership should have detected sid as member\n");
is_member = FALSE; ret = pCheckTokenMembership(NULL, token_groups->Groups[i].Sid, &is_member); - ok(ret, "CheckTokenMembership failed with error %d\n", GetLastError()); + ok(ret, "CheckTokenMembership failed with error %ld\n", GetLastError()); ok(is_member, "CheckTokenMembership should have detected sid as member\n");
is_member = TRUE; SetLastError(0xdeadbeef); ret = pCheckTokenMembership(process_token, token_groups->Groups[i].Sid, &is_member); ok(!ret && GetLastError() == ERROR_NO_IMPERSONATION_TOKEN, - "CheckTokenMembership with process token %s with error %d\n", + "CheckTokenMembership with process token %s with error %ld\n", ret ? "succeeded" : "failed", GetLastError()); ok(!is_member, "CheckTokenMembership should have cleared is_member\n");
@@ -5001,33 +5001,33 @@ static void test_EqualSid(void) win_skip("AllocateAndInitializeSid is not implemented\n"); return; } - ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(ret, "AllocateAndInitializeSid failed with error %ld\n", GetLastError()); ok(GetLastError() == 0xdeadbeef, - "AllocateAndInitializeSid shouldn't have set last error to %d\n", + "AllocateAndInitializeSid shouldn't have set last error to %ld\n", GetLastError());
ret = AllocateAndInitializeSid(&SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &sid2); - ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(ret, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = EqualSid(sid1, sid2); ok(!ret, "World and domain admins sids shouldn't have been equal\n"); ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef), /* NT4 */ - "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", + "EqualSid should have set last error to ERROR_SUCCESS instead of %ld\n", GetLastError());
SetLastError(0xdeadbeef); sid2 = FreeSid(sid2); ok(!sid2, "FreeSid should have returned NULL instead of %p\n", sid2); ok(GetLastError() == 0xdeadbeef, - "FreeSid shouldn't have set last error to %d\n", + "FreeSid shouldn't have set last error to %ld\n", GetLastError());
ret = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &sid2); - ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(ret, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = EqualSid(sid1, sid2); @@ -5035,7 +5035,7 @@ static void test_EqualSid(void) debugstr_sid(sid1), debugstr_sid(sid2)); ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef), /* NT4 */ - "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", + "EqualSid should have set last error to ERROR_SUCCESS instead of %ld\n", GetLastError());
((SID *)sid2)->Revision = 2; @@ -5044,7 +5044,7 @@ static void test_EqualSid(void) ok(!ret, "EqualSid with invalid sid should have returned FALSE\n"); ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef), /* NT4 */ - "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", + "EqualSid should have set last error to ERROR_SUCCESS instead of %ld\n", GetLastError()); ((SID *)sid2)->Revision = SID_REVISION;
@@ -5069,15 +5069,15 @@ static void test_GetUserNameA(void) required_len = 0; ret = GetUserNameA(NULL, &required_len); ok(ret == FALSE, "GetUserNameA returned %d\n", ret); - ok(required_len != 0, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); + ok(required_len != 0, "Outputted buffer length was %lu\n", required_len); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %lu\n", GetLastError());
SetLastError(0xdeadbeef); required_len = 1; ret = GetUserNameA(NULL, &required_len); ok(ret == FALSE, "GetUserNameA returned %d\n", ret); - ok(required_len != 0 && required_len != 1, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); + ok(required_len != 0 && required_len != 1, "Outputted buffer length was %lu\n", required_len); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %lu\n", GetLastError());
/* Tests crashes on Windows. */ if (0) @@ -5100,19 +5100,19 @@ static void test_GetUserNameA(void) ret = GetUserNameA(buffer, &required_len); ok(ret == FALSE, "GetUserNameA returned %d\n", ret); ok(!memcmp(buffer, filler, sizeof(filler)), "Output buffer was altered\n"); - ok(required_len != 0, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); + ok(required_len != 0, "Outputted buffer length was %lu\n", required_len); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %lu\n", GetLastError());
SetLastError(0xdeadbeef); memcpy(buffer, filler, sizeof(filler)); buffer_len = required_len; ret = GetUserNameA(buffer, &buffer_len); - ok(ret == TRUE, "GetUserNameA returned %d, last error %u\n", ret, GetLastError()); + ok(ret == TRUE, "GetUserNameA returned %d, last error %lu\n", ret, GetLastError()); ok(memcmp(buffer, filler, sizeof(filler)) != 0, "Output buffer was untouched\n"); ok(buffer_len == required_len || broken(buffer_len == required_len / sizeof(WCHAR)), /* XP+ */ - "Outputted buffer length was %u\n", buffer_len); - ok(GetLastError() == 0xdeadbeef, "Last error was %u\n", GetLastError()); + "Outputted buffer length was %lu\n", buffer_len); + ok(GetLastError() == 0xdeadbeef, "Last error was %lu\n", GetLastError());
/* Use the reported buffer size from the last GetUserNameA call and pass * a length that is one less than the required value. */ @@ -5122,8 +5122,8 @@ static void test_GetUserNameA(void) ret = GetUserNameA(buffer, &buffer_len); ok(ret == FALSE, "GetUserNameA returned %d\n", ret); ok(!memcmp(buffer, filler, sizeof(filler)), "Output buffer was untouched\n"); - ok(buffer_len == required_len, "Outputted buffer length was %u\n", buffer_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); + ok(buffer_len == required_len, "Outputted buffer length was %lu\n", buffer_len); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %lu\n", GetLastError()); }
static void test_GetUserNameW(void) @@ -5143,15 +5143,15 @@ static void test_GetUserNameW(void) required_len = 0; ret = GetUserNameW(NULL, &required_len); ok(ret == FALSE, "GetUserNameW returned %d\n", ret); - ok(required_len != 0, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); + ok(required_len != 0, "Outputted buffer length was %lu\n", required_len); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %lu\n", GetLastError());
SetLastError(0xdeadbeef); required_len = 1; ret = GetUserNameW(NULL, &required_len); ok(ret == FALSE, "GetUserNameW returned %d\n", ret); - ok(required_len != 0 && required_len != 1, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); + ok(required_len != 0 && required_len != 1, "Outputted buffer length was %lu\n", required_len); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %lu\n", GetLastError());
/* Tests crash on Windows. */ if (0) @@ -5172,17 +5172,17 @@ static void test_GetUserNameW(void) ret = GetUserNameW(buffer, &required_len); ok(ret == FALSE, "GetUserNameW returned %d\n", ret); ok(!memcmp(buffer, filler, sizeof(filler)), "Output buffer was altered\n"); - ok(required_len != 0, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); + ok(required_len != 0, "Outputted buffer length was %lu\n", required_len); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %lu\n", GetLastError());
SetLastError(0xdeadbeef); memcpy(buffer, filler, sizeof(filler)); buffer_len = required_len; ret = GetUserNameW(buffer, &buffer_len); - ok(ret == TRUE, "GetUserNameW returned %d, last error %u\n", ret, GetLastError()); + ok(ret == TRUE, "GetUserNameW returned %d, last error %lu\n", ret, GetLastError()); ok(memcmp(buffer, filler, sizeof(filler)) != 0, "Output buffer was untouched\n"); - ok(buffer_len == required_len, "Outputted buffer length was %u\n", buffer_len); - ok(GetLastError() == 0xdeadbeef, "Last error was %u\n", GetLastError()); + ok(buffer_len == required_len, "Outputted buffer length was %lu\n", buffer_len); + ok(GetLastError() == 0xdeadbeef, "Last error was %lu\n", GetLastError());
/* GetUserNameW on XP and newer writes a truncated portion of the username string to the buffer. */ SetLastError(0xdeadbeef); @@ -5193,8 +5193,8 @@ static void test_GetUserNameW(void) ok(!memcmp(buffer, filler, sizeof(filler)) || broken(memcmp(buffer, filler, sizeof(filler)) != 0), /* XP+ */ "Output buffer was altered\n"); - ok(buffer_len == required_len, "Outputted buffer length was %u\n", buffer_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); + ok(buffer_len == required_len, "Outputted buffer length was %lu\n", buffer_len); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %lu\n", GetLastError()); }
static void test_CreateRestrictedToken(void) @@ -5216,18 +5216,18 @@ static void test_CreateRestrictedToken(void) DWORD i;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &process_token); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError());
ret = DuplicateTokenEx(process_token, TOKEN_DUPLICATE|TOKEN_ADJUST_GROUPS|TOKEN_QUERY, NULL, SecurityImpersonation, TokenImpersonation, &token); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError());
ret = GetTokenInformation(token, TokenGroups, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "got %d with error %d\n", ret, GetLastError()); + "got %d with error %ld\n", ret, GetLastError()); token_groups = HeapAlloc(GetProcessHeap(), 0, size); ret = GetTokenInformation(token, TokenGroups, token_groups, size, &size); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError());
for (i = 0; i < token_groups->GroupCount; i++) { @@ -5241,34 +5241,34 @@ static void test_CreateRestrictedToken(void)
is_member = FALSE; ret = pCheckTokenMembership(token, removed_sid, &is_member); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError()); ok(is_member, "not a member\n");
sattr.Sid = removed_sid; sattr.Attributes = 0; r_token = NULL; ret = CreateRestrictedToken(token, 0, 1, &sattr, 0, NULL, 0, NULL, &r_token); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError());
is_member = TRUE; ret = pCheckTokenMembership(r_token, removed_sid, &is_member); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError()); ok(!is_member, "not a member\n");
ret = GetTokenInformation(r_token, TokenGroups, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n", + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %ld\n", ret, GetLastError()); groups2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetTokenInformation(r_token, TokenGroups, groups2, size, &size); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError());
for (i = 0; i < groups2->GroupCount; i++) { if (EqualSid(groups2->Groups[i].Sid, removed_sid)) { DWORD attr = groups2->Groups[i].Attributes; - ok(attr & SE_GROUP_USE_FOR_DENY_ONLY, "got wrong attributes %#x\n", attr); - ok(!(attr & SE_GROUP_ENABLED), "got wrong attributes %#x\n", attr); + ok(attr & SE_GROUP_USE_FOR_DENY_ONLY, "got wrong attributes %#lx\n", attr); + ok(!(attr & SE_GROUP_ENABLED), "got wrong attributes %#lx\n", attr); break; } } @@ -5277,29 +5277,29 @@ static void test_CreateRestrictedToken(void)
size = sizeof(type); ret = GetTokenInformation(r_token, TokenType, &type, size, &size); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError()); ok(type == TokenImpersonation, "got type %u\n", type);
size = sizeof(level); ret = GetTokenInformation(r_token, TokenImpersonationLevel, &level, size, &size); - ok(ret, "got error %d\n", GetLastError()); + ok(ret, "got error %ld\n", GetLastError()); ok(level == SecurityImpersonation, "got level %u\n", type);
CloseHandle(r_token);
r_token = NULL; ret = CreateRestrictedToken(process_token, 0, 1, &sattr, 0, NULL, 0, NULL, &r_token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
size = sizeof(type); ret = GetTokenInformation(r_token, TokenType, &type, size, &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(type == TokenPrimary, "got type %u\n", type);
CloseHandle(r_token);
ret = GetTokenInformation(token, TokenPrivileges, privs, sizeof(privs_buffer), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
for (i = 0; i < privs->PrivilegeCount; i++) { @@ -5315,18 +5315,18 @@ static void test_CreateRestrictedToken(void) lattr.Attributes = 0; r_token = NULL; ret = CreateRestrictedToken(token, 0, 0, NULL, 1, &lattr, 0, NULL, &r_token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
priv_set.PrivilegeCount = 1; priv_set.Control = 0; priv_set.Privilege[0].Luid = luid; priv_set.Privilege[0].Attributes = 0; ret = PrivilegeCheck(r_token, &priv_set, &is_member); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!is_member, "privilege should not be enabled\n");
ret = GetTokenInformation(r_token, TokenPrivileges, privs, sizeof(privs_buffer), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
is_member = FALSE; for (i = 0; i < privs->PrivilegeCount; i++) @@ -5342,7 +5342,7 @@ static void test_CreateRestrictedToken(void) lattr.Luid.LowPart = 0xdeadbeef; r_token = NULL; ret = CreateRestrictedToken(token, 0, 1, &sattr, 1, &lattr, 0, NULL, &r_token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); CloseHandle(r_token);
HeapFree(GetProcessHeap(), 0, token_groups); @@ -5364,7 +5364,7 @@ static void validate_default_security_descriptor(SECURITY_DESCRIPTOR *sd) acl = (void *)0xdeadbeef; SetLastError(0xdeadbeef); ret = GetSecurityDescriptorDacl(sd, &present, &acl, &defaulted); - ok(ret, "GetSecurityDescriptorDacl error %d\n", GetLastError()); + ok(ret, "GetSecurityDescriptorDacl error %ld\n", GetLastError()); todo_wine ok(present == 1, "acl is not present\n"); todo_wine @@ -5375,7 +5375,7 @@ static void validate_default_security_descriptor(SECURITY_DESCRIPTOR *sd) sid = (void *)0xdeadbeef; SetLastError(0xdeadbeef); ret = GetSecurityDescriptorOwner(sd, &sid, &defaulted); - ok(ret, "GetSecurityDescriptorOwner error %d\n", GetLastError()); + ok(ret, "GetSecurityDescriptorOwner error %ld\n", GetLastError()); todo_wine ok(sid != (void *)0xdeadbeef && sid != NULL, "sid pointer is not set\n"); ok(defaulted == 0, "defaulted is set to TRUE\n"); @@ -5384,7 +5384,7 @@ static void validate_default_security_descriptor(SECURITY_DESCRIPTOR *sd) sid = (void *)0xdeadbeef; SetLastError(0xdeadbeef); ret = GetSecurityDescriptorGroup(sd, &sid, &defaulted); - ok(ret, "GetSecurityDescriptorGroup error %d\n", GetLastError()); + ok(ret, "GetSecurityDescriptorGroup error %ld\n", GetLastError()); todo_wine ok(sid != (void *)0xdeadbeef && sid != NULL, "sid pointer is not set\n"); ok(defaulted == 0, "defaulted is set to TRUE\n"); @@ -5406,9 +5406,9 @@ static void test_default_handle_security(HANDLE token, HANDLE handle, GENERIC_MA SetLastError(0xdeadbeef); ret = AccessCheck(sd, token, MAXIMUM_ALLOWED, mapping, &priv_set, &priv_set_len, &granted, &status); todo_wine { - ok(ret, "AccessCheck error %d\n", GetLastError()); + ok(ret, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == mapping->GenericAll, "expected all access %#x, got %#x\n", mapping->GenericAll, granted); + ok(granted == mapping->GenericAll, "expected all access %#lx, got %#lx\n", mapping->GenericAll, granted); } priv_set_len = sizeof(priv_set); granted = 0xdeadbeef; @@ -5416,9 +5416,9 @@ todo_wine { SetLastError(0xdeadbeef); ret = AccessCheck(sd, token, 0, mapping, &priv_set, &priv_set_len, &granted, &status); todo_wine { - ok(ret, "AccessCheck error %d\n", GetLastError()); + ok(ret, "AccessCheck error %ld\n", GetLastError()); ok(status == 0 || broken(status == 1) /* NT4 */, "expected 0, got %d\n", status); - ok(granted == 0 || broken(granted == mapping->GenericRead) /* NT4 */, "expected 0, got %#x\n", granted); + ok(granted == 0 || broken(granted == mapping->GenericRead) /* NT4 */, "expected 0, got %#lx\n", granted); } priv_set_len = sizeof(priv_set); granted = 0xdeadbeef; @@ -5426,9 +5426,9 @@ todo_wine { SetLastError(0xdeadbeef); ret = AccessCheck(sd, token, ACCESS_SYSTEM_SECURITY, mapping, &priv_set, &priv_set_len, &granted, &status); todo_wine { - ok(ret, "AccessCheck error %d\n", GetLastError()); + ok(ret, "AccessCheck error %ld\n", GetLastError()); ok(status == 0, "expected 0, got %d\n", status); - ok(granted == 0, "expected 0, got %#x\n", granted); + ok(granted == 0, "expected 0, got %#lx\n", granted); } priv_set_len = sizeof(priv_set); granted = 0xdeadbeef; @@ -5436,9 +5436,9 @@ todo_wine { SetLastError(0xdeadbeef); ret = AccessCheck(sd, token, mapping->GenericRead, mapping, &priv_set, &priv_set_len, &granted, &status); todo_wine { - ok(ret, "AccessCheck error %d\n", GetLastError()); + ok(ret, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == mapping->GenericRead, "expected read access %#x, got %#x\n", mapping->GenericRead, granted); + ok(granted == mapping->GenericRead, "expected read access %#lx, got %#lx\n", mapping->GenericRead, granted); } priv_set_len = sizeof(priv_set); granted = 0xdeadbeef; @@ -5446,9 +5446,9 @@ todo_wine { SetLastError(0xdeadbeef); ret = AccessCheck(sd, token, mapping->GenericWrite, mapping, &priv_set, &priv_set_len, &granted, &status); todo_wine { - ok(ret, "AccessCheck error %d\n", GetLastError()); + ok(ret, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == mapping->GenericWrite, "expected write access %#x, got %#x\n", mapping->GenericWrite, granted); + ok(granted == mapping->GenericWrite, "expected write access %#lx, got %#lx\n", mapping->GenericWrite, granted); } priv_set_len = sizeof(priv_set); granted = 0xdeadbeef; @@ -5456,9 +5456,9 @@ todo_wine { SetLastError(0xdeadbeef); ret = AccessCheck(sd, token, mapping->GenericExecute, mapping, &priv_set, &priv_set_len, &granted, &status); todo_wine { - ok(ret, "AccessCheck error %d\n", GetLastError()); + ok(ret, "AccessCheck error %ld\n", GetLastError()); ok(status == 1, "expected 1, got %d\n", status); - ok(granted == mapping->GenericExecute, "expected execute access %#x, got %#x\n", mapping->GenericExecute, granted); + ok(granted == mapping->GenericExecute, "expected execute access %#lx, got %#lx\n", mapping->GenericExecute, granted); } HeapFree(GetProcessHeap(), 0, sd); } @@ -5471,7 +5471,7 @@ static ACCESS_MASK get_obj_access(HANDLE obj) if (!pNtQueryObject) return 0;
status = pNtQueryObject(obj, ObjectBasicInformation, &info, sizeof(info), NULL); - ok(!status, "NtQueryObject error %#x\n", status); + ok(!status, "NtQueryObject error %#lx\n", status);
return info.GrantedAccess; } @@ -5499,24 +5499,24 @@ static void test_mutex_security(HANDLE token) SetLastError(0xdeadbeef); mutex = OpenMutexA(0, FALSE, "WineTestMutex"); ok(!mutex, "mutex should not exist\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); mutex = CreateMutexA(NULL, FALSE, "WineTestMutex"); - ok(mutex != 0, "CreateMutex error %d\n", GetLastError()); + ok(mutex != 0, "CreateMutex error %ld\n", GetLastError());
access = get_obj_access(mutex); - ok(access == MUTANT_ALL_ACCESS, "expected MUTANT_ALL_ACCESS, got %#x\n", access); + ok(access == MUTANT_ALL_ACCESS, "expected MUTANT_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), mutex, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access);
CloseHandle(dup);
@@ -5525,7 +5525,7 @@ static void test_mutex_security(HANDLE token) todo_wine ok(!dup, "OpenMutex should fail\n"); todo_wine - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu\n", GetLastError()); }
test_default_handle_security(token, mutex, &mapping); @@ -5556,24 +5556,24 @@ static void test_event_security(HANDLE token) SetLastError(0xdeadbeef); event = OpenEventA(0, FALSE, "WineTestEvent"); ok(!event, "event should not exist\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); event = CreateEventA(NULL, FALSE, FALSE, "WineTestEvent"); - ok(event != 0, "CreateEvent error %d\n", GetLastError()); + ok(event != 0, "CreateEvent error %ld\n", GetLastError());
access = get_obj_access(event); - ok(access == EVENT_ALL_ACCESS, "expected EVENT_ALL_ACCESS, got %#x\n", access); + ok(access == EVENT_ALL_ACCESS, "expected EVENT_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), event, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access);
CloseHandle(dup);
@@ -5582,7 +5582,7 @@ static void test_event_security(HANDLE token) todo_wine ok(!dup, "OpenEvent should fail\n"); todo_wine - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu\n", GetLastError()); }
test_default_handle_security(token, event, &mapping); @@ -5613,24 +5613,24 @@ static void test_semaphore_security(HANDLE token) SetLastError(0xdeadbeef); sem = OpenSemaphoreA(0, FALSE, "WineTestSemaphore"); ok(!sem, "semaphore should not exist\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); sem = CreateSemaphoreA(NULL, 0, 10, "WineTestSemaphore"); - ok(sem != 0, "CreateSemaphore error %d\n", GetLastError()); + ok(sem != 0, "CreateSemaphore error %ld\n", GetLastError());
access = get_obj_access(sem); - ok(access == SEMAPHORE_ALL_ACCESS, "expected SEMAPHORE_ALL_ACCESS, got %#x\n", access); + ok(access == SEMAPHORE_ALL_ACCESS, "expected SEMAPHORE_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), sem, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access);
CloseHandle(dup); } @@ -5681,11 +5681,11 @@ static void test_named_pipe_security(HANDLE token) pipe = CreateNamedPipeA(WINE_TEST_PIPE, creation_access[i].open_mode, PIPE_TYPE_BYTE | PIPE_NOWAIT, PIPE_UNLIMITED_INSTANCES, 0, 0, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "CreateNamedPipe(0x%x) error %d\n", + ok(pipe != INVALID_HANDLE_VALUE, "CreateNamedPipe(0x%lx) error %ld\n", creation_access[i].open_mode, GetLastError()); access = get_obj_access(pipe); ok(access == creation_access[i].access, - "CreateNamedPipeA(0x%x) pipe expected access 0x%x (got 0x%x)\n", + "CreateNamedPipeA(0x%lx) pipe expected access 0x%lx (got 0x%lx)\n", creation_access[i].open_mode, creation_access[i].access, access); CloseHandle(pipe); } @@ -5694,26 +5694,26 @@ static void test_named_pipe_security(HANDLE token) pipe = CreateNamedPipeA(WINE_TEST_PIPE, PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE, PIPE_TYPE_BYTE | PIPE_NOWAIT, PIPE_UNLIMITED_INSTANCES, 0, 0, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "CreateNamedPipe error %d\n", GetLastError()); + ok(pipe != INVALID_HANDLE_VALUE, "CreateNamedPipe error %ld\n", GetLastError());
test_default_handle_security(token, pipe, &mapping);
SetLastError(0xdeadbeef); file = CreateFileA(WINE_TEST_PIPE, FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
access = get_obj_access(file); - ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", access); + ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), file, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access);
CloseHandle(dup); } @@ -5723,22 +5723,22 @@ static void test_named_pipe_security(HANDLE token)
SetLastError(0xdeadbeef); file = CreateFileA("\\.\pipe\", FILE_ALL_ACCESS, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(file != INVALID_HANDLE_VALUE || broken(file == INVALID_HANDLE_VALUE) /* before Vista */, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE || broken(file == INVALID_HANDLE_VALUE) /* before Vista */, "CreateFile error %ld\n", GetLastError());
if (file != INVALID_HANDLE_VALUE) { access = get_obj_access(file); - ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", access); + ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), file, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); CloseHandle(dup); } } @@ -5771,20 +5771,20 @@ static void test_file_security(HANDLE token) /* file */ SetLastError(0xdeadbeef); file = CreateFileA(file_name, GENERIC_ALL, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
access = get_obj_access(file); - ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", access); + ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), file, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access);
CloseHandle(dup); } @@ -5793,33 +5793,33 @@ static void test_file_security(HANDLE token)
SetLastError(0xdeadbeef); file = CreateFileA(file_name, 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
access = get_obj_access(file); - ok(access == (FILE_READ_ATTRIBUTES | SYNCHRONIZE), "expected FILE_READ_ATTRIBUTES | SYNCHRONIZE, got %#x\n", access); + ok(access == (FILE_READ_ATTRIBUTES | SYNCHRONIZE), "expected FILE_READ_ATTRIBUTES | SYNCHRONIZE, got %#lx\n", access);
bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadFile(file, buf, sizeof(buf), &bytes, NULL); ok(!ret, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - ok(bytes == 0, "expected 0, got %u\n", bytes); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); + ok(bytes == 0, "expected 0, got %lu\n", bytes);
CloseHandle(file);
SetLastError(0xdeadbeef); file = CreateFileA(file_name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
access = get_obj_access(file); - ok(access == (FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES), "expected FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES, got %#x\n", access); + ok(access == (FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES), "expected FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES, got %#lx\n", access);
bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadFile(file, buf, sizeof(buf), &bytes, NULL); ok(!ret, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - ok(bytes == 0, "expected 0, got %u\n", bytes); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); + ok(bytes == 0, "expected 0, got %lu\n", bytes);
CloseHandle(file); DeleteFileA(file_name); @@ -5827,20 +5827,20 @@ static void test_file_security(HANDLE token) /* directory */ SetLastError(0xdeadbeef); file = CreateFileA(temp_path, GENERIC_ALL, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
access = get_obj_access(file); - ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", access); + ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), file, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access);
CloseHandle(dup); } @@ -5849,19 +5849,19 @@ static void test_file_security(HANDLE token)
SetLastError(0xdeadbeef); file = CreateFileA(temp_path, 0, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
access = get_obj_access(file); - ok(access == (FILE_READ_ATTRIBUTES | SYNCHRONIZE), "expected FILE_READ_ATTRIBUTES | SYNCHRONIZE, got %#x\n", access); + ok(access == (FILE_READ_ATTRIBUTES | SYNCHRONIZE), "expected FILE_READ_ATTRIBUTES | SYNCHRONIZE, got %#lx\n", access);
CloseHandle(file);
SetLastError(0xdeadbeef); file = CreateFileA(temp_path, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
access = get_obj_access(file); - ok(access == (FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES), "expected FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES, got %#x\n", access); + ok(access == (FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES), "expected FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES, got %#lx\n", access);
CloseHandle(file); } @@ -5910,7 +5910,7 @@ static void test_filemap_security(void)
SetLastError(0xdeadbeef); file = CreateFileA(file_name, GENERIC_READ|GENERIC_WRITE|GENERIC_EXECUTE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError()); SetFilePointer(file, 4096, NULL, FILE_BEGIN); SetEndOfFile(file);
@@ -5931,17 +5931,17 @@ static void test_filemap_security(void) continue; } } - ok(mapping != 0, "CreateFileMapping(%04x) error %d\n", prot_map[i].prot, GetLastError()); + ok(mapping != 0, "CreateFileMapping(%04x) error %ld\n", prot_map[i].prot, GetLastError()); } else { ok(!mapping, "CreateFileMapping(%04x) should fail\n", prot_map[i].prot); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); continue; }
access = get_obj_access(mapping); - ok(access == prot_map[i].mapped, "%d: expected %#x, got %#x\n", i, prot_map[i].mapped, access); + ok(access == prot_map[i].mapped, "%ld: expected %#x, got %#lx\n", i, prot_map[i].mapped, access);
CloseHandle(mapping); } @@ -5956,11 +5956,11 @@ static void test_filemap_security(void) DeleteFileA(file_name); return; } - ok(mapping != 0, "CreateFileMapping error %d\n", GetLastError()); + ok(mapping != 0, "CreateFileMapping error %ld\n", GetLastError());
access = get_obj_access(mapping); ok(access == (STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE), - "expected STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE, got %#x\n", access); + "expected STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { @@ -5969,10 +5969,10 @@ static void test_filemap_security(void) SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), mapping, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access);
CloseHandle(dup); } @@ -5983,16 +5983,16 @@ static void test_filemap_security(void)
created_mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 0x1000, "Wine Test Open Mapping"); - ok(created_mapping != NULL, "CreateFileMapping failed with error %u\n", GetLastError()); + ok(created_mapping != NULL, "CreateFileMapping failed with error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(map); i++) { if (!map[i].generic) continue;
mapping = OpenFileMappingA(map[i].generic, FALSE, "Wine Test Open Mapping"); - ok(mapping != NULL, "OpenFileMapping failed with error %d\n", GetLastError()); + ok(mapping != NULL, "OpenFileMapping failed with error %ld\n", GetLastError()); access = get_obj_access(mapping); - ok(access == map[i].mapped, "%d: unexpected access flags %#x, expected %#x\n", + ok(access == map[i].mapped, "%ld: unexpected access flags %#lx, expected %#x\n", i, access, map[i].mapped); CloseHandle(mapping); } @@ -6018,17 +6018,17 @@ static void test_thread_security(void)
SetLastError(0xdeadbeef); thread = CreateThread(NULL, 0, (void *)0xdeadbeef, NULL, CREATE_SUSPENDED, &ret); - ok(thread != 0, "CreateThread error %d\n", GetLastError()); + ok(thread != 0, "CreateThread error %ld\n", GetLastError());
access = get_obj_access(thread); - ok(access == THREAD_ALL_ACCESS_NT4 || access == THREAD_ALL_ACCESS_VISTA, "expected THREAD_ALL_ACCESS, got %#x\n", access); + ok(access == THREAD_ALL_ACCESS_NT4 || access == THREAD_ALL_ACCESS_VISTA, "expected THREAD_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), thread, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); switch (map[i].generic) @@ -6038,20 +6038,20 @@ static void test_thread_security(void) ok(access == map[i].mapped || access == (map[i].mapped | THREAD_QUERY_LIMITED_INFORMATION) /* Vista+ */ || access == (map[i].mapped | THREAD_QUERY_LIMITED_INFORMATION | THREAD_RESUME) /* win8 */, - "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; case GENERIC_WRITE: ok(access == map[i].mapped || access == (map[i].mapped | THREAD_SET_LIMITED_INFORMATION) /* Vista+ */ || access == (map[i].mapped | THREAD_SET_LIMITED_INFORMATION | THREAD_RESUME) /* win8 */, - "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; case GENERIC_ALL: ok(access == map[i].mapped || access == THREAD_ALL_ACCESS_VISTA, - "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; default: - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; }
@@ -6061,11 +6061,11 @@ static void test_thread_security(void) SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), thread, GetCurrentProcess(), &dup, THREAD_QUERY_INFORMATION, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError()); access = get_obj_access(dup); ok(access == (THREAD_QUERY_INFORMATION | THREAD_QUERY_LIMITED_INFORMATION) /* Vista+ */ || access == THREAD_QUERY_INFORMATION /* before Vista */, - "expected THREAD_QUERY_INFORMATION|THREAD_QUERY_LIMITED_INFORMATION, got %#x\n", access); + "expected THREAD_QUERY_INFORMATION|THREAD_QUERY_LIMITED_INFORMATION, got %#lx\n", access); CloseHandle(dup);
TerminateThread(thread, 0); @@ -6096,45 +6096,45 @@ static void test_process_access(void) sti.cb = sizeof(sti); SetLastError(0xdeadbeef); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &sti, &pi); - ok(ret, "CreateProcess() error %d\n", GetLastError()); + ok(ret, "CreateProcess() error %ld\n", GetLastError());
CloseHandle(pi.hThread); process = pi.hProcess;
access = get_obj_access(process); - ok(access == PROCESS_ALL_ACCESS_NT4 || access == PROCESS_ALL_ACCESS_VISTA, "expected PROCESS_ALL_ACCESS, got %#x\n", access); + ok(access == PROCESS_ALL_ACCESS_NT4 || access == PROCESS_ALL_ACCESS_VISTA, "expected PROCESS_ALL_ACCESS, got %#lx\n", access);
for (i = 0; i < ARRAY_SIZE(map); i++) { SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), process, GetCurrentProcess(), &dup, map[i].generic, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
access = get_obj_access(dup); switch (map[i].generic) { case GENERIC_READ: ok(access == map[i].mapped || access == (map[i].mapped | PROCESS_QUERY_LIMITED_INFORMATION) /* Vista+ */, - "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; case GENERIC_WRITE: ok(access == map[i].mapped || access == (map[i].mapped | PROCESS_TERMINATE) /* before Vista */ || access == (map[i].mapped | PROCESS_SET_LIMITED_INFORMATION) /* win8 */ || access == (map[i].mapped | PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_SET_LIMITED_INFORMATION) /* Win10 Anniversary Update */, - "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; case GENERIC_EXECUTE: ok(access == map[i].mapped || access == (map[i].mapped | PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_TERMINATE) /* Vista+ */, - "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; case GENERIC_ALL: ok(access == map[i].mapped || access == PROCESS_ALL_ACCESS_VISTA, - "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; default: - ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + ok(access == map[i].mapped, "%ld: expected %#x, got %#lx\n", i, map[i].mapped, access); break; }
@@ -6144,11 +6144,11 @@ static void test_process_access(void) SetLastError( 0xdeadbeef ); ret = DuplicateHandle(GetCurrentProcess(), process, GetCurrentProcess(), &dup, PROCESS_QUERY_INFORMATION, FALSE, 0); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError()); access = get_obj_access(dup); ok(access == (PROCESS_QUERY_INFORMATION | PROCESS_QUERY_LIMITED_INFORMATION) /* Vista+ */ || access == PROCESS_QUERY_INFORMATION /* before Vista */, - "expected PROCESS_QUERY_INFORMATION|PROCESS_QUERY_LIMITED_INFORMATION, got %#x\n", access); + "expected PROCESS_QUERY_INFORMATION|PROCESS_QUERY_LIMITED_INFORMATION, got %#lx\n", access); CloseHandle(dup);
TerminateProcess(process, 0); @@ -6165,7 +6165,7 @@ static BOOL validate_impersonation_token(HANDLE token, DWORD *token_type) needed = 0; SetLastError(0xdeadbeef); ret = GetTokenInformation(token, TokenType, &type, sizeof(type), &needed); - ok(ret, "GetTokenInformation error %d\n", GetLastError()); + ok(ret, "GetTokenInformation error %ld\n", GetLastError()); ok(needed == sizeof(type), "GetTokenInformation should return required buffer length\n"); ok(type == TokenPrimary || type == TokenImpersonation, "expected TokenPrimary or TokenImpersonation, got %d\n", type);
@@ -6175,7 +6175,7 @@ static BOOL validate_impersonation_token(HANDLE token, DWORD *token_type) needed = 0; SetLastError(0xdeadbeef); ret = GetTokenInformation(token, TokenImpersonationLevel, &sil, sizeof(sil), &needed); - ok(ret, "GetTokenInformation error %d\n", GetLastError()); + ok(ret, "GetTokenInformation error %ld\n", GetLastError()); ok(needed == sizeof(sil), "GetTokenInformation should return required buffer length\n"); ok(sil == SecurityImpersonation, "expected SecurityImpersonation, got %d\n", sil);
@@ -6183,7 +6183,7 @@ static BOOL validate_impersonation_token(HANDLE token, DWORD *token_type) SetLastError(0xdeadbeef); ret = GetTokenInformation(token, TokenDefaultDacl, NULL, 0, &needed); ok(!ret, "GetTokenInformation should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok(needed != 0xdeadbeef, "GetTokenInformation should return required buffer length\n"); ok(needed > sizeof(TOKEN_DEFAULT_DACL), "GetTokenInformation returned empty default DACL\n");
@@ -6191,7 +6191,7 @@ static BOOL validate_impersonation_token(HANDLE token, DWORD *token_type) SetLastError(0xdeadbeef); ret = GetTokenInformation(token, TokenOwner, NULL, 0, &needed); ok(!ret, "GetTokenInformation should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok(needed != 0xdeadbeef, "GetTokenInformation should return required buffer length\n"); ok(needed > sizeof(TOKEN_OWNER), "GetTokenInformation returned empty token owner\n");
@@ -6199,7 +6199,7 @@ static BOOL validate_impersonation_token(HANDLE token, DWORD *token_type) SetLastError(0xdeadbeef); ret = GetTokenInformation(token, TokenPrimaryGroup, NULL, 0, &needed); ok(!ret, "GetTokenInformation should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok(needed != 0xdeadbeef, "GetTokenInformation should return required buffer length\n"); ok(needed > sizeof(TOKEN_PRIMARY_GROUP), "GetTokenInformation returned empty token primary group\n");
@@ -6212,18 +6212,18 @@ static void test_kernel_objects_security(void) DWORD ret, token_type;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_QUERY, &process_token); - ok(ret, "OpenProcessToken error %d\n", GetLastError()); + ok(ret, "OpenProcessToken error %ld\n", GetLastError());
ret = validate_impersonation_token(process_token, &token_type); - ok(token_type == TokenPrimary, "expected TokenPrimary, got %d\n", token_type); + ok(token_type == TokenPrimary, "expected TokenPrimary, got %ld\n", token_type); ok(!ret, "access token should not be an impersonation token\n");
ret = DuplicateToken(process_token, SecurityImpersonation, &token); - ok(ret, "DuplicateToken error %d\n", GetLastError()); + ok(ret, "DuplicateToken error %ld\n", GetLastError());
ret = validate_impersonation_token(token, &token_type); ok(ret, "access token should be a valid impersonation token\n"); - ok(token_type == TokenImpersonation, "expected TokenImpersonation, got %d\n", token_type); + ok(token_type == TokenImpersonation, "expected TokenImpersonation, got %ld\n", token_type);
test_mutex_security(token); test_event_security(token); @@ -6253,7 +6253,7 @@ static void test_TokenIntegrityLevel(void)
SetLastError(0xdeadbeef); res = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); - ok(res, "got %d with %d (expected TRUE)\n", res, GetLastError()); + ok(res, "got %ld with %ld (expected TRUE)\n", res, GetLastError());
SetLastError(0xdeadbeef); res = GetTokenInformation(token, TokenIntegrityLevel, buffer, sizeof(buffer), &size); @@ -6266,7 +6266,7 @@ static void test_TokenIntegrityLevel(void) return; }
- ok(res, "got %u with %u (expected TRUE)\n", res, GetLastError()); + ok(res, "got %lu with %lu (expected TRUE)\n", res, GetLastError()); if (!res) { CloseHandle(token); @@ -6275,7 +6275,7 @@ static void test_TokenIntegrityLevel(void)
tml = (TOKEN_MANDATORY_LABEL*) buffer; ok(tml->Label.Attributes == (SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED), - "got 0x%x (expected 0x%x)\n", tml->Label.Attributes, (SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED)); + "got 0x%lx (expected 0x%x)\n", tml->Label.Attributes, (SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED));
ok(EqualSid(tml->Label.Sid, &medium_level) || EqualSid(tml->Label.Sid, &high_level), "got %s (expected %s or %s)\n", debugstr_sid(tml->Label.Sid), @@ -6297,26 +6297,26 @@ static void test_default_dacl_owner_sid(void)
sd = HeapAlloc( GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH ); ret = InitializeSecurityDescriptor( sd, SECURITY_DESCRIPTOR_REVISION ); - ok( ret, "error %u\n", GetLastError() ); + ok( ret, "error %lu\n", GetLastError() );
sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = sd; sa.bInheritHandle = FALSE; handle = CreateEventA( &sa, TRUE, TRUE, "test_event" ); - ok( handle != NULL, "error %u\n", GetLastError() ); + ok( handle != NULL, "error %lu\n", GetLastError() );
size = 0; ret = GetKernelObjectSecurity( handle, OWNER_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, NULL, 0, &size ); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "error %u\n", GetLastError() ); + ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "error %lu\n", GetLastError() );
sd = HeapAlloc( GetProcessHeap(), 0, size ); ret = GetKernelObjectSecurity( handle, OWNER_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, sd, size, &size ); - ok( ret, "error %u\n", GetLastError() ); + ok( ret, "error %lu\n", GetLastError() );
owner = (void *)0xdeadbeef; defaulted = TRUE; ret = GetSecurityDescriptorOwner( sd, &owner, &defaulted ); - ok( ret, "error %u\n", GetLastError() ); + ok( ret, "error %lu\n", GetLastError() ); ok( owner != (void *)0xdeadbeef, "owner not set\n" ); ok( !defaulted, "owner defaulted\n" );
@@ -6324,7 +6324,7 @@ static void test_default_dacl_owner_sid(void) present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorDacl( sd, &present, &dacl, &defaulted ); - ok( ret, "error %u\n", GetLastError() ); + ok( ret, "error %lu\n", GetLastError() ); ok( present, "dacl not present\n" ); ok( dacl != (void *)0xdeadbeef, "dacl not set\n" ); ok( !defaulted, "dacl defaulted\n" ); @@ -6366,7 +6366,7 @@ static void test_AdjustTokenPrivileges(void) len = 0xdeadbeef; ret = AdjustTokenPrivileges(token, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), NULL, &len); ok(ret, "got %d\n", ret); - ok(len == 0xdeadbeef, "got length %d\n", len); + ok(len == 0xdeadbeef, "got length %ld\n", len);
/* revert */ tp.PrivilegeCount = 1; @@ -6393,34 +6393,34 @@ static void test_AddAce(void) memcpy(&ace->SidStart, &sidWorld, sizeof(sidWorld));
ret = InitializeAcl(acl, sizeof(acl_buf), ACL_REVISION2); - ok(ret, "InitializeAcl failed: %d\n", GetLastError()); + ok(ret, "InitializeAcl failed: %ld\n", GetLastError());
ret = AddAce(acl, ACL_REVISION1, MAXDWORD, ace, ace->Header.AceSize); - ok(ret, "AddAce failed: %d\n", GetLastError()); + ok(ret, "AddAce failed: %ld\n", GetLastError()); ret = AddAce(acl, ACL_REVISION2, MAXDWORD, ace, ace->Header.AceSize); - ok(ret, "AddAce failed: %d\n", GetLastError()); + ok(ret, "AddAce failed: %ld\n", GetLastError()); ret = AddAce(acl, ACL_REVISION3, MAXDWORD, ace, ace->Header.AceSize); - ok(ret, "AddAce failed: %d\n", GetLastError()); + ok(ret, "AddAce failed: %ld\n", GetLastError()); ok(acl->AclRevision == ACL_REVISION3, "acl->AclRevision = %d\n", acl->AclRevision); ret = AddAce(acl, ACL_REVISION4, MAXDWORD, ace, ace->Header.AceSize); - ok(ret, "AddAce failed: %d\n", GetLastError()); + ok(ret, "AddAce failed: %ld\n", GetLastError()); ok(acl->AclRevision == ACL_REVISION4, "acl->AclRevision = %d\n", acl->AclRevision); ret = AddAce(acl, ACL_REVISION1, MAXDWORD, ace, ace->Header.AceSize); - ok(ret, "AddAce failed: %d\n", GetLastError()); + ok(ret, "AddAce failed: %ld\n", GetLastError()); ok(acl->AclRevision == ACL_REVISION4, "acl->AclRevision = %d\n", acl->AclRevision); ret = AddAce(acl, ACL_REVISION2, MAXDWORD, ace, ace->Header.AceSize); - ok(ret, "AddAce failed: %d\n", GetLastError()); + ok(ret, "AddAce failed: %ld\n", GetLastError());
ret = AddAce(acl, MIN_ACL_REVISION-1, MAXDWORD, ace, ace->Header.AceSize); - ok(ret, "AddAce failed: %d\n", GetLastError()); + ok(ret, "AddAce failed: %ld\n", GetLastError()); /* next test succeededs but corrupts ACL */ ret = AddAce(acl, MAX_ACL_REVISION+1, MAXDWORD, ace, ace->Header.AceSize); - ok(ret, "AddAce failed: %d\n", GetLastError()); + ok(ret, "AddAce failed: %ld\n", GetLastError()); ok(acl->AclRevision == MAX_ACL_REVISION+1, "acl->AclRevision = %d\n", acl->AclRevision); SetLastError(0xdeadbeef); ret = AddAce(acl, ACL_REVISION1, MAXDWORD, ace, ace->Header.AceSize); ok(!ret, "AddAce succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() = %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() = %ld\n", GetLastError()); }
static void test_AddMandatoryAce(void) @@ -6450,27 +6450,27 @@ static void test_AddMandatoryAce(void) }
ret = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); - ok(ret, "InitializeSecurityDescriptor failed with error %u\n", GetLastError()); + ok(ret, "InitializeSecurityDescriptor failed with error %lu\n", GetLastError());
sa.nLength = sizeof(sa); sa.lpSecurityDescriptor = sd; sa.bInheritHandle = FALSE;
handle = CreateEventA(&sa, TRUE, TRUE, "test_event"); - ok(handle != NULL, "CreateEventA failed with error %u\n", GetLastError()); + ok(handle != NULL, "CreateEventA failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %u, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %u, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
sacl = (void *)0xdeadbeef; present = TRUE; ret = GetSecurityDescriptorSacl(sd2, &present, &sacl, &defaulted); - ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorSacl failed with error %lu\n", GetLastError()); ok(!present, "SACL is present\n"); ok(sacl == (void *)0xdeadbeef, "SACL is set\n");
@@ -6479,128 +6479,128 @@ static void test_AddMandatoryAce(void)
memset(buffer_acl, 0, sizeof(buffer_acl)); ret = InitializeAcl(acl, 256, ACL_REVISION); - ok(ret, "InitializeAcl failed with %u\n", GetLastError()); + ok(ret, "InitializeAcl failed with %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pAddMandatoryAce(acl, ACL_REVISION, 0, 0x1234, &low_level); ok(!ret, "AddMandatoryAce succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER got %u\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError());
ret = pAddMandatoryAce(acl, ACL_REVISION, 0, SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, &low_level); - ok(ret, "AddMandatoryAce failed with %u\n", GetLastError()); + ok(ret, "AddMandatoryAce failed with %lu\n", GetLastError());
ret = GetAce(acl, 0, (void **)&ace); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE, "got type %#x\n", ace->Header.AceType); ok(!ace->Header.AceFlags, "got flags %#x\n", ace->Header.AceFlags); - ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, "got mask %#x\n", ace->Mask); + ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, "got mask %#lx\n", ace->Mask); ok(EqualSid(&ace->SidStart, &low_level), "wrong sid\n");
SetLastError(0xdeadbeef); ret = GetAce(acl, 1, (void **)&ace); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
ret = SetSecurityDescriptorSacl(sd, TRUE, acl, FALSE); - ok(ret, "SetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "SetSecurityDescriptorSacl failed with error %lu\n", GetLastError());
handle = CreateEventA(&sa, TRUE, TRUE, "test_event"); - ok(handle != NULL, "CreateEventA failed with error %u\n", GetLastError()); + ok(handle != NULL, "CreateEventA failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %u, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %u, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
sacl = (void *)0xdeadbeef; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorSacl(sd2, &present, &sacl, &defaulted); - ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorSacl failed with error %lu\n", GetLastError()); ok(present, "SACL not present\n"); ok(sacl != (void *)0xdeadbeef, "SACL not set\n"); ok(!defaulted, "SACL defaulted\n"); ret = GetAclInformation(sacl, &acl_size_info, sizeof(acl_size_info), AclSizeInformation); - ok(ret, "GetAclInformation failed with error %u\n", GetLastError()); - ok(acl_size_info.AceCount == 1, "SACL contains an unexpected ACE count %u\n", acl_size_info.AceCount); + ok(ret, "GetAclInformation failed with error %lu\n", GetLastError()); + ok(acl_size_info.AceCount == 1, "SACL contains an unexpected ACE count %lu\n", acl_size_info.AceCount);
ret = GetAce(sacl, 0, (void **)&ace); - ok(ret, "GetAce failed with error %u\n", GetLastError()); + ok(ret, "GetAce failed with error %lu\n", GetLastError()); ok (ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE, "Unexpected ACE type %#x\n", ace->Header.AceType); ok(!ace->Header.AceFlags, "Unexpected ACE flags %#x\n", ace->Header.AceFlags); - ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, "Unexpected ACE mask %#x\n", ace->Mask); + ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, "Unexpected ACE mask %#lx\n", ace->Mask); ok(EqualSid(&ace->SidStart, &low_level), "Expected low integrity level\n");
HeapFree(GetProcessHeap(), 0, sd2);
ret = pAddMandatoryAce(acl, ACL_REVISION, 0, SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP, &medium_level); - ok(ret, "AddMandatoryAce failed with error %u\n", GetLastError()); + ok(ret, "AddMandatoryAce failed with error %lu\n", GetLastError());
ret = SetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd); - ok(ret, "SetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "SetKernelObjectSecurity failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %u, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %u, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
sacl = (void *)0xdeadbeef; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorSacl(sd2, &present, &sacl, &defaulted); - ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorSacl failed with error %lu\n", GetLastError()); ok(present, "SACL not present\n"); ok(sacl != (void *)0xdeadbeef, "SACL not set\n"); ok(sacl->AceCount == 2, "Expected 2 ACEs, got %d\n", sacl->AceCount); ok(!defaulted, "SACL defaulted\n");
ret = GetAce(acl, 0, (void **)&ace); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE, "got type %#x\n", ace->Header.AceType); ok(!ace->Header.AceFlags, "got flags %#x\n", ace->Header.AceFlags); - ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, "got mask %#x\n", ace->Mask); + ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, "got mask %#lx\n", ace->Mask); ok(EqualSid(&ace->SidStart, &low_level), "wrong sid\n");
ret = GetAce(acl, 1, (void **)&ace); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE, "got type %#x\n", ace->Header.AceType); ok(!ace->Header.AceFlags, "got flags %#x\n", ace->Header.AceFlags); - ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP, "got mask %#x\n", ace->Mask); + ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP, "got mask %#lx\n", ace->Mask); ok(EqualSid(&ace->SidStart, &medium_level), "wrong sid\n");
SetLastError(0xdeadbeef); ret = GetAce(acl, 2, (void **)&ace); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
HeapFree(GetProcessHeap(), 0, sd2);
ret = SetSecurityDescriptorSacl(sd, FALSE, NULL, FALSE); - ok(ret, "SetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "SetSecurityDescriptorSacl failed with error %lu\n", GetLastError());
ret = SetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd); - ok(ret, "SetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "SetKernelObjectSecurity failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
sacl = (void *)0xdeadbeef; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorSacl(sd2, &present, &sacl, &defaulted); - ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorSacl failed with error %lu\n", GetLastError()); ok(present, "SACL not present\n"); ok(sacl && sacl != (void *)0xdeadbeef, "SACL not set\n"); ok(!defaulted, "SACL defaulted\n"); @@ -6609,30 +6609,30 @@ static void test_AddMandatoryAce(void) HeapFree(GetProcessHeap(), 0, sd2);
ret = InitializeAcl(acl, 256, ACL_REVISION); - ok(ret, "InitializeAcl failed with error %u\n", GetLastError()); + ok(ret, "InitializeAcl failed with error %lu\n", GetLastError());
ret = pAddMandatoryAce(acl, ACL_REVISION3, 0, SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP, &medium_level); - ok(ret, "AddMandatoryAce failed with error %u\n", GetLastError()); + ok(ret, "AddMandatoryAce failed with error %lu\n", GetLastError());
ret = SetSecurityDescriptorSacl(sd, TRUE, acl, FALSE); - ok(ret, "SetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "SetSecurityDescriptorSacl failed with error %lu\n", GetLastError());
ret = SetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd); - ok(ret, "SetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "SetKernelObjectSecurity failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
sacl = (void *)0xdeadbeef; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorSacl(sd2, &present, &sacl, &defaulted); - ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorSacl failed with error %lu\n", GetLastError()); ok(present, "SACL not present\n"); ok(sacl != (void *)0xdeadbeef, "SACL not set\n"); ok(sacl->AclRevision == ACL_REVISION3, "Expected revision 3, got %d\n", sacl->AclRevision); @@ -6641,33 +6641,33 @@ static void test_AddMandatoryAce(void) HeapFree(GetProcessHeap(), 0, sd2);
ret = InitializeAcl(acl, 256, ACL_REVISION); - ok(ret, "InitializeAcl failed with error %u\n", GetLastError()); + ok(ret, "InitializeAcl failed with error %lu\n", GetLastError());
ret = AllocateAndInitializeSid(&sia_world, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, (void **)&everyone); - ok(ret, "AllocateAndInitializeSid failed with error %u\n", GetLastError()); + ok(ret, "AllocateAndInitializeSid failed with error %lu\n", GetLastError());
ret = AddAccessAllowedAce(acl, ACL_REVISION, KEY_READ, everyone); - ok(ret, "AddAccessAllowedAce failed with error %u\n", GetLastError()); + ok(ret, "AddAccessAllowedAce failed with error %lu\n", GetLastError());
ret = SetSecurityDescriptorSacl(sd, TRUE, acl, FALSE); - ok(ret, "SetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "SetSecurityDescriptorSacl failed with error %lu\n", GetLastError());
ret = SetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd); - ok(ret, "SetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "SetKernelObjectSecurity failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(handle, LABEL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
sacl = (void *)0xdeadbeef; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorSacl(sd2, &present, &sacl, &defaulted); - ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorSacl failed with error %lu\n", GetLastError()); ok(present, "SACL not present\n"); ok(sacl && sacl != (void *)0xdeadbeef, "SACL not set\n"); ok(!defaulted, "SACL defaulted\n"); @@ -6707,7 +6707,7 @@ static void test_system_security_access(void) CloseHandle( token ); return; } - todo_wine ok( res == ERROR_PRIVILEGE_NOT_HELD, "got %d\n", res ); + todo_wine ok( res == ERROR_PRIVILEGE_NOT_HELD, "got %ld\n", res );
priv.PrivilegeCount = 1; priv.Privileges[0].Luid = luid; @@ -6715,7 +6715,7 @@ static void test_system_security_access(void)
priv_prev = HeapAlloc( GetProcessHeap(), 0, len ); ret = AdjustTokenPrivileges( token, FALSE, &priv, len, priv_prev, &len ); - ok( ret, "got %u\n", GetLastError()); + ok( ret, "got %lu\n", GetLastError());
res = RegCreateKeyExW( HKEY_LOCAL_MACHINE, testkeyW, 0, NULL, 0, KEY_READ|ACCESS_SYSTEM_SECURITY, NULL, &hkey, NULL ); if (res == ERROR_PRIVILEGE_NOT_HELD) @@ -6725,16 +6725,16 @@ static void test_system_security_access(void) CloseHandle( token ); return; } - ok( !res, "got %d\n", res ); + ok( !res, "got %ld\n", res );
/* restore privileges */ ret = AdjustTokenPrivileges( token, FALSE, priv_prev, 0, NULL, NULL ); - ok( ret, "got %u\n", GetLastError() ); + ok( ret, "got %lu\n", GetLastError() ); HeapFree( GetProcessHeap(), 0, priv_prev );
/* privilege is checked on access */ err = GetSecurityInfo( hkey, SE_REGISTRY_KEY, SACL_SECURITY_INFORMATION, NULL, NULL, NULL, &sacl, &sd ); - todo_wine ok( err == ERROR_PRIVILEGE_NOT_HELD || err == ERROR_ACCESS_DENIED, "got %u\n", err ); + todo_wine ok( err == ERROR_PRIVILEGE_NOT_HELD || err == ERROR_ACCESS_DENIED, "got %lu\n", err ); if (err == ERROR_SUCCESS) LocalFree( sd );
@@ -6744,38 +6744,38 @@ static void test_system_security_access(void)
priv_prev = HeapAlloc( GetProcessHeap(), 0, len ); ret = AdjustTokenPrivileges( token, FALSE, &priv, len, priv_prev, &len ); - ok( ret, "got %u\n", GetLastError()); + ok( ret, "got %lu\n", GetLastError());
err = GetSecurityInfo( hkey, SE_REGISTRY_KEY, SACL_SECURITY_INFORMATION, NULL, NULL, NULL, &sacl, &sd ); - ok( err == ERROR_SUCCESS, "got %u\n", err ); + ok( err == ERROR_SUCCESS, "got %lu\n", err ); RegCloseKey( hkey ); LocalFree( sd );
/* handle created without ACCESS_SYSTEM_SECURITY, privilege held */ res = RegCreateKeyExW( HKEY_LOCAL_MACHINE, testkeyW, 0, NULL, 0, KEY_READ, NULL, &hkey, NULL ); - ok( res == ERROR_SUCCESS, "got %d\n", res ); + ok( res == ERROR_SUCCESS, "got %ld\n", res );
sd = NULL; err = GetSecurityInfo( hkey, SE_REGISTRY_KEY, SACL_SECURITY_INFORMATION, NULL, NULL, NULL, &sacl, &sd ); - todo_wine ok( err == ERROR_SUCCESS, "got %u\n", err ); + todo_wine ok( err == ERROR_SUCCESS, "got %lu\n", err ); RegCloseKey( hkey ); LocalFree( sd );
/* restore privileges */ ret = AdjustTokenPrivileges( token, FALSE, priv_prev, 0, NULL, NULL ); - ok( ret, "got %u\n", GetLastError() ); + ok( ret, "got %lu\n", GetLastError() ); HeapFree( GetProcessHeap(), 0, priv_prev );
/* handle created without ACCESS_SYSTEM_SECURITY, privilege not held */ res = RegCreateKeyExW( HKEY_LOCAL_MACHINE, testkeyW, 0, NULL, 0, KEY_READ, NULL, &hkey, NULL ); - ok( res == ERROR_SUCCESS, "got %d\n", res ); + ok( res == ERROR_SUCCESS, "got %ld\n", res );
err = GetSecurityInfo( hkey, SE_REGISTRY_KEY, SACL_SECURITY_INFORMATION, NULL, NULL, NULL, &sacl, &sd ); - ok( err == ERROR_PRIVILEGE_NOT_HELD || err == ERROR_ACCESS_DENIED, "got %u\n", err ); + ok( err == ERROR_PRIVILEGE_NOT_HELD || err == ERROR_ACCESS_DENIED, "got %lu\n", err ); RegCloseKey( hkey );
res = RegDeleteKeyW( HKEY_LOCAL_MACHINE, testkeyW ); - ok( !res, "got %d\n", res ); + ok( !res, "got %ld\n", res ); CloseHandle( token ); }
@@ -6810,46 +6810,46 @@ static void test_GetWindowsAccountDomainSid(void)
bret = GetTokenInformation(token, TokenUser, NULL, 0, &sid_size); ok(!bret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); user = HeapAlloc(GetProcessHeap(), 0, sid_size); bret = GetTokenInformation(token, TokenUser, user, sid_size, &sid_size); - ok(bret, "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + ok(bret, "GetTokenInformation(TokenUser) failed with error %ld\n", GetLastError()); CloseHandle(token); user_sid = ((TOKEN_USER *)user)->User.Sid;
SetLastError(0xdeadbeef); bret = pGetWindowsAccountDomainSid(0, 0, 0); ok(!bret, "GetWindowsAccountDomainSid succeeded\n"); - ok(GetLastError() == ERROR_INVALID_SID, "expected ERROR_INVALID_SID, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_SID, "expected ERROR_INVALID_SID, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); bret = pGetWindowsAccountDomainSid(user_sid, 0, 0); ok(!bret, "GetWindowsAccountDomainSid succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
sid_size = SECURITY_MAX_SID_SIZE; SetLastError(0xdeadbeef); bret = pGetWindowsAccountDomainSid(user_sid, 0, &sid_size); ok(!bret, "GetWindowsAccountDomainSid succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ok(sid_size == GetSidLengthRequired(4), "expected size %d, got %d\n", GetSidLengthRequired(4), sid_size); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); + ok(sid_size == GetSidLengthRequired(4), "expected size %ld, got %ld\n", GetSidLengthRequired(4), sid_size);
SetLastError(0xdeadbeef); bret = pGetWindowsAccountDomainSid(user_sid, domain_sid, 0); ok(!bret, "GetWindowsAccountDomainSid succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
sid_size = 1; SetLastError(0xdeadbeef); bret = pGetWindowsAccountDomainSid(user_sid, domain_sid, &sid_size); ok(!bret, "GetWindowsAccountDomainSid succeeded\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size == GetSidLengthRequired(4), "expected size %d, got %d\n", GetSidLengthRequired(4), sid_size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(sid_size == GetSidLengthRequired(4), "expected size %ld, got %ld\n", GetSidLengthRequired(4), sid_size);
sid_size = SECURITY_MAX_SID_SIZE; bret = pGetWindowsAccountDomainSid(user_sid, domain_sid, &sid_size); - ok(bret, "GetWindowsAccountDomainSid failed with error %d\n", GetLastError()); - ok(sid_size == GetSidLengthRequired(4), "expected size %d, got %d\n", GetSidLengthRequired(4), sid_size); + ok(bret, "GetWindowsAccountDomainSid failed with error %ld\n", GetLastError()); + ok(sid_size == GetSidLengthRequired(4), "expected size %ld, got %ld\n", GetSidLengthRequired(4), sid_size); InitializeSid(domain_sid2, &domain_ident, 4); for (i = 0; i < 4; i++) *GetSidSubAuthority(domain_sid2, i) = *GetSidSubAuthority(user_sid, i); @@ -6879,12 +6879,12 @@ static void test_GetSidIdentifierAuthority(void) SetLastError(0xdeadbeef); id = GetSidIdentifierAuthority(authority_sid); ok(id != NULL, "got NULL pointer as identifier authority\n"); - ok(GetLastError() == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); id = GetSidIdentifierAuthority(NULL); ok(id != NULL, "got NULL pointer as identifier authority\n"); - ok(GetLastError() == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", GetLastError()); }
static void test_pseudo_tokens(void) @@ -6895,10 +6895,10 @@ static void test_pseudo_tokens(void) BOOL ret;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); - ok(ret, "OpenProcessToken failed with error %u\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %lu\n", GetLastError()); memset(&statistics1, 0x11, sizeof(statistics1)); ret = GetTokenInformation(token, TokenStatistics, &statistics1, sizeof(statistics1), &retlen); - ok(ret, "GetTokenInformation failed with %u\n", GetLastError()); + ok(ret, "GetTokenInformation failed with %lu\n", GetLastError()); CloseHandle(token);
/* test GetCurrentProcessToken() */ @@ -6907,7 +6907,7 @@ static void test_pseudo_tokens(void) ret = GetTokenInformation(GetCurrentProcessToken(), TokenStatistics, &statistics2, sizeof(statistics2), &retlen); ok(ret || broken(GetLastError() == ERROR_INVALID_HANDLE), - "GetTokenInformation failed with %u\n", GetLastError()); + "GetTokenInformation failed with %lu\n", GetLastError()); if (ret) ok(!memcmp(&statistics1, &statistics2, sizeof(statistics1)), "Token statistics do not match\n"); else @@ -6919,7 +6919,7 @@ static void test_pseudo_tokens(void) ret = GetTokenInformation(GetCurrentThreadEffectiveToken(), TokenStatistics, &statistics2, sizeof(statistics2), &retlen); ok(ret || broken(GetLastError() == ERROR_INVALID_HANDLE), - "GetTokenInformation failed with %u\n", GetLastError()); + "GetTokenInformation failed with %lu\n", GetLastError()); if (ret) ok(!memcmp(&statistics1, &statistics2, sizeof(statistics1)), "Token statistics do not match\n"); else @@ -6928,14 +6928,14 @@ static void test_pseudo_tokens(void) SetLastError(0xdeadbeef); ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, TRUE, &token); ok(!ret, "OpenThreadToken should have failed\n"); - ok(GetLastError() == ERROR_NO_TOKEN, "Expected ERROR_NO_TOKEN, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_NO_TOKEN, "Expected ERROR_NO_TOKEN, got %lu\n", GetLastError());
/* test GetCurrentThreadToken() */ SetLastError(0xdeadbeef); ret = GetTokenInformation(GetCurrentThreadToken(), TokenStatistics, &statistics2, sizeof(statistics2), &retlen); todo_wine ok(GetLastError() == ERROR_NO_TOKEN || broken(GetLastError() == ERROR_INVALID_HANDLE), - "Expected ERROR_NO_TOKEN, got %u\n", GetLastError()); + "Expected ERROR_NO_TOKEN, got %lu\n", GetLastError()); }
static void test_maximum_allowed(void) @@ -6958,21 +6958,21 @@ static void test_maximum_allowed(void) }
ret = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); - ok(ret, "InitializeSecurityDescriptor failed with %u\n", GetLastError()); + ok(ret, "InitializeSecurityDescriptor failed with %lu\n", GetLastError()); memset(buffer_acl, 0, sizeof(buffer_acl)); ret = InitializeAcl(acl, 256, ACL_REVISION); - ok(ret, "InitializeAcl failed with %u\n", GetLastError()); + ok(ret, "InitializeAcl failed with %lu\n", GetLastError()); ret = SetSecurityDescriptorDacl(sd, TRUE, acl, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with %u\n", GetLastError()); + ok(ret, "SetSecurityDescriptorDacl failed with %lu\n", GetLastError());
sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = sd; sa.bInheritHandle = FALSE;
handle = pCreateEventExA(&sa, NULL, 0, MAXIMUM_ALLOWED | 0x4); - ok(handle != NULL, "CreateEventExA failed with error %u\n", GetLastError()); + ok(handle != NULL, "CreateEventExA failed with error %lu\n", GetLastError()); mask = get_obj_access(handle); - ok(mask == EVENT_ALL_ACCESS, "Expected %x, got %x\n", EVENT_ALL_ACCESS, mask); + ok(mask == EVENT_ALL_ACCESS, "Expected %x, got %lx\n", EVENT_ALL_ACCESS, mask); CloseHandle(handle); }
@@ -6999,51 +6999,51 @@ static void test_token_label(void) }
ret = OpenProcessToken(GetCurrentProcess(), READ_CONTROL | WRITE_OWNER, &token); - ok(ret, "OpenProcessToken failed with error %u\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(token, LABEL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(token, LABEL_SECURITY_INFORMATION, sd, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
ret = GetSecurityDescriptorControl(sd, &control, &revision); - ok(ret, "GetSecurityDescriptorControl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorControl failed with error %lu\n", GetLastError()); todo_wine ok(control == (SE_SELF_RELATIVE | SE_SACL_AUTO_INHERITED | SE_SACL_PRESENT), "Unexpected security descriptor control %#x\n", control); - ok(revision == 1, "Unexpected security descriptor revision %u\n", revision); + ok(revision == 1, "Unexpected security descriptor revision %lu\n", revision);
sid = (void *)0xdeadbeef; defaulted = TRUE; ret = GetSecurityDescriptorOwner(sd, (void **)&sid, &defaulted); - ok(ret, "GetSecurityDescriptorOwner failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorOwner failed with error %lu\n", GetLastError()); ok(!sid, "Owner present\n"); ok(!defaulted, "Owner defaulted\n");
sid = (void *)0xdeadbeef; defaulted = TRUE; ret = GetSecurityDescriptorGroup(sd, (void **)&sid, &defaulted); - ok(ret, "GetSecurityDescriptorGroup failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorGroup failed with error %lu\n", GetLastError()); ok(!sid, "Group present\n"); ok(!defaulted, "Group defaulted\n");
ret = GetSecurityDescriptorSacl(sd, &present, &sacl, &defaulted); - ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorSacl failed with error %lu\n", GetLastError()); ok(present, "No SACL in the security descriptor\n"); ok(!!sacl, "NULL SACL in the security descriptor\n"); ok(!defaulted, "SACL defaulted\n"); ok(sacl->AceCount == 1, "SACL contains an unexpected ACE count %u\n", sacl->AceCount);
ret = GetAce(sacl, 0, (void **)&ace); - ok(ret, "GetAce failed with error %u\n", GetLastError()); + ok(ret, "GetAce failed with error %lu\n", GetLastError());
ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE, "Unexpected ACE type %#x\n", ace->Header.AceType); ok(!ace->Header.AceFlags, "Unexpected ACE flags %#x\n", ace->Header.AceFlags); ok(ace->Header.AceSize, "Unexpected ACE size %u\n", ace->Header.AceSize); - ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, "Unexpected ACE mask %#x\n", ace->Mask); + ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, "Unexpected ACE mask %#lx\n", ace->Mask);
sid = (SID *)&ace->SidStart; ConvertSidToStringSidA(sid, &str); @@ -7051,7 +7051,7 @@ static void test_token_label(void) LocalFree(str);
ret = GetSecurityDescriptorDacl(sd, &present, &dacl, &defaulted); - ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorDacl failed with error %lu\n", GetLastError()); todo_wine ok(!present, "DACL present\n");
HeapFree(GetProcessHeap(), 0, sd); @@ -7084,51 +7084,51 @@ static void test_token_security_descriptor(void)
/* Test whether we can create tokens with security descriptors */ ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &token); - ok(ret, "OpenProcessToken failed with error %u\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %lu\n", GetLastError());
ret = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); - ok(ret, "InitializeSecurityDescriptor failed with error %u\n", GetLastError()); + ok(ret, "InitializeSecurityDescriptor failed with error %lu\n", GetLastError());
memset(buffer_acl, 0, sizeof(buffer_acl)); ret = InitializeAcl(acl, 256, ACL_REVISION); - ok(ret, "InitializeAcl failed with error %u\n", GetLastError()); + ok(ret, "InitializeAcl failed with error %lu\n", GetLastError());
ret = ConvertStringSidToSidA("S-1-5-6", &psid); - ok(ret, "ConvertStringSidToSidA failed with error %u\n", GetLastError()); + ok(ret, "ConvertStringSidToSidA failed with error %lu\n", GetLastError());
ret = pAddAccessAllowedAceEx(acl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE, GENERIC_ALL, psid); - ok(ret, "AddAccessAllowedAceEx failed with error %u\n", GetLastError()); + ok(ret, "AddAccessAllowedAceEx failed with error %lu\n", GetLastError());
ret = SetSecurityDescriptorDacl(sd, TRUE, acl, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with error %u\n", GetLastError()); + ok(ret, "SetSecurityDescriptorDacl failed with error %lu\n", GetLastError());
sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = sd; sa.bInheritHandle = FALSE;
ret = pDuplicateTokenEx(token, MAXIMUM_ALLOWED, &sa, SecurityImpersonation, TokenImpersonation, &token2); - ok(ret, "DuplicateTokenEx failed with error %u\n", GetLastError()); + ok(ret, "DuplicateTokenEx failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(token2, DACL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(token2, DACL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
acl2 = (void *)0xdeadbeef; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorDacl(sd2, &present, &acl2, &defaulted); - ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorDacl failed with error %lu\n", GetLastError()); ok(present, "acl2 not present\n"); ok(acl2 != (void *)0xdeadbeef, "acl2 not set\n"); ok(acl2->AceCount == 1, "Expected 1 ACE, got %d\n", acl2->AceCount); ok(!defaulted, "acl2 defaulted\n");
ret = GetAce(acl2, 0, (void **)&ace); - ok(ret, "GetAce failed with error %u\n", GetLastError()); + ok(ret, "GetAce failed with error %lu\n", GetLastError()); ok(ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "Unexpected ACE type %#x\n", ace->Header.AceType); ok(EqualSid(&ace->SidStart, psid), "Expected access allowed ACE\n"); ok(ace->Header.AceFlags == NO_PROPAGATE_INHERIT_ACE, @@ -7139,21 +7139,21 @@ static void test_token_security_descriptor(void) /* Duplicate token without security attributes. * Tokens do not inherit the security descriptor in DuplicateToken. */ ret = pDuplicateTokenEx(token2, MAXIMUM_ALLOWED, NULL, SecurityImpersonation, TokenImpersonation, &token3); - ok(ret, "DuplicateTokenEx failed with error %u\n", GetLastError()); + ok(ret, "DuplicateTokenEx failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(token3, DACL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(token3, DACL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
acl2 = (void *)0xdeadbeef; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorDacl(sd2, &present, &acl2, &defaulted); - ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorDacl failed with error %lu\n", GetLastError()); todo_wine ok(present, "DACL not present\n");
@@ -7178,17 +7178,17 @@ static void test_token_security_descriptor(void) * the parent but not the DACL of the token */ ret = GetKernelObjectSecurity(token, DACL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd2 = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(token, DACL_SECURITY_INFORMATION, sd2, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
acl2 = (void *)0xdeadbeef; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorDacl(sd2, &present, &acl2, &defaulted); - ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorDacl failed with error %lu\n", GetLastError()); ok(present, "DACL not present\n"); ok(acl2 != (void *)0xdeadbeef, "DACL not set\n"); ok(!defaulted, "DACL defaulted\n"); @@ -7203,36 +7203,36 @@ static void test_token_security_descriptor(void) exp_access.Trustee.ptstrName = (void*)psid;
retd = pSetEntriesInAclW(1, &exp_access, acl2, &acl_child); - ok(retd == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", retd); + ok(retd == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", retd);
memset(sd, 0, sizeof(buffer_sd)); ret = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); - ok(ret, "InitializeSecurityDescriptor failed with error %u\n", GetLastError()); + ok(ret, "InitializeSecurityDescriptor failed with error %lu\n", GetLastError());
ret = SetSecurityDescriptorDacl(sd, TRUE, acl_child, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with error %u\n", GetLastError()); + ok(ret, "SetSecurityDescriptorDacl failed with error %lu\n", GetLastError());
ret = SetKernelObjectSecurity(token, DACL_SECURITY_INFORMATION, sd); - ok(ret, "SetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "SetKernelObjectSecurity failed with error %lu\n", GetLastError());
/* The security label is also not inherited */ if (pAddMandatoryAce) { ret = InitializeAcl(acl, 256, ACL_REVISION); - ok(ret, "InitializeAcl failed with error %u\n", GetLastError()); + ok(ret, "InitializeAcl failed with error %lu\n", GetLastError());
ret = pAddMandatoryAce(acl, ACL_REVISION, 0, SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, &low_level); - ok(ret, "AddMandatoryAce failed with error %u\n", GetLastError()); + ok(ret, "AddMandatoryAce failed with error %lu\n", GetLastError());
memset(sd, 0, sizeof(buffer_sd)); ret = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); - ok(ret, "InitializeSecurityDescriptor failed with error %u\n", GetLastError()); + ok(ret, "InitializeSecurityDescriptor failed with error %lu\n", GetLastError());
ret = SetSecurityDescriptorSacl(sd, TRUE, acl, FALSE); - ok(ret, "SetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "SetSecurityDescriptorSacl failed with error %lu\n", GetLastError());
ret = SetKernelObjectSecurity(token, LABEL_SECURITY_INFORMATION, sd); - ok(ret, "SetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "SetKernelObjectSecurity failed with error %lu\n", GetLastError()); } else win_skip("SYSTEM_MANDATORY_LABEL not supported\n"); @@ -7245,7 +7245,7 @@ static void test_token_security_descriptor(void)
sprintf(buffer, "%s security test_token_sd", myARGV[0]); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess failed with error %u\n", GetLastError()); + ok(ret, "CreateProcess failed with error %lu\n", GetLastError()); wait_child_process(info.hProcess); CloseHandle(info.hProcess); CloseHandle(info.hThread); @@ -7273,24 +7273,24 @@ static void test_child_token_sd(void) ACL *acl;
ret = ConvertStringSidToSidA("S-1-5-6", &psid); - ok(ret, "ConvertStringSidToSidA failed with error %u\n", GetLastError()); + ok(ret, "ConvertStringSidToSidA failed with error %lu\n", GetLastError());
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &token); - ok(ret, "OpenProcessToken failed with error %u\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(token, DACL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(token, DACL_SECURITY_INFORMATION, sd, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
acl = NULL; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorDacl(sd, &present, &acl, &defaulted); - ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorDacl failed with error %lu\n", GetLastError()); ok(present, "DACL not present\n"); ok(acl && acl != (void *)0xdeadbeef, "Got invalid DACL\n"); ok(!defaulted, "DACL defaulted\n"); @@ -7299,7 +7299,7 @@ static void test_child_token_sd(void) for (i = 0; i < acl->AceCount; i++) { ret = GetAce(acl, i, (void **)&acc_ace); - ok(ret, "GetAce failed with error %u\n", GetLastError()); + ok(ret, "GetAce failed with error %lu\n", GetLastError()); ok(acc_ace->Header.AceType != ACCESS_ALLOWED_ACE_TYPE || !EqualSid(&acc_ace->SidStart, psid), "ACE inherited from the parent\n"); } @@ -7315,23 +7315,23 @@ static void test_child_token_sd(void)
ret = GetKernelObjectSecurity(token, LABEL_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Unexpected GetKernelObjectSecurity return value %d, error %u\n", ret, GetLastError()); + "Unexpected GetKernelObjectSecurity return value %d, error %lu\n", ret, GetLastError());
sd = HeapAlloc(GetProcessHeap(), 0, size); ret = GetKernelObjectSecurity(token, LABEL_SECURITY_INFORMATION, sd, size, &size); - ok(ret, "GetKernelObjectSecurity failed with error %u\n", GetLastError()); + ok(ret, "GetKernelObjectSecurity failed with error %lu\n", GetLastError());
acl = NULL; present = FALSE; defaulted = TRUE; ret = GetSecurityDescriptorSacl(sd, &present, &acl, &defaulted); - ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorSacl failed with error %lu\n", GetLastError()); ok(present, "SACL not present\n"); ok(acl && acl != (void *)0xdeadbeef, "Got invalid SACL\n"); ok(!defaulted, "SACL defaulted\n"); ok(acl->AceCount == 1, "Expected exactly one ACE\n"); ret = GetAce(acl, 0, (void **)&ace_label); - ok(ret, "GetAce failed with error %u\n", GetLastError()); + ok(ret, "GetAce failed with error %lu\n", GetLastError()); ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE, "Unexpected ACE type %#x\n", ace_label->Header.AceType); ok(!EqualSid(&ace_label->SidStart, &low_level), @@ -7372,26 +7372,26 @@ static void test_GetExplicitEntriesFromAclW(void) HeapFree(GetProcessHeap(), 0, old_acl); return; } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); + ok(res, "InitializeAcl failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid(&SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &everyone_sid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
res = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &users_sid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + ok(res, "AllocateAndInitializeSid failed with error %ld\n", GetLastError());
res = AddAccessAllowedAce(old_acl, ACL_REVISION, KEY_READ, users_sid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessAllowedAce failed with error %ld\n", GetLastError());
access2 = NULL; res = pGetExplicitEntriesFromAclW(old_acl, &count, &access2); - ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); - ok(count == 1, "Expected count == 1, got %d\n", count); + ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %ld\n", GetLastError()); + ok(count == 1, "Expected count == 1, got %ld\n", count); ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); - ok(access2[0].grfAccessPermissions == KEY_READ, "Expected KEY_READ, got %d\n", access2[0].grfAccessPermissions); + ok(access2[0].grfAccessPermissions == KEY_READ, "Expected KEY_READ, got %ld\n", access2[0].grfAccessPermissions); ok(access2[0].Trustee.TrusteeForm == TRUSTEE_IS_SID, "Expected SID trustee, got %d\n", access2[0].Trustee.TrusteeForm); - ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %x\n", access2[0].grfInheritance); + ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %lx\n", access2[0].grfInheritance); ok(EqualSid(access2[0].Trustee.ptstrName, users_sid), "Expected equal SIDs\n"); LocalFree(access2);
@@ -7405,38 +7405,38 @@ static void test_GetExplicitEntriesFromAclW(void) access.Trustee.TrusteeForm = TRUSTEE_IS_SID; access.Trustee.ptstrName = everyone_sid; res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(new_acl != NULL, "returned acl was NULL\n");
access2 = NULL; res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); - ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); - ok(count == 2, "Expected count == 2, got %d\n", count); + ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %ld\n", GetLastError()); + ok(count == 2, "Expected count == 2, got %ld\n", count); ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); - ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %d\n", access2[0].grfAccessPermissions); + ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %ld\n", access2[0].grfAccessPermissions); ok(access2[0].Trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "Expected TRUSTEE_IS_UNKNOWN trustee type, got %d\n", access2[0].Trustee.TrusteeType); ok(access2[0].Trustee.TrusteeForm == TRUSTEE_IS_SID, "Expected SID trustee, got %d\n", access2[0].Trustee.TrusteeForm); - ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %x\n", access2[0].grfInheritance); + ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %lx\n", access2[0].grfInheritance); ok(EqualSid(access2[0].Trustee.ptstrName, everyone_sid), "Expected equal SIDs\n"); LocalFree(access2); LocalFree(new_acl);
access.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(new_acl != NULL, "returned acl was NULL\n");
access2 = NULL; res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); - ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); - ok(count == 2, "Expected count == 2, got %d\n", count); + ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %ld\n", GetLastError()); + ok(count == 2, "Expected count == 2, got %ld\n", count); ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); - ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %d\n", access2[0].grfAccessPermissions); + ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %ld\n", access2[0].grfAccessPermissions); ok(access2[0].Trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "Expected TRUSTEE_IS_UNKNOWN trustee type, got %d\n", access2[0].Trustee.TrusteeType); ok(access2[0].Trustee.TrusteeForm == TRUSTEE_IS_SID, "Expected SID trustee, got %d\n", access2[0].Trustee.TrusteeForm); - ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %x\n", access2[0].grfInheritance); + ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %lx\n", access2[0].grfInheritance); ok(EqualSid(access2[0].Trustee.ptstrName, everyone_sid), "Expected equal SIDs\n"); LocalFree(access2); LocalFree(new_acl); @@ -7444,19 +7444,19 @@ static void test_GetExplicitEntriesFromAclW(void) access.Trustee.TrusteeForm = TRUSTEE_IS_NAME; access.Trustee.ptstrName = (LPWSTR)wszCurrentUser; res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(new_acl != NULL, "returned acl was NULL\n");
access2 = NULL; res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); - ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); - ok(count == 2, "Expected count == 2, got %d\n", count); + ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %ld\n", GetLastError()); + ok(count == 2, "Expected count == 2, got %ld\n", count); ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); - ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %d\n", access2[0].grfAccessPermissions); + ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %ld\n", access2[0].grfAccessPermissions); ok(access2[0].Trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "Expected TRUSTEE_IS_UNKNOWN trustee type, got %d\n", access2[0].Trustee.TrusteeType); ok(access2[0].Trustee.TrusteeForm == TRUSTEE_IS_SID, "Expected SID trustee, got %d\n", access2[0].Trustee.TrusteeForm); - ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %x\n", access2[0].grfInheritance); + ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %lx\n", access2[0].grfInheritance); LocalFree(access2); LocalFree(new_acl);
@@ -7464,39 +7464,39 @@ static void test_GetExplicitEntriesFromAclW(void) access.Trustee.TrusteeForm = TRUSTEE_IS_SID; access.Trustee.ptstrName = users_sid; res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(new_acl != NULL, "returned acl was NULL\n");
access2 = (void *)0xdeadbeef; res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); - ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); - ok(count == 0, "Expected count == 0, got %d\n", count); + ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %ld\n", GetLastError()); + ok(count == 0, "Expected count == 0, got %ld\n", count); ok(access2 == NULL, "access2 was not NULL\n"); LocalFree(new_acl);
/* Make the ACL both Allow and Deny Everyone. */ res = AddAccessAllowedAce(old_acl, ACL_REVISION, KEY_READ, everyone_sid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessAllowedAce failed with error %ld\n", GetLastError()); res = AddAccessDeniedAce(old_acl, ACL_REVISION, KEY_WRITE, everyone_sid); - ok(res, "AddAccessDeniedAce failed with error %d\n", GetLastError()); + ok(res, "AddAccessDeniedAce failed with error %ld\n", GetLastError()); /* Revoke Everyone. */ access.Trustee.ptstrName = everyone_sid; access.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; access.grfAccessPermissions = 0; new_acl = NULL; res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %lu\n", res); ok(new_acl != NULL, "returned acl was NULL\n"); /* Deny Everyone should remain (along with Grant Users from earlier). */ access2 = NULL; res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); - ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); - ok(count == 2, "Expected count == 2, got %d\n", count); + ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %ld\n", GetLastError()); + ok(count == 2, "Expected count == 2, got %ld\n", count); ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); - ok(access2[0].grfAccessPermissions == KEY_READ , "Expected KEY_READ, got %d\n", access2[0].grfAccessPermissions); + ok(access2[0].grfAccessPermissions == KEY_READ , "Expected KEY_READ, got %ld\n", access2[0].grfAccessPermissions); ok(EqualSid(access2[0].Trustee.ptstrName, users_sid), "Expected equal SIDs\n"); ok(access2[1].grfAccessMode == DENY_ACCESS, "Expected DENY_ACCESS, got %d\n", access2[1].grfAccessMode); - ok(access2[1].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %d\n", access2[1].grfAccessPermissions); + ok(access2[1].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %ld\n", access2[1].grfAccessPermissions); ok(EqualSid(access2[1].Trustee.ptstrName, everyone_sid), "Expected equal SIDs\n"); LocalFree(access2);
@@ -7519,24 +7519,24 @@ static void test_BuildSecurityDescriptorW(void) buf_size = sizeof(buf); rel_sd = (SECURITY_DESCRIPTOR *)buf; success = MakeSelfRelativeSD(&old_sd, rel_sd, &buf_size); - ok(success, "MakeSelfRelativeSD failed with %u\n", GetLastError()); + ok(success, "MakeSelfRelativeSD failed with %lu\n", GetLastError());
new_sd = NULL; new_sd_size = 0; ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, NULL, &new_sd_size, (void **)&new_sd); - ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %u\n", ret); + ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %lu\n", ret); ok(new_sd != NULL, "expected new_sd != NULL\n"); LocalFree(new_sd);
new_sd = (void *)0xdeadbeef; ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, &old_sd, &new_sd_size, (void **)&new_sd); - ok(ret == ERROR_INVALID_SECURITY_DESCR, "expected ERROR_INVALID_SECURITY_DESCR, got %u\n", ret); + ok(ret == ERROR_INVALID_SECURITY_DESCR, "expected ERROR_INVALID_SECURITY_DESCR, got %lu\n", ret); ok(new_sd == (void *)0xdeadbeef, "expected new_sd == 0xdeadbeef, got %p\n", new_sd);
new_sd = NULL; new_sd_size = 0; ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, rel_sd, &new_sd_size, (void **)&new_sd); - ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %u\n", ret); + ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %lu\n", ret); ok(new_sd != NULL, "expected new_sd != NULL\n"); LocalFree(new_sd); } @@ -7557,17 +7557,17 @@ static void test_EqualDomainSid(void) }
ret = AllocateAndInitializeSid(&ident, 6, SECURITY_NT_NON_UNIQUE, 12, 23, 34, 45, 56, 0, 0, &domainsid); - ok(ret, "AllocateAndInitializeSid error %u\n", GetLastError()); + ok(ret, "AllocateAndInitializeSid error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pEqualDomainSid(NULL, NULL, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_SID, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_SID, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pEqualDomainSid(domainsid, domainsid, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(well_known_sid_values); i++) { @@ -7586,24 +7586,24 @@ static void test_EqualDomainSid(void) if (pisid->SubAuthority[0] != SECURITY_BUILTIN_DOMAIN_RID) { ok(!ret, "%u: got %d\n", i, ret); - ok(GetLastError() == ERROR_NON_DOMAIN_SID, "%u: got %u\n", i, GetLastError()); + ok(GetLastError() == ERROR_NON_DOMAIN_SID, "%u: got %lu\n", i, GetLastError()); ok(equal == 0xdeadbeef, "%u: got %d\n", i, equal); continue; }
ok(ret, "%u: got %d\n", i, ret); - ok(GetLastError() == 0, "%u: got %u\n", i, GetLastError()); + ok(GetLastError() == 0, "%u: got %lu\n", i, GetLastError()); ok(equal == 0, "%u: got %d\n", i, equal);
size = sizeof(sid_buffer2); ret = CreateWellKnownSid(i, well_known_sid_values[i].without_domain ? NULL : domainsid, sid2, &size); - ok(ret, "%u: CreateWellKnownSid error %u\n", i, GetLastError()); + ok(ret, "%u: CreateWellKnownSid error %lu\n", i, GetLastError());
equal = 0xdeadbeef; SetLastError(0xdeadbeef); ret = pEqualDomainSid(sid, sid2, &equal); ok(ret, "%u: got %d\n", i, ret); - ok(GetLastError() == 0, "%u: got %u\n", i, GetLastError()); + ok(GetLastError() == 0, "%u: got %lu\n", i, GetLastError()); ok(equal == 1, "%u: got %d\n", i, equal); }
@@ -7616,16 +7616,16 @@ static DWORD WINAPI duplicate_handle_access_thread(void *arg) BOOL ret;
event2 = OpenEventA(SYNCHRONIZE, FALSE, "test_dup"); - ok(!!event2, "got error %u\n", GetLastError()); + ok(!!event2, "got error %lu\n", GetLastError()); CloseHandle(event2);
event2 = OpenEventA(EVENT_MODIFY_STATE, FALSE, "test_dup"); - ok(!!event2, "got error %u\n", GetLastError()); + ok(!!event2, "got error %lu\n", GetLastError()); CloseHandle(event2);
ret = DuplicateHandle(GetCurrentProcess(), event, GetCurrentProcess(), &event2, EVENT_MODIFY_STATE, FALSE, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); CloseHandle(event2);
return 0; @@ -7652,95 +7652,95 @@ static void test_duplicate_handle_access(void) */
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, &token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
size = sizeof(everyone_sid_buffer); ret = CreateWellKnownSid(WinWorldSid, NULL, everyone_sid, &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); size = sizeof(local_sid_buffer); ret = CreateWellKnownSid(WinLocalSid, NULL, local_sid, &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
InitializeAcl(acl, sizeof(acl_buffer), ACL_REVISION); ret = AddAccessAllowedAce(acl, ACL_REVISION, SYNCHRONIZE, everyone_sid); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); ret = AddAccessAllowedAce(acl, ACL_REVISION, EVENT_MODIFY_STATE, local_sid); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); ret = SetSecurityDescriptorDacl(&sd, TRUE, acl, FALSE); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); sa.lpSecurityDescriptor = &sd;
sid_attr.Sid = local_sid; sid_attr.Attributes = 0; ret = CreateRestrictedToken(token, 0, 1, &sid_attr, 0, NULL, 0, NULL, &restricted); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = DuplicateTokenEx(restricted, TOKEN_IMPERSONATE, NULL, SecurityImpersonation, TokenImpersonation, &impersonation); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
all_event = CreateEventA(&sa, TRUE, TRUE, "test_dup"); - ok(!!all_event, "got error %u\n", GetLastError()); + ok(!!all_event, "got error %lu\n", GetLastError()); sync_event = OpenEventA(SYNCHRONIZE, FALSE, "test_dup"); - ok(!!sync_event, "got error %u\n", GetLastError()); + ok(!!sync_event, "got error %lu\n", GetLastError());
event2 = OpenEventA(SYNCHRONIZE, FALSE, "test_dup"); - ok(!!event2, "got error %u\n", GetLastError()); + ok(!!event2, "got error %lu\n", GetLastError()); CloseHandle(event2);
event2 = OpenEventA(EVENT_MODIFY_STATE, FALSE, "test_dup"); - ok(!!event2, "got error %u\n", GetLastError()); + ok(!!event2, "got error %lu\n", GetLastError()); CloseHandle(event2);
ret = DuplicateHandle(GetCurrentProcess(), all_event, GetCurrentProcess(), &event2, EVENT_MODIFY_STATE, FALSE, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); CloseHandle(event2);
ret = DuplicateHandle(GetCurrentProcess(), sync_event, GetCurrentProcess(), &event2, EVENT_MODIFY_STATE, FALSE, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); CloseHandle(event2);
ret = SetThreadToken(NULL, impersonation); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
thread = CreateThread(NULL, 0, duplicate_handle_access_thread, sync_event, 0, NULL); ret = WaitForSingleObject(thread, 1000); ok(!ret, "wait failed\n");
event2 = OpenEventA(SYNCHRONIZE, FALSE, "test_dup"); - ok(!!event2, "got error %u\n", GetLastError()); + ok(!!event2, "got error %lu\n", GetLastError()); CloseHandle(event2);
SetLastError(0xdeadbeef); event2 = OpenEventA(EVENT_MODIFY_STATE, FALSE, "test_dup"); ok(!event2, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
ret = DuplicateHandle(GetCurrentProcess(), all_event, GetCurrentProcess(), &event2, EVENT_MODIFY_STATE, FALSE, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); CloseHandle(event2);
SetLastError(0xdeadbeef); ret = DuplicateHandle(GetCurrentProcess(), sync_event, GetCurrentProcess(), &event2, EVENT_MODIFY_STATE, FALSE, 0); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
ret = RevertToSelf(); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
- sprintf(cmdline, "%s security duplicate %Iu %u %Iu", myARGV[0], + sprintf(cmdline, "%s security duplicate %Iu %lu %Iu", myARGV[0], (ULONG_PTR)sync_event, GetCurrentProcessId(), (ULONG_PTR)impersonation ); ret = CreateProcessAsUserA(restricted, NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = DuplicateHandle(GetCurrentProcess(), all_event, pi.hProcess, &event2, EVENT_MODIFY_STATE, FALSE, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = DuplicateHandle(GetCurrentProcess(), sync_event, pi.hProcess, &event2, EVENT_MODIFY_STATE, FALSE, 0); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
ret = WaitForSingleObject(pi.hProcess, 1000); ok(!ret, "wait failed\n"); @@ -7759,43 +7759,43 @@ static void test_duplicate_handle_access_child(void)
event = (HANDLE)(ULONG_PTR)_atoi64(myARGV[3]); process = OpenProcess(PROCESS_DUP_HANDLE, FALSE, atoi(myARGV[4])); - ok(!!process, "failed to open process, error %u\n", GetLastError()); + ok(!!process, "failed to open process, error %lu\n", GetLastError());
event2 = OpenEventA(SYNCHRONIZE, FALSE, "test_dup"); - ok(!!event2, "got error %u\n", GetLastError()); + ok(!!event2, "got error %lu\n", GetLastError()); CloseHandle(event2);
SetLastError(0xdeadbeef); event2 = OpenEventA(EVENT_MODIFY_STATE, FALSE, "test_dup"); ok(!event2, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
ret = DuplicateHandle(process, event, process, &event2, EVENT_MODIFY_STATE, FALSE, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = DuplicateHandle(process, event, GetCurrentProcess(), &event2, EVENT_MODIFY_STATE, FALSE, 0); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
ret = DuplicateHandle(process, (HANDLE)(ULONG_PTR)_atoi64(myARGV[5]), GetCurrentProcess(), &token, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(ret, "failed to retrieve token, error %u\n", GetLastError()); + ok(ret, "failed to retrieve token, error %lu\n", GetLastError()); ret = SetThreadToken(NULL, token); - ok(ret, "failed to set thread token, error %u\n", GetLastError()); + ok(ret, "failed to set thread token, error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = DuplicateHandle(process, event, process, &event2, EVENT_MODIFY_STATE, FALSE, 0); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = DuplicateHandle(process, event, GetCurrentProcess(), &event2, EVENT_MODIFY_STATE, FALSE, 0); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
ret = RevertToSelf(); - ok(ret, "failed to revert, error %u\n", GetLastError()); + ok(ret, "failed to revert, error %lu\n", GetLastError()); CloseHandle(token); CloseHandle(process); } @@ -7825,58 +7825,58 @@ static void test_create_process_token(void)
size = sizeof(sid_buffer); ret = CreateWellKnownSid(WinLocalSid, NULL, sid, &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = InitializeAcl(acl, sizeof(acl_buffer), ACL_REVISION); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = AddAccessAllowedAce(acl, ACL_REVISION, EVENT_MODIFY_STATE, sid); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); ret = SetSecurityDescriptorDacl(&sd, TRUE, acl, FALSE); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); sa.lpSecurityDescriptor = &sd; event = CreateEventA(&sa, TRUE, TRUE, "test_event"); - ok(!!event, "got error %u\n", GetLastError()); + ok(!!event, "got error %lu\n", GetLastError());
sprintf(cmdline, "%s security restricted 0", myARGV[0]);
ret = CreateProcessAsUserA(NULL, NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); join_process(&pi);
ret = CreateProcessAsUserA(GetCurrentProcessToken(), NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); todo_wine ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError()); if (ret) join_process(&pi);
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, &token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = CreateProcessAsUserA(token, NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret || broken(GetLastError() == ERROR_ACCESS_DENIED) /* < 7 */, "got error %u\n", GetLastError()); + ok(ret || broken(GetLastError() == ERROR_ACCESS_DENIED) /* < 7 */, "got error %lu\n", GetLastError()); if (ret) join_process(&pi); CloseHandle(token);
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = CreateProcessAsUserA(token, NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError()); CloseHandle(token);
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_ASSIGN_PRIMARY, &token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = CreateProcessAsUserA(token, NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError()); CloseHandle(token);
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE, &token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = DuplicateTokenEx(token, TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, NULL, SecurityImpersonation, TokenImpersonation, &token2); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = CreateProcessAsUserA(token2, NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret || broken(GetLastError() == ERROR_BAD_TOKEN_TYPE) /* < 7 */, "got error %u\n", GetLastError()); + ok(ret || broken(GetLastError() == ERROR_BAD_TOKEN_TYPE) /* < 7 */, "got error %lu\n", GetLastError()); if (ret) join_process(&pi); CloseHandle(token2);
@@ -7884,9 +7884,9 @@ static void test_create_process_token(void) sid_attr.Sid = sid; sid_attr.Attributes = 0; ret = CreateRestrictedToken(token, 0, 1, &sid_attr, 0, NULL, 0, NULL, &token2); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = CreateProcessAsUserA(token2, NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); join_process(&pi); CloseHandle(token2);
@@ -7903,13 +7903,13 @@ static void test_create_process_token_child(void) event = OpenEventA(EVENT_MODIFY_STATE, FALSE, "test_event"); if (!atoi(myARGV[3])) { - ok(!!event, "got error %u\n", GetLastError()); + ok(!!event, "got error %lu\n", GetLastError()); CloseHandle(event); } else { ok(!event, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError()); } }
@@ -7933,17 +7933,17 @@ static void test_pseudo_handle_security(void) };
ret = GetKernelObjectSecurity(GetCurrentProcess(), OWNER_SECURITY_INFORMATION, &sd, sizeof(buffer), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(GetCurrentThread(), OWNER_SECURITY_INFORMATION, &sd, sizeof(buffer), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(keys); ++i) { SetLastError(0xdeadbeef); ret = GetKernelObjectSecurity(keys[i], OWNER_SECURITY_INFORMATION, &sd, sizeof(buffer), &size); ok(!ret, "key %p: expected failure\n", keys[i]); - ok(GetLastError() == ERROR_INVALID_HANDLE, "key %p: got error %u\n", keys[i], GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "key %p: got error %lu\n", keys[i], GetLastError());
ret = GetSecurityInfo(keys[i], SE_REGISTRY_KEY, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &sd_ptr); @@ -7968,25 +7968,25 @@ static void test_duplicate_token(void) BOOL ret;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_ADJUST_DEFAULT, &token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = DuplicateToken(token, SecurityAnonymous, &token2); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); TEST_GRANTED_ACCESS(token2, TOKEN_QUERY | TOKEN_IMPERSONATE); CloseHandle(token2);
ret = DuplicateTokenEx(token, 0, NULL, SecurityAnonymous, TokenPrimary, &token2); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); TEST_GRANTED_ACCESS(token2, TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_ADJUST_DEFAULT); CloseHandle(token2);
ret = DuplicateTokenEx(token, MAXIMUM_ALLOWED, NULL, SecurityAnonymous, TokenPrimary, &token2); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); TEST_GRANTED_ACCESS(token2, TOKEN_ALL_ACCESS); CloseHandle(token2);
ret = DuplicateTokenEx(token, TOKEN_QUERY_SOURCE, NULL, SecurityAnonymous, TokenPrimary, &token2); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); TEST_GRANTED_ACCESS(token2, TOKEN_QUERY_SOURCE); CloseHandle(token2);
@@ -8008,19 +8008,19 @@ static void test_GetKernelObjectSecurity(void) size = 0xdeadbeef; ret = GetKernelObjectSecurity(NULL, OWNER_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got error %u\n", GetLastError()); - ok(size == 0xdeadbeef, "got size %u\n", size); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError()); + ok(size == 0xdeadbeef, "got size %lu\n", size);
SetLastError(0xdeadbeef); ret = GetKernelObjectSecurity(GetCurrentProcess(), OWNER_SECURITY_INFORMATION, NULL, 0, NULL); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_NOACCESS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); size = 0xdeadbeef; ret = GetKernelObjectSecurity(GetCurrentProcess(), OWNER_SECURITY_INFORMATION, NULL, 0, &size); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %lu\n", GetLastError()); ok(size > 0 && size != 0xdeadbeef, "got size 0\n");
sd = malloc(size + 1); @@ -8028,14 +8028,14 @@ static void test_GetKernelObjectSecurity(void) SetLastError(0xdeadbeef); ret = GetKernelObjectSecurity(GetCurrentProcess(), OWNER_SECURITY_INFORMATION, sd, size - 1, &ret_size); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %u\n", GetLastError()); - ok(ret_size == size, "expected size %u, got %u\n", size, ret_size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %lu\n", GetLastError()); + ok(ret_size == size, "expected size %lu, got %lu\n", size, ret_size);
SetLastError(0xdeadbeef); ret = GetKernelObjectSecurity(GetCurrentProcess(), OWNER_SECURITY_INFORMATION, sd, size + 1, &ret_size); ok(ret, "expected success\n"); - ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); - ok(ret_size == size, "expected size %u, got %u\n", size, ret_size); + ok(GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError()); + ok(ret_size == size, "expected size %lu, got %lu\n", size, ret_size);
free(sd);
@@ -8045,37 +8045,37 @@ static void test_GetKernelObjectSecurity(void) SetLastError(0xdeadbeef); ret = GetKernelObjectSecurity(GetCurrentProcess(), 0x100000, NULL, 0, &size); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %lu\n", GetLastError());
sd = malloc(size); SetLastError(0xdeadbeef); ret = GetKernelObjectSecurity(GetCurrentProcess(), 0x100000, sd, size, &ret_size); ok(ret, "expected success\n"); - ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); - ok(ret_size == size, "expected size %u, got %u\n", size, ret_size); + ok(GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError()); + ok(ret_size == size, "expected size %lu, got %lu\n", size, ret_size);
ret = GetSecurityDescriptorControl(sd, &control, &revision); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); todo_wine ok(control == SE_SELF_RELATIVE, "got control %#x\n", control); - ok(revision == SECURITY_DESCRIPTOR_REVISION1, "got revision %u\n", revision); + ok(revision == SECURITY_DESCRIPTOR_REVISION1, "got revision %lu\n", revision);
ret = GetSecurityDescriptorOwner(sd, &sid, &defaulted); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!sid, "expected no owner SID\n"); ok(!defaulted, "expected owner not defaulted\n");
ret = GetSecurityDescriptorGroup(sd, &sid, &defaulted); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!sid, "expected no group SID\n"); ok(!defaulted, "expected group not defaulted\n");
ret = GetSecurityDescriptorDacl(sd, &present, &acl, &defaulted); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); todo_wine ok(!present, "expected no DACL present\n"); /* the descriptor is defaulted only on Windows >= 7 */
ret = GetSecurityDescriptorSacl(sd, &present, &acl, &defaulted); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!present, "expected no SACL present\n"); /* the descriptor is defaulted only on Windows >= 7 */
@@ -8089,9 +8089,9 @@ static void check_different_token(HANDLE token1, HANDLE token2) BOOL ret;
ret = GetTokenInformation(token1, TokenStatistics, &stats1, sizeof(stats1), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = GetTokenInformation(token2, TokenStatistics, &stats2, sizeof(stats2), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ok(memcmp(&stats1.TokenId, &stats2.TokenId, sizeof(LUID)), "expected different IDs\n"); } @@ -8106,13 +8106,13 @@ static void test_elevation(void)
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | READ_CONTROL | TOKEN_DUPLICATE | TOKEN_ASSIGN_PRIMARY | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_DEFAULT, &token); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetTokenInformation(token, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); orig_type = type; ret = GetTokenInformation(token, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = GetTokenInformation(token, TokenLinkedToken, &linked, sizeof(linked), &size); if (!ret && GetLastError() == ERROR_NO_SUCH_LOGON_SESSION) /* fails on w2008s64 */ { @@ -8120,42 +8120,42 @@ static void test_elevation(void) CloseHandle(token); return; } - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
if (type == TokenElevationTypeDefault) { - ok(elevation.TokenIsElevated == FALSE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(elevation.TokenIsElevated == FALSE, "got elevation %#lx\n", elevation.TokenIsElevated); ok(!linked.LinkedToken, "expected no linked token\n"); } else if (type == TokenElevationTypeLimited) { - ok(elevation.TokenIsElevated == FALSE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(elevation.TokenIsElevated == FALSE, "got elevation %#lx\n", elevation.TokenIsElevated); ok(!!linked.LinkedToken, "expected a linked token\n");
TEST_GRANTED_ACCESS(linked.LinkedToken, TOKEN_ALL_ACCESS); ret = GetTokenInformation(linked.LinkedToken, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenElevationTypeFull, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenElevationTypeFull, "got type %#lx\n", type); ret = GetTokenInformation(linked.LinkedToken, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(elevation.TokenIsElevated == TRUE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(ret, "got error %lu\n", GetLastError()); + ok(elevation.TokenIsElevated == TRUE, "got elevation %#lx\n", elevation.TokenIsElevated); ret = GetTokenInformation(linked.LinkedToken, TokenType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenImpersonation, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenImpersonation, "got type %#lx\n", type); ret = GetTokenInformation(linked.LinkedToken, TokenImpersonationLevel, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == SecurityIdentification, "got impersonation level %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == SecurityIdentification, "got impersonation level %#lx\n", type);
/* Asking for the linked token again gives us a different token. */ ret = GetTokenInformation(token, TokenLinkedToken, &linked2, sizeof(linked2), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetTokenInformation(linked2.LinkedToken, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenElevationTypeFull, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenElevationTypeFull, "got type %#lx\n", type); ret = GetTokenInformation(linked2.LinkedToken, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(elevation.TokenIsElevated == TRUE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(ret, "got error %lu\n", GetLastError()); + ok(elevation.TokenIsElevated == TRUE, "got elevation %#lx\n", elevation.TokenIsElevated);
check_different_token(linked.LinkedToken, linked2.LinkedToken);
@@ -8163,14 +8163,14 @@ static void test_elevation(void)
/* Asking for the linked token's linked token gives us a new limited token. */ ret = GetTokenInformation(linked.LinkedToken, TokenLinkedToken, &linked2, sizeof(linked2), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetTokenInformation(linked2.LinkedToken, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenElevationTypeLimited, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenElevationTypeLimited, "got type %#lx\n", type); ret = GetTokenInformation(linked2.LinkedToken, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(elevation.TokenIsElevated == FALSE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(ret, "got error %lu\n", GetLastError()); + ok(elevation.TokenIsElevated == FALSE, "got elevation %#lx\n", elevation.TokenIsElevated);
check_different_token(token, linked2.LinkedToken);
@@ -8181,42 +8181,42 @@ static void test_elevation(void) type = TokenElevationTypeLimited; ret = SetTokenInformation(token, TokenElevationType, &type, sizeof(type)); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
elevation.TokenIsElevated = FALSE; ret = SetTokenInformation(token, TokenElevation, &elevation, sizeof(elevation)); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError()); } else { - ok(elevation.TokenIsElevated == TRUE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(elevation.TokenIsElevated == TRUE, "got elevation %#lx\n", elevation.TokenIsElevated); ok(!!linked.LinkedToken, "expected a linked token\n");
TEST_GRANTED_ACCESS(linked.LinkedToken, TOKEN_ALL_ACCESS); ret = GetTokenInformation(linked.LinkedToken, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenElevationTypeLimited, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenElevationTypeLimited, "got type %#lx\n", type); ret = GetTokenInformation(linked.LinkedToken, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(elevation.TokenIsElevated == FALSE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(ret, "got error %lu\n", GetLastError()); + ok(elevation.TokenIsElevated == FALSE, "got elevation %#lx\n", elevation.TokenIsElevated); ret = GetTokenInformation(linked.LinkedToken, TokenType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenImpersonation, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenImpersonation, "got type %#lx\n", type); ret = GetTokenInformation(linked.LinkedToken, TokenImpersonationLevel, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == SecurityIdentification, "got impersonation level %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == SecurityIdentification, "got impersonation level %#lx\n", type);
/* Asking for the linked token again gives us a different token. */ ret = GetTokenInformation(token, TokenLinkedToken, &linked2, sizeof(linked2), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetTokenInformation(linked2.LinkedToken, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenElevationTypeLimited, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenElevationTypeLimited, "got type %#lx\n", type); ret = GetTokenInformation(linked2.LinkedToken, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(elevation.TokenIsElevated == FALSE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(ret, "got error %lu\n", GetLastError()); + ok(elevation.TokenIsElevated == FALSE, "got elevation %#lx\n", elevation.TokenIsElevated);
check_different_token(linked.LinkedToken, linked2.LinkedToken);
@@ -8224,14 +8224,14 @@ static void test_elevation(void)
/* Asking for the linked token's linked token gives us a new elevated token. */ ret = GetTokenInformation(linked.LinkedToken, TokenLinkedToken, &linked2, sizeof(linked2), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetTokenInformation(linked2.LinkedToken, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenElevationTypeFull, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenElevationTypeFull, "got type %#lx\n", type); ret = GetTokenInformation(linked2.LinkedToken, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(elevation.TokenIsElevated == TRUE, "got elevation %#x\n", elevation.TokenIsElevated); + ok(ret, "got error %lu\n", GetLastError()); + ok(elevation.TokenIsElevated == TRUE, "got elevation %#lx\n", elevation.TokenIsElevated);
check_different_token(token, linked2.LinkedToken);
@@ -8242,33 +8242,33 @@ static void test_elevation(void) type = TokenElevationTypeLimited; ret = SetTokenInformation(token, TokenElevationType, &type, sizeof(type)); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
elevation.TokenIsElevated = FALSE; ret = SetTokenInformation(token, TokenElevation, &elevation, sizeof(elevation)); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError()); }
ret = DuplicateTokenEx(token, TOKEN_ALL_ACCESS, NULL, SecurityAnonymous, TokenPrimary, &token2); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = GetTokenInformation(token2, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(type == orig_type, "expected same type\n"); ret = GetTokenInformation(token2, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(elevation.TokenIsElevated == (type == TokenElevationTypeFull), "got elevation %#x\n", elevation.TokenIsElevated); + ok(ret, "got error %lu\n", GetLastError()); + ok(elevation.TokenIsElevated == (type == TokenElevationTypeFull), "got elevation %#lx\n", elevation.TokenIsElevated); ret = GetTokenInformation(token2, TokenLinkedToken, &linked, sizeof(linked), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); if (type == TokenElevationTypeDefault) { ok(!linked.LinkedToken, "expected no linked token\n"); ret = GetTokenInformation(linked.LinkedToken, TokenType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == TokenImpersonation, "got type %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == TokenImpersonation, "got type %#lx\n", type); ret = GetTokenInformation(linked.LinkedToken, TokenImpersonationLevel, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(type == SecurityIdentification, "got impersonation level %#x\n", type); + ok(ret, "got error %lu\n", GetLastError()); + ok(type == SecurityIdentification, "got impersonation level %#lx\n", type); CloseHandle(linked.LinkedToken); } else @@ -8276,15 +8276,15 @@ static void test_elevation(void) CloseHandle(token2);
ret = CreateRestrictedToken(token, 0, 0, NULL, 0, NULL, 0, NULL, &token2); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = GetTokenInformation(token2, TokenElevationType, &type, sizeof(type), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(type == orig_type, "expected same type\n"); ret = GetTokenInformation(token2, TokenElevation, &elevation, sizeof(elevation), &size); - ok(ret, "got error %u\n", GetLastError()); - ok(elevation.TokenIsElevated == (type == TokenElevationTypeFull), "got elevation %#x\n", elevation.TokenIsElevated); + ok(ret, "got error %lu\n", GetLastError()); + ok(elevation.TokenIsElevated == (type == TokenElevationTypeFull), "got elevation %#lx\n", elevation.TokenIsElevated); ret = GetTokenInformation(token2, TokenLinkedToken, &linked, sizeof(linked), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); if (type == TokenElevationTypeDefault) ok(!linked.LinkedToken, "expected no linked token\n"); else @@ -8308,56 +8308,56 @@ static void test_elevation(void)
privs.PrivilegeCount = 1; ret = LookupPrivilegeValueA(NULL, "SeChangeNotifyPrivilege", &privs.Privileges[0].Luid); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); privs.Privileges[0].Attributes = SE_PRIVILEGE_REMOVED; ret = AdjustTokenPrivileges(token, FALSE, &privs, sizeof(prev_privs_buffer), prev_privs, &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
priv_set.PrivilegeCount = 1; priv_set.Control = 0; priv_set.Privilege[0] = privs.Privileges[0]; ret = PrivilegeCheck(token, &priv_set, &is_member); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!is_member, "not a member\n");
ret = GetTokenInformation(token, TokenLinkedToken, &linked, sizeof(linked), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = PrivilegeCheck(linked.LinkedToken, &priv_set, &is_member); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(is_member, "not a member\n");
CloseHandle(linked.LinkedToken);
ret = AdjustTokenPrivileges(token, FALSE, prev_privs, 0, NULL, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
/* Linked tokens do not preserve default DACL modifications. */
ret = GetTokenInformation(token, TokenDefaultDacl, prev_acl, sizeof(prev_acl_buffer), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(prev_acl->DefaultDacl->AceCount, "expected non-empty default DACL\n");
InitializeAcl(&acl, sizeof(acl), ACL_REVISION); default_acl.DefaultDacl = &acl; ret = SetTokenInformation(token, TokenDefaultDacl, &default_acl, sizeof(default_acl)); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetTokenInformation(token, TokenDefaultDacl, ret_acl, sizeof(acl_buffer), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!ret_acl->DefaultDacl->AceCount, "expected empty default DACL\n");
ret = GetTokenInformation(token, TokenLinkedToken, &linked, sizeof(linked), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetTokenInformation(linked.LinkedToken, TokenDefaultDacl, ret_acl, sizeof(acl_buffer), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(ret_acl->DefaultDacl->AceCount, "expected non-empty default DACL\n");
CloseHandle(linked.LinkedToken);
ret = SetTokenInformation(token, TokenDefaultDacl, prev_acl, sizeof(*prev_acl)); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); }
CloseHandle(token); @@ -8383,7 +8383,7 @@ static void test_group_as_file_owner(void) CreateWellKnownSid(WinBuiltinAdministratorsSid, NULL, admin_sid, &size);
ret = CheckTokenMembership(NULL, admin_sid, &present); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); if (!present) { skip("user is not an administrator\n"); @@ -8394,41 +8394,41 @@ static void test_group_as_file_owner(void) sprintf(path, "%s\testdir", temp_path);
ret = CreateDirectoryA(path, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
file = CreateFileA(path, FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
ret = GetKernelObjectSecurity(file, DACL_SECURITY_INFORMATION, sd_buffer, sizeof(sd_buffer), &size); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = GetSecurityDescriptorDacl(sd, &present, &dacl, &defaulted); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
InitializeSecurityDescriptor(&new_sd, SECURITY_DESCRIPTOR_REVISION);
ret = SetSecurityDescriptorOwner(&new_sd, admin_sid, FALSE); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = GetSecurityDescriptorDacl(sd, &present, &dacl, &defaulted); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = SetSecurityDescriptorDacl(&new_sd, present, dacl, defaulted); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = SetKernelObjectSecurity(file, OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, &new_sd); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
CloseHandle(file);
sprintf(path, "%s\testdir\subdir", temp_path); ret = CreateDirectoryA(path, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = RemoveDirectoryA(path); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); sprintf(path, "%s\testdir", temp_path); ret = RemoveDirectoryA(path); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); }
START_TEST(security) diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index 21704048778..fbb18b048a0 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -77,21 +77,21 @@ static void test_open_scm(void) /* No access rights */ SetLastError(0xdeadbeef); scm_handle = OpenSCManagerA(NULL, NULL, 0); - ok(scm_handle != NULL, "Expected success, got error %u\n", GetLastError()); + ok(scm_handle != NULL, "Expected success, got error %lu\n", GetLastError()); CloseServiceHandle(scm_handle);
/* Unknown database name */ SetLastError(0xdeadbeef); scm_handle = OpenSCManagerA(NULL, "DoesNotExist", SC_MANAGER_CONNECT); ok(!scm_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %ld\n", GetLastError()); CloseServiceHandle(scm_handle); /* Just in case */
/* MSDN says only ServiceActive is allowed, or NULL */ SetLastError(0xdeadbeef); scm_handle = OpenSCManagerA(NULL, SERVICES_FAILED_DATABASEA, SC_MANAGER_CONNECT); ok(!scm_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_DATABASE_DOES_NOT_EXIST, "Expected ERROR_DATABASE_DOES_NOT_EXIST, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_DATABASE_DOES_NOT_EXIST, "Expected ERROR_DATABASE_DOES_NOT_EXIST, got %ld\n", GetLastError()); CloseServiceHandle(scm_handle); /* Just in case */
/* Remote unknown host */ @@ -101,21 +101,21 @@ static void test_open_scm(void) { ok(!scm_handle, "Expected failure\n"); ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR /* w2k8 */, - "Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %d\n", GetLastError()); + "Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %ld\n", GetLastError()); } CloseServiceHandle(scm_handle); /* Just in case */
/* Proper call with an empty hostname */ scm_handle = OpenSCManagerA("", SERVICES_ACTIVE_DATABASEA, SC_MANAGER_CONNECT); - ok(scm_handle != NULL, "Expected success, got error %u\n", GetLastError()); + ok(scm_handle != NULL, "Expected success, got error %lu\n", GetLastError()); CloseServiceHandle(scm_handle);
/* Again a correct one */ SetLastError(0xdeadbeef); scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == ERROR_IO_PENDING) /* win2k */, - "Expected ERROR_SUCCESS, got %u\n", GetLastError()); - ok(scm_handle != NULL, "Expected success, got error %u\n", GetLastError()); + "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); + ok(scm_handle != NULL, "Expected success, got error %lu\n", GetLastError()); CloseServiceHandle(scm_handle); }
@@ -129,7 +129,7 @@ static void test_open_svc(void) SetLastError(0xdeadbeef); svc_handle = OpenServiceA(NULL, NULL, 0); ok(!svc_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
/* TODO: Add some tests with invalid handles. These produce errors on Windows but crash on Wine */
@@ -140,7 +140,7 @@ static void test_open_svc(void) ok(!svc_handle, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); CloseServiceHandle(scm_handle);
/* Nonexistent service */ @@ -148,7 +148,7 @@ static void test_open_svc(void) SetLastError(0xdeadbeef); svc_handle = OpenServiceA(scm_handle, "deadbeef", GENERIC_READ); ok(!svc_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); CloseServiceHandle(scm_handle);
/* Proper SCM handle but different access rights */ @@ -159,7 +159,7 @@ static void test_open_svc(void) skip("Not enough rights to get a handle to the service\n"); else { - ok(svc_handle != NULL, "Expected success, got error %u\n", GetLastError()); + ok(svc_handle != NULL, "Expected success, got error %lu\n", GetLastError()); CloseServiceHandle(svc_handle); }
@@ -183,7 +183,7 @@ static void test_open_svc(void) SetLastError(0xdeadbeef); svc_handle = OpenServiceA(scm_handle, displayname, GENERIC_READ); ok(!svc_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); /* Just in case */ CloseServiceHandle(svc_handle);
@@ -216,7 +216,7 @@ static void test_create_delete_svc(void) SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT);
@@ -226,7 +226,7 @@ static void test_create_delete_svc(void) ok(!svc_handle1, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, W2K3, XP, Vista */ || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Now with a servicename */ SetLastError(0xdeadbeef); @@ -234,7 +234,7 @@ static void test_create_delete_svc(void) ok(!svc_handle1, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, W2K3, XP, Vista */ || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Or just a binary name */ SetLastError(0xdeadbeef); @@ -242,24 +242,24 @@ static void test_create_delete_svc(void) ok(!svc_handle1, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, W2K3, XP, Vista */ || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Both servicename and binary name (We only have connect rights) */ SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, 0, 0, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* They can even be empty at this stage of parameter checking */ SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, empty, NULL, 0, 0, 0, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, 0, 0, 0, empty, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* Open the Service Control Manager with minimal rights for creation * (Verified with 'SC_MANAGER_ALL_ACCESS &~ SC_MANAGER_CREATE_SERVICE') @@ -279,17 +279,17 @@ static void test_create_delete_svc(void) SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, empty, NULL, 0, 0, 0, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, 0, 0, 0, empty, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, empty, NULL, 0, 0, 0, 0, empty, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %ld\n", GetLastError());
/* Valid call (as we will see later) except for the empty binary name (to proof it's indeed * an ERROR_INVALID_PARAMETER) @@ -298,7 +298,7 @@ static void test_create_delete_svc(void) svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, SERVICE_WIN32_OWN_PROCESS, SERVICE_DISABLED, 0, empty, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Windows checks if the 'service type', 'access type' and the combination of them are valid, so let's test that */
@@ -309,14 +309,14 @@ static void test_create_delete_svc(void) svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS, SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Illegal (SERVICE_INTERACTIVE_PROCESS is only allowed with SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS) */ SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_FILE_SYSTEM_DRIVER | SERVICE_INTERACTIVE_PROCESS, SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Illegal (this combination is only allowed when the LocalSystem account (ServiceStartName) is used) * Not having a correct account would have resulted in an ERROR_INVALID_SERVICE_ACCOUNT. @@ -326,7 +326,7 @@ static void test_create_delete_svc(void) SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, account, password); ok(!svc_handle1, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_SERVICE_ACCOUNT, - "Expected ERROR_INVALID_PARAMETER or ERROR_INVALID_SERVICE_ACCOUNT, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER or ERROR_INVALID_SERVICE_ACCOUNT, got %ld\n", GetLastError());
/* Illegal (start-type is not a mask and should only be one of the possibilities) * Remark : 'OR'-ing them could result in a valid possibility (but doesn't make sense as @@ -336,36 +336,36 @@ static void test_create_delete_svc(void) svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START | SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Illegal (SERVICE_BOOT_START and SERVICE_SYSTEM_START are only allowed for driver services) */ SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, SERVICE_WIN32_OWN_PROCESS, SERVICE_BOOT_START, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Test if ServiceType can be a combined one for drivers */ SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER, SERVICE_BOOT_START, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Test duplicate service names */ svc_handle1 = CreateServiceA(scm_handle, "winetest_dupname", "winetest_display", DELETE, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!!svc_handle1, "Failed to create service, error %u\n", GetLastError()); + ok(!!svc_handle1, "Failed to create service, error %lu\n", GetLastError());
svc_handle2 = CreateServiceA(scm_handle, "winetest_dupname", NULL, 0, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle2, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_EXISTS, "Got wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SERVICE_EXISTS, "Got wrong error %lu\n", GetLastError());
svc_handle2 = CreateServiceA(scm_handle, "winetest_dupname2", "winetest_dupname", DELETE, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, 0, pathname, NULL, NULL, NULL, NULL, NULL); todo_wine ok(!svc_handle2, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_DUPLICATE_SERVICE_NAME, "Got wrong error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_DUPLICATE_SERVICE_NAME, "Got wrong error %lu\n", GetLastError()); if (svc_handle2) { DeleteService(svc_handle2); @@ -378,18 +378,18 @@ static void test_create_delete_svc(void) { size = sizeof(buffer); ret = GetServiceKeyNameA(scm_handle, "winetest_display", buffer, &size); - ok(ret, "Failed to get key name, error %u\n", GetLastError()); + ok(ret, "Failed to get key name, error %lu\n", GetLastError()); ok(!strcmp(buffer, "winetest_dupname"), "Got wrong name "%s"\n", buffer);
ret = DeleteService(svc_handle2); - ok(ret, "Failed to delete service, error %u\n", GetLastError()); + ok(ret, "Failed to delete service, error %lu\n", GetLastError()); CloseServiceHandle(svc_handle2); } else - ok(GetLastError() == ERROR_DUPLICATE_SERVICE_NAME, "Got wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_DUPLICATE_SERVICE_NAME, "Got wrong error %lu\n", GetLastError());
ret = DeleteService(svc_handle1); - ok(ret, "Failed to delete service, error %u\n", GetLastError()); + ok(ret, "Failed to delete service, error %lu\n", GetLastError()); CloseServiceHandle(svc_handle1);
/* Windows doesn't care about the access rights for creation (which makes @@ -399,14 +399,14 @@ static void test_create_delete_svc(void) SetLastError(0xdeadbeef); svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(svc_handle1 != NULL, "Could not create the service : %d\n", GetLastError()); + ok(svc_handle1 != NULL, "Could not create the service : %ld\n", GetLastError());
/* DeleteService however must have proper rights */ SetLastError(0xdeadbeef); ret = DeleteService(svc_handle1); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* Open the service with minimal rights for deletion. * (Verified with 'SERVICE_ALL_ACCESS &~ DELETE') @@ -417,11 +417,11 @@ static void test_create_delete_svc(void) /* Now that we have the proper rights, we should be able to delete */ SetLastError(0xdeadbeef); ret = DeleteService(svc_handle1); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError());
/* Service is marked for delete, but handle is still open. Try to open service again. */ svc_handle2 = OpenServiceA(scm_handle, servicename, GENERIC_READ); - ok(svc_handle2 != NULL, "got %p, error %u\n", svc_handle2, GetLastError()); + ok(svc_handle2 != NULL, "got %p, error %lu\n", svc_handle2, GetLastError()); CloseServiceHandle(svc_handle2);
CloseServiceHandle(svc_handle1); @@ -432,7 +432,7 @@ static void test_create_delete_svc(void) ret = DeleteService(NULL); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); }
static void test_get_displayname(void) @@ -455,7 +455,7 @@ static void test_get_displayname(void) ret = GetServiceDisplayNameA(NULL, NULL, NULL, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT);
@@ -464,7 +464,7 @@ static void test_get_displayname(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); displaysize = sizeof(displayname); @@ -472,7 +472,7 @@ static void test_get_displayname(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Test for nonexistent service */ SetLastError(0xdeadbeef); @@ -480,22 +480,22 @@ static void test_get_displayname(void) ret = GetServiceDisplayNameA(scm_handle, deadbeef, NULL, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetServiceDisplayNameA(scm_handle, deadbeef, NULL, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 1, "Service size expected 1, got %d\n", displaysize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(displaysize == 1, "Service size expected 1, got %ld\n", displaysize);
displaysize = 15; strcpy(displayname, "ABC"); ret = GetServiceDisplayNameA(scm_handle, deadbeef, displayname, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 15, "Service size expected 15, got %d\n", displaysize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(displaysize == 15, "Service size expected 15, got %ld\n", displaysize); ok(displayname[0] == 0, "Service name not empty\n");
displaysize = 15; @@ -503,8 +503,8 @@ static void test_get_displayname(void) ret = GetServiceDisplayNameW(scm_handle, deadbeefW, displaynameW, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(displaysize == 15, "Service size expected 15, got %d\n", displaysize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + ok(displaysize == 15, "Service size expected 15, got %ld\n", displaysize); ok(displaynameW[0] == 0, "Service name not empty\n");
displaysize = 0; @@ -512,17 +512,17 @@ static void test_get_displayname(void) ret = GetServiceDisplayNameA(scm_handle, deadbeef, displayname, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 1, "Service size expected 1, got %d\n", displaysize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(displaysize == 1, "Service size expected 1, got %ld\n", displaysize); ok(displayname[0] == 'A', "Service name changed\n");
displaysize = 0; lstrcpyW( displaynameW, abcW ); ret = GetServiceDisplayNameW(scm_handle, deadbeefW, displaynameW, &displaysize); ok(!ret, "Expected failure\n"); - ok(displaysize == 2, "Service size expected 2, got %d\n", displaysize); + ok(displaysize == 2, "Service size expected 2, got %ld\n", displaysize); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); ok(displaynameW[0] == 'A', "Service name changed\n");
displaysize = 1; @@ -530,17 +530,17 @@ static void test_get_displayname(void) ret = GetServiceDisplayNameA(scm_handle, deadbeef, displayname, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 1, "Service size expected 1, got %d\n", displaysize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(displaysize == 1, "Service size expected 1, got %ld\n", displaysize); ok(displayname[0] == 0, "Service name not empty\n");
displaysize = 1; lstrcpyW( displaynameW, abcW ); ret = GetServiceDisplayNameW(scm_handle, deadbeefW, displaynameW, &displaysize); ok(!ret, "Expected failure\n"); - ok(displaysize == 2, "Service size expected 2, got %d\n", displaysize); + ok(displaysize == 2, "Service size expected 2, got %ld\n", displaysize); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); ok(displaynameW[0] == 'A', "Service name changed\n");
displaysize = 2; @@ -548,17 +548,17 @@ static void test_get_displayname(void) ret = GetServiceDisplayNameA(scm_handle, deadbeef, displayname, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 2, "Service size expected 2, got %d\n", displaysize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(displaysize == 2, "Service size expected 2, got %ld\n", displaysize); ok(displayname[0] == 0, "Service name not empty\n");
displaysize = 2; lstrcpyW( displaynameW, abcW ); ret = GetServiceDisplayNameW(scm_handle, deadbeefW, displaynameW, &displaysize); ok(!ret, "Expected failure\n"); - ok(displaysize == 2, "Service size expected 2, got %d\n", displaysize); + ok(displaysize == 2, "Service size expected 2, got %ld\n", displaysize); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); ok(displaynameW[0] == 0, "Service name not empty\n");
/* Check if 'Spooler' exists */ @@ -577,15 +577,15 @@ static void test_get_displayname(void) ret = GetServiceDisplayNameA(scm_handle, spooler, NULL, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); tempsize = displaysize;
displaysize = 0; ret = GetServiceDisplayNameA(scm_handle, spooler, NULL, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(displaysize == tempsize, "Buffer size mismatch (%d vs %d)\n", tempsize, displaysize); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(displaysize == tempsize, "Buffer size mismatch (%ld vs %ld)\n", tempsize, displaysize);
/* Buffer is too small */ SetLastError(0xdeadbeef); @@ -594,7 +594,7 @@ static void test_get_displayname(void) ok(!ret, "Expected failure\n"); ok(displaysize == tempsize, "Expected the needed buffersize\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* First try with a buffer that should be big enough to hold * the ANSI string (and terminating character). This succeeds on Windows @@ -603,21 +603,21 @@ static void test_get_displayname(void) SetLastError(0xdeadbeef); displaysize = (tempsize / 2) + 1; ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(displaysize == ((tempsize / 2) + 1), "Expected no change for the needed buffer size\n");
/* Now with the original returned size */ SetLastError(0xdeadbeef); displaysize = tempsize; ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(displaysize == tempsize, "Expected no change for the needed buffer size\n");
/* And with a bigger than needed buffer */ SetLastError(0xdeadbeef); displaysize = tempsize * 2; ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); /* Test that shows that if the buffersize is enough, it's not changed */ ok(displaysize == tempsize * 2, "Expected no change for the needed buffer size\n"); ok(strlen(displayname) == tempsize/2, @@ -629,7 +629,7 @@ static void test_get_displayname(void) ret = GetServiceDisplayNameW(scm_handle, spoolerW, NULL, &displaysize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* Buffer is too small */ SetLastError(0xdeadbeef); @@ -639,7 +639,7 @@ static void test_get_displayname(void) ok(!ret, "Expected failure\n"); ok(displaysize == tempsizeW, "Expected the needed buffersize\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* Now with the original returned size */ SetLastError(0xdeadbeef); @@ -648,13 +648,13 @@ static void test_get_displayname(void) ok(!ret, "Expected failure\n"); ok(displaysize == tempsizeW, "Expected the needed buffersize\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* And with a bigger than needed buffer */ SetLastError(0xdeadbeef); displaysize = tempsizeW + 1; /* This caters for the null terminating character */ ret = GetServiceDisplayNameW(scm_handle, spoolerW, displaynameW, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(displaysize == tempsizeW, "Expected the needed buffersize\n"); ok(lstrlenW(displaynameW) == displaysize, "Expected the buffer to be the length of the string\n") ; @@ -678,7 +678,7 @@ static void test_get_displayname(void) svc_handle = CreateServiceA(scm_handle, servicename, NULL, DELETE, SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError()); + ok(svc_handle != NULL, "Could not create the service : %ld\n", GetLastError()); if (!svc_handle) { CloseServiceHandle(scm_handle); @@ -693,7 +693,7 @@ static void test_get_displayname(void) ok(displaysize == strlen(servicename) * 2, "Expected the displaysize to be twice the size of the servicename\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* Buffer is too small */ SetLastError(0xdeadbeef); @@ -703,18 +703,18 @@ static void test_get_displayname(void) ok(!ret, "Expected failure\n"); ok(displaysize == tempsize, "Expected the needed buffersize\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* Get the displayname */ SetLastError(0xdeadbeef); ret = GetServiceDisplayNameA(scm_handle, servicename, displayname, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(!lstrcmpiA(displayname, servicename), "Expected displayname to be %s, got %s\n", servicename, displayname);
/* Delete the service */ ret = DeleteService(svc_handle); - ok(ret, "Expected success (err=%d)\n", GetLastError()); + ok(ret, "Expected success (err=%ld)\n", GetLastError());
CloseServiceHandle(svc_handle); CloseServiceHandle(scm_handle); @@ -739,7 +739,7 @@ static void test_get_servicekeyname(void) ret = GetServiceKeyNameA(NULL, NULL, NULL, &servicesize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT);
@@ -749,8 +749,8 @@ static void test_get_servicekeyname(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - todo_wine ok(servicesize == 1, "Service size expected 1, got %d\n", servicesize); + "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); + todo_wine ok(servicesize == 1, "Service size expected 1, got %ld\n", servicesize);
/* Valid handle and buffer but no displayname */ servicesize = 200; @@ -759,24 +759,24 @@ static void test_get_servicekeyname(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - todo_wine ok(servicesize == 200, "Service size expected 1, got %d\n", servicesize); + "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); + todo_wine ok(servicesize == 200, "Service size expected 1, got %ld\n", servicesize);
/* Test for nonexistent displayname */ SetLastError(0xdeadbeef); ret = GetServiceKeyNameA(scm_handle, deadbeef, NULL, &servicesize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 1, "Service size expected 1, got %d\n", servicesize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(servicesize == 1, "Service size expected 1, got %ld\n", servicesize);
servicesize = 15; strcpy(servicename, "ABC"); ret = GetServiceKeyNameA(scm_handle, deadbeef, servicename, &servicesize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 15, "Service size expected 15, got %d\n", servicesize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(servicesize == 15, "Service size expected 15, got %ld\n", servicesize); ok(servicename[0] == 0, "Service name not empty\n");
servicesize = 15; @@ -784,8 +784,8 @@ static void test_get_servicekeyname(void) ret = GetServiceKeyNameW(scm_handle, deadbeefW, servicenameW, &servicesize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(servicesize == 15, "Service size expected 15, got %d\n", servicesize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + ok(servicesize == 15, "Service size expected 15, got %ld\n", servicesize); ok(servicenameW[0] == 0, "Service name not empty\n");
servicesize = 0; @@ -793,17 +793,17 @@ static void test_get_servicekeyname(void) ret = GetServiceKeyNameA(scm_handle, deadbeef, servicename, &servicesize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 1, "Service size expected 1, got %d\n", servicesize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(servicesize == 1, "Service size expected 1, got %ld\n", servicesize); ok(servicename[0] == 'A', "Service name changed\n");
servicesize = 0; lstrcpyW( servicenameW, abcW ); ret = GetServiceKeyNameW(scm_handle, deadbeefW, servicenameW, &servicesize); ok(!ret, "Expected failure\n"); - ok(servicesize == 2, "Service size expected 2, got %d\n", servicesize); + ok(servicesize == 2, "Service size expected 2, got %ld\n", servicesize); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); ok(servicenameW[0] == 'A', "Service name changed\n");
servicesize = 1; @@ -811,17 +811,17 @@ static void test_get_servicekeyname(void) ret = GetServiceKeyNameA(scm_handle, deadbeef, servicename, &servicesize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 1, "Service size expected 1, got %d\n", servicesize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(servicesize == 1, "Service size expected 1, got %ld\n", servicesize); ok(servicename[0] == 0, "Service name not empty\n");
servicesize = 1; lstrcpyW( servicenameW, abcW ); ret = GetServiceKeyNameW(scm_handle, deadbeefW, servicenameW, &servicesize); ok(!ret, "Expected failure\n"); - ok(servicesize == 2, "Service size expected 2, got %d\n", servicesize); + ok(servicesize == 2, "Service size expected 2, got %ld\n", servicesize); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); ok(servicenameW[0] == 'A', "Service name changed\n");
servicesize = 2; @@ -829,17 +829,17 @@ static void test_get_servicekeyname(void) ret = GetServiceKeyNameA(scm_handle, deadbeef, servicename, &servicesize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 2, "Service size expected 2, got %d\n", servicesize); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); + todo_wine ok(servicesize == 2, "Service size expected 2, got %ld\n", servicesize); ok(servicename[0] == 0, "Service name not empty\n");
servicesize = 2; lstrcpyW( servicenameW, abcW ); ret = GetServiceKeyNameW(scm_handle, deadbeefW, servicenameW, &servicesize); ok(!ret, "Expected failure\n"); - ok(servicesize == 2, "Service size expected 2, got %d\n", servicesize); + ok(servicesize == 2, "Service size expected 2, got %ld\n", servicesize); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError()); ok(servicenameW[0] == 0, "Service name not empty\n");
/* Check if 'Spooler' exists */ @@ -870,14 +870,14 @@ static void test_get_servicekeyname(void) }
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* Valid call with the correct buffersize */ SetLastError(0xdeadbeef); tempsize = servicesize; servicesize *= 2; ret = GetServiceKeyNameA(scm_handle, displayname, servicename, &servicesize); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); if (ret) { ok(strlen(servicename) == tempsize/2, @@ -891,7 +891,7 @@ static void test_get_servicekeyname(void) SetLastError(0xdeadbeef); servicesize *= 2; ret = GetServiceKeyNameW(scm_handle, displaynameW, servicenameW, &servicesize); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); if (ret) { ok(strlen(servicename) == tempsize/2, @@ -905,7 +905,7 @@ static void test_get_servicekeyname(void) ret = GetServiceKeyNameW(scm_handle, displaynameW, servicenameW, &servicesize); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok(servicenameW[0] == 0, "Buffer not empty\n");
CloseServiceHandle(scm_handle); @@ -924,7 +924,7 @@ static void test_query_svc(void) ret = QueryServiceStatus(NULL, NULL); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT);
@@ -944,13 +944,13 @@ static void test_query_svc(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = QueryServiceStatus(svc_handle, &status); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* Open the service with just enough rights. * (Verified with 'SERVICE_ALL_ACCESS &~ SERVICE_QUERY_STATUS') @@ -960,7 +960,7 @@ static void test_query_svc(void)
SetLastError(0xdeadbeef); ret = QueryServiceStatus(svc_handle, &status); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError());
CloseServiceHandle(svc_handle);
@@ -980,7 +980,7 @@ static void test_query_svc(void) ret = pQueryServiceStatusEx(NULL, 1, NULL, 0, NULL); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_LEVEL, - "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + "Expected ERROR_INVALID_LEVEL, got %ld\n", GetLastError());
/* Passing a NULL parameter for the needed buffer size * will crash on anything but NT4. @@ -994,9 +994,9 @@ static void test_query_svc(void) { ok(!ret, "Expected failure\n"); ok(needed == sizeof(SERVICE_STATUS_PROCESS), - "Needed buffersize is wrong : %d\n", needed); + "Needed buffersize is wrong : %ld\n", needed); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); }
/* Pass a correct buffer and buffersize but a NULL handle */ @@ -1006,7 +1006,7 @@ static void test_query_svc(void) ret = pQueryServiceStatusEx(NULL, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, statusproc);
/* Correct handle and info level */ @@ -1017,9 +1017,9 @@ static void test_query_svc(void) { ok(!ret, "Expected failure\n"); ok(needed == sizeof(SERVICE_STATUS_PROCESS), - "Needed buffersize is wrong : %d\n", needed); + "Needed buffersize is wrong : %ld\n", needed); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); }
/* All parameters are OK but we don't have enough rights */ @@ -1029,7 +1029,7 @@ static void test_query_svc(void) ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, statusproc);
/* Open the service with just enough rights. */ @@ -1041,7 +1041,7 @@ static void test_query_svc(void) bufsize = sizeof(SERVICE_STATUS_PROCESS); SetLastError(0xdeadbeef); ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); if (statusproc->dwCurrentState == SERVICE_RUNNING) ok(statusproc->dwProcessId != 0, "Expect a process id for this running service\n"); @@ -1054,7 +1054,7 @@ static void test_query_svc(void) ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, NULL); ok(!ret, "Expected failure\n"); ok(broken(GetLastError() == ERROR_INVALID_PARAMETER) /* NT4 */ || - GetLastError() == ERROR_INVALID_ADDRESS, "got %d\n", GetLastError()); + GetLastError() == ERROR_INVALID_ADDRESS, "got %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, statusproc);
@@ -1080,13 +1080,13 @@ static void test_enum_svc(void) ret = EnumServicesStatusA(NULL, 1, 0, NULL, 0, NULL, NULL, NULL); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = EnumServicesStatusW(NULL, 1, 0, NULL, 0, NULL, NULL, NULL); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
/* Open the service control manager with not enough rights at first */ scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); @@ -1097,14 +1097,14 @@ static void test_enum_svc(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = EnumServicesStatusW(scm_handle, 1, 0, NULL, 0, NULL, NULL, NULL); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
/* Don't specify the two required pointers */ returned = 0xdeadbeef; @@ -1114,7 +1114,7 @@ static void test_enum_svc(void) ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
returned = 0xdeadbeef; SetLastError(0xdeadbeef); @@ -1123,7 +1123,7 @@ static void test_enum_svc(void) ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
/* Don't specify the two required pointers */ needed = 0xdeadbeef; @@ -1134,7 +1134,7 @@ static void test_enum_svc(void) "Expected no change to the needed buffer variable\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
needed = 0xdeadbeef; SetLastError(0xdeadbeef); @@ -1144,7 +1144,7 @@ static void test_enum_svc(void) "Expected no change to the needed buffer variable\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
/* No valid servicetype and servicestate */ needed = 0xdeadbeef; @@ -1153,10 +1153,10 @@ static void test_enum_svc(void) ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + "Expected needed buffer size to be set to 0, got %ld\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
needed = 0xdeadbeef; returned = 0xdeadbeef; @@ -1164,11 +1164,11 @@ static void test_enum_svc(void) ret = EnumServicesStatusW(scm_handle, 0, 0, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); + "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(returned == 0 || broken(returned != 0), /* nt4 */ - "Expected number of services to be set to 0, got %d\n", returned); + "Expected number of services to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* No valid servicestate */ needed = 0xdeadbeef; @@ -1177,10 +1177,10 @@ static void test_enum_svc(void) ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, 0, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + "Expected needed buffer size to be set to 0, got %ld\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
needed = 0xdeadbeef; returned = 0xdeadbeef; @@ -1188,11 +1188,11 @@ static void test_enum_svc(void) ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, 0, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); + "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(returned == 0 || broken(returned != 0), /* nt4 */ - "Expected number of services to be set to 0, got %d\n", returned); + "Expected number of services to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* No valid servicetype */ needed = 0xdeadbeef; @@ -1201,10 +1201,10 @@ static void test_enum_svc(void) ret = EnumServicesStatusA(scm_handle, 0, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + "Expected needed buffer size to be set to 0, got %ld\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
needed = 0xdeadbeef; returned = 0xdeadbeef; @@ -1212,11 +1212,11 @@ static void test_enum_svc(void) ret = EnumServicesStatusW(scm_handle, 0, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); + "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(returned == 0 || broken(returned != 0), /* nt4 */ - "Expected number of services to be set to 0, got %d\n", returned); + "Expected number of services to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* All parameters are correct but our access rights are wrong */ needed = 0xdeadbeef; @@ -1225,10 +1225,10 @@ static void test_enum_svc(void) ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + "Expected needed buffer size to be set to 0, got %ld\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
needed = 0xdeadbeef; returned = 0xdeadbeef; @@ -1236,11 +1236,11 @@ static void test_enum_svc(void) ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); + "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(returned == 0 || broken(returned != 0), /* nt4 */ - "Expected number of services to be set to 0, got %d\n", returned); + "Expected number of services to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* Open the service control manager with the needed rights */ CloseServiceHandle(scm_handle); @@ -1253,9 +1253,9 @@ static void test_enum_svc(void) ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); ok(!ret, "Expected failure\n"); ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); - ok(returned == 0, "Expected no service returned, got %d\n", returned); + ok(returned == 0, "Expected no service returned, got %ld\n", returned); ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError());
/* Test to show we get the same needed buffer size for the W-call */ neededW = 0xdeadbeef; @@ -1265,9 +1265,9 @@ static void test_enum_svc(void) ok(!ret, "Expected failure\n"); ok(neededW != 0xdeadbeef && neededW > 0, "Expected the needed buffer size for this one service\n"); ok(neededW == needed, "Expected needed buffersize to be the same for A- and W-calls\n"); - ok(returnedW == 0, "Expected no service returned, got %d\n", returnedW); + ok(returnedW == 0, "Expected no service returned, got %ld\n", returnedW); ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError());
/* Store the needed bytes */ tempneeded = needed; @@ -1280,7 +1280,7 @@ static void test_enum_svc(void) SetLastError(0xdeadbeef); ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, services, bufsize, &needed, &returned, NULL); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); ok(returned != 0xdeadbeef && returned > 0, "Expected some returned services\n"); HeapFree(GetProcessHeap(), 0, services); @@ -1295,7 +1295,7 @@ static void test_enum_svc(void) SetLastError(0xdeadbeef); ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, servicesW, bufsize, &neededW, &returnedW, NULL); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(neededW == 0, "Expected needed buffer to be 0 as we are done\n"); ok(returnedW != 0xdeadbeef && returnedW > 0, "Expected some returned services\n"); HeapFree(GetProcessHeap(), 0, servicesW); @@ -1312,7 +1312,7 @@ static void test_enum_svc(void) ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); ok(returned < tempreturned, "Expected fewer services to be returned\n"); ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError());
/* Allocate less than the needed bytes, this time with a correct resume handle */ bufsize = (tempreturned - 1) * sizeof(ENUM_SERVICE_STATUSA); @@ -1327,7 +1327,7 @@ static void test_enum_svc(void) ok(returned < tempreturned, "Expected fewer services to be returned\n"); todo_wine ok(resume, "Expected a resume handle\n"); ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError());
/* Fetch the missing services but pass a bigger buffer size */ missing = tempreturned - returned; @@ -1337,9 +1337,9 @@ static void test_enum_svc(void) SetLastError(0xdeadbeef); ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, services, bufsize, &needed, &returned, &resume); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); - todo_wine ok(returned == missing, "Expected %u services to be returned\n", missing); + todo_wine ok(returned == missing, "Expected %lu services to be returned\n", missing); ok(resume == 0, "Expected the resume handle to be 0\n"); HeapFree(GetProcessHeap(), 0, services);
@@ -1420,8 +1420,8 @@ static void test_enum_svc(void) } HeapFree(GetProcessHeap(), 0, services);
- ok(servicecountactive == 0, "Active services mismatch %u\n", servicecountactive); - ok(servicecountinactive == 0, "Inactive services mismatch %u\n", servicecountinactive); + ok(servicecountactive == 0, "Active services mismatch %lu\n", servicecountactive); + ok(servicecountinactive == 0, "Inactive services mismatch %lu\n", servicecountinactive);
CloseServiceHandle(scm_handle);
@@ -1437,14 +1437,14 @@ static void test_enum_svc(void) ret = pEnumServicesStatusExA(NULL, 1, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_LEVEL, - "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + "Expected ERROR_INVALID_LEVEL, got %ld\n", GetLastError());
/* All NULL or wrong, just the info level is correct */ SetLastError(0xdeadbeef); ret = pEnumServicesStatusExA(NULL, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
/* Open the service control manager with not enough rights at first */ scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); @@ -1455,7 +1455,7 @@ static void test_enum_svc(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
/* Don't specify the two required pointers */ needed = 0xdeadbeef; @@ -1466,7 +1466,7 @@ static void test_enum_svc(void) "Expected no change to the needed buffer variable\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
/* Don't specify the two required pointers */ returned = 0xdeadbeef; @@ -1476,7 +1476,7 @@ static void test_enum_svc(void) ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); ok(GetLastError() == ERROR_INVALID_ADDRESS || GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); + "Unexpected last error %ld\n", GetLastError());
/* No valid servicetype and servicestate */ needed = 0xdeadbeef; @@ -1484,11 +1484,11 @@ static void test_enum_svc(void) SetLastError(0xdeadbeef); ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, &returned, NULL, NULL); ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + ok(returned == 0, "Expected number of service to be set to 0, got %ld\n", returned); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); + "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* No valid servicestate */ needed = 0xdeadbeef; @@ -1497,11 +1497,11 @@ static void test_enum_svc(void) ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, 0, NULL, 0, &needed, &returned, NULL, NULL); ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + ok(returned == 0, "Expected number of service to be set to 0, got %ld\n", returned); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); + "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* No valid servicetype */ needed = 0xdeadbeef; @@ -1510,11 +1510,11 @@ static void test_enum_svc(void) ret = pEnumServicesStatusExA(scm_handle, 0, 0, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL, NULL); ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + ok(returned == 0, "Expected number of service to be set to 0, got %ld\n", returned); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); + "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* No valid servicetype and servicestate and unknown service group */ needed = 0xdeadbeef; @@ -1523,11 +1523,11 @@ static void test_enum_svc(void) ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, &returned, NULL, "deadbeef_group"); ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + ok(returned == 0, "Expected number of service to be set to 0, got %ld\n", returned); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); + "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* All parameters are correct but our access rights are wrong */ needed = 0xdeadbeef; @@ -1537,10 +1537,10 @@ static void test_enum_svc(void) NULL, 0, &needed, &returned, NULL, NULL); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + "Expected needed buffer size to be set to 0, got %ld\n", needed); + ok(returned == 0, "Expected number of service to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* All parameters are correct, access rights are wrong but the * group name won't be checked yet. @@ -1552,10 +1552,10 @@ static void test_enum_svc(void) NULL, 0, &needed, &returned, NULL, "deadbeef_group"); ok(!ret, "Expected failure\n"); ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + "Expected needed buffer size to be set to 0, got %ld\n", needed); + ok(returned == 0, "Expected number of service to be set to 0, got %ld\n", returned); ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* Open the service control manager with the needed rights */ CloseServiceHandle(scm_handle); @@ -1568,10 +1568,10 @@ static void test_enum_svc(void) ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL, "deadbeef_group"); ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); - ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of service to be set to 0, got %ld\n", returned); + ok(needed == 0, "Expected needed buffer size to be set to 0, got %ld\n", needed); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %ld\n", GetLastError());
/* TODO: Create a test that makes sure we enumerate all services that don't * belong to a group. (specifying ""). @@ -1584,10 +1584,10 @@ static void test_enum_svc(void) ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL, NULL); ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected no service returned, got %d\n", returned); + ok(returned == 0, "Expected no service returned, got %ld\n", returned); ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError());
/* Test to show we get the same needed buffer size for the W-call */ neededW = 0xdeadbeef; @@ -1607,7 +1607,7 @@ static void test_enum_svc(void) SetLastError(0xdeadbeef); ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, (BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); ok(returned == tempreturned, "Expected the same number of service from this function\n"); HeapFree(GetProcessHeap(), 0, exservices); @@ -1627,7 +1627,7 @@ static void test_enum_svc(void) ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); ok(returned < tempreturned, "Expected fewer services to be returned\n"); ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError());
/* Allocate less than the needed bytes, this time with a correct resume handle */ bufsize = (tempreturned - 1) * sizeof(ENUM_SERVICE_STATUSA); @@ -1642,7 +1642,7 @@ static void test_enum_svc(void) ok(returned < tempreturned, "Expected fewer services to be returned\n"); todo_wine ok(resume, "Expected a resume handle\n"); ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError());
/* Fetch that last service but pass a bigger buffer size */ missing = tempreturned - returned; @@ -1652,9 +1652,9 @@ static void test_enum_svc(void) SetLastError(0xdeadbeef); ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, (BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); - ok(returned == missing, "Expected %u services to be returned\n", missing); + ok(returned == missing, "Expected %lu services to be returned\n", missing); ok(resume == 0, "Expected the resume handle to be 0\n"); HeapFree(GetProcessHeap(), 0, exservices);
@@ -1699,7 +1699,7 @@ static void test_enum_svc(void) exservices = HeapAlloc(GetProcessHeap(), 0, needed); ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER, SERVICE_STATE_ALL, (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); - ok(ret, "Expected success %u\n", GetLastError()); + ok(ret, "Expected success %lu\n", GetLastError());
/* Loop through all those returned drivers and services */ for (i = 0; i < returned; i++) @@ -1734,7 +1734,7 @@ static void test_enum_svc(void) else { /* We shouldn't have a process id for inactive services */ - ok(status.dwProcessId == 0, "Service %s state %u shouldn't have an associated process id\n", + ok(status.dwProcessId == 0, "Service %s state %lu shouldn't have an associated process id\n", exservices[i].lpServiceName, status.dwCurrentState);
servicecountinactive--; @@ -1743,8 +1743,8 @@ static void test_enum_svc(void) } HeapFree(GetProcessHeap(), 0, exservices);
- ok(servicecountactive == 0, "Active services mismatch %u\n", servicecountactive); - ok(servicecountinactive == 0, "Inactive services mismatch %u\n", servicecountinactive); + ok(servicecountactive == 0, "Active services mismatch %lu\n", servicecountactive); + ok(servicecountinactive == 0, "Inactive services mismatch %lu\n", servicecountinactive);
CloseServiceHandle(scm_handle); } @@ -1758,7 +1758,7 @@ static void test_close(void) SetLastError(0xdeadbeef); ret = CloseServiceHandle(NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
/* TODO: Add some tests with invalid handles. These produce errors on Windows but crash on Wine */
@@ -1766,7 +1766,7 @@ static void test_close(void) handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); SetLastError(0xdeadbeef); ret = CloseServiceHandle(handle); - ok(ret, "Expected success got error %u\n", GetLastError()); + ok(ret, "Expected success got error %lu\n", GetLastError()); }
static void test_wow64(void) @@ -1795,29 +1795,29 @@ static void test_wow64(void) SERVICE_START | SERVICE_STOP | SERVICE_QUERY_STATUS | DELETE, SERVICE_WIN32_OWN_PROCESS, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, "C:\windows\system32\winetestsvc.exe service serve", NULL, NULL, NULL, NULL, NULL); - ok(!!service, "Failed to create service, error %u.\n", GetLastError()); + ok(!!service, "Failed to create service, error %lu.\n", GetLastError()); ret = StartServiceA(service, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_BAD_EXE_FORMAT, "Got error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_BAD_EXE_FORMAT, "Got error %lu.\n", GetLastError());
ret = DeleteService(service); - ok(ret, "Failed to delete service, error %u.\n", GetLastError()); + ok(ret, "Failed to delete service, error %lu.\n", GetLastError()); CloseServiceHandle(service);
service = CreateServiceA(manager, "winetestsvc2", "winetestsvc2", SERVICE_START | DELETE, SERVICE_KERNEL_DRIVER, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, "C:\windows\system32\winetestsvc.exe", NULL, NULL, NULL, NULL, NULL); - ok(!!service, "Failed to create service, error %u.\n", GetLastError()); + ok(!!service, "Failed to create service, error %lu.\n", GetLastError()); ret = StartServiceA(service, 0, NULL); ok(!ret, "Expected failure.\n"); - todo_wine ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Got error %u.\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Got error %lu.\n", GetLastError());
ret = DeleteService(service); - ok(ret, "Failed to delete service, error %u.\n", GetLastError()); + ok(ret, "Failed to delete service, error %lu.\n", GetLastError()); CloseServiceHandle(service);
ret = DeleteFileA("C:\windows\syswow64\winetestsvc.exe"); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError());
file = CreateFileA("C:\windows\sysnative\winetestsvc.exe", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); @@ -1826,29 +1826,29 @@ static void test_wow64(void) service = CreateServiceA(manager, "winetestsvc3", "winetestsvc3", SERVICE_START | DELETE, SERVICE_WIN32_OWN_PROCESS, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, "C:\windows\system32\winetestsvc.exe service serve", NULL, NULL, NULL, NULL, NULL); - ok(!!service, "Failed to create service, error %u.\n", GetLastError()); + ok(!!service, "Failed to create service, error %lu.\n", GetLastError()); ret = StartServiceA(service, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Got error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Got error %lu.\n", GetLastError());
ret = DeleteService(service); - ok(ret, "Failed to delete service, error %u.\n", GetLastError()); + ok(ret, "Failed to delete service, error %lu.\n", GetLastError()); CloseServiceHandle(service);
service = CreateServiceA(manager, "winetestsvc4", "winetestsvc4", SERVICE_START | DELETE, SERVICE_KERNEL_DRIVER, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, "C:\windows\system32\winetestsvc.exe", NULL, NULL, NULL, NULL, NULL); - ok(!!service, "Failed to create service, error %u.\n", GetLastError()); + ok(!!service, "Failed to create service, error %lu.\n", GetLastError()); ret = StartServiceA(service, 0, NULL); ok(!ret, "Expected failure.\n"); - todo_wine ok(GetLastError() == ERROR_BAD_EXE_FORMAT, "Got error %u.\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_BAD_EXE_FORMAT, "Got error %lu.\n", GetLastError());
ret = DeleteService(service); - ok(ret, "Failed to delete service, error %u.\n", GetLastError()); + ok(ret, "Failed to delete service, error %lu.\n", GetLastError()); CloseServiceHandle(service);
ret = DeleteFileA("C:\windows\sysnative\winetestsvc.exe"); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError());
CloseServiceHandle(manager); } @@ -1877,7 +1877,7 @@ static void test_sequence(void) return; } else - ok(scm_handle != NULL, "Could not get a handle to the manager: %d\n", GetLastError()); + ok(scm_handle != NULL, "Could not get a handle to the manager: %ld\n", GetLastError());
if (!scm_handle) return; svc_handle = OpenServiceA(scm_handle, NULL, GENERIC_READ); @@ -1904,7 +1904,7 @@ static void test_sequence(void) CloseServiceHandle(scm_handle); return; } - ok(svc_handle != NULL, "Could not open the service : %d\n", GetLastError()); + ok(svc_handle != NULL, "Could not open the service : %ld\n", GetLastError()); } else if (!svc_handle && (GetLastError() == ERROR_ACCESS_DENIED)) { @@ -1914,7 +1914,7 @@ static void test_sequence(void) } else { - ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError()); + ok(svc_handle != NULL, "Could not create the service : %ld\n", GetLastError()); if (svc_handle != NULL) { PSID sidOwner, sidGroup; @@ -1928,23 +1928,23 @@ static void test_sequence(void) retval = GetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, &sidOwner, &sidGroup, &dacl, &sacl, &pSD); LocalFree(pSD); - ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %ld\n", retval); retval = GetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &pSD); LocalFree(pSD); - ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %ld\n", retval); if (!is_nt4) { retval = GetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL, NULL, &dacl, NULL, &pSD); - ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %ld\n", retval); LocalFree(pSD); SetLastError(0xdeadbeef); retval = GetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, NULL); error = GetLastError(); - ok(retval == ERROR_INVALID_PARAMETER, "Expected GetSecurityInfo to fail: result %d\n", retval); - ok(error == 0xdeadbeef, "Unexpected last error %d\n", error); + ok(retval == ERROR_INVALID_PARAMETER, "Expected GetSecurityInfo to fail: result %ld\n", retval); + ok(error == 0xdeadbeef, "Unexpected last error %ld\n", error); } else win_skip("A NULL security descriptor in GetSecurityInfo results in an exception on NT4.\n"); @@ -1956,7 +1956,7 @@ static void test_sequence(void) ok(!bret, "Expected QueryServiceObjectSecurity to fail: result %d\n", bret); ok(error == ERROR_INSUFFICIENT_BUFFER || broken(error == ERROR_INVALID_ADDRESS) || broken(error == ERROR_INVALID_PARAMETER), - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", error); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", error); if (error != ERROR_INSUFFICIENT_BUFFER) n1 = 1024; pSD = LocalAlloc(0, n1); bret = pQueryServiceObjectSecurity(svc_handle, DACL_SECURITY_INFORMATION, pSD, n1, &n2); @@ -1979,23 +1979,23 @@ static void test_sequence(void) SetLastError(0xdeadbeef); ret = QueryServiceConfigA(svc_handle, NULL, 0, &needed); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
config = HeapAlloc(GetProcessHeap(), 0, needed); given = needed; SetLastError(0xdeadbeef); ret = QueryServiceConfigA(svc_handle, config, given, &needed); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError());
ok(config->lpBinaryPathName && config->lpLoadOrderGroup && config->lpDependencies && config->lpServiceStartName && config->lpDisplayName, "Expected all string struct members to be non-NULL\n"); ok(config->dwServiceType == (SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS), - "Expected SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, got %d\n", config->dwServiceType); - ok(config->dwStartType == SERVICE_DISABLED, "Expected SERVICE_DISABLED, got %d\n", config->dwStartType); - ok(config->dwErrorControl == SERVICE_ERROR_IGNORE, "Expected SERVICE_ERROR_IGNORE, got %d\n", config->dwErrorControl); + "Expected SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, got %ld\n", config->dwServiceType); + ok(config->dwStartType == SERVICE_DISABLED, "Expected SERVICE_DISABLED, got %ld\n", config->dwStartType); + ok(config->dwErrorControl == SERVICE_ERROR_IGNORE, "Expected SERVICE_ERROR_IGNORE, got %ld\n", config->dwErrorControl); ok(!strcmp(config->lpBinaryPathName, pathname), "Expected '%s', got '%s'\n", pathname, config->lpBinaryPathName); ok(!strcmp(config->lpLoadOrderGroup, empty), "Expected an empty string, got '%s'\n", config->lpLoadOrderGroup); - ok(config->dwTagId == 0, "Expected 0, got %d\n", config->dwTagId); + ok(config->dwTagId == 0, "Expected 0, got %ld\n", config->dwTagId); /* TODO: Show the double 0 terminated string */ todo_wine { @@ -2006,7 +2006,7 @@ static void test_sequence(void)
ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_ERROR_NORMAL, NULL, "TestGroup2", NULL, NULL, NULL, NULL, displayname2); - ok(ret, "ChangeServiceConfig failed (err=%d)\n", GetLastError()); + ok(ret, "ChangeServiceConfig failed (err=%ld)\n", GetLastError());
QueryServiceConfigA(svc_handle, NULL, 0, &needed); config = HeapReAlloc(GetProcessHeap(), 0, config, needed); @@ -2014,18 +2014,18 @@ static void test_sequence(void) ok(config->lpBinaryPathName && config->lpLoadOrderGroup && config->lpDependencies && config->lpServiceStartName && config->lpDisplayName, "Expected all string struct members to be non-NULL\n"); ok(config->dwServiceType == (SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS), - "Expected SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, got %d\n", config->dwServiceType); - ok(config->dwStartType == SERVICE_DISABLED, "Expected SERVICE_DISABLED, got %d\n", config->dwStartType); - ok(config->dwErrorControl == SERVICE_ERROR_NORMAL, "Expected SERVICE_ERROR_NORMAL, got %d\n", config->dwErrorControl); + "Expected SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, got %ld\n", config->dwServiceType); + ok(config->dwStartType == SERVICE_DISABLED, "Expected SERVICE_DISABLED, got %ld\n", config->dwStartType); + ok(config->dwErrorControl == SERVICE_ERROR_NORMAL, "Expected SERVICE_ERROR_NORMAL, got %ld\n", config->dwErrorControl); ok(!strcmp(config->lpBinaryPathName, pathname), "Expected '%s', got '%s'\n", pathname, config->lpBinaryPathName); ok(!strcmp(config->lpLoadOrderGroup, "TestGroup2"), "Expected 'TestGroup2', got '%s'\n", config->lpLoadOrderGroup); - ok(config->dwTagId == 0, "Expected 0, got %d\n", config->dwTagId); + ok(config->dwTagId == 0, "Expected 0, got %ld\n", config->dwTagId); ok(!strcmp(config->lpServiceStartName, localsystem), "Expected 'LocalSystem', got '%s'\n", config->lpServiceStartName); ok(!strcmp(config->lpDisplayName, displayname2), "Expected '%s', got '%s'\n", displayname2, config->lpDisplayName);
SetLastError(0xdeadbeef); ret = DeleteService(svc_handle); - ok(ret, "Expected success, got error %u\n", GetLastError()); + ok(ret, "Expected success, got error %lu\n", GetLastError()); CloseServiceHandle(svc_handle); CloseServiceHandle(scm_handle); HeapFree(GetProcessHeap(), 0, config); @@ -2064,7 +2064,7 @@ static void test_queryconfig2(void) if(GetLastError() == ERROR_ACCESS_DENIED) skip("Not enough rights to get a handle to the manager\n"); else - ok(FALSE, "Could not get a handle to the manager: %d\n", GetLastError()); + ok(FALSE, "Could not get a handle to the manager: %ld\n", GetLastError()); return; }
@@ -2089,7 +2089,7 @@ static void test_queryconfig2(void) if(GetLastError() == ERROR_ACCESS_DENIED) skip("Not enough rights to open the service\n"); else - ok(FALSE, "Could not open the service : %d\n", GetLastError()); + ok(FALSE, "Could not open the service : %ld\n", GetLastError()); CloseServiceHandle(scm_handle); return; } @@ -2100,7 +2100,7 @@ static void test_queryconfig2(void) CloseServiceHandle(scm_handle); return; } - ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError()); + ok(svc_handle != NULL, "Could not create the service : %ld\n", GetLastError()); if (!svc_handle) { CloseServiceHandle(scm_handle); @@ -2110,49 +2110,49 @@ static void test_queryconfig2(void) SetLastError(0xdeadbeef); ret = pQueryServiceConfig2A(svc_handle,0xfff0,buffer,sizeof(SERVICE_DESCRIPTIONA),&needed); ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INVALID_LEVEL == GetLastError(), "expected error ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + ok(ERROR_INVALID_LEVEL == GetLastError(), "expected error ERROR_INVALID_LEVEL, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pQueryServiceConfig2A(svc_handle,0xfff0,buffer,sizeof(SERVICE_DESCRIPTIONA),NULL); ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INVALID_LEVEL == GetLastError(), "expected error ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + ok(ERROR_INVALID_LEVEL == GetLastError(), "expected error ERROR_INVALID_LEVEL, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA),NULL); ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INVALID_ADDRESS == GetLastError(), "expected error ERROR_INVALID_ADDRESS, got %d\n", GetLastError()); + ok(ERROR_INVALID_ADDRESS == GetLastError(), "expected error ERROR_INVALID_ADDRESS, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,sizeof(SERVICE_DESCRIPTIONA),&needed); ok(!ret, "expected QueryServiceConfig2A to fail\n"); ok((ERROR_INVALID_ADDRESS == GetLastError()) || (ERROR_INSUFFICIENT_BUFFER == GetLastError()), - "expected error ERROR_INVALID_ADDRESS or ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "expected error ERROR_INVALID_ADDRESS or ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,sizeof(SERVICE_DESCRIPTIONA),NULL); ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INVALID_ADDRESS == GetLastError(), "expected error ERROR_INVALID_ADDRESS, got %d\n", GetLastError()); + ok(ERROR_INVALID_ADDRESS == GetLastError(), "expected error ERROR_INVALID_ADDRESS, got %ld\n", GetLastError());
needed = 0; SetLastError(0xdeadbeef); ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA)-1,&needed); ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %d\n", needed); + ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %ld\n", needed);
needed = 0; pConfig->lpDescription = (LPSTR)0xdeadbeef; ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA),&needed); ok(ret, "expected QueryServiceConfig2A to succeed\n"); - ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %d\n", needed); + ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %ld\n", needed); ok(!pConfig->lpDescription, "expected lpDescription to be NULL, got %p\n", pConfig->lpDescription);
SetLastError(0xdeadbeef); needed = 0; ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,0,&needed); ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %d\n", needed); + ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %ld\n", needed);
if(!pChangeServiceConfig2A) { @@ -2172,13 +2172,13 @@ static void test_queryconfig2(void) expected = sizeof(SERVICE_DESCRIPTIONA) + sizeof(description) * sizeof(WCHAR); /* !! */ ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA),&needed); ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == expected, "expected needed to be %d, got %d\n", expected, needed); + ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(needed == expected, "expected needed to be %ld, got %ld\n", expected, needed);
SetLastError(0xdeadbeef); ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,needed-1,&needed); ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,needed,&needed); @@ -2202,8 +2202,8 @@ static void test_queryconfig2(void) expected = sizeof(SERVICE_DESCRIPTIONW) + sizeof(WCHAR) * sizeof(description); ret = pQueryServiceConfig2W(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,0,&needed); ok(!ret, "expected QueryServiceConfig2W to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == expected, "expected needed to be %d, got %d\n", expected, needed); + ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(needed == expected, "expected needed to be %ld, got %ld\n", expected, needed);
SetLastError(0xdeadbeef); ret = pQueryServiceConfig2W(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer, needed,&needed); @@ -2278,23 +2278,23 @@ static void test_queryconfig2(void) win_skip("SERVICE_CONFIG_PRESHUTDOWN_INFO not supported\n"); goto cleanup; } - ok(ret, "expected QueryServiceConfig2W to succeed (%d)\n", GetLastError()); - ok(needed == sizeof(preshutdown_info), "needed = %d\n", needed); + ok(ret, "expected QueryServiceConfig2W to succeed (%ld)\n", GetLastError()); + ok(needed == sizeof(preshutdown_info), "needed = %ld\n", needed); ok(preshutdown_info.dwPreshutdownTimeout == 180000 || preshutdown_info.dwPreshutdownTimeout == 10000 /* Win10 1709+ */, - "Default PreshutdownTimeout = %d\n", preshutdown_info.dwPreshutdownTimeout); + "Default PreshutdownTimeout = %ld\n", preshutdown_info.dwPreshutdownTimeout);
SetLastError(0xdeadbeef); preshutdown_info.dwPreshutdownTimeout = -1; ret = pChangeServiceConfig2A(svc_handle, SERVICE_CONFIG_PRESHUTDOWN_INFO, (LPVOID)&preshutdown_info); - ok(ret, "expected ChangeServiceConfig2A to succeed (%d)\n", GetLastError()); + ok(ret, "expected ChangeServiceConfig2A to succeed (%ld)\n", GetLastError());
ret = pQueryServiceConfig2W(svc_handle, SERVICE_CONFIG_PRESHUTDOWN_INFO, (LPBYTE)&preshutdown_info, sizeof(preshutdown_info), &needed); - ok(ret, "expected QueryServiceConfig2W to succeed (%d)\n", GetLastError()); - ok(needed == sizeof(preshutdown_info), "needed = %d\n", needed); - ok(preshutdown_info.dwPreshutdownTimeout == -1, "New PreshutdownTimeout = %d\n", + ok(ret, "expected QueryServiceConfig2W to succeed (%ld)\n", GetLastError()); + ok(needed == sizeof(preshutdown_info), "needed = %ld\n", needed); + ok(preshutdown_info.dwPreshutdownTimeout == -1, "New PreshutdownTimeout = %ld\n", preshutdown_info.dwPreshutdownTimeout);
cleanup: @@ -2319,24 +2319,24 @@ static DWORD try_start_stop(SC_HANDLE svc_handle, const char* name, DWORD is_nt4 SERVICE_STATUS_PROCESS statusproc;
ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)&statusproc, sizeof(statusproc), &needed); - ok(ret, "%s: QueryServiceStatusEx() failed le=%u\n", name, GetLastError()); - ok(statusproc.dwCurrentState == SERVICE_STOPPED, "%s: should be stopped state=%x\n", name, statusproc.dwCurrentState); - ok(statusproc.dwProcessId == 0, "%s: ProcessId should be 0 instead of %x\n", name, statusproc.dwProcessId); + ok(ret, "%s: QueryServiceStatusEx() failed le=%lu\n", name, GetLastError()); + ok(statusproc.dwCurrentState == SERVICE_STOPPED, "%s: should be stopped state=%lx\n", name, statusproc.dwCurrentState); + ok(statusproc.dwProcessId == 0, "%s: ProcessId should be 0 instead of %lx\n", name, statusproc.dwProcessId); }
ret = StartServiceA(svc_handle, 0, NULL); le2 = GetLastError(); ok(!ret, "%s: StartServiceA() should have failed\n", name); - ok(le2 == le1, "%s: the second try should yield the same error: %u != %u\n", name, le1, le2); + ok(le2 == le1, "%s: the second try should yield the same error: %lu != %lu\n", name, le1, le2);
status.dwCurrentState = 0xdeadbeef; ret = ControlService(svc_handle, SERVICE_CONTROL_STOP, &status); le2 = GetLastError(); ok(!ret, "%s: ControlService() should have failed\n", name); - ok(le2 == ERROR_SERVICE_NOT_ACTIVE, "%s: %d != ERROR_SERVICE_NOT_ACTIVE\n", name, le2); + ok(le2 == ERROR_SERVICE_NOT_ACTIVE, "%s: %ld != ERROR_SERVICE_NOT_ACTIVE\n", name, le2); ok(status.dwCurrentState == SERVICE_STOPPED || broken(is_nt4), /* NT4 returns a random value */ - "%s: should be stopped state=%x\n", name, status.dwCurrentState); + "%s: should be stopped state=%lx\n", name, status.dwCurrentState);
return le1; } @@ -2358,20 +2358,20 @@ static void CALLBACK notify_cb(void *user) { case PHASE_STOPPED: ok(data->notify.dwNotificationStatus == ERROR_SUCCESS, - "Got wrong notification status: %u\n", data->notify.dwNotificationStatus); + "Got wrong notification status: %lu\n", data->notify.dwNotificationStatus); ok(data->notify.ServiceStatus.dwCurrentState == SERVICE_STOPPED, - "Got wrong service state: 0x%x\n", data->notify.ServiceStatus.dwCurrentState); + "Got wrong service state: 0x%lx\n", data->notify.ServiceStatus.dwCurrentState); ok(data->notify.dwNotificationTriggered == SERVICE_NOTIFY_STOPPED, - "Got wrong notification triggered: 0x%x\n", data->notify.dwNotificationTriggered); + "Got wrong notification triggered: 0x%lx\n", data->notify.dwNotificationTriggered); break;
case PHASE_RUNNING: ok(data->notify.dwNotificationStatus == ERROR_SUCCESS, - "Got wrong notification status: %u\n", data->notify.dwNotificationStatus); + "Got wrong notification status: %lu\n", data->notify.dwNotificationStatus); ok(data->notify.ServiceStatus.dwCurrentState == SERVICE_RUNNING, - "Got wrong service state: 0x%x\n", data->notify.ServiceStatus.dwCurrentState); + "Got wrong service state: 0x%lx\n", data->notify.ServiceStatus.dwCurrentState); ok(data->notify.dwNotificationTriggered == SERVICE_NOTIFY_RUNNING, - "Got wrong notification triggered: 0x%x\n", data->notify.dwNotificationTriggered); + "Got wrong notification triggered: 0x%lx\n", data->notify.dwNotificationTriggered); break; }
@@ -2408,24 +2408,24 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename) data.was_called = FALSE;
dr = pNotifyServiceStatusChangeW(svc, SERVICE_NOTIFY_STOPPED | SERVICE_NOTIFY_RUNNING, &data.notify); - ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW failed: %u\n", dr); + ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW failed: %lu\n", dr);
dr = SleepEx(100, TRUE); - ok(dr == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %u\n", dr); + ok(dr == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %lu\n", dr); ok(data.was_called == TRUE, "APC wasn't called\n");
br = StartServiceA(svc, 0, NULL); - ok(br, "StartService failed: %u\n", GetLastError()); + ok(br, "StartService failed: %lu\n", GetLastError());
/* receive running notification */ data.phase = PHASE_RUNNING; data.was_called = FALSE;
dr = pNotifyServiceStatusChangeW(svc, SERVICE_NOTIFY_STOPPED | SERVICE_NOTIFY_RUNNING, &data.notify); - ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW failed: %u\n", dr); + ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW failed: %lu\n", dr);
dr = SleepEx(100, TRUE); - ok(dr == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %u\n", dr); + ok(dr == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %lu\n", dr); ok(data.was_called == TRUE, "APC wasn't called\n");
/* cannot register two notifications on the same handle */ @@ -2433,7 +2433,7 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename) data.was_called = FALSE;
dr = pNotifyServiceStatusChangeW(svc, SERVICE_NOTIFY_STOPPED | SERVICE_NOTIFY_RUNNING, &data.notify); - ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW failed: %u\n", dr); + ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW failed: %lu\n", dr);
memset(&data2.notify, 0, sizeof(data2.notify)); data2.notify.dwVersion = SERVICE_NOTIFY_STATUS_CHANGE; @@ -2443,17 +2443,17 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename) data2.was_called = FALSE;
dr = pNotifyServiceStatusChangeW(svc, SERVICE_NOTIFY_STOPPED | SERVICE_NOTIFY_RUNNING, &data2.notify); - ok(dr == ERROR_ALREADY_REGISTERED || !dr /* Win8+ */, "wrong error %u\n", dr); + ok(dr == ERROR_ALREADY_REGISTERED || !dr /* Win8+ */, "wrong error %lu\n", dr); if (!dr) { dr = SleepEx(100, TRUE); - ok(dr == WAIT_IO_COMPLETION, "got %u\n", dr); + ok(dr == WAIT_IO_COMPLETION, "got %lu\n", dr); ok(data2.was_called, "APC was not called\n"); } else { dr = SleepEx(100, TRUE); - ok(!dr, "got %u\n", dr); + ok(!dr, "got %lu\n", dr); ok(!data2.was_called, "APC should not have been called\n"); } ok(data.was_called == FALSE, "APC should not have been called\n"); @@ -2468,15 +2468,15 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename)
/* it's possible to have multiple notifications using different service handles */ dr = pNotifyServiceStatusChangeW(svc2, SERVICE_NOTIFY_STOPPED, &data2.notify); - ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW gave wrong result: %u\n", dr); + ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW gave wrong result: %lu\n", dr);
/* stop service and receive notifiction */ br = ControlService(svc, SERVICE_CONTROL_STOP, &status); - ok(br, "ControlService failed: %u\n", GetLastError()); + ok(br, "ControlService failed: %lu\n", GetLastError());
dr = SleepEx(100, TRUE); dr2 = SleepEx(100, TRUE); - ok(dr == WAIT_IO_COMPLETION || dr2 == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %u\n", dr); + ok(dr == WAIT_IO_COMPLETION || dr2 == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %lu\n", dr); ok(data.was_called == TRUE, "APC wasn't called\n"); ok(data2.was_called == TRUE, "APC wasn't called\n");
@@ -2487,19 +2487,19 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename) data.phase = PHASE_RUNNING; data.was_called = FALSE; dr = pNotifyServiceStatusChangeW(svc, SERVICE_NOTIFY_STOPPED | SERVICE_NOTIFY_RUNNING, &data.notify); - ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW failed: %u\n", dr); + ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW failed: %lu\n", dr);
CloseServiceHandle(svc);
br = StartServiceA(svc2, 0, NULL); - ok(br, "StartService failed: %u\n", GetLastError()); + ok(br, "StartService failed: %lu\n", GetLastError());
dr = SleepEx(100, TRUE); - ok(dr == 0, "Got wrong SleepEx result: %u\n", dr); + ok(dr == 0, "Got wrong SleepEx result: %lu\n", dr); ok(data.was_called == FALSE, "APC should not have been called\n");
br = ControlService(svc2, SERVICE_CONTROL_STOP, &status); - ok(br, "ControlService failed: %u\n", GetLastError()); + ok(br, "ControlService failed: %lu\n", GetLastError());
CloseServiceHandle(svc2); } @@ -2520,7 +2520,7 @@ static void test_start_stop(void) if(GetLastError() == ERROR_ACCESS_DENIED) skip("Not enough rights to get a handle to the manager\n"); else - ok(FALSE, "Could not get a handle to the manager: %d\n", GetLastError()); + ok(FALSE, "Could not get a handle to the manager: %ld\n", GetLastError()); return; }
@@ -2548,16 +2548,16 @@ static void test_start_stop(void) if(GetLastError() == ERROR_ACCESS_DENIED) skip("Not enough rights to create the service\n"); else - ok(FALSE, "Could not create the service: %d\n", GetLastError()); + ok(FALSE, "Could not create the service: %ld\n", GetLastError()); goto cleanup; } le = try_start_stop(svc_handle, displayname, is_nt4); - ok(le == ERROR_SERVICE_DISABLED, "%d != ERROR_SERVICE_DISABLED\n", le); + ok(le == ERROR_SERVICE_DISABLED, "%ld != ERROR_SERVICE_DISABLED\n", le);
/* Then one with a bad path */ displayname = "Winetest Bad Path"; ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_DEMAND_START, SERVICE_NO_CHANGE, "c:\no_such_file.exe", NULL, NULL, NULL, NULL, NULL, displayname); - ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); + ok(ret, "ChangeServiceConfig() failed le=%lu\n", GetLastError()); try_start_stop(svc_handle, displayname, is_nt4);
if (is_nt4) @@ -2572,15 +2572,15 @@ static void test_start_stop(void) /* Again with a process that exits right away */ displayname = "Winetest Exit Service"; ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, cmd, NULL, NULL, NULL, NULL, NULL, displayname); - ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); + ok(ret, "ChangeServiceConfig() failed le=%lu\n", GetLastError()); le = try_start_stop(svc_handle, displayname, is_nt4); - ok(le == ERROR_SERVICE_REQUEST_TIMEOUT, "%d != ERROR_SERVICE_REQUEST_TIMEOUT\n", le); + ok(le == ERROR_SERVICE_REQUEST_TIMEOUT, "%ld != ERROR_SERVICE_REQUEST_TIMEOUT\n", le);
/* create a real service and test notifications */ sprintf(cmd, "%s service serve", selfname); displayname = "Winetest Service"; ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, cmd, NULL, NULL, NULL, NULL, NULL, displayname); - ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); + ok(ret, "ChangeServiceConfig() failed le=%lu\n", GetLastError()); test_servicenotify(scm_handle, servicename);
cleanup: @@ -2612,31 +2612,31 @@ static void test_refcount(void) svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(svc_handle1 != NULL, "Expected success, got error %u\n", GetLastError()); + ok(svc_handle1 != NULL, "Expected success, got error %lu\n", GetLastError());
/* Get a handle to this new service */ svc_handle2 = OpenServiceA(scm_handle, servicename, GENERIC_READ); - ok(svc_handle2 != NULL, "Expected success, got error %u\n", GetLastError()); + ok(svc_handle2 != NULL, "Expected success, got error %lu\n", GetLastError());
/* Get another handle to this new service */ svc_handle3 = OpenServiceA(scm_handle, servicename, GENERIC_READ); - ok(svc_handle3 != NULL, "Expected success, got error %u\n", GetLastError()); + ok(svc_handle3 != NULL, "Expected success, got error %lu\n", GetLastError());
/* Check if we can close the handle to the Service Control Manager */ ret = CloseServiceHandle(scm_handle); - ok(ret, "Expected success (err=%d)\n", GetLastError()); + ok(ret, "Expected success (err=%ld)\n", GetLastError());
/* Get a new handle to the Service Control Manager */ scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - ok(scm_handle != NULL, "Expected success, got error %u\n", GetLastError()); + ok(scm_handle != NULL, "Expected success, got error %lu\n", GetLastError());
/* Get a handle to this new service */ svc_handle4 = OpenServiceA(scm_handle, servicename, GENERIC_ALL); - ok(svc_handle4 != NULL, "Expected success, got error %u\n", GetLastError()); + ok(svc_handle4 != NULL, "Expected success, got error %lu\n", GetLastError());
/* Delete the service */ ret = DeleteService(svc_handle4); - ok(ret, "Expected success (err=%d)\n", GetLastError()); + ok(ret, "Expected success (err=%ld)\n", GetLastError());
/* We cannot create the same service again as it's still marked as 'being deleted'. * The reason is that we still have 4 open handles to this service even though we @@ -2648,17 +2648,17 @@ static void test_refcount(void) SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); ok(!svc_handle5, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_MARKED_FOR_DELETE, - "Expected ERROR_SERVICE_MARKED_FOR_DELETE, got %d\n", GetLastError()); + "Expected ERROR_SERVICE_MARKED_FOR_DELETE, got %ld\n", GetLastError());
/* Close all the handles to the service and try again */ ret = CloseServiceHandle(svc_handle4); - ok(ret, "Expected success (err=%d)\n", GetLastError()); + ok(ret, "Expected success (err=%ld)\n", GetLastError()); ret = CloseServiceHandle(svc_handle3); - ok(ret, "Expected success (err=%d)\n", GetLastError()); + ok(ret, "Expected success (err=%ld)\n", GetLastError()); ret = CloseServiceHandle(svc_handle2); - ok(ret, "Expected success (err=%d)\n", GetLastError()); + ok(ret, "Expected success (err=%ld)\n", GetLastError()); ret = CloseServiceHandle(svc_handle1); - ok(ret, "Expected success (err=%d)\n", GetLastError()); + ok(ret, "Expected success (err=%ld)\n", GetLastError());
/* Wait a while. Doing a CreateService too soon will result again * in an ERROR_SERVICE_MARKED_FOR_DELETE error. @@ -2669,11 +2669,11 @@ static void test_refcount(void) svc_handle5 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(svc_handle5 != NULL, "Expected success, got error %u\n", GetLastError()); + ok(svc_handle5 != NULL, "Expected success, got error %lu\n", GetLastError());
/* Delete the service */ ret = DeleteService(svc_handle5); - ok(ret, "Expected success (err=%d)\n", GetLastError()); + ok(ret, "Expected success (err=%ld)\n", GetLastError()); CloseServiceHandle(svc_handle5); CloseServiceHandle(scm_handle); } @@ -2707,30 +2707,30 @@ static void test_EventLog(void) SERVICE_STATUS_PROCESS status;
scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_READ); - ok(scm_handle != NULL, "OpenSCManager error %u\n", GetLastError()); + ok(scm_handle != NULL, "OpenSCManager error %lu\n", GetLastError());
svc_handle = OpenServiceA(scm_handle, "EventLog", GENERIC_READ); - ok(svc_handle != NULL, "OpenService error %u\n", GetLastError()); + ok(svc_handle != NULL, "OpenService error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = QueryServiceConfigA(svc_handle, NULL, 0, &size); ok(!ret, "QueryServiceConfig should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError());
config = HeapAlloc(GetProcessHeap(), 0, size); ret = QueryServiceConfigA(svc_handle, config, size, &size); - ok(ret, "QueryServiceConfig error %u\n", GetLastError()); + ok(ret, "QueryServiceConfig error %lu\n", GetLastError());
- ok(config->dwServiceType == SERVICE_WIN32_SHARE_PROCESS, "got %#x\n", config->dwServiceType); - ok(config->dwStartType == SERVICE_AUTO_START, "got %u\n", config->dwStartType); - ok(config->dwErrorControl == SERVICE_ERROR_NORMAL, "got %u\n", config->dwErrorControl); + ok(config->dwServiceType == SERVICE_WIN32_SHARE_PROCESS, "got %#lx\n", config->dwServiceType); + ok(config->dwStartType == SERVICE_AUTO_START, "got %lu\n", config->dwStartType); + ok(config->dwErrorControl == SERVICE_ERROR_NORMAL, "got %lu\n", config->dwErrorControl); ok(!strcmpi(config->lpBinaryPathName, "C:\windows\system32\services.exe") /* XP */ || !strcmpi(config->lpBinaryPathName, "C:\windows\system32\svchost.exe -k LocalServiceNetworkRestricted") /* Vista+ */ || !strcmpi(config->lpBinaryPathName, "C:\windows\system32\svchost.exe -k LocalServiceNetworkRestricted -p") /* Win10 */, "got %s\n", config->lpBinaryPathName); todo_wine ok(!strcmpi(config->lpLoadOrderGroup, "Event Log"), "got %s\n", config->lpLoadOrderGroup); - ok(config->dwTagId == 0, "Expected 0, got %d\n", config->dwTagId); + ok(config->dwTagId == 0, "Expected 0, got %ld\n", config->dwTagId); ok(!config->lpDependencies[0], "lpDependencies is not empty\n"); ok(!strcmp(config->lpServiceStartName, "LocalSystem") /* XP */ || !strcmp(config->lpServiceStartName, "NT AUTHORITY\LocalService"), @@ -2744,23 +2744,23 @@ static void test_EventLog(void) memset(&status, 0, sizeof(status)); size = sizeof(status); ret = QueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE *)&status, size, &size); - ok(ret, "QueryServiceStatusEx error %u\n", GetLastError()); + ok(ret, "QueryServiceStatusEx error %lu\n", GetLastError()); ok(status.dwServiceType == SERVICE_WIN32_SHARE_PROCESS || status.dwServiceType == (SERVICE_WIN32_SHARE_PROCESS | SERVICE_WIN32_OWN_PROCESS) /* Win10 */, - "got %#x\n", status.dwServiceType); - ok(status.dwCurrentState == SERVICE_RUNNING, "got %#x\n", status.dwCurrentState); + "got %#lx\n", status.dwServiceType); + ok(status.dwCurrentState == SERVICE_RUNNING, "got %#lx\n", status.dwCurrentState); todo_wine ok(status.dwControlsAccepted == SERVICE_ACCEPT_SHUTDOWN /* XP */ || status.dwControlsAccepted == (SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN) /* 2008 */ || status.dwControlsAccepted == (SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_TIMECHANGE | SERVICE_ACCEPT_SHUTDOWN), - "got %#x\n", status.dwControlsAccepted); - ok(status.dwWin32ExitCode == 0, "got %#x\n", status.dwWin32ExitCode); - ok(status.dwServiceSpecificExitCode == 0, "got %#x\n", status.dwServiceSpecificExitCode); - ok(status.dwCheckPoint == 0, "got %#x\n", status.dwCheckPoint); - ok(status.dwWaitHint == 0, "got %#x\n", status.dwWaitHint); - ok(status.dwProcessId != 0, "got %#x\n", status.dwProcessId); + "got %#lx\n", status.dwControlsAccepted); + ok(status.dwWin32ExitCode == 0, "got %#lx\n", status.dwWin32ExitCode); + ok(status.dwServiceSpecificExitCode == 0, "got %#lx\n", status.dwServiceSpecificExitCode); + ok(status.dwCheckPoint == 0, "got %#lx\n", status.dwCheckPoint); + ok(status.dwWaitHint == 0, "got %#lx\n", status.dwWaitHint); + ok(status.dwProcessId != 0, "got %#lx\n", status.dwProcessId); ok(status.dwServiceFlags == 0 || status.dwServiceFlags == SERVICE_RUNS_IN_SYSTEM_PROCESS /* XP */, - "got %#x\n", status.dwServiceFlags); + "got %#lx\n", status.dwServiceFlags);
CloseServiceHandle(svc_handle); CloseServiceHandle(scm_handle);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109041
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
advapi32: eventlog.c:894: Test failed: Expected ReportEvent success : 5 eventlog.c:901: Test failed: Expected 9 records, got 8 eventlog.c:901: Test failed: Expected 10 records, got 9 eventlog.c:926: Test failed: Expected 10 records, got 9 eventlog.c:995: Test failed: Expected 9, got 10 eventlog.c:997: Test failed: Expected 2, got 1 eventlog.c:999: Test failed: Expected 0, got 1 eventlog.c:1005: Test failed: Expected 'WineSrc20', got 'WineSrc300'
=== w1064 (32 bit report) ===
advapi32: eventlog: Timeout
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/advpack/tests/Makefile.in | 1 dlls/advpack/tests/advpack.c | 88 ++++++++++++++++++++-------------------- dlls/advpack/tests/files.c | 48 +++++++++++----------- dlls/advpack/tests/install.c | 50 +++++++++++------------ 4 files changed, 93 insertions(+), 94 deletions(-)
diff --git a/dlls/advpack/tests/Makefile.in b/dlls/advpack/tests/Makefile.in index 12e2d344dc3..9c1fecebe9a 100644 --- a/dlls/advpack/tests/Makefile.in +++ b/dlls/advpack/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = advpack.dll IMPORTS = cabinet advapi32 advpack
diff --git a/dlls/advpack/tests/advpack.c b/dlls/advpack/tests/advpack.c index d787590eea0..33d5f4bc52b 100644 --- a/dlls/advpack/tests/advpack.c +++ b/dlls/advpack/tests/advpack.c @@ -99,28 +99,28 @@ static void version_test(void) major = minor = 0; hr = pGetVersionFromFile("kernel32.dll", &major, &minor, FALSE); ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned " - "0x%08x\n", hr); - trace("kernel32.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n", + "0x%08lx\n", hr); + trace("kernel32.dll Language ID: 0x%08lx, Codepage ID: 0x%08lx\n", major, minor);
major = minor = 0; hr = pGetVersionFromFile("kernel32.dll", &major, &minor, TRUE); ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned " - "0x%08x\n", hr); + "0x%08lx\n", hr); trace("kernel32.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major), HIWORD(minor), LOWORD(minor));
major = minor = 0; hr = pGetVersionFromFile("advpack.dll", &major, &minor, FALSE); ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned " - "0x%08x\n", hr); - trace("advpack.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n", + "0x%08lx\n", hr); + trace("advpack.dll Language ID: 0x%08lx, Codepage ID: 0x%08lx\n", major, minor);
major = minor = 0; hr = pGetVersionFromFile("advpack.dll", &major, &minor, TRUE); ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned " - "0x%08x\n", hr); + "0x%08lx\n", hr); trace("advpack.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major), HIWORD(minor), LOWORD(minor)); } @@ -278,7 +278,7 @@ static void translateinfstring_test(void) } ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr); ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer); - ok(dwSize == 25, "Expected size 25, got %d\n", dwSize); + ok(dwSize == 25, "Expected size 25, got %ld\n", dwSize);
buffer[0] = 0; /* try other nonexistent section */ @@ -304,7 +304,7 @@ static void translateinfstring_test(void) if(hr == ERROR_SUCCESS) { ok(!strcmp(buffer, APP_PATH), "Expected '%s', got '%s'\n", APP_PATH, buffer); - ok(dwSize == APP_PATH_LEN, "Expected size %d, got %d\n", APP_PATH_LEN, dwSize); + ok(dwSize == APP_PATH_LEN, "Expected size %ld, got %ld\n", APP_PATH_LEN, dwSize); }
buffer[0] = 0; @@ -315,7 +315,7 @@ static void translateinfstring_test(void) todo_wine { ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer); - ok(dwSize == 25, "Expected size 25, got %d\n", dwSize); + ok(dwSize == 25, "Expected size 25, got %ld\n", dwSize); }
DeleteFileA("c:\a.inf"); @@ -342,31 +342,31 @@ static void translateinfstringex_test(void)
/* try a NULL filename */ hr = pOpenINFEngine(NULL, "Options.NTx86", 0, &hinf, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* try an empty filename */ hr = pOpenINFEngine("", "Options.NTx86", 0, &hinf, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* NT+ */ || hr == HRESULT_FROM_WIN32(E_UNEXPECTED) /* 9x */, - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND or E_UNEXPECTED), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND or E_UNEXPECTED), got %08lx\n", hr);
/* try a NULL hinf */ hr = pOpenINFEngine(inf_file, "Options.NTx86", 0, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* open the INF without the Install section specified */ hr = pOpenINFEngine(inf_file, NULL, 0, &hinf, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* try a NULL hinf */ hr = pTranslateInfStringEx(NULL, inf_file, "Options.NTx86", "InstallDir", buffer, size, &size, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* try a NULL filename */ hr = pTranslateInfStringEx(hinf, NULL, "Options.NTx86", "InstallDir", buffer, size, &size, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* try an empty filename */ memset(buffer, 'a', 25); @@ -374,32 +374,32 @@ static void translateinfstringex_test(void) size = MAX_PATH; hr = pTranslateInfStringEx(hinf, "", "Options.NTx86", "InstallDir", buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); todo_wine { ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer); - ok(size == 25, "Expected size 25, got %d\n", size); + ok(size == 25, "Expected size 25, got %ld\n", size); }
/* try a NULL translate section */ hr = pTranslateInfStringEx(hinf, inf_file, NULL, "InstallDir", buffer, size, &size, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* try an empty translate section */ hr = pTranslateInfStringEx(hinf, inf_file, "", "InstallDir", buffer, size, &size, NULL); - ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr); + ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08lx\n", hr);
/* try a NULL translate key */ hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", NULL, buffer, size, &size, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* try an empty translate key */ hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "", buffer, size, &size, NULL); - ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr); + ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08lx\n", hr);
/* successfully translate the string */ memset(buffer, 'a', 25); @@ -407,20 +407,20 @@ static void translateinfstringex_test(void) size = MAX_PATH; hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "InstallDir", buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); todo_wine { ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer); - ok(size == 25, "Expected size 25, got %d\n", size); + ok(size == 25, "Expected size 25, got %ld\n", size); }
/* try a NULL hinf */ hr = pCloseINFEngine(NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* successfully close the hinf */ hr = pCloseINFEngine(hinf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* open the inf with the install section */ hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL); @@ -430,7 +430,7 @@ static void translateinfstringex_test(void) DeleteFileA(inf_file); return; } - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* translate the string with the install section specified */ memset(buffer, 'a', APP_PATH_LEN); @@ -438,9 +438,9 @@ static void translateinfstringex_test(void) size = MAX_PATH; hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "InstallDir", buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!strcmp(buffer, APP_PATH), "Expected %s, got %s\n", APP_PATH, buffer); - ok(size == APP_PATH_LEN, "Expected size %d, got %d\n", APP_PATH_LEN, size); + ok(size == APP_PATH_LEN, "Expected size %ld, got %ld\n", APP_PATH_LEN, size);
/* Single quote test (Note size includes null on return from call) */ memset(buffer, 'a', APP_PATH_LEN); @@ -448,10 +448,10 @@ static void translateinfstringex_test(void) size = MAX_PATH; hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result1", buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpiA(buffer, PROG_FILES_ROOT), "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", + ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %ld\n", lstrlenA(PROG_FILES_ROOT)+1, size);
memset(buffer, 'a', APP_PATH_LEN); @@ -459,10 +459,10 @@ static void translateinfstringex_test(void) size = MAX_PATH; hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result2", buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpiA(buffer, PROG_FILES_ROOT), "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", + ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %ld\n", lstrlenA(PROG_FILES_ROOT)+1, size);
{ @@ -475,16 +475,16 @@ static void translateinfstringex_test(void) size = MAX_PATH; hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result3", buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpiA(buffer, drive), "Expected %s, got %s\n", drive, buffer); - ok(size == strlen(drive)+1, "Expected size %d, got %d\n", + ok(size == strlen(drive)+1, "Expected size %d, got %ld\n", lstrlenA(drive)+1, size); }
/* close the INF again */ hr = pCloseINFEngine(hinf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
DeleteFileA(inf_file);
@@ -525,7 +525,7 @@ static void translateinfstringex_test(void)
/* open the inf with the install section */ hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* Single quote test (Note size includes null on return from call) */ memset(buffer, 'a', APP_PATH_LEN); @@ -533,15 +533,15 @@ static void translateinfstringex_test(void) size = MAX_PATH; hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result2", buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpiA(buffer, PROG_FILES_ROOT), "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", + ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %ld\n", lstrlenA(PROG_FILES_ROOT)+1, size);
/* close the INF again */ hr = pCloseINFEngine(hinf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
DeleteFileA(inf_file); } @@ -588,14 +588,14 @@ static void setperusersecvalues_test(void) /* This crashes on systems with IE7 */ hr = pSetPerUserSecValues(NULL); todo_wine - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n"); }
/* at the very least, szGUID must be valid */ peruser.szGUID[0] = '\0'; hr = pSetPerUserSecValues(&peruser); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
/* set initial values */ @@ -606,7 +606,7 @@ static void setperusersecvalues_test(void) skip("SetPerUserSecValues is broken\n"); return; } - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(OPEN_GUID_KEY(), "Expected guid key to exist\n"); ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n"); ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n"); @@ -623,7 +623,7 @@ static void setperusersecvalues_test(void) /* raise the version, but bRollback is FALSE, so vals not saved */ lstrcpyA(peruser.szVersion, "2,1,1,1"); hr = pSetPerUserSecValues(&peruser); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n"); ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n"); ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n"); @@ -640,7 +640,7 @@ static void setperusersecvalues_test(void) peruser.bRollback = TRUE; lstrcpyA(peruser.szVersion, "3,1,1,1"); hr = pSetPerUserSecValues(&peruser); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n"); ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n"); ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n"); diff --git a/dlls/advpack/tests/files.c b/dlls/advpack/tests/files.c index 488b7ab6136..8186fbf0c74 100644 --- a/dlls/advpack/tests/files.c +++ b/dlls/advpack/tests/files.c @@ -111,7 +111,7 @@ static void test_AddDelBackupEntry(void)
/* try a NULL file list */ res = pAddDelBackupEntry(NULL, "backup", "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(!DeleteFileA(path), "Expected path to not exist\n");
lstrcpyA(path, CURR_DIR); @@ -119,7 +119,7 @@ static void test_AddDelBackupEntry(void)
/* try an empty base name */ res = pAddDelBackupEntry("one\0two\0three\0", "backup", "", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(!DeleteFileA(path), "Expected path to not exist\n");
lstrcpyA(path, CURR_DIR); @@ -127,14 +127,14 @@ static void test_AddDelBackupEntry(void)
/* try an invalid flag */ res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", 0); - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(!DeleteFileA(path), "Expected path to not exist\n");
lstrcpyA(path, "c:\basename.INI");
/* create the INF file */ res = pAddDelBackupEntry("one\0two\0three\0", "c:\", "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); if (GetFileAttributesA(path) != INVALID_FILE_ATTRIBUTES) { ok(check_ini_file_attr(path), "Expected ini file to be hidden\n"); @@ -149,14 +149,14 @@ static void test_AddDelBackupEntry(void) /* try to create the INI file in a nonexistent directory */ RemoveDirectoryA("backup"); res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(!check_ini_file_attr(path), "Expected ini file to not be hidden\n"); ok(!DeleteFileA(path), "Expected path to not exist\n");
/* try an existent, relative backup directory */ CreateDirectoryA("backup", NULL); res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(check_ini_file_attr(path), "Expected ini file to be hidden\n"); ok(DeleteFileA(path), "Expected path to exist\n"); RemoveDirectoryA("backup"); @@ -166,13 +166,13 @@ static void test_AddDelBackupEntry(void)
/* try a NULL backup dir, INI is created in the windows directory */ res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res);
/* remove the entries with AADBE_DEL_ENTRY */ SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL); res = pAddDelBackupEntry("one\0three\0", NULL, "basename", AADBE_DEL_ENTRY); SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL); - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ret = DeleteFileA(path); ok(ret == TRUE || broken(ret == FALSE), /* win98 */ @@ -395,19 +395,19 @@ static void test_ExtractFiles(void)
/* try NULL cab file */ hr = pExtractFiles(NULL, destFolder, 0, NULL, NULL, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr); ok(RemoveDirectoryA("dest"), "Expected dest to exist\n");
/* try NULL destination */ hr = pExtractFiles("extract.cab", NULL, 0, NULL, NULL, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr); ok(!RemoveDirectoryA("dest"), "Expected dest to not exist\n");
/* extract all files in the cab to nonexistent destination directory */ hr = pExtractFiles("extract.cab", destFolder, 0, NULL, NULL, 0); ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || hr == E_FAIL, /* win95 */ - "Expected %08x or %08x, got %08x\n", E_FAIL, + "Expected %08lx or %08lx, got %08lx\n", E_FAIL, HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), hr); ok(!DeleteFileA("dest\a.txt"), "Expected dest\a.txt to not exist\n"); ok(!DeleteFileA("dest\testdir\c.txt"), "Expected dest\testdir\c.txt to not exist\n"); @@ -417,7 +417,7 @@ static void test_ExtractFiles(void) /* extract all files in the cab to the destination directory */ CreateDirectoryA("dest", NULL); hr = pExtractFiles("extract.cab", destFolder, 0, NULL, NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); ok(DeleteFileA("dest\a.txt"), "Expected dest\a.txt to exist\n"); ok(DeleteFileA("dest\b.txt"), "Expected dest\b.txt to exist\n"); ok(DeleteFileA("dest\testdir\c.txt"), "Expected dest\testdir\c.txt to exist\n"); @@ -426,7 +426,7 @@ static void test_ExtractFiles(void)
/* extract all files to a relative destination directory */ hr = pExtractFiles("extract.cab", "dest", 0, NULL, NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); ok(DeleteFileA("dest\a.txt"), "Expected dest\a.txt to exist\n"); ok(DeleteFileA("dest\b.txt"), "Expected dest\b.txt to exist\n"); ok(DeleteFileA("dest\testdir\c.txt"), "Expected dest\testdir\c.txt to exist\n"); @@ -435,7 +435,7 @@ static void test_ExtractFiles(void)
/* only extract two of the files from the cab */ hr = pExtractFiles("extract.cab", "dest", 0, "a.txt:testdir\c.txt", NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); ok(DeleteFileA("dest\a.txt"), "Expected dest\a.txt to exist\n"); ok(DeleteFileA("dest\testdir\c.txt"), "Expected dest\testdir\c.txt to exist\n"); ok(RemoveDirectoryA("dest\testdir"), "Expected dest\testdir to exist\n"); @@ -444,7 +444,7 @@ static void test_ExtractFiles(void)
/* use valid chars before and after file list */ hr = pExtractFiles("extract.cab", "dest", 0, " :\t: a.txt:testdir\c.txt \t:", NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); ok(DeleteFileA("dest\a.txt"), "Expected dest\a.txt to exist\n"); ok(DeleteFileA("dest\testdir\c.txt"), "Expected dest\testdir\c.txt to exist\n"); ok(RemoveDirectoryA("dest\testdir"), "Expected dest\testdir to exist\n"); @@ -453,27 +453,27 @@ static void test_ExtractFiles(void)
/* use invalid chars before and after file list */ hr = pExtractFiles("extract.cab", "dest", 0, " +-\ a.txt:testdir\c.txt a_:", NULL, 0); - ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr); + ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr); ok(!DeleteFileA("dest\a.txt"), "Expected dest\a.txt to not exist\n"); ok(!DeleteFileA("dest\testdir\c.txt"), "Expected dest\testdir\c.txt to not exist\n"); ok(!RemoveDirectoryA("dest\testdir"), "Expected dest\testdir to not exist\n");
/* try an empty file list */ hr = pExtractFiles("extract.cab", "dest", 0, "", NULL, 0); - ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr); + ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr); ok(!DeleteFileA("dest\a.txt"), "Expected dest\a.txt to not exist\n"); ok(!RemoveDirectoryA("dest\testdir"), "Expected dest\testdir to not exist\n");
/* try a nonexistent file in the file list */ hr = pExtractFiles("extract.cab", "dest", 0, "a.txt:idontexist:testdir\c.txt", NULL, 0); - ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr); + ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr); ok(!DeleteFileA("dest\a.txt"), "Expected dest\a.txt to not exist\n"); ok(!DeleteFileA("dest\testdir\c.txt"), "Expected dest\testdir\c.txt to not exist\n"); ok(!RemoveDirectoryA("dest\testdir"), "Expected dest\testdir to not exist\n");
if(pExtractFilesW) { hr = pExtractFilesW(L"extract.cab", L"dest", 0, L"a.txt:testdir\c.txt", NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(DeleteFileA("dest\a.txt"), "Expected dest\a.txt to exist\n"); ok(DeleteFileA("dest\testdir\c.txt"), "Expected dest\testdir\c.txt to exist\n"); ok(RemoveDirectoryA("dest\testdir"), "Expected dest\testdir to exist\n"); @@ -507,22 +507,22 @@ static void test_AdvInstallFile(void)
/* try invalid source directory */ hr = pAdvInstallFile(NULL, NULL, "source.txt", destFolder, "destination.txt", 0, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr); ok(!DeleteFileA("dest\destination.txt"), "Expected dest\destination.txt to not exist\n");
/* try invalid source file */ hr = pAdvInstallFile(NULL, CURR_DIR, NULL, destFolder, "destination.txt", 0, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr); ok(!DeleteFileA("dest\destination.txt"), "Expected dest\destination.txt to not exist\n");
/* try invalid destination directory */ hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", NULL, "destination.txt", 0, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr); ok(!DeleteFileA("dest\destination.txt"), "Expected dest\destination.txt to not exist\n");
/* try copying to nonexistent destination directory */ hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", destFolder, "destination.txt", 0, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); ok(DeleteFileA("dest\destination.txt"), "Expected dest\destination.txt to exist\n");
/* native windows screws up if the source file doesn't exist */ @@ -531,7 +531,7 @@ static void test_AdvInstallFile(void) createTestFile("dest\destination.txt"); hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", destFolder, "destination.txt", AIF_NOOVERWRITE | AIF_QUIET, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); ok(DeleteFileA("dest\destination.txt"), "Expected dest\destination.txt to exist\n"); ok(RemoveDirectoryA("dest"), "Expected dest to exist\n");
diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c index 16593d1c5e7..bdf02c5a397 100644 --- a/dlls/advpack/tests/install.c +++ b/dlls/advpack/tests/install.c @@ -84,17 +84,17 @@ static void test_RunSetupCommand(void)
/* try an invalid cmd name */ hr = pRunSetupCommand(NULL, NULL, "Install", "Dir", "Title", NULL, 0, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
/* try an invalid directory */ hr = pRunSetupCommand(NULL, "winver.exe", "Install", NULL, "Title", NULL, 0, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
/* try to run a nonexistent exe */ hexe = (HANDLE)0xdeadbeef; hr = pRunSetupCommand(NULL, "idontexist.exe", "Install", systemdir, "Title", &hexe, 0, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr); ok(hexe == NULL, "Expected hexe to be NULL\n"); ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
@@ -102,21 +102,21 @@ static void test_RunSetupCommand(void) hexe = (HANDLE)0xdeadbeef; hr = pRunSetupCommand(NULL, "winver.exe", "Install", "non\existent\directory", "Title", &hexe, 0, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_DIRECTORY), - "Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %d\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %ld\n", hr); ok(hexe == NULL, "Expected hexe to be NULL\n"); ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
/* try to run an exe with the RSC_FLAG_INF flag */ hexe = (HANDLE)0xdeadbeef; hr = pRunSetupCommand(NULL, "winver.exe", "Install", systemdir, "Title", &hexe, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(is_spapi_err(hr), "Expected a setupapi error, got %d\n", hr); + ok(is_spapi_err(hr), "Expected a setupapi error, got %ld\n", hr); ok(hexe == (HANDLE)0xdeadbeef, "Expected hexe to be 0xdeadbeef\n"); ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
/* run winver.exe */ hexe = (HANDLE)0xdeadbeef; hr = pRunSetupCommand(NULL, "winver.exe", "Install", systemdir, "Title", &hexe, 0, NULL); - ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %d\n", hr); + ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %ld\n", hr); ok(hexe != NULL, "Expected hexe to be non-NULL\n"); ok(TerminateProcess(hexe, 0), "Expected TerminateProcess to succeed\n");
@@ -129,42 +129,42 @@ static void test_RunSetupCommand(void) lstrcpyA(dir, CURR_DIR); lstrcatA(dir, "\one"); hr = pRunSetupCommand(NULL, path, "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); + ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
/* try a full path to the INF, NULL working dir */ hr = pRunSetupCommand(NULL, path, "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
/* try a full path to the INF, empty working dir */ hr = pRunSetupCommand(NULL, path, "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); + ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
/* try a relative path to the INF, with working dir provided */ hr = pRunSetupCommand(NULL, "one\test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); + ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
/* try a relative path to the INF, NULL working dir */ hr = pRunSetupCommand(NULL, "one\test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
/* try a relative path to the INF, empty working dir */ hr = pRunSetupCommand(NULL, "one\test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); + ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
/* try only the INF filename, with working dir provided */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
/* try only the INF filename, NULL working dir */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
/* try only the INF filename, empty working dir */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
DeleteFileA("one\test.inf"); RemoveDirectoryA("one"); @@ -173,16 +173,16 @@ static void test_RunSetupCommand(void)
/* try INF file in the current directory, working directory provided */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
/* try INF file in the current directory, NULL working directory */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
/* try INF file in the current directory, empty working directory */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr); }
static void test_LaunchINFSection(void) @@ -199,7 +199,7 @@ static void test_LaunchINFSection(void) { /* try an invalid cmdline */ hr = pLaunchINFSection(NULL, NULL, NULL, 0); - ok(hr == 1, "Expected 1, got %d\n", hr); + ok(hr == 1, "Expected 1, got %ld\n", hr); }
CreateDirectoryA("one", NULL); @@ -210,7 +210,7 @@ static void test_LaunchINFSection(void) lstrcatA(cmdline, "\"); lstrcatA(cmdline, "one\test.inf,DefaultInstall,,4"); hr = pLaunchINFSection(NULL, NULL, cmdline, 0); - ok(hr == 0, "Expected 0, got %d\n", hr); + ok(hr == 0, "Expected 0, got %ld\n", hr);
DeleteFileA("one\test.inf"); RemoveDirectoryA("one"); @@ -219,10 +219,10 @@ static void test_LaunchINFSection(void)
/* try just the INF filename */ hr = pLaunchINFSection(NULL, NULL, file, 0); - ok(hr == 0, "Expected 0, got %d\n", hr); + ok(hr == 0, "Expected 0, got %ld\n", hr);
hr = pLaunchINFSection(NULL, NULL, file2, 0); - ok(hr == 0, "Expected 0, got %d\n", hr); + ok(hr == 0, "Expected 0, got %ld\n", hr);
DeleteFileA("test.inf"); } @@ -239,14 +239,14 @@ static void test_LaunchINFSectionEx(void) lstrcatA(cmdline, "\"); lstrcatA(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4"); hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0); - ok(hr == 0, "Expected 0, got %d\n", hr); + ok(hr == 0, "Expected 0, got %ld\n", hr);
/* try quoting the parameters */ lstrcpyA(cmdline, """); lstrcatA(cmdline, CURR_DIR); lstrcatA(cmdline, "\test.inf","DefaultInstall","c:,imacab.cab","4""); hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0); - ok(hr == 0, "Expected 0, got %d\n", hr); + ok(hr == 0, "Expected 0, got %ld\n", hr);
/* The 'No UI' flag seems to have no effect whatsoever on Windows. * So only do this test in interactive mode. @@ -256,7 +256,7 @@ static void test_LaunchINFSectionEx(void) /* try an invalid CAB filename with a relative INF name */ lstrcpyA(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4"); hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr); }
DeleteFileA("test.inf");
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109042
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/amstream/tests/Makefile.in | 1 dlls/amstream/tests/amstream.c | 3504 ++++++++++++++++++++------------------- 2 files changed, 1752 insertions(+), 1753 deletions(-)
diff --git a/dlls/amstream/tests/Makefile.in b/dlls/amstream/tests/Makefile.in index 4c09b3a2e22..eb756ddf39d 100644 --- a/dlls/amstream/tests/Makefile.in +++ b/dlls/amstream/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = amstream.dll IMPORTS = strmbase strmiids uuid ddraw ole32 user32
diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 6b17ba6d430..f15584f8948 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -263,10 +263,10 @@ static const WCHAR *load_resource(const WCHAR *name) wcscat(path, name);
file = CreateFileW(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n", wine_dbgstr_w(path), GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %lu.\n", wine_dbgstr_w(path), GetLastError());
resource = FindResourceW(module, name, (const WCHAR *)RT_RCDATA); - ok(!!resource, "Failed to find resource %s, error %u.\n", wine_dbgstr_w(name), GetLastError()); + ok(!!resource, "Failed to find resource %s, error %lu.\n", wine_dbgstr_w(name), GetLastError());
size = SizeofResource(module, resource); ptr = LockResource(LoadResource(module, resource)); @@ -292,7 +292,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__,line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
static IAMMultiMediaStream *create_ammultimediastream(void) @@ -300,7 +300,7 @@ static IAMMultiMediaStream *create_ammultimediastream(void) IAMMultiMediaStream *stream = NULL; HRESULT hr = CoCreateInstance(&CLSID_AMMultiMediaStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMultiMediaStream, (void **)&stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return stream; }
@@ -321,7 +321,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(unk); } @@ -349,7 +349,7 @@ static void test_interfaces(void) check_interface(mmstream, &IID_IPin, FALSE);
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IBaseFilter, TRUE); check_interface(filter, &IID_IMediaFilter, TRUE); @@ -369,7 +369,7 @@ static void test_interfaces(void) IMediaStreamFilter_Release(filter);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(stream, &IID_IAMMediaStream, TRUE); check_interface(stream, &IID_IAudioMediaStream, TRUE); @@ -390,7 +390,7 @@ static void test_interfaces(void) IMediaStream_Release(stream);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(stream, &IID_IAMMediaStream, TRUE); check_interface(stream, &IID_IDirectDrawMediaStream, TRUE); @@ -412,7 +412,7 @@ static void test_interfaces(void) IMediaStream_Release(stream);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %u.\n", ref); + ok(!ref, "Got outstanding refcount %lu.\n", ref); }
static void test_openfile(const WCHAR *test_avi_path) @@ -428,186 +428,186 @@ static void test_openfile(const WCHAR *test_avi_path) ULONG ref;
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!graph, "Expected NULL graph.\n");
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); ok(!!filter, "Expected non-NULL filter.\n"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, FALSE);
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_NORENDER); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, FALSE);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n"); IGraphBuilder_Release(graph); IMediaStreamFilter_Release(filter);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!graph, "Expected NULL graph.\n");
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); ok(!!filter, "Expected non-NULL filter.\n"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, FALSE);
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_RENDERALLSTREAMS); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, FALSE);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n");
hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock = NULL; IMediaFilter_GetSyncSource(media_filter, &clock); ok(!!clock, "Expected non-NULL clock.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IReferenceClock_Release(clock); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!graph, "Expected NULL graph.\n");
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); ok(!!filter, "Expected non-NULL filter.\n"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, FALSE);
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_RENDERTOEXISTING); - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, FALSE);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n"); IGraphBuilder_Release(graph); IMediaStreamFilter_Release(filter);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, FALSE);
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_RENDERTOEXISTING); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, TRUE);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock = NULL; IMediaFilter_GetSyncSource(media_filter, &clock); ok(!!clock, "Expected non-NULL clock.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IReferenceClock_Release(clock); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaControl, (void **)&media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
state = 0xdeadbeef; hr = IMediaControl_GetState(media_control, INFINITE, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %#x.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %#lx.\n", state);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaControl_Release(media_control); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_NOCLOCK); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock = (IReferenceClock *)0xdeadbeef; IMediaFilter_GetSyncSource(media_filter, &clock); ok(!clock, "Got clock %p.\n", clock);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_mmstream_get_duration(const WCHAR *test_avi_path) @@ -619,74 +619,74 @@ static void test_mmstream_get_duration(const WCHAR *test_avi_path)
duration = 0xdeadbeefdeadbeefULL; hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(duration == 0xdeadbeefdeadbeefULL, "Got duration %s.\n", wine_dbgstr_longlong(duration));
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, NULL); - ok(hr == S_OK || hr == VFW_E_NO_AUDIO_HARDWARE, "Got hr %#x.\n", hr); + ok(hr == S_OK || hr == VFW_E_NO_AUDIO_HARDWARE, "Got hr %#lx.\n", hr); audio_hr = hr;
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_RENDERTOEXISTING); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
duration = 0xdeadbeefdeadbeefULL; hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); if (audio_hr == S_OK) { - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(duration == 1000000LL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); } else { - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(!duration, "Got duration %s.\n", wine_dbgstr_longlong(duration)); }
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
duration = 0xdeadbeefdeadbeefULL; hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration));
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_RENDERTOEXISTING); - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx.\n", hr);
duration = 0xdeadbeefdeadbeefULL; hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration));
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_NORENDER); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
duration = 0xdeadbeefdeadbeefULL; hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration));
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static const GUID test_mspid = {0x88888888}; @@ -999,10 +999,10 @@ static void check_enum_stream_(int line, IAMMultiMediaStream *mmstream,
hr = IAMMultiMediaStream_EnumMediaStreams(mmstream, index, &stream); ok_(__FILE__, line)(hr == (expect ? S_OK : S_FALSE), - "IAMMultiMediaStream::EnumMediaStreams() returned %#x.\n", hr); + "IAMMultiMediaStream::EnumMediaStreams() returned %#lx.\n", hr); hr = IMediaStreamFilter_EnumMediaStreams(filter, index, &stream2); ok_(__FILE__, line)(hr == (expect ? S_OK : S_FALSE), - "IMediaStreamFilter::EnumMediaStreams() returned %#x.\n", hr); + "IMediaStreamFilter::EnumMediaStreams() returned %#lx.\n", hr); if (hr == S_OK) { ok_(__FILE__, line)(stream == expect, "Expected stream %p, got %p.\n", expect, stream); @@ -1059,7 +1059,7 @@ static HRESULT testfilter_init_stream(struct strmbase_filter *iface) if (SUCCEEDED(filter->init_stream_hr) && filter->source.pin.peer) { hr = IMemAllocator_Commit(filter->source.pAllocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
return filter->init_stream_hr; @@ -1073,7 +1073,7 @@ static HRESULT testfilter_cleanup_stream(struct strmbase_filter *iface) if (SUCCEEDED(filter->cleanup_stream_hr) && filter->source.pin.peer) { hr = IMemAllocator_Decommit(filter->source.pAllocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
return filter->cleanup_stream_hr; @@ -1142,11 +1142,11 @@ static HRESULT WINAPI testsource_DecideAllocator(struct strmbase_source *iface, * We don't yet implement the custom allocator so force the standard one for now. */ hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)alloc); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMemInputPin_GetAllocatorRequirements(pin, &props); hr = iface->pFuncsTable->pfnDecideBufferSize(iface, *alloc, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
return IMemInputPin_NotifyAllocator(pin, *alloc, FALSE); } @@ -1367,10 +1367,10 @@ static void check_get_stream_(int line, IAMMultiMediaStream *mmstream,
hr = IAMMultiMediaStream_GetMediaStream(mmstream, mspid, &stream); ok_(__FILE__, line)(hr == (expect ? S_OK : MS_E_NOSTREAM), - "IAMMultiMediaStream::GetMediaStream() returned %#x.\n", hr); + "IAMMultiMediaStream::GetMediaStream() returned %#lx.\n", hr); hr = IMediaStreamFilter_GetMediaStream(filter, mspid, &stream2); ok_(__FILE__, line)(hr == (expect ? S_OK : MS_E_NOSTREAM), - "IMediaStreamFilter::GetMediaStream() returned %#x.\n", hr); + "IMediaStreamFilter::GetMediaStream() returned %#lx.\n", hr); if (hr == S_OK) { ok_(__FILE__, line)(stream == expect, "Expected stream %p, got %p.\n", expect, stream); @@ -1400,21 +1400,21 @@ static void test_add_stream(void) teststream_init(&teststream);
hr = IAMMultiMediaStream_GetFilter(mmstream, &stream_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_EnumMediaStreams(mmstream, 0, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EnumMediaStreams(stream_filter, 0, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_GetMediaStream(mmstream, &MSPID_PrimaryAudio, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_GetMediaStream(stream_filter, &MSPID_PrimaryAudio, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetMediaStream(mmstream, &MSPID_PrimaryVideo, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_GetMediaStream(stream_filter, &MSPID_PrimaryVideo, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
check_enum_stream(mmstream, stream_filter, 0, NULL);
@@ -1424,22 +1424,22 @@ static void test_add_stream(void) check_get_stream(mmstream, stream_filter, &test_mspid, NULL);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &test_mspid, 0, &stream); - ok(hr == MS_E_PURPOSEID, "Got hr %#x.\n", hr); + ok(hr == MS_E_PURPOSEID, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &video_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == MS_E_PURPOSEID, "Got hr %#x.\n", hr); + ok(hr == MS_E_PURPOSEID, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_EnumMediaStreams(mmstream, 0, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EnumMediaStreams(stream_filter, 0, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_EnumMediaStreams(mmstream, 1, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EnumMediaStreams(stream_filter, 1, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
check_enum_stream(mmstream, stream_filter, 0, video_stream); check_enum_stream(mmstream, stream_filter, 1, NULL); @@ -1449,7 +1449,7 @@ static void test_add_stream(void) check_get_stream(mmstream, stream_filter, &test_mspid, NULL);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_enum_stream(mmstream, stream_filter, 0, video_stream); check_enum_stream(mmstream, stream_filter, 1, audio_stream); @@ -1460,13 +1460,13 @@ static void test_add_stream(void) check_get_stream(mmstream, stream_filter, &test_mspid, NULL);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)&teststream, &IID_IUnknown, 0, &stream); - ok(hr == MS_E_PURPOSEID, "Got hr %#x.\n", hr); + ok(hr == MS_E_PURPOSEID, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_QueryFilterInfo(stream_filter, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)&teststream, &test_mspid, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(stream == (IMediaStream *)&teststream, "Streams didn't match.\n"); IMediaStream_Release(stream); ok(teststream.mmstream == mmstream, "IAMMultiMediaStream objects didn't match.\n"); @@ -1485,17 +1485,17 @@ static void test_add_stream(void) check_get_stream(mmstream, stream_filter, &test_mspid, (IMediaStream *)&teststream);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == MS_E_PURPOSEID, "Got hr %#x.\n", hr); + ok(hr == MS_E_PURPOSEID, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected a non-NULL graph.\n");
hr = IGraphBuilder_EnumFilters(graph, &enum_filters); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumFilters_Next(enum_filters, 3, filters, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); ok(filters[0] == (IBaseFilter *)stream_filter, "Expected filter %p, got %p.\n", stream_filter, filters[0]); IBaseFilter_Release(filters[0]); @@ -1504,91 +1504,91 @@ static void test_add_stream(void)
IMediaStreamFilter_Release(stream_filter); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStream_Release(video_stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStream_Release(audio_stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(teststream.refcount == 1, "Got outstanding refcount %d.\n", teststream.refcount); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(teststream.refcount == 1, "Got outstanding refcount %ld.\n", teststream.refcount);
/* The return parameter is optional. */
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_GetMediaStream(mmstream, &MSPID_PrimaryVideo, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaStream_Release(stream);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Test supplying a DirectDraw object with the primary video stream. */
hr = DirectDrawCreate(NULL, &ddraw, NULL); - ok(hr == DD_OK, "Got hr %#x.\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)ddraw, &MSPID_PrimaryVideo, 0, &video_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStream_QueryInterface(video_stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ddraw2 == ddraw, "Expected IDirectDraw %p, got %p.\n", ddraw, ddraw2); IDirectDraw_Release(ddraw2); IDirectDrawMediaStream_Release(ddraw_stream);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStream_Release(video_stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDraw_Release(ddraw); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &video_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStream_QueryInterface(video_stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!ddraw, "Expected a non-NULL IDirectDraw.\n"); IDirectDraw_Release(ddraw); IDirectDrawMediaStream_Release(ddraw_stream);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStream_Release(video_stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Test the AMMSF_ADDDEFAULTRENDERER flag. No stream is added; however, a * new filter will be added to the graph. */
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_GetFilter(mmstream, &stream_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, AMMSF_ADDDEFAULTRENDERER, &video_stream); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, AMMSF_ADDDEFAULTRENDERER, NULL); - ok(hr == MS_E_PURPOSEID, "Got hr %#x.\n", hr); + ok(hr == MS_E_PURPOSEID, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, &audio_stream); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, NULL); - ok(hr == S_OK || hr == VFW_E_NO_AUDIO_HARDWARE, "Got hr %#x.\n", hr); + ok(hr == S_OK || hr == VFW_E_NO_AUDIO_HARDWARE, "Got hr %#lx.\n", hr);
check_enum_stream(mmstream, stream_filter, 0, NULL);
@@ -1598,17 +1598,17 @@ static void test_add_stream(void) if (hr == S_OK) { hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Got graph %p.\n", graph); hr = IGraphBuilder_EnumFilters(graph, &enum_filters); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumFilters_Next(enum_filters, 3, filters, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); ok(filters[1] == (IBaseFilter *)stream_filter, "Expected filter %p, got %p.\n", stream_filter, filters[1]); hr = IBaseFilter_GetClassID(filters[0], &clsid); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&clsid, &CLSID_DSoundRender), "Got unexpected filter %s.\n", wine_dbgstr_guid(&clsid)); IBaseFilter_Release(filters[0]); IBaseFilter_Release(filters[1]); @@ -1618,15 +1618,15 @@ static void test_add_stream(void)
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &test_mspid, AMMSF_ADDDEFAULTRENDERER, NULL); - ok(hr == MS_E_PURPOSEID, "Got hr %#x.\n", hr); + ok(hr == MS_E_PURPOSEID, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &test_mspid, AMMSF_ADDDEFAULTRENDERER, &audio_stream); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(stream_filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_streams(void) @@ -1641,18 +1641,18 @@ static void test_media_streams(void) return;
hr = IAMMultiMediaStream_Initialize(pams, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "IAMMultiMediaStream_Initialize returned: %x\n", hr); + ok(hr == S_OK, "IAMMultiMediaStream_Initialize returned: %lx\n", hr);
/* Retrieve media stream filter */ hr = IAMMultiMediaStream_GetFilter(pams, NULL); - ok(hr == E_POINTER, "IAMMultiMediaStream_GetFilter returned: %x\n", hr); + ok(hr == E_POINTER, "IAMMultiMediaStream_GetFilter returned: %lx\n", hr); hr = IAMMultiMediaStream_GetFilter(pams, &media_stream_filter); - ok(hr == S_OK, "IAMMultiMediaStream_GetFilter returned: %x\n", hr); + ok(hr == S_OK, "IAMMultiMediaStream_GetFilter returned: %lx\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(pams, NULL, &MSPID_PrimaryVideo, 0, NULL); - ok(hr == S_OK, "IAMMultiMediaStream_AddMediaStream returned: %x\n", hr); + ok(hr == S_OK, "IAMMultiMediaStream_AddMediaStream returned: %lx\n", hr); hr = IAMMultiMediaStream_GetMediaStream(pams, &MSPID_PrimaryVideo, &video_stream); - ok(hr == S_OK, "IAMMultiMediaStream_GetMediaStream returned: %x\n", hr); + ok(hr == S_OK, "IAMMultiMediaStream_GetMediaStream returned: %lx\n", hr);
/* Check interfaces and samples for video */ if (video_stream) @@ -1665,30 +1665,30 @@ static void test_media_streams(void) IDirectDrawStreamSample *ddraw_sample = NULL;
hr = IMediaStream_QueryInterface(video_stream, &IID_IAMMediaStream, (LPVOID*)&am_media_stream); - ok(hr == S_OK, "IMediaStream_QueryInterface returned: %x\n", hr); + ok(hr == S_OK, "IMediaStream_QueryInterface returned: %lx\n", hr); ok((void*)am_media_stream == (void*)video_stream, "Not same interface, got %p expected %p\n", am_media_stream, video_stream);
hr = IAMMediaStream_GetMultiMediaStream(am_media_stream, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER, got %lx\n", hr);
multi_media_stream = (void *)0xdeadbeef; hr = IAMMediaStream_GetMultiMediaStream(am_media_stream, &multi_media_stream); - ok(hr == S_OK, "IAMMediaStream_GetMultiMediaStream returned: %x\n", hr); + ok(hr == S_OK, "IAMMediaStream_GetMultiMediaStream returned: %lx\n", hr); ok((void *)multi_media_stream == (void *)pams, "Expected %p, got %p\n", pams, multi_media_stream); IMultiMediaStream_Release(multi_media_stream);
IAMMediaStream_Release(am_media_stream);
hr = IMediaStream_QueryInterface(video_stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "IMediaStream_QueryInterface returned: %x\n", hr); + ok(hr == S_OK, "IMediaStream_QueryInterface returned: %lx\n", hr);
IPin_Release(pin);
hr = IMediaStream_QueryInterface(video_stream, &IID_IAudioMediaStream, (LPVOID*)&audio_media_stream); - ok(hr == E_NOINTERFACE, "IMediaStream_QueryInterface returned: %x\n", hr); + ok(hr == E_NOINTERFACE, "IMediaStream_QueryInterface returned: %lx\n", hr);
hr = IMediaStream_QueryInterface(video_stream, &IID_IDirectDrawMediaStream, (LPVOID*)&ddraw_stream); - ok(hr == S_OK, "IMediaStream_QueryInterface returned: %x\n", hr); + ok(hr == S_OK, "IMediaStream_QueryInterface returned: %lx\n", hr);
if (SUCCEEDED(hr)) { @@ -1697,17 +1697,17 @@ static void test_media_streams(void) DWORD flags;
hr = IDirectDrawMediaStream_GetFormat(ddraw_stream, ¤t_format, &palette, &desired_format, &flags); - ok(hr == MS_E_NOSTREAM, "IDirectDrawoMediaStream_GetFormat returned: %x\n", hr); + ok(hr == MS_E_NOSTREAM, "IDirectDrawoMediaStream_GetFormat returned: %lx\n", hr);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &ddraw_sample); - ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr); + ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %lx\n", hr);
hr = IDirectDrawMediaStream_GetMultiMediaStream(ddraw_stream, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER, got %lx\n", hr);
multi_media_stream = (void *)0xdeadbeef; hr = IDirectDrawMediaStream_GetMultiMediaStream(ddraw_stream, &multi_media_stream); - ok(hr == S_OK, "IDirectDrawMediaStream_GetMultiMediaStream returned: %x\n", hr); + ok(hr == S_OK, "IDirectDrawMediaStream_GetMultiMediaStream returned: %lx\n", hr); ok((void *)multi_media_stream == (void *)pams, "Expected %p, got %p\n", pams, multi_media_stream); IMultiMediaStream_Release(multi_media_stream); } @@ -1719,9 +1719,9 @@ static void test_media_streams(void) }
hr = IAMMultiMediaStream_AddMediaStream(pams, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "IAMMultiMediaStream_AddMediaStream returned: %x\n", hr); + ok(hr == S_OK, "IAMMultiMediaStream_AddMediaStream returned: %lx\n", hr); hr = IAMMultiMediaStream_GetMediaStream(pams, &MSPID_PrimaryAudio, &audio_stream); - ok(hr == S_OK, "IAMMultiMediaStream_GetMediaStream returned: %x\n", hr); + ok(hr == S_OK, "IAMMultiMediaStream_GetMediaStream returned: %lx\n", hr);
/* Check interfaces and samples for audio */ if (audio_stream) @@ -1734,54 +1734,54 @@ static void test_media_streams(void) IAudioStreamSample *audio_sample = NULL;
hr = IMediaStream_QueryInterface(audio_stream, &IID_IAMMediaStream, (LPVOID*)&am_media_stream); - ok(hr == S_OK, "IMediaStream_QueryInterface returned: %x\n", hr); + ok(hr == S_OK, "IMediaStream_QueryInterface returned: %lx\n", hr); ok((void*)am_media_stream == (void*)audio_stream, "Not same interface, got %p expected %p\n", am_media_stream, audio_stream);
hr = IAMMediaStream_GetMultiMediaStream(am_media_stream, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER, got %lx\n", hr);
multi_media_stream = (void *)0xdeadbeef; hr = IAMMediaStream_GetMultiMediaStream(am_media_stream, &multi_media_stream); - ok(hr == S_OK, "IAMMediaStream_GetMultiMediaStream returned: %x\n", hr); + ok(hr == S_OK, "IAMMediaStream_GetMultiMediaStream returned: %lx\n", hr); ok((void *)multi_media_stream == (void *)pams, "Expected %p, got %p\n", pams, multi_media_stream); IMultiMediaStream_Release(multi_media_stream);
IAMMediaStream_Release(am_media_stream);
hr = IMediaStream_QueryInterface(audio_stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "IMediaStream_QueryInterface returned: %x\n", hr); + ok(hr == S_OK, "IMediaStream_QueryInterface returned: %lx\n", hr);
IPin_Release(pin);
hr = IMediaStream_QueryInterface(audio_stream, &IID_IDirectDrawMediaStream, (LPVOID*)&ddraw_stream); - ok(hr == E_NOINTERFACE, "IMediaStream_QueryInterface returned: %x\n", hr); + ok(hr == E_NOINTERFACE, "IMediaStream_QueryInterface returned: %lx\n", hr);
hr = IMediaStream_QueryInterface(audio_stream, &IID_IAudioMediaStream, (LPVOID*)&audio_media_stream); - ok(hr == S_OK, "IMediaStream_QueryInterface returned: %x\n", hr); + ok(hr == S_OK, "IMediaStream_QueryInterface returned: %lx\n", hr);
if (SUCCEEDED(hr)) { IAudioData* audio_data = NULL;
hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data); - ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); + ok(hr == S_OK, "CoCreateInstance returned: %lx\n", hr);
hr = IAudioMediaStream_CreateSample(audio_media_stream, NULL, 0, &audio_sample); - ok(hr == E_POINTER, "IAudioMediaStream_CreateSample returned: %x\n", hr); + ok(hr == E_POINTER, "IAudioMediaStream_CreateSample returned: %lx\n", hr);
EXPECT_REF(audio_stream, 3); EXPECT_REF(audio_data, 1); hr = IAudioMediaStream_CreateSample(audio_media_stream, audio_data, 0, &audio_sample); - ok(hr == S_OK, "IAudioMediaStream_CreateSample returned: %x\n", hr); + ok(hr == S_OK, "IAudioMediaStream_CreateSample returned: %lx\n", hr); EXPECT_REF(audio_stream, 4); EXPECT_REF(audio_data, 2);
hr = IAudioMediaStream_GetMultiMediaStream(audio_media_stream, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER, got %lx\n", hr);
multi_media_stream = (void *)0xdeadbeef; hr = IAudioMediaStream_GetMultiMediaStream(audio_media_stream, &multi_media_stream); - ok(hr == S_OK, "IAudioMediaStream_GetMultiMediaStream returned: %x\n", hr); + ok(hr == S_OK, "IAudioMediaStream_GetMultiMediaStream returned: %lx\n", hr); ok((void *)multi_media_stream == (void *)pams, "Expected %p, got %p\n", pams, multi_media_stream); IMultiMediaStream_Release(multi_media_stream);
@@ -1799,7 +1799,7 @@ static void test_media_streams(void) IEnumPins *enum_pins;
hr = IMediaStreamFilter_EnumPins(media_stream_filter, &enum_pins); - ok(hr == S_OK, "IBaseFilter_EnumPins returned: %x\n", hr); + ok(hr == S_OK, "IBaseFilter_EnumPins returned: %lx\n", hr); if (hr == S_OK) { IPin* pins[3] = { NULL, NULL, NULL }; @@ -1808,14 +1808,14 @@ static void test_media_streams(void) int i;
hr = IEnumPins_Next(enum_pins, 3, pins, &nb_pins); - ok(SUCCEEDED(hr), "IEnumPins_Next returned: %x\n", hr); - ok(nb_pins == expected_nb_pins, "Number of pins is %u instead of %u\n", nb_pins, expected_nb_pins); + ok(SUCCEEDED(hr), "IEnumPins_Next returned: %lx\n", hr); + ok(nb_pins == expected_nb_pins, "Number of pins is %lu instead of %lu\n", nb_pins, expected_nb_pins); for (i = 0; i < min(nb_pins, expected_nb_pins); i++) { IPin* pin;
hr = IPin_ConnectedTo(pins[i], &pin); - ok(hr == VFW_E_NOT_CONNECTED, "IPin_ConnectedTo returned: %x\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "IPin_ConnectedTo returned: %lx\n", hr); IPin_Release(pins[i]); } IEnumPins_Release(enum_pins); @@ -1824,7 +1824,7 @@ static void test_media_streams(void)
/* Test open file with no filename */ hr = IAMMultiMediaStream_OpenFile(pams, NULL, AMMSF_RENDERTOEXISTING); - ok(hr == E_POINTER, "IAMMultiMediaStream_OpenFile returned %x instead of %x\n", hr, E_POINTER); + ok(hr == E_POINTER, "IAMMultiMediaStream_OpenFile returned %lx instead of %lx\n", hr, E_POINTER);
if (video_stream) IMediaStream_Release(video_stream); @@ -1847,113 +1847,113 @@ static void test_enum_pins(void) HRESULT hr;
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
hr = IMediaStreamFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 0); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Reset() isn't enough; we have to call EnumPins() again to see the updated * pin count. */ hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumPins_Release(enum1);
hr = IMediaStreamFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter); - ok(ref == 4, "Got unexpected refcount %d.\n", ref); + ok(ref == 4, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 4, "Got unexpected refcount %d.\n", ref); + ok(ref == 4, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); ref = get_refcount(filter); - ok(ref == 4, "Got unexpected refcount %d.\n", ref); + ok(ref == 4, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 5, "Got unexpected refcount %d.\n", ref); + ok(ref == 5, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); IPin_Release(pins[0]);
@@ -1962,10 +1962,10 @@ static void test_enum_pins(void)
IMediaStreamFilter_Release(filter); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaStream_Release(stream); ref = IPin_Release(pin); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -1978,18 +1978,18 @@ static void test_find_pin(void) ULONG ref;
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_FindPin(filter, primary_video_sink_id, &pin2); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_FindPin(filter, primary_video_sink_id, &pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2);
IPin_Release(pin2); @@ -1997,7 +1997,7 @@ static void test_find_pin(void) IMediaStream_Release(stream); IMediaStreamFilter_Release(filter); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -2013,65 +2013,65 @@ static void test_pin_info(void) IPin *pin;
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == (IBaseFilter *)filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, primary_video_sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, primary_video_sink_id), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin); IMediaStream_Release(stream);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == (IBaseFilter *)filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, primary_audio_sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, primary_audio_sink_id), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin); IMediaStream_Release(stream);
IMediaStreamFilter_Release(filter); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct graph @@ -2329,11 +2329,11 @@ static void graph_init(struct graph *graph) graph->refcount = 1; hr = CoCreateInstance(&CLSID_FilterGraph, (IUnknown *)&graph->IFilterGraph2_iface, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&graph->inner_unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IUnknown_QueryInterface(graph->inner_unk, &IID_IFilterGraph2, (void **)&graph->inner); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IUnknown_QueryInterface(graph->inner_unk, &IID_IMediaEventSink, (void **)&graph->inner_event_sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void graph_destroy(struct graph *graph) @@ -2343,7 +2343,7 @@ static void graph_destroy(struct graph *graph) IMediaEventSink_Release(graph->inner_event_sink); IFilterGraph2_Release(graph->inner); ref = IUnknown_Release(graph->inner_unk); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_initialize(void) @@ -2359,129 +2359,129 @@ static void test_initialize(void)
ret_graph = (IGraphBuilder *)0xdeadbeef; hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &ret_graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!ret_graph, "Got unexpected graph %p.\n", ret_graph);
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected a non-NULL filter."); IMediaStreamFilter_Release(filter);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_WRITE, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_TRANSFORM, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ret_graph = (IGraphBuilder *)0xdeadbeef; hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &ret_graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!ret_graph, "Got unexpected graph %p.\n", ret_graph);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); type = 0xdeadbeef; hr = IMediaStream_GetInformation(stream, NULL, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(type == STREAMTYPE_READ, "Got type %u.\n", type); IMediaStream_Release(stream);
ret_graph = NULL; hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &ret_graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!ret_graph, "Got unexpected graph %p.\n", ret_graph); IGraphBuilder_Release(ret_graph);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_WRITE, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_WRITE, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_TRANSFORM, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ret_graph = (IGraphBuilder *)0xdeadbeef; hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &ret_graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!ret_graph, "Got unexpected graph %p.\n", ret_graph);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); type = 0xdeadbeef; hr = IMediaStream_GetInformation(stream, NULL, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(type == STREAMTYPE_WRITE, "Got type %u.\n", type); IMediaStream_Release(stream);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_TRANSFORM, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_TRANSFORM, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_WRITE, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ret_graph = (IGraphBuilder *)0xdeadbeef; hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &ret_graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!ret_graph, "Got unexpected graph %p.\n", ret_graph);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); type = 0xdeadbeef; hr = IMediaStream_GetInformation(stream, NULL, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(type == STREAMTYPE_TRANSFORM, "Got type %u.\n", type); IMediaStream_Release(stream);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
type = 0xdeadbeef; hr = IMediaStream_GetInformation(stream, NULL, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(type == STREAMTYPE_READ, "Got type %u.\n", type);
ret_graph = NULL; hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &ret_graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!ret_graph, "Got unexpected graph %p.\n", ret_graph); IGraphBuilder_Release(ret_graph);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_TRANSFORM, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
type = 0xdeadbeef; hr = IMediaStream_GetInformation(stream, NULL, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(type == STREAMTYPE_READ, "Got type %u.\n", type);
IMediaStream_Release(stream); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Test with a custom filter graph. */
@@ -2491,47 +2491,47 @@ static void test_initialize(void)
ret_graph = (IGraphBuilder *)0xdeadbeef; hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &ret_graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!ret_graph, "Got unexpected graph %p.\n", ret_graph);
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected a non-NULL filter.");
graph.got_add_filter = 0; hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, (IGraphBuilder *)&graph.IFilterGraph2_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph.got_add_filter == 1, "Got %d calls to IGraphBuilder::AddFilter().\n", graph.got_add_filter); ok(graph.filter == (IBaseFilter *)filter, "Got filter %p.\n", filter); ok(!wcscmp(graph.filter_name, L"MediaStreamFilter"), "Got unexpected name %s.\n", wine_dbgstr_w(graph.filter_name));
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &ret_graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_graph == (IGraphBuilder *)&graph, "Got unexpected graph %p.\n", ret_graph); IGraphBuilder_Release(ret_graph);
graph.got_add_filter = 0; hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!graph.got_add_filter, "Got %d calls to IGraphBuilder::AddFilter().\n", graph.got_add_filter);
graph.got_add_filter = 0; hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!graph.got_add_filter, "Got %d calls to IGraphBuilder::AddFilter().\n", graph.got_add_filter);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, (IGraphBuilder *)&graph); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_WRITE, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_TRANSFORM, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
IMediaStreamFilter_Release(filter); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
graph_destroy(&graph); } @@ -2544,7 +2544,7 @@ static DWORD CALLBACK mmstream_set_state(void *param) HRESULT hr;
hr = IAMMultiMediaStream_SetState(mmstream_mmstream, mmstream_state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
return 0; } @@ -2561,39 +2561,39 @@ static void test_set_state(void) ULONG ref;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaControl, (void **)&media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source);
hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
source.init_stream_hr = E_FAIL; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); source.init_stream_hr = S_OK; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
source.init_stream_hr = S_FALSE; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); source.init_stream_hr = S_OK; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
source.wait_state_hr = E_FAIL; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); source.wait_state_hr = S_OK; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
source.wait_state_hr = VFW_S_STATE_INTERMEDIATE; ResetEvent(source.wait_state_event); @@ -2613,93 +2613,93 @@ static void test_set_state(void) CloseHandle(thread);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
source.init_stream_hr = E_FAIL; source.wait_state_hr = VFW_S_STATE_INTERMEDIATE; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); source.init_stream_hr = S_OK; source.wait_state_hr = S_OK; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); source.cleanup_stream_hr = E_FAIL; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); source.cleanup_stream_hr = S_OK; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); source.cleanup_stream_hr = S_FALSE; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); source.cleanup_stream_hr = S_OK;
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); source.wait_state_hr = VFW_S_STATE_INTERMEDIATE; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); source.wait_state_hr = S_OK;
/* Crashes on native. */ if (0) { hr = IAMMultiMediaStream_GetState(mmstream, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
state = 0xdeadbeef; hr = IAMMultiMediaStream_GetState(mmstream, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == STREAMSTATE_STOP, "Got state %#x.\n", state);
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
state = 0xdeadbeef; hr = IAMMultiMediaStream_GetState(mmstream, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == STREAMSTATE_STOP, "Got state %#x.\n", state);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
state = 0xdeadbeef; hr = IAMMultiMediaStream_GetState(mmstream, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == STREAMSTATE_RUN, "Got state %#x.\n", state);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
state = 0xdeadbeef; hr = IAMMultiMediaStream_GetState(mmstream, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == STREAMSTATE_STOP, "Got state %#x.\n", state);
source.init_stream_hr = E_FAIL; hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
state = 0xdeadbeef; hr = IAMMultiMediaStream_GetState(mmstream, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == STREAMSTATE_STOP, "Got state %#x.\n", state);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaControl_Release(media_control); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -2713,53 +2713,53 @@ static void test_enum_media_types(void) IPin *pin;
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 0, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Next(enum2, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]);
IEnumMediaTypes_Release(enum2); @@ -2768,55 +2768,55 @@ static void test_enum_media_types(void) IMediaStream_Release(stream);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 0, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Next(enum2, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
@@ -2826,7 +2826,7 @@ static void test_enum_media_types(void) IMediaStream_Release(stream);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_types(void) @@ -2895,26 +2895,26 @@ static void test_media_types(void) };
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Video), "Got major type %s\n", wine_dbgstr_guid(&pmt->majortype)); ok(IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB8), "Got subtype %s\n", wine_dbgstr_guid(&pmt->subtype)); ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 10000, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 10000, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &GUID_NULL), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); @@ -2925,85 +2925,85 @@ static void test_media_types(void) pmt->cbFormat = tests[i].size; pmt->pbFormat = tests[i].format; hr = IPin_QueryAccept(pin, pmt); - ok(hr == (i == 6 ? S_OK : VFW_E_TYPE_NOT_ACCEPTED), "Got hr %#x.\n", hr); + ok(hr == (i == 6 ? S_OK : VFW_E_TYPE_NOT_ACCEPTED), "Got hr %#lx.\n", hr); }
pmt->bFixedSizeSamples = FALSE; pmt->bTemporalCompression = TRUE; pmt->lSampleSize = 123; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->majortype = MEDIATYPE_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Audio; hr = IPin_QueryAccept(pin, pmt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Stream; hr = IPin_QueryAccept(pin, pmt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Video;
for (i = 0; i < ARRAY_SIZE(rejected_subtypes); ++i) { pmt->subtype = *rejected_subtypes[i]; hr = IPin_QueryAccept(pin, pmt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x for subtype %s.\n", + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx for subtype %s.\n", hr, wine_dbgstr_guid(rejected_subtypes[i])); }
CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin); IMediaStream_Release(stream);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Audio), "Got major type %s\n", wine_dbgstr_guid(&pmt->majortype)); ok(IsEqualGUID(&pmt->subtype, &GUID_NULL), "Got subtype %s\n", wine_dbgstr_guid(&pmt->subtype)); ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 2, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 2, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &FORMAT_WaveFormatEx), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); - ok(pmt->cbFormat == sizeof(WAVEFORMATEX), "Got format size %u.\n", pmt->cbFormat); + ok(pmt->cbFormat == sizeof(WAVEFORMATEX), "Got format size %lu.\n", pmt->cbFormat); ok(!memcmp(pmt->pbFormat, &expect_wfx, pmt->cbFormat), "Format blocks didn't match.\n");
hr = IPin_QueryAccept(pin, pmt); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
CoTaskMemFree(pmt->pbFormat); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin); IMediaStream_Release(stream);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_get_end_of_stream_event_handle(void) @@ -3019,72 +3019,72 @@ static void test_get_end_of_stream_event_handle(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n"); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n"); testfilter_init(&source); source.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_GetEndOfStreamEventHandle(mmstream, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
event = INVALID_HANDLE_VALUE; hr = IAMMultiMediaStream_GetEndOfStreamEventHandle(mmstream, &event); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &rgb32_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static IUnknown *create_audio_data(void) @@ -3092,7 +3092,7 @@ static IUnknown *create_audio_data(void) IUnknown *audio_data = NULL; HRESULT result = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&audio_data); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result); return audio_data; }
@@ -3105,14 +3105,14 @@ static void test_audiodata_query_interface(void) HRESULT result;
result = IUnknown_QueryInterface(unknown, &IID_IMemoryData, (void **)&memory_data); - ok(E_NOINTERFACE == result, "got 0x%08x\n", result); + ok(E_NOINTERFACE == result, "got 0x%08lx\n", result);
result = IUnknown_QueryInterface(unknown, &IID_IAudioData, (void **)&audio_data); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result); if (S_OK == result) { result = IAudioData_QueryInterface(audio_data, &IID_IMemoryData, (void **)&memory_data); - ok(E_NOINTERFACE == result, "got 0x%08x\n", result); + ok(E_NOINTERFACE == result, "got 0x%08lx\n", result);
IAudioData_Release(audio_data); } @@ -3136,7 +3136,7 @@ static void test_audiodata_get_info(void) }
result = IAudioData_GetInfo(audio_data, NULL, NULL, NULL); - ok(MS_E_NOTINIT == result, "got 0x%08x\n", result); + ok(MS_E_NOTINIT == result, "got 0x%08lx\n", result);
IAudioData_Release(audio_data);
@@ -3163,26 +3163,26 @@ static void test_audiodata_set_buffer(void) }
result = IAudioData_SetBuffer(audio_data, 100, NULL, 0); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result);
data = (BYTE *)0xdeadbeef; length = 0xdeadbeef; result = IAudioData_GetInfo(audio_data, &length, &data, NULL); - ok(S_OK == result, "got 0x%08x\n", result); - ok(100 == length, "got %u\n", length); + ok(S_OK == result, "got 0x%08lx\n", result); + ok(100 == length, "got %lu\n", length); ok(NULL != data, "got %p\n", data);
result = IAudioData_SetBuffer(audio_data, 0, buffer, 0); - ok(E_INVALIDARG == result, "got 0x%08x\n", result); + ok(E_INVALIDARG == result, "got 0x%08lx\n", result);
result = IAudioData_SetBuffer(audio_data, sizeof(buffer), buffer, 0); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result);
data = (BYTE *)0xdeadbeef; length = 0xdeadbeef; result = IAudioData_GetInfo(audio_data, &length, &data, NULL); - ok(S_OK == result, "got 0x%08x\n", result); - ok(sizeof(buffer) == length, "got %u\n", length); + ok(S_OK == result, "got 0x%08lx\n", result); + ok(sizeof(buffer) == length, "got %lu\n", length); ok(buffer == data, "got %p\n", data);
IAudioData_Release(audio_data); @@ -3209,29 +3209,29 @@ static void test_audiodata_set_actual(void) }
result = IAudioData_SetActual(audio_data, 0); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result);
result = IAudioData_SetBuffer(audio_data, sizeof(buffer), buffer, 0); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result);
result = IAudioData_SetActual(audio_data, sizeof(buffer) + 1); - ok(E_INVALIDARG == result, "got 0x%08x\n", result); + ok(E_INVALIDARG == result, "got 0x%08lx\n", result);
result = IAudioData_SetActual(audio_data, sizeof(buffer)); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result);
actual_data = 0xdeadbeef; result = IAudioData_GetInfo(audio_data, NULL, NULL, &actual_data); - ok(S_OK == result, "got 0x%08x\n", result); - ok(sizeof(buffer) == actual_data, "got %u\n", actual_data); + ok(S_OK == result, "got 0x%08lx\n", result); + ok(sizeof(buffer) == actual_data, "got %lu\n", actual_data);
result = IAudioData_SetActual(audio_data, 0); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result);
actual_data = 0xdeadbeef; result = IAudioData_GetInfo(audio_data, NULL, NULL, &actual_data); - ok(S_OK == result, "got 0x%08x\n", result); - ok(0 == actual_data, "got %u\n", actual_data); + ok(S_OK == result, "got 0x%08lx\n", result); + ok(0 == actual_data, "got %lu\n", actual_data);
IAudioData_Release(audio_data);
@@ -3256,7 +3256,7 @@ static void test_audiodata_get_format(void) }
result = IAudioData_GetFormat(audio_data, NULL); - ok(E_POINTER == result, "got 0x%08x\n", result); + ok(E_POINTER == result, "got 0x%08lx\n", result);
wave_format.wFormatTag = 0xdead; wave_format.nChannels = 0xdead; @@ -3266,11 +3266,11 @@ static void test_audiodata_get_format(void) wave_format.wBitsPerSample = 0xdead; wave_format.cbSize = 0xdead; result = IAudioData_GetFormat(audio_data, &wave_format); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result); ok(WAVE_FORMAT_PCM == wave_format.wFormatTag, "got %u\n", wave_format.wFormatTag); ok(1 == wave_format.nChannels, "got %u\n", wave_format.nChannels); - ok(11025 == wave_format.nSamplesPerSec, "got %u\n", wave_format.nSamplesPerSec); - ok(22050 == wave_format.nAvgBytesPerSec, "got %u\n", wave_format.nAvgBytesPerSec); + ok(11025 == wave_format.nSamplesPerSec, "got %lu\n", wave_format.nSamplesPerSec); + ok(22050 == wave_format.nAvgBytesPerSec, "got %lu\n", wave_format.nAvgBytesPerSec); ok(2 == wave_format.nBlockAlign, "got %u\n", wave_format.nBlockAlign); ok(16 == wave_format.wBitsPerSample, "got %u\n", wave_format.wBitsPerSample); ok(0 == wave_format.cbSize, "got %u\n", wave_format.cbSize); @@ -3298,7 +3298,7 @@ static void test_audiodata_set_format(void) }
result = IAudioData_SetFormat(audio_data, NULL); - ok(E_POINTER == result, "got 0x%08x\n", result); + ok(E_POINTER == result, "got 0x%08lx\n", result);
wave_format.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; wave_format.Format.nChannels = 2; @@ -3311,7 +3311,7 @@ static void test_audiodata_set_format(void) wave_format.dwChannelMask = KSAUDIO_SPEAKER_STEREO; wave_format.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; result = IAudioData_SetFormat(audio_data, &wave_format.Format); - ok(E_INVALIDARG == result, "got 0x%08x\n", result); + ok(E_INVALIDARG == result, "got 0x%08lx\n", result);
wave_format.Format.wFormatTag = WAVE_FORMAT_PCM; wave_format.Format.nChannels = 2; @@ -3321,7 +3321,7 @@ static void test_audiodata_set_format(void) wave_format.Format.wBitsPerSample = 16; wave_format.Format.cbSize = 0; result = IAudioData_SetFormat(audio_data, &wave_format.Format); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result);
wave_format.Format.wFormatTag = 0xdead; wave_format.Format.nChannels = 0xdead; @@ -3331,11 +3331,11 @@ static void test_audiodata_set_format(void) wave_format.Format.wBitsPerSample = 0xdead; wave_format.Format.cbSize = 0xdead; result = IAudioData_GetFormat(audio_data, &wave_format.Format); - ok(S_OK == result, "got 0x%08x\n", result); + ok(S_OK == result, "got 0x%08lx\n", result); ok(WAVE_FORMAT_PCM == wave_format.Format.wFormatTag, "got %u\n", wave_format.Format.wFormatTag); ok(2 == wave_format.Format.nChannels, "got %u\n", wave_format.Format.nChannels); - ok(44100 == wave_format.Format.nSamplesPerSec, "got %u\n", wave_format.Format.nSamplesPerSec); - ok(176400 == wave_format.Format.nAvgBytesPerSec, "got %u\n", wave_format.Format.nAvgBytesPerSec); + ok(44100 == wave_format.Format.nSamplesPerSec, "got %lu\n", wave_format.Format.nSamplesPerSec); + ok(176400 == wave_format.Format.nAvgBytesPerSec, "got %lu\n", wave_format.Format.nAvgBytesPerSec); ok(4 == wave_format.Format.nBlockAlign, "got %u\n", wave_format.Format.nBlockAlign); ok(16 == wave_format.Format.wBitsPerSample, "got %u\n", wave_format.Format.wBitsPerSample); ok(0 == wave_format.Format.cbSize, "got %u\n", wave_format.Format.cbSize); @@ -3480,59 +3480,59 @@ static void test_audiostream_get_format(void) IPin *pin;
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n");
testfilter_init(&source);
hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, L"source"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_GetFormat(audio_stream, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_GetFormat(audio_stream, &format); - ok(hr == MS_E_NOSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOSTREAM, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&format, 0xcc, sizeof(format)); hr = IAudioMediaStream_GetFormat(audio_stream, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(format.wFormatTag == WAVE_FORMAT_PCM, "Got tag %#x.\n", format.wFormatTag); ok(format.nChannels == 2, "Got %u channels.\n", format.nChannels); - ok(format.nSamplesPerSec == 44100, "Got sample rate %u.\n", format.nSamplesPerSec); - ok(format.nAvgBytesPerSec == 176400, "Got %u bytes/sec.\n", format.nAvgBytesPerSec); + ok(format.nSamplesPerSec == 44100, "Got sample rate %lu.\n", format.nSamplesPerSec); + ok(format.nAvgBytesPerSec == 176400, "Got %lu bytes/sec.\n", format.nAvgBytesPerSec); ok(format.nBlockAlign == 4, "Got alignment %u.\n", format.nBlockAlign); ok(format.wBitsPerSample == 16, "Got %u bits/sample.\n", format.wBitsPerSample); ok(!format.cbSize, "Got extra size %u.\n", format.cbSize);
hr = IGraphBuilder_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_GetFormat(audio_stream, &format); - ok(hr == MS_E_NOSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOSTREAM, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static HRESULT set_audiostream_format(const WAVEFORMATEX *format) @@ -3544,17 +3544,17 @@ static HRESULT set_audiostream_format(const WAVEFORMATEX *format) ULONG ref;
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_SetFormat(audio_stream, format);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
return hr; } @@ -3592,9 +3592,9 @@ static void test_audiostream_set_format(void) IPin *pin;
hr = set_audiostream_format(&valid_format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = set_audiostream_format(NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
extensible_format.Format = valid_format; extensible_format.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; @@ -3603,116 +3603,116 @@ static void test_audiostream_set_format(void) extensible_format.dwChannelMask = KSAUDIO_SPEAKER_STEREO; extensible_format.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; hr = set_audiostream_format(&extensible_format.Format); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
format = valid_format; format.nBlockAlign = 1; hr = set_audiostream_format(&format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
format = valid_format; format.nAvgBytesPerSec = 1234; hr = set_audiostream_format(&format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_SetFormat(audio_stream, &valid_format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_GetFormat(audio_stream, &format); - ok(hr == MS_E_NOSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOSTREAM, "Got hr %#lx.\n", hr);
format = valid_format; format.nChannels = 1; hr = IAudioMediaStream_SetFormat(audio_stream, &format); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
format = valid_format; format.nSamplesPerSec = 11025; hr = IAudioMediaStream_SetFormat(audio_stream, &format); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
format = valid_format; format.nAvgBytesPerSec = 1234; hr = IAudioMediaStream_SetFormat(audio_stream, &format); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
format = valid_format; format.nBlockAlign = 1; hr = IAudioMediaStream_SetFormat(audio_stream, &format); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
format = valid_format; format.wBitsPerSample = 8; hr = IAudioMediaStream_SetFormat(audio_stream, &format); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
format = valid_format; format.cbSize = 1; hr = IAudioMediaStream_SetFormat(audio_stream, &format); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_SetFormat(audio_stream, &valid_format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n");
testfilter_init(&source);
hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
format = valid_format; format.nChannels = 1; hr = IAudioMediaStream_SetFormat(audio_stream, &format); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
format = valid_format; format.nChannels = 1; hr = IAudioMediaStream_SetFormat(audio_stream, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_audiostream_receive_connection(void) @@ -3731,44 +3731,44 @@ static void test_audiostream_receive_connection(void)
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-null graph\n"); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
mt = audio_mt; mt.majortype = GUID_NULL; hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
mt = audio_mt; mt.subtype = MEDIASUBTYPE_RGB24; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
mt = audio_mt; mt.formattype = GUID_NULL; hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
mt = audio_mt; mt.cbFormat = sizeof(WAVEFORMATEX) - 1; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
extensible_format.Format = audio_format; extensible_format.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; @@ -3780,33 +3780,33 @@ static void test_audiostream_receive_connection(void) mt.cbFormat = sizeof(extensible_format); mt.pbFormat = (BYTE *)&extensible_format; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_SetFormat(audio_stream, &audio_format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
format = audio_format; format.nChannels = 2; mt = audio_mt; mt.pbFormat = (BYTE *)&format; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstream_receive_connection(void) @@ -3876,30 +3876,30 @@ static void test_ddrawstream_receive_connection(void)
mmstream = create_ammultimediastream(); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&source);
mt = video_mt; hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(subtypes); ++i) { mt = video_mt; mt.subtype = *subtypes[i]; hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); - ok(hr == (i < 4 ? S_OK : VFW_E_TYPE_NOT_ACCEPTED), "Got hr %#x.\n", hr); + ok(hr == (i < 4 ? S_OK : VFW_E_TYPE_NOT_ACCEPTED), "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); } }
@@ -3908,19 +3908,19 @@ static void test_ddrawstream_receive_connection(void) format.dwWidth = 222; format.dwHeight = 555; hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb32_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
format = rgb8_format; format.dwFlags = DDSD_HEIGHT; format.dwWidth = 333; format.dwHeight = 444; hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
video_info = rgb555_video_info; video_info.bmiHeader.biWidth = 333; @@ -3928,14 +3928,14 @@ static void test_ddrawstream_receive_connection(void) mt = rgb555_mt; mt.pbFormat = (BYTE *)&video_info; hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb32_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
video_info = rgb32_video_info; video_info.bmiHeader.biWidth = 332; @@ -3943,7 +3943,7 @@ static void test_ddrawstream_receive_connection(void) mt = rgb32_mt; mt.pbFormat = (BYTE *)&video_info; hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
video_info = rgb32_video_info; video_info.bmiHeader.biWidth = 333; @@ -3951,97 +3951,97 @@ static void test_ddrawstream_receive_connection(void) mt = rgb32_mt; mt.pbFormat = (BYTE *)&video_info; hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb8_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb555_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb8_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb555_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb565_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb555_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb565_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb24_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb565_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb24_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb32_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb24_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb32_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb8_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb32_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &yuy2_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &yuy2_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
format = yuy2_format; format.ddpfPixelFormat.u2.dwRBitMask = 0xf800; format.ddpfPixelFormat.u3.dwGBitMask = 0x07e0; format.ddpfPixelFormat.u4.dwBBitMask = 0x001f; hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb565_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
format = rgb8_format; format.dwFlags = 0; hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb565_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_audiostream_receive(void) @@ -4067,93 +4067,93 @@ static void test_audiostream_receive(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_SetProperties(allocator, &properties, &actual); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample1, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, sample1); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(sample1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample1, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, sample1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(sample1); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IMemAllocator_GetBuffer(allocator, &sample2, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, sample2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(sample2); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample3, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, sample3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(sample3); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IMediaSample_Release(sample1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaSample_Release(sample2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaSample_Release(sample3); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IMemAllocator_GetBuffer(allocator, &sample1, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, sample1); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(sample1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
hr = IMemAllocator_Decommit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMemAllocator_Release(allocator); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_audiostream_initialize(void) @@ -4165,33 +4165,33 @@ static void test_audiostream_initialize(void) ULONG ref;
hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Crashes on native. */ if (0) { hr = IAMMediaStream_Initialize(stream, NULL, 0, NULL, STREAMTYPE_WRITE); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
hr = IAMMediaStream_Initialize(stream, NULL, 0, &test_mspid, STREAMTYPE_WRITE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_GetInformation(stream, &mspid, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&mspid, &test_mspid), "Got mspid %s.\n", wine_dbgstr_guid(&mspid)); ok(type == STREAMTYPE_WRITE, "Got type %u.\n", type);
hr = IAMMediaStream_Initialize(stream, NULL, 0, &MSPID_PrimaryAudio, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_GetInformation(stream, &mspid, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&mspid, &MSPID_PrimaryAudio), "Got mspid %s.\n", wine_dbgstr_guid(&mspid)); ok(type == STREAMTYPE_READ, "Got type %u.\n", type);
ref = IAMMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_audiostream_begin_flush_end_flush(void) @@ -4215,170 +4215,170 @@ static void test_audiostream_begin_flush_end_flush(void)
graph_init(&graph); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, (IGraphBuilder *)&graph.IFilterGraph2_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_Initialize(stream2, NULL, 0, &mspid, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream2, &mspid, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_QueryInterface(stream2, &IID_IPin, (void **)&pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); testfilter_init(&source2); source.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; hr = IFilterGraph2_AddFilter(&graph.IFilterGraph2_iface, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_AddFilter(&graph.IFilterGraph2_iface, &source2.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioData_SetBuffer(audio_data, 16, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioMediaStream_CreateSample(audio_stream, audio_data, 0, &stream_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(&graph.IFilterGraph2_iface, &source.source.pin.IPin_iface, pin, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(&graph.IFilterGraph2_iface, &source2.source.pin.IPin_iface, pin2, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(media_sample); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAudioStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(ref == 1, "Got outstanding refcount %d.\n", ref); + ok(ref == 1, "Got outstanding refcount %ld.\n", ref);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IPin_EndOfStream(pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify); - ok(graph.event_code == EC_COMPLETE, "Got event code %d.\n", graph.event_code); + ok(graph.event_code == EC_COMPLETE, "Got event code %ld.\n", graph.event_code);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0; graph.event_code = 0xcc;
hr = IPin_EndOfStream(pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify); - ok(graph.event_code == EC_COMPLETE, "Got event code %d.\n", graph.event_code); + ok(graph.event_code == EC_COMPLETE, "Got event code %ld.\n", graph.event_code);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0; graph.event_code = 0xcc;
hr = IPin_EndOfStream(pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify); - ok(graph.event_code == EC_COMPLETE, "Got event code %d.\n", graph.event_code); + ok(graph.event_code == EC_COMPLETE, "Got event code %ld.\n", graph.event_code);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IFilterGraph2_Disconnect(&graph.IFilterGraph2_iface, pin); IFilterGraph2_Disconnect(&graph.IFilterGraph2_iface, &source.source.pin.IPin_iface); @@ -4386,21 +4386,21 @@ static void test_audiostream_begin_flush_end_flush(void) IFilterGraph2_Disconnect(&graph.IFilterGraph2_iface, &source2.source.pin.IPin_iface);
ref = IAudioStreamSample_Release(stream_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioData_Release(audio_data); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); graph_destroy(&graph); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin2); ref = IAMMediaStream_Release(stream2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static IMediaSample *ammediastream_allocate_sample(struct testfilter *source, const BYTE *input_data, DWORD input_length) @@ -4410,13 +4410,13 @@ static IMediaSample *ammediastream_allocate_sample(struct testfilter *source, co HRESULT hr;
hr = IMemAllocator_GetBuffer(source->source.pAllocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &sample_data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_SetActualDataLength(sample, input_length); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memcpy(sample_data, input_data, input_length);
@@ -4442,95 +4442,95 @@ static void test_audiostream_new_segment(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IMemInputPin, (void **)&mem_input_pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioMediaStream_CreateSample(audio_stream, audio_data, 0, &stream_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioData_SetBuffer(audio_data, 5, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_NewSegment(pin, 11111111, 22222222, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, 5); start_time = 12345678; end_time = 23456789; hr = IMediaSample_SetTime(media_sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(mem_input_pin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(media_sample);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 23456789, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 23459057, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
hr = IPin_NewSegment(pin, 11111111, 22222222, 2.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, 5); start_time = 12345678; end_time = 23456789; hr = IMediaSample_SetTime(media_sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(mem_input_pin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(media_sample);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 23456789, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 23459057, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
ref = IAudioStreamSample_Release(stream_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioData_Release(audio_data); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IMemInputPin_Release(mem_input_pin); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void CALLBACK apc_func(ULONG_PTR param) @@ -4549,7 +4549,7 @@ static DWORD CALLBACK ammediastream_end_of_stream(void *param)
Sleep(ammediastream_sleep_time); hr = IPin_EndOfStream(ammediastream_pin); - ok(hr == ammediastream_expected_hr, "Got hr %#x.\n", hr); + ok(hr == ammediastream_expected_hr, "Got hr %#lx.\n", hr);
return 0; } @@ -4560,7 +4560,7 @@ static DWORD CALLBACK ammediastream_receive(void *param)
Sleep(ammediastream_sleep_time); hr = IMemInputPin_Receive(ammediastream_mem_input_pin, ammediastream_media_sample); - ok(hr == ammediastream_expected_hr, "Got hr %#x.\n", hr); + ok(hr == ammediastream_expected_hr, "Got hr %#lx.\n", hr);
return 0; } @@ -4578,10 +4578,10 @@ static DWORD CALLBACK ammediastream_receive_release(void *p) ULONG ref;
hr = IMemInputPin_Receive(param->mem_input_pin, param->media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IMediaSample_Release(param->media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
free(p);
@@ -4597,7 +4597,7 @@ static HANDLE ammediastream_async_receive_time(struct testfilter *source,
sample = ammediastream_allocate_sample(source, input_data, input_length); hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
param = calloc(1, sizeof(*param)); param->mem_input_pin = source->source.pMemInputPin; @@ -4615,7 +4615,7 @@ static DWORD CALLBACK streamsample_completion_status(void *param) HRESULT hr;
hr = IStreamSample_CompletionStatus(streamsample_sample, streamsample_flags, streamsample_timeout); - ok(hr == streamsample_expected_hr, "Got hr %#x.\n", hr); + ok(hr == streamsample_expected_hr, "Got hr %#lx.\n", hr);
return 0; } @@ -4643,131 +4643,131 @@ static void test_audiostreamsample_update(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IMemInputPin, (void **)&mem_input_pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaControl, (void **)&media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioMediaStream_CreateSample(audio_stream, audio_data, 0, &stream_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); event = CreateEventW(NULL, FALSE, FALSE, NULL); ok(event != NULL, "Expected non-NULL event.");
hr = IAudioStreamSample_Update(stream_sample, 0, event, apc_func, 0); - ok(hr == MS_E_NOTINIT, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOTINIT, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_E_NOTINIT, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOTINIT, "Got hr %#lx.\n", hr);
hr = IAudioData_SetBuffer(audio_data, sizeof(buffer), buffer, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample, 0, event, apc_func, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_E_NOTRUNNING, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOTRUNNING, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample1 = ammediastream_allocate_sample(&source, test_data, 8); hr = IMemInputPin_Receive(mem_input_pin, media_sample1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(media_sample1); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioData_GetInfo(audio_data, NULL, NULL, &actual_length); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(actual_length == 6, "Got actual length %u.\n", actual_length); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(actual_length == 6, "Got actual length %lu.\n", actual_length);
ok(memcmp(buffer, test_data, 6) == 0, "Sample data didn't match.\n");
ref = get_refcount(media_sample1); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
media_sample2 = ammediastream_allocate_sample(&source, test_data, 8); hr = IMemInputPin_Receive(mem_input_pin, media_sample2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(media_sample2); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioData_GetInfo(audio_data, NULL, NULL, &actual_length); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(actual_length == 6, "Got actual length %u.\n", actual_length); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(actual_length == 6, "Got actual length %lu.\n", actual_length);
ok(memcmp(buffer, &test_data[6], 2) == 0, "Sample data didn't match.\n"); ok(memcmp(&buffer[2], test_data, 4) == 0, "Sample data didn't match.\n");
ref = IMediaSample_Release(media_sample1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioData_GetInfo(audio_data, NULL, NULL, &actual_length); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(actual_length == 4, "Got actual length %u.\n", actual_length); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(actual_length == 4, "Got actual length %lu.\n", actual_length);
ok(memcmp(buffer, &test_data[4], 4) == 0, "Sample data didn't match.\n");
ref = IMediaSample_Release(media_sample2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample1 = ammediastream_allocate_sample(&source, test_data, 6); hr = IMemInputPin_Receive(mem_input_pin, media_sample1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample1); - ok(ref == 1, "Got outstanding refcount %d.\n", ref); + ok(ref == 1, "Got outstanding refcount %ld.\n", ref);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_E_NOTRUNNING, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOTRUNNING, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample1 = ammediastream_allocate_sample(&source, test_data, 6);
@@ -4778,11 +4778,11 @@ static void test_audiostreamsample_update(void) thread = CreateThread(NULL, 0, ammediastream_receive, NULL, 0, NULL);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioData_GetInfo(audio_data, NULL, NULL, &actual_length); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(actual_length == 6, "Got actual length %u.\n", actual_length); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(actual_length == 6, "Got actual length %lu.\n", actual_length);
ok(memcmp(buffer, test_data, 6) == 0, "Sample data didn't match.\n");
@@ -4790,7 +4790,7 @@ static void test_audiostreamsample_update(void) CloseHandle(thread);
ref = IMediaSample_Release(media_sample1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
ammediastream_pin = pin; ammediastream_sleep_time = 100; @@ -4798,53 +4798,53 @@ static void test_audiostreamsample_update(void) thread = CreateThread(NULL, 0, ammediastream_end_of_stream, NULL, 0, NULL);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
IAudioStreamSample_AddRef(stream_sample); ref = IAudioStreamSample_Release(stream_sample); - ok(ref == 1, "Got outstanding refcount %d.\n", ref); + ok(ref == 1, "Got outstanding refcount %ld.\n", ref);
hr = IAudioStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_E_BUSY, "Got hr %#x.\n", hr); + ok(hr == MS_E_BUSY, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
CloseHandle(event); ref = IAudioStreamSample_Release(stream_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioData_Release(audio_data); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaControl_Release(media_control); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IMemInputPin_Release(mem_input_pin); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
void test_audiostreamsample_completion_status(void) @@ -4869,130 +4869,130 @@ void test_audiostreamsample_completion_status(void) ok(event != NULL, "Expected non-NULL event.");
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioData_SetBuffer(audio_data1, 6, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioData_SetBuffer(audio_data2, 6, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioMediaStream_CreateSample(audio_stream, audio_data1, 0, &stream_sample1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioMediaStream_CreateSample(audio_stream, audio_data2, 0, &stream_sample2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, 6); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAudioStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample2, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, 12); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAudioStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_CompletionStatus(stream_sample2, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, 6); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAudioStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
ref = IAudioStreamSample_Release(stream_sample1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioStreamSample_Release(stream_sample2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioData_Release(audio_data1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioData_Release(audio_data2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
CloseHandle(event); } @@ -5021,62 +5021,62 @@ static void test_audiostreamsample_get_sample_times(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n"); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IMemInputPin, (void **)&mem_input_pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&graph_media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioMediaStream_CreateSample(audio_stream, audio_data, 0, &stream_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAudioData_SetBuffer(audio_data, 5, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testclock_init(&clock);
clock.time = 12345678;
current_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == 0, "Got current time %s.\n", wine_dbgstr_longlong(current_time));
hr = IMediaFilter_SetSyncSource(graph_media_filter, &clock.IReferenceClock_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
current_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == 0, "Got current time %s.\n", wine_dbgstr_longlong(current_time));
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_GetCurrentStreamTime(filter, &filter_start_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.get_time_hr = E_FAIL;
current_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == 0xdeadbeefddf15da1 + filter_start_time, "Expected current time %s, got %s.\n", wine_dbgstr_longlong(0xdeadbeefddf15da1 + filter_start_time), wine_dbgstr_longlong(current_time));
@@ -5084,7 +5084,7 @@ static void test_audiostreamsample_get_sample_times(void)
current_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == filter_start_time, "Expected current time %s, got %s.\n", wine_dbgstr_longlong(filter_start_time), wine_dbgstr_longlong(current_time));
@@ -5092,14 +5092,14 @@ static void test_audiostreamsample_get_sample_times(void)
current_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == filter_start_time + 11111111, "Expected current time %s, got %s.\n", wine_dbgstr_longlong(filter_start_time + 11111111), wine_dbgstr_longlong(current_time));
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 0, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 0, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
@@ -5107,18 +5107,18 @@ static void test_audiostreamsample_get_sample_times(void) start_time = 12345678; end_time = 23456789; hr = IMediaSample_SetTime(media_sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(mem_input_pin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(media_sample);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 12345678, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 12347946, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
@@ -5126,55 +5126,55 @@ static void test_audiostreamsample_get_sample_times(void) start_time = 12345678; end_time = 23456789; hr = IMediaSample_SetTime(media_sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(mem_input_pin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(media_sample);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 12347946, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 12346585, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 12346585, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 12348399, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
ref = IAudioStreamSample_Release(stream_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioData_Release(audio_data); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(graph_media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IMemInputPin_Release(mem_input_pin); IAudioMediaStream_Release(audio_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstream_initialize(void) @@ -5189,47 +5189,47 @@ static void test_ddrawstream_initialize(void) ULONG ref;
hr = DirectDrawCreate(NULL, &ddraw, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_AMDirectDrawStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Crashes on native. */ if (0) { hr = IAMMediaStream_Initialize(stream, NULL, 0, NULL, STREAMTYPE_WRITE); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
hr = IAMMediaStream_Initialize(stream, NULL, 0, &test_mspid, STREAMTYPE_WRITE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_GetInformation(stream, &mspid, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&mspid, &test_mspid), "Got mspid %s.\n", wine_dbgstr_guid(&mspid)); ok(type == STREAMTYPE_WRITE, "Got type %u.\n", type);
hr = IAMMediaStream_Initialize(stream, (IUnknown *)ddraw, 0, &MSPID_PrimaryAudio, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_GetInformation(stream, &mspid, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&mspid, &MSPID_PrimaryAudio), "Got mspid %s.\n", wine_dbgstr_guid(&mspid)); ok(type == STREAMTYPE_READ, "Got type %u.\n", type);
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ddraw2 == ddraw, "Expected ddraw %p, got %p.\n", ddraw, ddraw2);
IDirectDrawMediaStream_Release(ddraw_stream); ref = IAMMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IDirectDraw_Release(ddraw2); ref = IDirectDraw_Release(ddraw); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
#define check_ddrawstream_get_format(a,b,c) check_ddrawstream_get_format_(__LINE__,a,b,c) @@ -5247,22 +5247,22 @@ static void check_ddrawstream_get_format_(int line, IDirectDrawMediaStream *stre IPin *pin;
hr = IDirectDrawMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryPinInfo(pin, &pin_info); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IBaseFilter_QueryFilterInfo(pin_info.pFilter, &filter_info); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&source);
hr = IFilterGraph_AddFilter(filter_info.pGraph, &source.filter.IBaseFilter_iface, L"source"); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph_ConnectDirect(filter_info.pGraph, &source.source.pin.IPin_iface, pin, mt); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_GetFormat(stream, NULL, NULL, NULL, NULL); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
memset(¤t_format, 0xcc, sizeof(current_format)); current_format.dwSize = sizeof(current_format); @@ -5270,7 +5270,7 @@ static void check_ddrawstream_get_format_(int line, IDirectDrawMediaStream *stre desired_format.dwSize = sizeof(desired_format); flags = 0xdeadbeef; hr = IDirectDrawMediaStream_GetFormat(stream, ¤t_format, NULL, &desired_format, &flags); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); memset(&format, 0xcc, sizeof(format)); format.dwSize = sizeof(format); format.ddpfPixelFormat = expected_format->ddpfPixelFormat; @@ -5283,12 +5283,12 @@ static void check_ddrawstream_get_format_(int line, IDirectDrawMediaStream *stre ok_(__FILE__, line)(memcmp(&desired_format, &format, sizeof(DDSURFACEDESC)) == 0, "Desired format didn't match.\n");
hr = IFilterGraph_Disconnect(filter_info.pGraph, &source.source.pin.IPin_iface); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph_Disconnect(filter_info.pGraph, pin); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph_RemoveFilter(filter_info.pGraph, &source.filter.IBaseFilter_iface); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
IFilterGraph_Release(filter_info.pGraph); IBaseFilter_Release(pin_info.pFilter); @@ -5310,14 +5310,14 @@ static void test_ddrawstream_get_format(void) ULONG ref;
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
current_format.dwSize = sizeof(current_format); desired_format.dwSize = sizeof(desired_format); hr = IDirectDrawMediaStream_GetFormat(ddraw_stream, ¤t_format, &palette, &desired_format, &flags); - ok(hr == MS_E_NOSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOSTREAM, "Got hr %#lx.\n", hr);
video_info = rgb32_video_info; video_info.rcSource.right = 222; @@ -5343,13 +5343,13 @@ static void test_ddrawstream_get_format(void) current_format.dwSize = sizeof(current_format); desired_format.dwSize = sizeof(desired_format); hr = IDirectDrawMediaStream_GetFormat(ddraw_stream, ¤t_format, &palette, &desired_format, &flags); - ok(hr == MS_E_NOSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOSTREAM, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
#define check_ddrawstream_set_format(a,b,c,d) check_ddrawstream_set_format_(__LINE__,a,b,c,d) @@ -5363,19 +5363,19 @@ static void check_ddrawstream_set_format_(int line, IDirectDrawMediaStream *stre IPin *pin;
hr = IDirectDrawMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryPinInfo(pin, &pin_info); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IBaseFilter_QueryFilterInfo(pin_info.pFilter, &filter_info); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&source);
hr = IFilterGraph_AddFilter(filter_info.pGraph, &source.filter.IBaseFilter_iface, L"source"); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_SetFormat(stream, format, NULL); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx.\n", hr);
if (mt) { @@ -5384,7 +5384,7 @@ static void check_ddrawstream_set_format_(int line, IDirectDrawMediaStream *stre DWORD flags;
hr = IFilterGraph_ConnectDirect(filter_info.pGraph, &source.source.pin.IPin_iface, pin, mt); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
memset(¤t_format, 0xcc, sizeof(current_format)); memset(&desired_format, 0xcc, sizeof(desired_format)); @@ -5392,11 +5392,11 @@ static void check_ddrawstream_set_format_(int line, IDirectDrawMediaStream *stre current_format.dwSize = sizeof(current_format); desired_format.dwSize = sizeof(desired_format); hr = IDirectDrawMediaStream_GetFormat(stream, ¤t_format, NULL, &desired_format, &flags); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); if (format->dwFlags & DDSD_PIXELFORMAT) { ok_(__FILE__, line)(current_format.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT), - "Got current format flags %#x.\n", current_format.dwFlags); + "Got current format flags %#lx.\n", current_format.dwFlags); ok_(__FILE__, line)(memcmp(¤t_format.ddpfPixelFormat, &format->ddpfPixelFormat, sizeof(DDPIXELFORMAT)) == 0, "Current pixel format didn't match.\n"); ok_(__FILE__, line)(memcmp(&desired_format.ddpfPixelFormat, &format->ddpfPixelFormat, sizeof(DDPIXELFORMAT)) == 0, @@ -5405,24 +5405,24 @@ static void check_ddrawstream_set_format_(int line, IDirectDrawMediaStream *stre else { ok_(__FILE__, line)(current_format.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS), - "Got flags %#x.\n", current_format.dwFlags); + "Got flags %#lx.\n", current_format.dwFlags); } ok_(__FILE__, line)(desired_format.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT), - "Got desired format flags %#x.\n", desired_format.dwFlags); + "Got desired format flags %#lx.\n", desired_format.dwFlags); ok_(__FILE__, line)(current_format.ddsCaps.dwCaps == (DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY), - "Got current format caps %#x.\n", current_format.ddsCaps.dwCaps); + "Got current format caps %#lx.\n", current_format.ddsCaps.dwCaps); ok_(__FILE__, line)(desired_format.ddsCaps.dwCaps == (DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY), - "Got desired format caps %#x.\n", desired_format.ddsCaps.dwCaps); - ok_(__FILE__, line)(flags == 0, "Got flags %#x.\n", flags); + "Got desired format caps %#lx.\n", desired_format.ddsCaps.dwCaps); + ok_(__FILE__, line)(flags == 0, "Got flags %#lx.\n", flags);
hr = IFilterGraph_Disconnect(filter_info.pGraph, &source.source.pin.IPin_iface); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph_Disconnect(filter_info.pGraph, pin); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); }
hr = IFilterGraph_RemoveFilter(filter_info.pGraph, &source.filter.IBaseFilter_iface); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
IFilterGraph_Release(filter_info.pGraph); IBaseFilter_Release(pin_info.pFilter); @@ -5492,9 +5492,9 @@ static void test_ddrawstream_set_format(void) mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_ddrawstream_set_format(ddraw_stream, &rgb8_format, &rgb8_mt, S_OK); check_ddrawstream_set_format(ddraw_stream, &rgb555_format, &rgb555_mt, S_OK); @@ -5576,67 +5576,67 @@ static void test_ddrawstream_set_format(void) check_ddrawstream_set_format(ddraw_stream, &format, NULL, DDERR_INVALIDSURFACETYPE);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
mmstream = create_ammultimediastream();
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!graph, "Expected non-NULL graph.\n");
testfilter_init(&source);
hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, L"source"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &rgb8_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
source.preferred_mt = NULL;
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb555_format, NULL); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&source.source.pin.mt.subtype, &MEDIASUBTYPE_RGB8), "Got subtype %s.\n", wine_dbgstr_guid(&source.source.pin.mt.subtype)); hr = IDirectDrawMediaStream_GetFormat(ddraw_stream, ¤t_format, NULL, &desired_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_format.ddpfPixelFormat.u1.dwRGBBitCount == 8, - "Got rgb bit count %u.\n", current_format.ddpfPixelFormat.u1.dwRGBBitCount); + "Got rgb bit count %lu.\n", current_format.ddpfPixelFormat.u1.dwRGBBitCount); ok(desired_format.ddpfPixelFormat.u1.dwRGBBitCount == 8, - "Got rgb bit count %u.\n", desired_format.ddpfPixelFormat.u1.dwRGBBitCount); + "Got rgb bit count %lu.\n", desired_format.ddpfPixelFormat.u1.dwRGBBitCount);
format = rgb555_format; format.dwFlags = 0; hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&source.source.pin.mt.subtype, &MEDIASUBTYPE_RGB8), "Got subtype %s.\n", wine_dbgstr_guid(&source.source.pin.mt.subtype));
source.preferred_mt = &rgb555_mt;
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb8_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &rgb555_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&source.source.pin.mt.subtype, &MEDIASUBTYPE_RGB555), "Got subtype %s.\n", wine_dbgstr_guid(&source.source.pin.mt.subtype)); hr = IDirectDrawMediaStream_GetFormat(ddraw_stream, ¤t_format, NULL, &desired_format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_format.ddpfPixelFormat.u1.dwRGBBitCount == 16, - "Got rgb bit count %u.\n", current_format.ddpfPixelFormat.u1.dwRGBBitCount); + "Got rgb bit count %lu.\n", current_format.ddpfPixelFormat.u1.dwRGBBitCount); ok(desired_format.ddpfPixelFormat.u1.dwRGBBitCount == 16, - "Got rgb bit count %u.\n", desired_format.ddpfPixelFormat.u1.dwRGBBitCount); + "Got rgb bit count %lu.\n", desired_format.ddpfPixelFormat.u1.dwRGBBitCount);
video_info = rgb555_video_info; video_info.bmiHeader.biWidth = 222; @@ -5650,27 +5650,27 @@ static void test_ddrawstream_set_format(void) format.dwWidth = 222; format.dwHeight = 555; hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &format, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&source.source.pin.mt.subtype, &MEDIASUBTYPE_RGB555), "Got subtype %s.\n", wine_dbgstr_guid(&source.source.pin.mt.subtype)); ok(((VIDEOINFO *)source.source.pin.mt.pbFormat)->bmiHeader.biWidth == 222, - "Got width %d.\n", ((VIDEOINFO *)source.source.pin.mt.pbFormat)->bmiHeader.biWidth); + "Got width %ld.\n", ((VIDEOINFO *)source.source.pin.mt.pbFormat)->bmiHeader.biWidth); ok(((VIDEOINFO *)source.source.pin.mt.pbFormat)->bmiHeader.biHeight == -555, - "Got height %d.\n", ((VIDEOINFO *)source.source.pin.mt.pbFormat)->bmiHeader.biHeight); + "Got height %ld.\n", ((VIDEOINFO *)source.source.pin.mt.pbFormat)->bmiHeader.biHeight);
hr = IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstream_receive(void) @@ -5696,42 +5696,42 @@ static void test_ddrawstream_receive(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n"); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_SetProperties(allocator, &properties, &actual); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &rgb32_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ammediastream_mem_input_pin = source.source.pMemInputPin; ammediastream_media_sample = sample; @@ -5742,38 +5742,38 @@ static void test_ddrawstream_receive(void) ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Receive returned prematurely.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
ref = IMediaSample_Release(sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
hr = IMemAllocator_Decommit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMemAllocator_Release(allocator); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstream_begin_flush_end_flush(void) @@ -5800,35 +5800,35 @@ static void test_ddrawstream_begin_flush_end_flush(void)
graph_init(&graph); hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, (IGraphBuilder *)&graph.IFilterGraph2_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMDirectDrawStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_Initialize(stream2, NULL, 0, &mspid, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream2, &mspid, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_QueryInterface(stream2, &IID_IPin, (void **)&pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_QueryInterface(&graph.IFilterGraph2_iface, &IID_IMediaFilter, (void **)&media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); testfilter_init(&source2); source.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; hr = IFilterGraph2_AddFilter(&graph.IFilterGraph2_iface, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_AddFilter(&graph.IFilterGraph2_iface, &source2.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaFilter_SetSyncSource(media_filter, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
video_info = rgb32_video_info; video_info.bmiHeader.biWidth = 3; @@ -5836,21 +5836,21 @@ static void test_ddrawstream_begin_flush_end_flush(void) mt = rgb32_mt; mt.pbFormat = (BYTE *)&video_info; hr = IFilterGraph2_ConnectDirect(&graph.IFilterGraph2_iface, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(&graph.IFilterGraph2_iface, &source2.source.pin.IPin_iface, pin2, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &stream_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ammediastream_mem_input_pin = source.source.pMemInputPin; ammediastream_media_sample = media_sample; @@ -5859,120 +5859,120 @@ static void test_ddrawstream_begin_flush_end_flush(void) thread = CreateThread(NULL, 0, ammediastream_receive, NULL, 0, NULL);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IPin_EndOfStream(pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify); - ok(graph.event_code == EC_COMPLETE, "Got event code %d.\n", graph.event_code); + ok(graph.event_code == EC_COMPLETE, "Got event code %ld.\n", graph.event_code);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0; graph.event_code = 0xcc;
hr = IPin_EndOfStream(pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify); - ok(graph.event_code == EC_COMPLETE, "Got event code %d.\n", graph.event_code); + ok(graph.event_code == EC_COMPLETE, "Got event code %ld.\n", graph.event_code);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0; graph.event_code = 0xcc;
hr = IPin_EndOfStream(pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify); - ok(graph.event_code == EC_COMPLETE, "Got event code %d.\n", graph.event_code); + ok(graph.event_code == EC_COMPLETE, "Got event code %ld.\n", graph.event_code);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IFilterGraph2_Disconnect(&graph.IFilterGraph2_iface, pin); IFilterGraph2_Disconnect(&graph.IFilterGraph2_iface, &source.source.pin.IPin_iface); @@ -5980,17 +5980,17 @@ static void test_ddrawstream_begin_flush_end_flush(void) IFilterGraph2_Disconnect(&graph.IFilterGraph2_iface, &source2.source.pin.IPin_iface);
ref = IDirectDrawStreamSample_Release(stream_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(media_filter); graph_destroy(&graph); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstream_new_segment(void) @@ -6014,26 +6014,26 @@ static void test_ddrawstream_new_segment(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IMemInputPin, (void **)&mem_input_pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaFilter_SetSyncSource(media_filter, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
video_info = rgb32_video_info; video_info.bmiHeader.biWidth = 3; @@ -6041,75 +6041,75 @@ static void test_ddrawstream_new_segment(void) mt = rgb32_mt; mt.pbFormat = (BYTE *)&video_info; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &stream_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_NewSegment(pin, 11111111, 22222222, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); start_time = 12345678; end_time = 23456789; hr = IMediaSample_SetTime(media_sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(mem_input_pin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(media_sample);
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 23456789, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 34567900, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
hr = IPin_NewSegment(pin, 11111111, 22222222, 2.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); start_time = 12345678; end_time = 23456789; hr = IMediaSample_SetTime(media_sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(mem_input_pin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(media_sample);
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 23456789, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 34567900, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
ref = IDirectDrawStreamSample_Release(stream_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IMemInputPin_Release(mem_input_pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstream_get_time_per_frame(void) @@ -6127,46 +6127,46 @@ static void test_ddrawstream_get_time_per_frame(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_GetTimePerFrame(ddraw_stream, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_GetTimePerFrame(ddraw_stream, &frame_time); - ok(hr == MS_E_NOSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOSTREAM, "Got hr %#lx.\n", hr);
video_info = rgb32_video_info; video_info.AvgTimePerFrame = 12345678; mt = rgb32_mt; mt.pbFormat = (BYTE *)&video_info; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
frame_time = 0xdeadbeefdeadbeef; hr = IDirectDrawMediaStream_GetTimePerFrame(ddraw_stream, &frame_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(frame_time == 12345678, "Got frame time %s.\n", wine_dbgstr_longlong(frame_time));
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void check_ammediastream_join_am_multi_media_stream(const CLSID *clsid) @@ -6179,33 +6179,33 @@ static void check_ammediastream_join_am_multi_media_stream(const CLSID *clsid) ULONG ref;
hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mmstream_ref = get_refcount(mmstream);
hr = IAMMediaStream_JoinAMMultiMediaStream(stream, mmstream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(mmstream); - ok(ref == mmstream_ref, "Expected outstanding refcount %d, got %d.\n", mmstream_ref, ref); + ok(ref == mmstream_ref, "Expected outstanding refcount %ld, got %ld.\n", mmstream_ref, ref);
hr = IAMMediaStream_GetMultiMediaStream(stream, &mmstream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(mmstream2 == (IMultiMediaStream *)mmstream, "Expected mmstream %p, got %p.\n", mmstream, mmstream2);
IMultiMediaStream_Release(mmstream2);
hr = IAMMediaStream_JoinAMMultiMediaStream(stream, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_GetMultiMediaStream(stream, &mmstream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(mmstream2 == NULL, "Got mmstream %p.\n", mmstream2);
ref = IAMMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ammediastream_join_am_multi_media_stream(void) @@ -6223,22 +6223,22 @@ static void check_ammediastream_join_filter(const CLSID *clsid) ULONG ref;
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n"); EXPECT_REF(filter, 3);
hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(filter, 3);
hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(filter, 3); EXPECT_REF(filter2, 1);
hr = IAMMediaStream_JoinFilter(stream, filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(filter, 3); EXPECT_REF(filter2, 1);
@@ -6246,11 +6246,11 @@ static void check_ammediastream_join_filter(const CLSID *clsid) if (0) { hr = IAMMediaStream_JoinFilter(stream, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter3 == filter, "Expected filter %p, got %p.\n", filter, filter3); EXPECT_REF(filter, 4);
@@ -6258,15 +6258,15 @@ static void check_ammediastream_join_filter(const CLSID *clsid) EXPECT_REF(filter, 3);
ref = IMediaStreamFilter_Release(filter2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); EXPECT_REF(filter, 3); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); EXPECT_REF(filter, 1); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ammediastream_join_filter(void) @@ -6287,26 +6287,26 @@ static void check_ammediastream_join_filter_graph(const MSPID *id) ULONG ref;
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n");
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, id, 0, (IMediaStream **)&stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &builder); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!builder, "Expected non-null graph.\n"); EXPECT_REF(builder, 4);
hr = IMediaStreamFilter_QueryFilterInfo(filter, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pGraph == (IFilterGraph *)builder, "Expected graph %p, got %p.\n", (IFilterGraph *)builder, info.pGraph); EXPECT_REF(builder, 5); IFilterGraph_Release(info.pGraph); EXPECT_REF(builder, 4);
hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph, (void **)&graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(builder, 4); EXPECT_REF(graph, 1);
@@ -6314,16 +6314,16 @@ static void check_ammediastream_join_filter_graph(const MSPID *id) if (0) { hr = IAMMediaStream_JoinFilterGraph(stream, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
hr = IAMMediaStream_JoinFilterGraph(stream, graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(builder, 4); EXPECT_REF(graph, 1);
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &builder2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(builder2 == builder, "Expected graph %p, got %p.\n", builder, builder2); EXPECT_REF(builder, 5); EXPECT_REF(graph, 1); @@ -6332,7 +6332,7 @@ static void check_ammediastream_join_filter_graph(const MSPID *id) EXPECT_REF(graph, 1);
hr = IMediaStreamFilter_QueryFilterInfo(filter, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pGraph == (IFilterGraph *)builder, "Expected graph %p, got %p.\n", (IFilterGraph *)builder, info.pGraph); EXPECT_REF(builder, 5); EXPECT_REF(graph, 1); @@ -6341,15 +6341,15 @@ static void check_ammediastream_join_filter_graph(const MSPID *id) EXPECT_REF(graph, 1);
ref = IFilterGraph_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(builder); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ammediastream_join_filter_graph(void) @@ -6367,29 +6367,29 @@ static void check_ammediastream_set_state(const MSPID *id) ULONG ref;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, id, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IAMMediaStream, (void **)&am_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_SetState(am_stream, 4); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_SetState(am_stream, State_Running); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_SetState(am_stream, State_Paused); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMediaStream_SetState(am_stream, State_Stopped); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IAMMediaStream_Release(am_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ammediastream_set_state(void) @@ -6412,71 +6412,71 @@ static void check_ammediastream_end_of_stream(const CLSID *clsid, const MSPID *i graph_init(&graph);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, (IGraphBuilder *)&graph.IFilterGraph2_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, id, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); source.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; hr = IFilterGraph2_AddFilter(&graph.IFilterGraph2_iface, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(&graph.IFilterGraph2_iface, &source.source.pin.IPin_iface, pin, mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0; graph.event_code = 0xcc;
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify); - ok(graph.event_code == EC_COMPLETE, "Got event code %d.\n", graph.event_code); + ok(graph.event_code == EC_COMPLETE, "Got event code %ld.\n", graph.event_code);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IFilterGraph2_Disconnect(&graph.IFilterGraph2_iface, pin); IFilterGraph2_Disconnect(&graph.IFilterGraph2_iface, &source.source.pin.IPin_iface);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); graph_destroy(&graph); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ammediastream_end_of_stream(void) @@ -6494,16 +6494,16 @@ void test_mediastreamfilter_get_state(void) ULONG ref;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n");
/* Crashes on native. */ if (0) { hr = IMediaStreamFilter_GetState(filter, 0, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
state = 0xcc; @@ -6511,9 +6511,9 @@ void test_mediastreamfilter_get_state(void) ok(state == State_Stopped, "Got state %#x.\n", state);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
void check_mediastreamfilter_state(FILTER_STATE expected_state, HRESULT (*set_state)(IMediaStreamFilter *), @@ -6532,70 +6532,70 @@ void check_mediastreamfilter_state(FILTER_STATE expected_state, HRESULT (*set_st teststream2.mspid.Data2 = 1;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)&teststream, &teststream.mspid, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)&teststream2, &teststream2.mspid, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter != NULL, "Expected non-null filter\n");
hr = reset_state(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
teststream.state = 0xcc; teststream2.state = 0xcc; hr = set_state(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(teststream.state == expected_state, "Got state %#x.\n", teststream.state); ok(teststream2.state == expected_state, "Got state %#x.\n", teststream2.state); hr = IMediaStreamFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == expected_state, "Got state %#x.\n", state);
teststream.state = 0xcc; teststream2.state = 0xcc; hr = set_state(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(teststream.state == 0xcc, "Got state %#x.\n", teststream.state); ok(teststream2.state == 0xcc, "Got state %#x.\n", teststream2.state);
hr = reset_state(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
teststream.set_state_result = E_FAIL; teststream.state = 0xcc; teststream2.state = 0xcc; hr = set_state(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(teststream.state == 0xcc, "Got state %#x.\n", teststream.state); ok(teststream2.state == expected_state, "Got state %#x.\n", teststream2.state); hr = IMediaStreamFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == expected_state, "Got state %#x.\n", state);
hr = reset_state(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
teststream.set_state_result = E_FAIL; teststream2.set_state_result = E_FAIL; teststream.state = 0xcc; teststream2.state = 0xcc; hr = set_state(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(teststream.state == 0xcc, "Got state %#x.\n", teststream.state); ok(teststream2.state == 0xcc, "Got state %#x.\n", teststream2.state); hr = IMediaStreamFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == expected_state, "Got state %#x.\n", state);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(teststream.refcount == 1, "Got outstanding refcount %d.\n", teststream.refcount); - ok(teststream2.refcount == 1, "Got outstanding refcount %d.\n", teststream2.refcount); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(teststream.refcount == 1, "Got outstanding refcount %ld.\n", teststream.refcount); + ok(teststream2.refcount == 1, "Got outstanding refcount %ld.\n", teststream2.refcount); }
static HRESULT mediastreamfilter_stop(IMediaStreamFilter *filter) @@ -6635,35 +6635,35 @@ static void test_mediastreamfilter_support_seeking(void) HRESULT hr;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_Initialize(stream1, NULL, 0, &mspid1, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_Initialize(stream2, NULL, 0, &mspid2, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_Initialize(stream3, NULL, 0, &mspid3, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream1, &mspid1, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream2, &mspid2, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream3, &mspid3, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_QueryInterface(stream1, &IID_IPin, (void **)&pin1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_QueryInterface(stream2, &IID_IPin, (void **)&pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_QueryInterface(stream3, &IID_IPin, (void **)&pin3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); testfilter_init(&source1); testfilter_init(&source2); @@ -6671,46 +6671,46 @@ static void test_mediastreamfilter_support_seeking(void) source2.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; source3.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; hr = IGraphBuilder_AddFilter(graph, &source1.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_AddFilter(graph, &source2.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_AddFilter(graph, &source3.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source1.source.pin.IPin_iface, pin1, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
source2.get_duration_hr = E_FAIL;
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source2.source.pin.IPin_iface, pin2, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source3.source.pin.IPin_iface, pin3, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, FALSE);
seeking_ref = get_refcount(&source3.IMediaSeeking_iface);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(filter, &IID_IMediaSeeking, TRUE);
ref = get_refcount(&source3.IMediaSeeking_iface); - ok(ref == seeking_ref, "Expected outstanding refcount %d, got %d.\n", seeking_ref, ref); + ok(ref == seeking_ref, "Expected outstanding refcount %ld, got %ld.\n", seeking_ref, ref);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_INITIALIZED), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_INITIALIZED), "Got hr %#lx.\n", hr);
IGraphBuilder_Disconnect(graph, pin1); IGraphBuilder_Disconnect(graph, &source1.source.pin.IPin_iface); @@ -6722,20 +6722,20 @@ static void test_mediastreamfilter_support_seeking(void) IGraphBuilder_Disconnect(graph, &source3.source.pin.IPin_iface);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin1); ref = IAMMediaStream_Release(stream1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin2); ref = IAMMediaStream_Release(stream2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin3); ref = IAMMediaStream_Release(stream3); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void check_mediastreamfilter_seeking(void (*check)(IMediaSeeking *seeking, struct testfilter *source1, @@ -6761,35 +6761,35 @@ static void check_mediastreamfilter_seeking(void (*check)(IMediaSeeking *seeking ULONG ref;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = CoCreateInstance(&CLSID_AMAudioStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_Initialize(stream1, NULL, 0, &mspid1, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_Initialize(stream2, NULL, 0, &mspid2, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_Initialize(stream3, NULL, 0, &mspid3, STREAMTYPE_READ); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream1, &mspid1, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream2, &mspid2, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)stream3, &mspid3, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_QueryInterface(stream1, &IID_IPin, (void **)&pin1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_QueryInterface(stream2, &IID_IPin, (void **)&pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMediaStream_QueryInterface(stream3, &IID_IPin, (void **)&pin3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); testfilter_init(&source1); testfilter_init(&source2); @@ -6798,25 +6798,25 @@ static void check_mediastreamfilter_seeking(void (*check)(IMediaSeeking *seeking source2.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; source3.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl; hr = IGraphBuilder_AddFilter(graph, &source1.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_AddFilter(graph, &source2.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_AddFilter(graph, &source3.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source2.source.pin.IPin_iface, pin2, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_ConnectDirect(graph, &source3.source.pin.IPin_iface, pin3, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source1.source.pin.IPin_iface, pin1, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_QueryInterface(filter, &IID_IMediaSeeking, (void **)&seeking); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check(seeking, &source1, &source2, &source3, S_OK, S_OK); check(seeking, &source1, &source2, &source3, E_FAIL, E_FAIL); @@ -6839,21 +6839,21 @@ static void check_mediastreamfilter_seeking(void (*check)(IMediaSeeking *seeking IGraphBuilder_Disconnect(graph, &source3.source.pin.IPin_iface);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaSeeking_Release(seeking); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin1); ref = IAMMediaStream_Release(stream1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin2); ref = IAMMediaStream_Release(stream2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin3); ref = IAMMediaStream_Release(stream3); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void check_mediastreamfilter_set_positions(IMediaSeeking *seeking, struct testfilter *source1, @@ -6872,7 +6872,7 @@ static void check_mediastreamfilter_set_positions(IMediaSeeking *seeking, struct source3->stop_position = 0xdeadbeefdeadbeefULL; hr = IMediaSeeking_SetPositions(seeking, ¤t_position, AM_SEEKING_AbsolutePositioning, &stop_position, AM_SEEKING_AbsolutePositioning); - ok(hr == expected_hr, "Got hr %#x.\n", hr); + ok(hr == expected_hr, "Got hr %#lx.\n", hr); ok(source1->current_position == 0xdeadbeefdeadbeefULL, "Got current position %s.\n", wine_dbgstr_longlong(source1->current_position)); ok(source1->stop_position == 0xdeadbeefdeadbeefULL, "Got stop position %s.\n", @@ -6898,7 +6898,7 @@ static void check_mediastreamfilter_get_duration(IMediaSeeking *seeking, struct
source2->get_duration_hr = source2_hr; hr = IMediaSeeking_GetDuration(seeking, &duration); - ok(hr == expected_hr, "Got hr %#x.\n", hr); + ok(hr == expected_hr, "Got hr %#lx.\n", hr); if (SUCCEEDED(expected_hr)) ok(duration == 0x8000000000000000ULL, "Got duration %s.\n", wine_dbgstr_longlong(duration)); else @@ -6913,7 +6913,7 @@ static void check_mediastreamfilter_get_stop_position(IMediaSeeking *seeking, st
source2->get_stop_position_hr = source2_hr; hr = IMediaSeeking_GetStopPosition(seeking, &stop); - ok(hr == expected_hr, "Got hr %#x.\n", hr); + ok(hr == expected_hr, "Got hr %#lx.\n", hr); if (SUCCEEDED(expected_hr)) ok(stop == 0x8000000000000000ULL, "Got stop position %s.\n", wine_dbgstr_longlong(stop)); else @@ -6927,7 +6927,7 @@ static void check_mediastreamfilter_is_format_supported(IMediaSeeking *seeking,
source2->is_format_supported_hr = source2_hr; hr = IMediaSeeking_IsFormatSupported(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == expected_hr, "Got hr %#x.\n", hr); + ok(hr == expected_hr, "Got hr %#lx.\n", hr); }
static void test_mediastreamfilter_seeking(void) @@ -6951,78 +6951,78 @@ static void test_mediastreamfilter_get_current_stream_time(void) ULONG ref;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n"); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testclock_init(&clock);
/* Crashes on native. */ if (0) { hr = IMediaStreamFilter_GetCurrentStreamTime(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetTime(mmstream, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
time = 0xdeadbeefdeadbeef; hr = IMediaStreamFilter_GetCurrentStreamTime(filter, &time); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(time == 0, "Got time %s.\n", wine_dbgstr_longlong(time)); time = 0xdeadbeefdeadbeef; hr = IAMMultiMediaStream_GetTime(mmstream, &time); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(time == 0, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaFilter_SetSyncSource(media_filter, &clock.IReferenceClock_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.get_time_hr = E_FAIL;
time = 0xdeadbeefdeadbeef; hr = IMediaStreamFilter_GetCurrentStreamTime(filter, &time); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(time == 0, "Got time %s.\n", wine_dbgstr_longlong(time)); time = 0xdeadbeefdeadbeef; hr = IAMMultiMediaStream_GetTime(mmstream, &time); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(time == 0, "Got time %s.\n", wine_dbgstr_longlong(time));
clock.time = 23456789; clock.get_time_hr = S_OK;
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_GetCurrentStreamTime(filter, &filter_start_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.time = 34567890;
time = 0xdeadbeefdeadbeef; hr = IMediaStreamFilter_GetCurrentStreamTime(filter, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 11111101 + filter_start_time, "Got time %s.\n", wine_dbgstr_longlong(time)); time = 0xdeadbeefdeadbeef; hr = IAMMultiMediaStream_GetTime(mmstream, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 11111101 + filter_start_time, "Got time %s.\n", wine_dbgstr_longlong(time));
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_mediastreamfilter_reference_time_to_stream_time(void) @@ -7035,19 +7035,19 @@ static void test_mediastreamfilter_reference_time_to_stream_time(void)
hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testclock_init(&clock);
hr = IMediaStreamFilter_ReferenceTimeToStreamTime(filter, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
time = 0xdeadbeefdeadbeef; hr = IMediaStreamFilter_ReferenceTimeToStreamTime(filter, &time); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(time == 0xdeadbeefdeadbeef, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaStreamFilter_SetSyncSource(filter, &clock.IReferenceClock_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.get_time_hr = E_FAIL;
@@ -7055,20 +7055,20 @@ static void test_mediastreamfilter_reference_time_to_stream_time(void) if (0) { hr = IMediaStreamFilter_ReferenceTimeToStreamTime(filter, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); }
time = 0xdeadbeefdeadbeef; hr = IMediaStreamFilter_ReferenceTimeToStreamTime(filter, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0xdeadbeefdeadbeef, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaStreamFilter_Run(filter, 23456789); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
time = 0xdeadbeefdeadbeef; hr = IMediaStreamFilter_ReferenceTimeToStreamTime(filter, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0xdeadbeefdd47d2da, "Got time %s.\n", wine_dbgstr_longlong(time));
clock.time = 34567890; @@ -7076,11 +7076,11 @@ static void test_mediastreamfilter_reference_time_to_stream_time(void)
time = 0xdeadbeefdeadbeef; hr = IMediaStreamFilter_ReferenceTimeToStreamTime(filter, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0xdeadbeefdd47d2da, "Got time %s.\n", wine_dbgstr_longlong(time));
ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct mediastreamfilter_wait_until_params @@ -7096,7 +7096,7 @@ static DWORD CALLBACK mediastreamfilter_wait_until(void *p) HRESULT hr;
hr = IMediaStreamFilter_WaitUntil(params->filter, params->time); - ok(hr == params->expected_hr, "Got hr %#x.\n", hr); + ok(hr == params->expected_hr, "Got hr %#lx.\n", hr);
return 0; } @@ -7116,22 +7116,22 @@ static void test_mediastreamfilter_wait_until(void)
hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testclock_init(&clock); cookie1.advise_time_called_event = CreateEventW(NULL, FALSE, FALSE, NULL); cookie2.advise_time_called_event = CreateEventW(NULL, FALSE, FALSE, NULL);
hr = IMediaStreamFilter_Run(filter, 12345678); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_WaitUntil(filter, 23456789); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_SetSyncSource(filter, &clock.IReferenceClock_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.advise_time_cookie = &cookie1;
@@ -7154,7 +7154,7 @@ static void test_mediastreamfilter_wait_until(void) ok(!cookie1.unadvise_called, "Unexpected Unadvise call.\n");
hr = IMediaStreamFilter_Run(filter, 12345678); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.time = 30000000;
@@ -7215,7 +7215,7 @@ static void test_mediastreamfilter_wait_until(void) ok(WaitForSingleObject(thread2, 100) == WAIT_TIMEOUT, "WaitUntil returned prematurely.\n");
hr = IMediaStreamFilter_Flush(filter, FALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(cookie1.unadvise_called, "Expected Unadvise to be called.\n"); ok(cookie2.unadvise_called, "Expected Unadvise to be called.\n"); @@ -7244,7 +7244,7 @@ static void test_mediastreamfilter_wait_until(void) ok(WaitForSingleObject(thread2, 100) == WAIT_TIMEOUT, "WaitUntil returned prematurely.\n");
hr = IMediaStreamFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(cookie1.unadvise_called, "Expected Unadvise to be called.\n"); ok(cookie2.unadvise_called, "Expected Unadvise to be called.\n"); @@ -7258,7 +7258,7 @@ static void test_mediastreamfilter_wait_until(void) CloseHandle(cookie2.advise_time_called_event);
ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_mediastreamfilter_end_of_stream(void) @@ -7275,307 +7275,307 @@ static void test_mediastreamfilter_end_of_stream(void)
graph_init(&graph); hr = IFilterGraph2_QueryInterface(&graph.IFilterGraph2_iface, &IID_IMediaControl, (void **)&media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, (IGraphBuilder *)&graph.IFilterGraph2_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream1, &IID_IPin, (void **)&pin1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream2, &IID_IPin, (void **)&pin2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter != NULL, "Expected non-null filter\n"); testfilter_init(&source1); testfilter_init(&source2); hr = IFilterGraph2_AddFilter(&graph.IFilterGraph2_iface, &source1.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_AddFilter(&graph.IFilterGraph2_iface, &source2.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_Connect(&source1.source.pin.IPin_iface, pin1, &audio_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Connect(&source2.source.pin.IPin_iface, pin2, &rgb32_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Initially, EC_COMPLETE notifications are disabled. */ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Unsuccsessful call to SupportSeeking does not enable EC_COMPLETE notifications. */ hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Successful call to SupportSeeking enables EC_COMPLETE notifications. */ source1.IMediaSeeking_iface.lpVtbl = &testsource_seeking_vtbl;
hr = IMediaStreamFilter_SupportSeeking(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* EC_COMPLETE is sent on paused->running state transition * if EndOfStream has been called for all streams. */ graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* EC_COMPLETE is sent on paused->running state transition * if EndOfStream has been called for all streams. */ graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* EndOfStream count is reset on paused->stopped state transition. */ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* EOS count is not reset on running->paused state transition. */ hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* EndOfStream count is not reset when Stop() is called on an already stopped filter. */ hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Flush with cancel_eos=TRUE decrements EOS count. */ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_Flush(filter, TRUE);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Flush followed by EndOfStream causes another EC_COMPLETE to be sent. */ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaStreamFilter_Flush(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 2, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Flush decrements EOS count event when it is 0. */ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_Flush(filter, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 0, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Flush with cancel_eos=FALSE does not decrement EOS count. */ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph.got_notify = 0;
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_Flush(filter, FALSE);
hr = IMediaStreamFilter_EndOfStream(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(graph.got_notify == 1, "Got %d calls to IMediaEventSink::Notify().\n", graph.got_notify);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaControl_Release(media_control); graph_destroy(&graph); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin1); ref = IMediaStream_Release(stream1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin2); ref = IMediaStream_Release(stream2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstream_getsetdirectdraw(void) @@ -7590,34 +7590,34 @@ static void test_ddrawstream_getsetdirectdraw(void) ULONG ref;
hr = DirectDrawCreate(NULL, &ddraw, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDraw_QueryInterface(ddraw, &IID_IDirectDraw7, (void **)&ddraw7); - ok(hr == DD_OK, "Got hr %#x.\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw7, GetDesktopWindow(), DDSCL_NORMAL); - ok(hr == DD_OK, "Got hr %#x.\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); EXPECT_REF(ddraw, 1); EXPECT_REF(ddraw7, 1);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)ddraw7, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(ddraw, 2);
hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ddraw2 == ddraw, "Expected ddraw %p, got %p.\n", ddraw, ddraw2); EXPECT_REF(ddraw, 3);
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ddraw3 == ddraw2, "Expected ddraw %p, got %p.\n", ddraw2, ddraw3); EXPECT_REF(ddraw, 4); IDirectDraw_Release(ddraw3); @@ -7625,85 +7625,85 @@ static void test_ddrawstream_getsetdirectdraw(void)
/* The current ddraw is released when SetDirectDraw() is called. */ hr = IDirectDrawMediaStream_SetDirectDraw(ddraw_stream, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(ddraw, 2);
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ddraw3 == NULL, "Expected NULL, got %p.\n", ddraw3);
hr = IDirectDrawMediaStream_SetDirectDraw(ddraw_stream, ddraw2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(ddraw, 3);
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ddraw3 == ddraw2, "Expected ddraw %p, got %p.\n", ddraw2, ddraw3); EXPECT_REF(ddraw, 4); IDirectDraw_Release(ddraw3); EXPECT_REF(ddraw, 3);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* SetDirectDraw() doesn't take an extra reference to the ddraw object * if there are samples extant. */ hr = IDirectDrawMediaStream_SetDirectDraw(ddraw_stream, ddraw2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(ddraw, 3);
hr = DirectDrawCreate(NULL, &ddraw3, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw3, GetDesktopWindow(), DDSCL_NORMAL); - ok(hr == DD_OK, "Got hr %#x.\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); EXPECT_REF(ddraw3, 1);
hr = IDirectDrawMediaStream_SetDirectDraw(ddraw_stream, ddraw3); - ok(hr == MS_E_SAMPLEALLOC, "Got hr %#x.\n", hr); + ok(hr == MS_E_SAMPLEALLOC, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw4); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ddraw4 == ddraw2, "Expected ddraw %p, got %p.\n", ddraw2, ddraw4); EXPECT_REF(ddraw, 4); IDirectDraw_Release(ddraw4); EXPECT_REF(ddraw, 3);
ref = IDirectDrawStreamSample_Release(sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawMediaStream_SetDirectDraw(ddraw_stream, ddraw3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(ddraw, 2); EXPECT_REF(ddraw3, 2);
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw4); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ddraw4 == ddraw3, "Expected ddraw %p, got %p.\n", ddraw3, ddraw4); EXPECT_REF(ddraw3, 3); IDirectDraw_Release(ddraw4); EXPECT_REF(ddraw3, 2);
hr = IDirectDrawMediaStream_SetDirectDraw(ddraw_stream, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(ddraw3, 1);
ref = IDirectDraw_Release(ddraw3); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
EXPECT_REF(stream, 3); IDirectDrawMediaStream_Release(ddraw_stream); EXPECT_REF(stream, 2); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); EXPECT_REF(stream, 1); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDraw7_Release(ddraw7); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IDirectDraw_Release(ddraw2); EXPECT_REF(ddraw, 1); ref = IDirectDraw_Release(ddraw); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_audiostreamsample_get_media_stream(void) @@ -7717,30 +7717,30 @@ static void test_audiostreamsample_get_media_stream(void) ULONG ref;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_CreateSample(audio_stream, audio_data, 0, &audio_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Crashes on native. */ if (0) { hr = IAudioStreamSample_GetMediaStream(audio_sample, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
EXPECT_REF(stream, 4); hr = IAudioStreamSample_GetMediaStream(audio_sample, &stream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(stream2 == stream, "Expected stream %p, got %p.\n", stream, stream2); EXPECT_REF(stream, 5);
@@ -7748,13 +7748,13 @@ static void test_audiostreamsample_get_media_stream(void)
IAudioMediaStream_Release(audio_stream); ref = IAudioStreamSample_Release(audio_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioData_Release(audio_data); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_audiostreamsample_get_audio_data(void) @@ -7768,26 +7768,26 @@ static void test_audiostreamsample_get_audio_data(void) ULONG ref;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioMediaStream_CreateSample(audio_stream, audio_data, 0, &audio_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAudioStreamSample_GetAudioData(audio_sample, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
EXPECT_REF(audio_data, 2); hr = IAudioStreamSample_GetAudioData(audio_sample, &audio_data2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(audio_data2 == audio_data, "Expected audio data %p, got %p.\n", audio_data, audio_data2); EXPECT_REF(audio_data, 3);
@@ -7795,13 +7795,13 @@ static void test_audiostreamsample_get_audio_data(void)
IAudioMediaStream_Release(audio_stream); ref = IAudioStreamSample_Release(audio_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAudioData_Release(audio_data); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
#define get_ddrawstream_create_sample_desc(a,b,c,d) get_ddrawstream_create_sample_desc_(__LINE__,a,b,c,d) @@ -7820,65 +7820,65 @@ static void get_ddrawstream_create_sample_desc_(int line, const DDSURFACEDESC *f IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&source);
hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
if (format1) { hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, format1, NULL); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); } if (format2) { hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, format2, NULL); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); } if (mt) { hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, mt); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_Disconnect(graph, pin); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); }
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &sample); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_GetSurface(sample, &surface, NULL); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr); ok_(__FILE__, line)(!!surface, "Expected non-NULL sufrace.\n");
desc->dwSize = sizeof(*desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, desc); - ok_(__FILE__, line)(hr == S_OK, "Got hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IDirectDrawStreamSample_Release(sample); - ok_(__FILE__, line)(!ref, "Got outstanding refcount %d.\n", ref); + ok_(__FILE__, line)(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDrawSurface_Release(surface); - ok_(__FILE__, line)(!ref, "Got outstanding refcount %d.\n", ref); + ok_(__FILE__, line)(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok_(__FILE__, line)(!ref, "Got outstanding refcount %d.\n", ref); + ok_(__FILE__, line)(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok_(__FILE__, line)(!ref, "Got outstanding refcount %d.\n", ref); + ok_(__FILE__, line)(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok_(__FILE__, line)(!ref, "Got outstanding refcount %d.\n", ref); + ok_(__FILE__, line)(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstream_create_sample(void) @@ -7898,59 +7898,59 @@ static void test_ddrawstream_create_sample(void) ULONG ref;
hr = DirectDrawCreate(NULL, &ddraw, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)ddraw, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Crashes on native. */ if (0) { hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
SetRectEmpty(&rect); hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, &rect, 0, &sample); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
EXPECT_REF(mmstream, 1); EXPECT_REF(stream, 3); hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(mmstream, 2); EXPECT_REF(stream, 4);
hr = IDirectDrawStreamSample_GetSurface(sample, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_GetSurface(sample, NULL, &rect); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_GetSurface(sample, &surface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(surface != NULL, "Expected non-NULL surface.\n"); IDirectDrawSurface_Release(surface);
surface = NULL; hr = IDirectDrawStreamSample_GetSurface(sample, &surface, &rect); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(surface != NULL, "Expected non-NULL surface.\n");
hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(desc.dwWidth == 100, "Expected width 100, got %d.\n", desc.dwWidth); - ok(desc.dwHeight == 100, "Expected height 100, got %d.\n", desc.dwHeight); - ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Expected format flags DDPF_RGB, got %#x.\n", desc.ddpfPixelFormat.dwFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(desc.dwWidth == 100, "Expected width 100, got %ld.\n", desc.dwWidth); + ok(desc.dwHeight == 100, "Expected height 100, got %ld.\n", desc.dwHeight); + ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Expected format flags DDPF_RGB, got %#lx.\n", desc.ddpfPixelFormat.dwFlags); ok(desc.ddpfPixelFormat.u1.dwRGBBitCount, "Expected non-zero RGB bit count.\n"); IDirectDrawSurface_Release(surface); IDirectDrawStreamSample_Release(sample); @@ -7961,19 +7961,19 @@ static void test_ddrawstream_create_sample(void) desc.dwFlags = DDSD_CAPS; desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &desc, &surface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
EXPECT_REF(surface, 1); hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, surface, NULL, 0, &sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); EXPECT_REF(surface, 2);
surface2 = NULL; SetRectEmpty(&rect); hr = IDirectDrawStreamSample_GetSurface(sample, &surface2, &rect); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(surface2 == surface, "Expected surface %p, got %p.\n", surface, surface2); - ok(rect.right > 0 && rect.bottom > 0, "Got rect %d, %d.\n", rect.right, rect.bottom); + ok(rect.right > 0 && rect.bottom > 0, "Got rect %ld, %ld.\n", rect.right, rect.bottom); EXPECT_REF(surface, 3); IDirectDrawSurface_Release(surface2); EXPECT_REF(surface, 2); @@ -7981,12 +7981,12 @@ static void test_ddrawstream_create_sample(void) EXPECT_REF(surface, 1);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, surface, &rect, 0, &sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IDirectDrawStreamSample_Release(sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDrawSurface_Release(surface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -8002,36 +8002,36 @@ static void test_ddrawstream_create_sample(void) desc.ddpfPixelFormat.u5.dwRGBAlphaBitMask = 0xff000000; desc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw_CreateSurface(ddraw, &desc, &surface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
SetRect(&rect, 111, 100, 333, 300);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, surface, &rect, 0, &sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IDirectDrawStreamSample_Release(sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); surface2 = NULL; hr = IDirectDrawStreamSample_GetSurface(sample, &surface2, &rect); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_GetSurfaceDesc(surface2, &desc2); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(desc2.dwWidth == 222, "Got width %u.\n", desc2.dwWidth); - ok(desc2.dwHeight == 200, "Got height %u.\n", desc2.dwHeight); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(desc2.dwWidth == 222, "Got width %lu.\n", desc2.dwWidth); + ok(desc2.dwHeight == 200, "Got height %lu.\n", desc2.dwHeight); ok(memcmp(&desc2.ddpfPixelFormat, &desc.ddpfPixelFormat, sizeof(DDPIXELFORMAT)) == 0, "Pixel format didn't match.\n");
ref = IDirectDrawStreamSample_Release(sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDrawSurface_Release(surface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDrawSurface_Release(surface2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -8043,33 +8043,33 @@ static void test_ddrawstream_create_sample(void) desc.ddpfPixelFormat.u1.dwRGBBitCount = 4; desc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw_CreateSurface(ddraw, &desc, &surface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, surface, NULL, 0, &sample); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got hr %#lx.\n", hr);
IDirectDrawMediaStream_Release(ddraw_stream); ref = IDirectDrawSurface_Release(surface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDraw_Release(ddraw); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
format1 = rgb8_format; format1.dwFlags = 0; format1.dwWidth = 333; format1.dwHeight = 444; get_ddrawstream_create_sample_desc(&format1, NULL, NULL, &desc); - ok(desc.dwWidth == 100, "Got width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 100, "Got height %u.\n", desc.dwHeight); - ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#x.\n", desc.ddpfPixelFormat.dwFlags); - ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %u.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); - ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#x.\n", desc.ddpfPixelFormat.u2.dwRBitMask); - ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#x.\n", desc.ddpfPixelFormat.u3.dwGBitMask); - ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#x.\n", desc.ddpfPixelFormat.u4.dwBBitMask); + ok(desc.dwWidth == 100, "Got width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 100, "Got height %lu.\n", desc.dwHeight); + ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#lx.\n", desc.ddpfPixelFormat.dwFlags); + ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %lu.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); + ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#lx.\n", desc.ddpfPixelFormat.u2.dwRBitMask); + ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#lx.\n", desc.ddpfPixelFormat.u3.dwGBitMask); + ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#lx.\n", desc.ddpfPixelFormat.u4.dwBBitMask);
format1 = rgb8_format; format1.dwFlags |= DDSD_WIDTH; @@ -8078,8 +8078,8 @@ static void test_ddrawstream_create_sample(void) format2 = rgb8_format; format2.dwFlags = 0; get_ddrawstream_create_sample_desc(&format1, &format2, NULL, &desc); - ok(desc.dwWidth == 333, "Got width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 444, "Got height %u.\n", desc.dwHeight); + ok(desc.dwWidth == 333, "Got width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 444, "Got height %lu.\n", desc.dwHeight);
format1 = rgb8_format; format1.dwFlags |= DDSD_HEIGHT; @@ -8088,37 +8088,37 @@ static void test_ddrawstream_create_sample(void) format2 = rgb8_format; format2.dwFlags = 0; get_ddrawstream_create_sample_desc(&format1, &format2, NULL, &desc); - ok(desc.dwWidth == 333, "Got width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 444, "Got height %u.\n", desc.dwHeight); + ok(desc.dwWidth == 333, "Got width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 444, "Got height %lu.\n", desc.dwHeight);
get_ddrawstream_create_sample_desc(NULL, NULL, &rgb8_mt, &desc); - ok(desc.dwWidth == 333, "Got width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 444, "Got height %u.\n", desc.dwHeight); - ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#x.\n", desc.ddpfPixelFormat.dwFlags); - ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %u.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); - ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#x.\n", desc.ddpfPixelFormat.u2.dwRBitMask); - ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#x.\n", desc.ddpfPixelFormat.u3.dwGBitMask); - ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#x.\n", desc.ddpfPixelFormat.u4.dwBBitMask); + ok(desc.dwWidth == 333, "Got width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 444, "Got height %lu.\n", desc.dwHeight); + ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#lx.\n", desc.ddpfPixelFormat.dwFlags); + ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %lu.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); + ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#lx.\n", desc.ddpfPixelFormat.u2.dwRBitMask); + ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#lx.\n", desc.ddpfPixelFormat.u3.dwGBitMask); + ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#lx.\n", desc.ddpfPixelFormat.u4.dwBBitMask);
get_ddrawstream_create_sample_desc(&rgb565_format, NULL, NULL, &desc); - ok(desc.dwWidth == 100, "Got width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 100, "Got height %u.\n", desc.dwHeight); - ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#x.\n", desc.ddpfPixelFormat.dwFlags); - ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 16, "Got rgb bit count %u.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); - ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xf800, "Got r bit mask %#x.\n", desc.ddpfPixelFormat.u2.dwRBitMask); - ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x07e0, "Got g bit mask %#x.\n", desc.ddpfPixelFormat.u3.dwGBitMask); - ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x001f, "Got b bit mask %#x.\n", desc.ddpfPixelFormat.u4.dwBBitMask); + ok(desc.dwWidth == 100, "Got width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 100, "Got height %lu.\n", desc.dwHeight); + ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#lx.\n", desc.ddpfPixelFormat.dwFlags); + ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 16, "Got rgb bit count %lu.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); + ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xf800, "Got r bit mask %#lx.\n", desc.ddpfPixelFormat.u2.dwRBitMask); + ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x07e0, "Got g bit mask %#lx.\n", desc.ddpfPixelFormat.u3.dwGBitMask); + ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x001f, "Got b bit mask %#lx.\n", desc.ddpfPixelFormat.u4.dwBBitMask);
get_ddrawstream_create_sample_desc(&argb32_format, NULL, NULL, &desc); - ok(desc.dwWidth == 100, "Got width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 100, "Got height %u.\n", desc.dwHeight); - ok(desc.ddpfPixelFormat.dwFlags == (DDPF_RGB | DDPF_ALPHAPIXELS), "Got flags %#x.\n", desc.ddpfPixelFormat.dwFlags); - ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %u.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); - ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#x.\n", desc.ddpfPixelFormat.u2.dwRBitMask); - ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#x.\n", desc.ddpfPixelFormat.u3.dwGBitMask); - ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#x.\n", desc.ddpfPixelFormat.u4.dwBBitMask); + ok(desc.dwWidth == 100, "Got width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 100, "Got height %lu.\n", desc.dwHeight); + ok(desc.ddpfPixelFormat.dwFlags == (DDPF_RGB | DDPF_ALPHAPIXELS), "Got flags %#lx.\n", desc.ddpfPixelFormat.dwFlags); + ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %lu.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); + ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#lx.\n", desc.ddpfPixelFormat.u2.dwRBitMask); + ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#lx.\n", desc.ddpfPixelFormat.u3.dwGBitMask); + ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#lx.\n", desc.ddpfPixelFormat.u4.dwBBitMask); ok(desc.ddpfPixelFormat.u5.dwRGBAlphaBitMask == 0xff000000, - "Got alpha bit mask %#x.\n", desc.ddpfPixelFormat.u4.dwBBitMask); + "Got alpha bit mask %#lx.\n", desc.ddpfPixelFormat.u4.dwBBitMask);
format1 = rgb32_format; format1.dwFlags |= DDSD_CAPS; @@ -8127,13 +8127,13 @@ static void test_ddrawstream_create_sample(void) ok(desc.ddsCaps.dwCaps & DDSCAPS_OFFSCREENPLAIN, "Expected set DDSCAPS_OFFSCREENPLAIN.\n"); ok(desc.ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY, "Expected set DDSCAPS_SYSTEMMEMORY.\n"); ok(!(desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY), "Expected unset DDSCAPS_VIDEOMEMORY.\n"); - ok(desc.dwWidth == 100, "Got width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 100, "Got height %u.\n", desc.dwHeight); - ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#x.\n", desc.ddpfPixelFormat.dwFlags); - ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %u.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); - ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#x.\n", desc.ddpfPixelFormat.u2.dwRBitMask); - ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#x.\n", desc.ddpfPixelFormat.u3.dwGBitMask); - ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#x.\n", desc.ddpfPixelFormat.u4.dwBBitMask); + ok(desc.dwWidth == 100, "Got width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 100, "Got height %lu.\n", desc.dwHeight); + ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#lx.\n", desc.ddpfPixelFormat.dwFlags); + ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %lu.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); + ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#lx.\n", desc.ddpfPixelFormat.u2.dwRBitMask); + ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#lx.\n", desc.ddpfPixelFormat.u3.dwGBitMask); + ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#lx.\n", desc.ddpfPixelFormat.u4.dwBBitMask);
format1 = rgb32_format; format1.dwFlags |= DDSD_CKSRCBLT; @@ -8141,16 +8141,16 @@ static void test_ddrawstream_create_sample(void) format1.ddckCKSrcBlt.dwColorSpaceHighValue = 0xff00ff; get_ddrawstream_create_sample_desc(&format1, NULL, NULL, &desc); ok(!(desc.dwFlags & DDSD_CKSRCBLT), "Expected unset DDSD_CKSRCBLT.\n"); - ok(desc.dwWidth == 100, "Got width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 100, "Got height %u.\n", desc.dwHeight); - ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#x.\n", desc.ddpfPixelFormat.dwFlags); - ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %u.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); - ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#x.\n", desc.ddpfPixelFormat.u2.dwRBitMask); - ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#x.\n", desc.ddpfPixelFormat.u3.dwGBitMask); - ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#x.\n", desc.ddpfPixelFormat.u4.dwBBitMask); - ok(desc.ddckCKSrcBlt.dwColorSpaceLowValue == 0, "Got color key low value %#x.\n", + ok(desc.dwWidth == 100, "Got width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 100, "Got height %lu.\n", desc.dwHeight); + ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got flags %#lx.\n", desc.ddpfPixelFormat.dwFlags); + ok(desc.ddpfPixelFormat.u1.dwRGBBitCount == 32, "Got rgb bit count %lu.\n", desc.ddpfPixelFormat.u1.dwRGBBitCount); + ok(desc.ddpfPixelFormat.u2.dwRBitMask == 0xff0000, "Got r bit mask %#lx.\n", desc.ddpfPixelFormat.u2.dwRBitMask); + ok(desc.ddpfPixelFormat.u3.dwGBitMask == 0x00ff00, "Got g bit mask %#lx.\n", desc.ddpfPixelFormat.u3.dwGBitMask); + ok(desc.ddpfPixelFormat.u4.dwBBitMask == 0x0000ff, "Got b bit mask %#lx.\n", desc.ddpfPixelFormat.u4.dwBBitMask); + ok(desc.ddckCKSrcBlt.dwColorSpaceLowValue == 0, "Got color key low value %#lx.\n", desc.ddckCKSrcBlt.dwColorSpaceLowValue); - ok(desc.ddckCKSrcBlt.dwColorSpaceHighValue == 0, "Got color key high value %#x.\n", + ok(desc.ddckCKSrcBlt.dwColorSpaceHighValue == 0, "Got color key high value %#lx.\n", desc.ddckCKSrcBlt.dwColorSpaceHighValue); }
@@ -8165,33 +8165,33 @@ static void test_ddrawstreamsample_get_media_stream(void) ULONG ref;
hr = DirectDrawCreate(NULL, &ddraw, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown *)ddraw, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Crashes on native. */ if (0) { hr = IDirectDrawStreamSample_GetMediaStream(sample, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
EXPECT_REF(stream, 4); hr = IDirectDrawStreamSample_GetMediaStream(sample, &stream2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(stream2 == stream, "Expected stream %p, got %p.\n", stream, stream2); EXPECT_REF(stream, 5); IMediaStream_Release(stream2); @@ -8199,13 +8199,13 @@ static void test_ddrawstreamsample_get_media_stream(void)
IDirectDrawMediaStream_Release(ddraw_stream); ref = IDirectDrawStreamSample_Release(sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDraw_Release(ddraw); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstreamsample_update(void) @@ -8247,27 +8247,27 @@ static void test_ddrawstreamsample_update(void) int i;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IMemInputPin, (void **)&mem_input_pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaControl, (void **)&media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testclock_init(&clock); event = CreateEventW(NULL, FALSE, FALSE, NULL); ok(event != NULL, "Expected non-NULL event."); @@ -8275,7 +8275,7 @@ static void test_ddrawstreamsample_update(void) ok(cookie.advise_time_called_event != NULL, "Expected non-NULL event.");
hr = IMediaFilter_SetSyncSource(media_filter, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
desc = rgb24_format; desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; @@ -8283,45 +8283,45 @@ static void test_ddrawstreamsample_update(void) desc.dwHeight = 5; desc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw_CreateSurface(ddraw, &desc, &surface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); /* Make the rect width equal to the surface width, as the native * implementation incorrectly handles rects that are not full-width * when the ddraw stream's custom allocator is not used. */ SetRect(&rect, 0, 1, 4, 3); hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, surface, &rect, 0, &stream_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, event, apc_func, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_E_NOTRUNNING, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOTRUNNING, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); video_info = rgb24_video_info; video_info.bmiHeader.biWidth = 4; video_info.bmiHeader.biHeight = -2; mt = rgb24_mt; mt.pbFormat = (BYTE *)&video_info; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 5; ++i) memcpy((BYTE *)desc.lpSurface + i * desc.u1.lPitch, initial_data, 12); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data));
@@ -8333,25 +8333,25 @@ static void test_ddrawstreamsample_update(void)
Sleep(100); hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(memcmp((BYTE *)desc.lpSurface + 0 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 1 * desc.u1.lPitch, &test_data[0], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 2 * desc.u1.lPitch, &test_data[12], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 3 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 4 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface); video_info = rgb24_video_info; @@ -8360,16 +8360,16 @@ static void test_ddrawstreamsample_update(void) mt = rgb24_mt; mt.pbFormat = (BYTE *)&video_info; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 5; ++i) memcpy((BYTE *)desc.lpSurface + i * desc.u1.lPitch, initial_data, 12); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data));
@@ -8381,48 +8381,48 @@ static void test_ddrawstreamsample_update(void)
Sleep(100); hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(memcmp((BYTE *)desc.lpSurface + 0 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 1 * desc.u1.lPitch, &test_data[12], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 2 * desc.u1.lPitch, &test_data[0], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 3 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 4 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_E_NOTRUNNING, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOTRUNNING, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 5; ++i) memcpy((BYTE *)desc.lpSurface + i * desc.u1.lPitch, initial_data, 12); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data));
@@ -8433,22 +8433,22 @@ static void test_ddrawstreamsample_update(void) thread = CreateThread(NULL, 0, ammediastream_receive, NULL, 0, NULL);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(memcmp((BYTE *)desc.lpSurface + 0 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 1 * desc.u1.lPitch, &test_data[12], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 2 * desc.u1.lPitch, &test_data[0], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 3 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 4 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
ammediastream_pin = pin; ammediastream_sleep_time = 100; @@ -8456,22 +8456,22 @@ static void test_ddrawstreamsample_update(void) thread = CreateThread(NULL, 0, ammediastream_end_of_stream, NULL, 0, NULL);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 5; ++i) memcpy((BYTE *)desc.lpSurface + i * desc.u1.lPitch, initial_data, 12); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data));
@@ -8482,116 +8482,116 @@ static void test_ddrawstreamsample_update(void) thread = CreateThread(NULL, 0, ammediastream_receive, NULL, 0, NULL);
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(memcmp((BYTE *)desc.lpSurface + 0 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 1 * desc.u1.lPitch, &test_data[12], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 2 * desc.u1.lPitch, &test_data[0], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 3 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 4 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC | SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 5; ++i) memcpy((BYTE *)desc.lpSurface + i * desc.u1.lPitch, initial_data, 12); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(memcmp((BYTE *)desc.lpSurface + 0 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 1 * desc.u1.lPitch, &test_data[12], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 2 * desc.u1.lPitch, &test_data[0], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 3 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 4 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 5; ++i) memcpy((BYTE *)desc.lpSurface + i * desc.u1.lPitch, initial_data, 12); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(memcmp((BYTE *)desc.lpSurface + 0 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 1 * desc.u1.lPitch, &test_data[12], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 2 * desc.u1.lPitch, &test_data[0], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 3 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 4 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, event, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr); EXPECT_REF(stream_sample, 1);
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_E_BUSY, "Got hr %#x.\n", hr); + ok(hr == MS_E_BUSY, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaFilter_SetSyncSource(media_filter, &clock.IReferenceClock_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 5; ++i) memcpy((BYTE *)desc.lpSurface + i * desc.u1.lPitch, initial_data, 12); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_E_BUSY, "Got hr %#x.\n", hr); + ok(hr == MS_E_BUSY, "Got hr %#lx.\n", hr);
clock.advise_time_cookie = &cookie;
@@ -8599,7 +8599,7 @@ static void test_ddrawstreamsample_update(void) start_time = 11111111; end_time = 11111111; hr = IMediaSample_SetTime(media_sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ammediastream_mem_input_pin = mem_input_pin; ammediastream_media_sample = media_sample; @@ -8610,11 +8610,11 @@ static void test_ddrawstreamsample_update(void) ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Receive returned prematurely.\n");
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 5; ++i) ok(memcmp((BYTE *)desc.lpSurface + i * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
SetEvent(cookie.event);
@@ -8622,50 +8622,50 @@ static void test_ddrawstreamsample_update(void) CloseHandle(thread);
hr = IDirectDrawSurface_Lock(surface, NULL, &desc, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(memcmp((BYTE *)desc.lpSurface + 0 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 1 * desc.u1.lPitch, &test_data[12], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 2 * desc.u1.lPitch, &test_data[0], 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 3 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); ok(memcmp((BYTE *)desc.lpSurface + 4 * desc.u1.lPitch, initial_data, 12) == 0, "Sample data didn't match.\n"); hr = IDirectDrawSurface_Unlock(surface, desc.lpSurface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample, 0, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
CloseHandle(cookie.advise_time_called_event); CloseHandle(event); ref = IDirectDrawStreamSample_Release(stream_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDrawSurface_Release(surface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaControl_Release(media_control); IMediaFilter_Release(media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IMemInputPin_Release(mem_input_pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDraw_Release(ddraw); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstreamsample_completion_status(void) @@ -8692,29 +8692,29 @@ static void test_ddrawstreamsample_completion_status(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n"); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testclock_init(&clock); cookie.advise_time_called_event = CreateEventW(NULL, FALSE, FALSE, NULL);
hr = IMediaFilter_SetSyncSource(media_filter, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
video_info = rgb32_video_info; video_info.bmiHeader.biWidth = 3; @@ -8722,273 +8722,273 @@ static void test_ddrawstreamsample_completion_status(void) mt = rgb32_mt; mt.pbFormat = (BYTE *)&video_info; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &stream_sample1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &stream_sample2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Initial status is S_OK. */ hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, INFINITE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Update changes the status to MS_S_PENDING. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, 100); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
/* Each Receive call changes the status of one queued sample to S_OK in the same order Update was called. */ hr = IDirectDrawStreamSample_Update(stream_sample2, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample2, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, INFINITE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample2, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample2, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* COMPSTAT_NOUPDATEOK removes the sample from the queue and changes the status to MS_S_NOUPDATE. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample2, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_NOUPDATEOK, 0); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, INFINITE); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample2, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* COMPSTAT_ABORT removes the sample from the queue and changes the status to MS_S_NOUPDATE. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample2, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_ABORT, 0); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, INFINITE); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample2, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* COMPSTAT_WAIT has no effect when combined with COMPSTAT_NOUPDATEOK. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_NOUPDATEOK | COMPSTAT_WAIT, INFINITE); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
/* COMPSTAT_WAIT has no effect when combined with COMPSTAT_ABORT. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_ABORT | COMPSTAT_WAIT, INFINITE); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
/* EndOfStream changes the status of the queued samples to MS_S_ENDOFSTREAM. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, INFINITE); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
/* Update after EndOfStream changes the status to MS_S_ENDOFSTREAM. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, INFINITE); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Continuous update can be canceled by COMPSTAT_NOUPDATEOK. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC | SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_NOUPDATEOK, 0); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
/* Continuous update can be canceled by COMPSTAT_ABORT. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC | SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_ABORT, 0); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
/* If a sample is in countinuous update mode, when Receive is called it's status remains MS_S_PENDING * and the sample is moved to the end of the queue. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC | SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC | SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == MS_E_BUSY, "Got hr %#x.\n", hr); + ok(hr == MS_E_BUSY, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_E_BUSY, "Got hr %#x.\n", hr); + ok(hr == MS_E_BUSY, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample2, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample2, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample2, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_NOUPDATEOK, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* In continuous update mode, flushing does not affect the status. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC | SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
/* In continuous update mode, stopping and running the stream does not affect the status. */ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
/* In continuous update mode, EndOfStream changes the status to MS_S_ENDOFSTREAM. */ hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_ENDOFSTREAM, "Got hr %#x.\n", hr); + ok(hr == MS_S_ENDOFSTREAM, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* COMPSTAT_WAIT resets the sample to the non-continuous update mode. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC | SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* In continuous update mode, CompletionStatus with COMPSTAT_WAIT returns when Receive is called. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC | SSUPDATE_CONTINUOUS, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
streamsample_sample = (IStreamSample *)stream_sample1; streamsample_flags = COMPSTAT_WAIT; @@ -8999,24 +8999,24 @@ static void test_ddrawstreamsample_completion_status(void)
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* CompletionStatus with COMPSTAT_WAIT returns when Receive is called. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
streamsample_sample = (IStreamSample *)stream_sample1; streamsample_flags = COMPSTAT_WAIT; @@ -9027,16 +9027,16 @@ static void test_ddrawstreamsample_completion_status(void)
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
/* CompletionStatus with COMPSTAT_WAIT returns when EndOfStream is called. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
streamsample_sample = (IStreamSample *)stream_sample1; streamsample_flags = COMPSTAT_WAIT; @@ -9046,69 +9046,69 @@ static void test_ddrawstreamsample_completion_status(void) ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "CompletionStatus returned prematurely.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Stopping and running the stream does not affect the status and does not remove the sample from the queue. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, 6); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IMediaSample_Release(media_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* When the stream is stopped Update does not change the status. */ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_E_NOTRUNNING, "Got hr %#x.\n", hr); + ok(hr == MS_E_NOTRUNNING, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_WAIT, INFINITE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* When the wait time is less than 1ms the sample is updated immediately. */ hr = IMediaFilter_SetSyncSource(media_filter, &clock.IReferenceClock_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.time = 12345678;
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_GetCurrentStreamTime(filter, &filter_start_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.time = 12345678 - filter_start_time + 11111111;
clock.advise_time_cookie = &cookie;
hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
thread = ammediastream_async_receive_time(&source, 11111111 + 9999, 11111111 + 9999, test_data, sizeof(test_data)); @@ -9116,12 +9116,12 @@ static void test_ddrawstreamsample_completion_status(void) CloseHandle(thread);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, INFINITE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* When the wait time is 1ms or greater AdviseTime is called * with base equal to the sample start time and offset equal to the filter start time. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
thread = ammediastream_async_receive_time(&source, 11111111 + 10000, 11111111 + 10000, test_data, sizeof(test_data)); @@ -9132,7 +9132,7 @@ static void test_ddrawstreamsample_completion_status(void) ok(cookie.offset == 12345678 - filter_start_time, "Got offset %s.\n", wine_dbgstr_longlong(cookie.offset));
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
clock.time = 12345678 - filter_start_time + 11111111 + 10000; SetEvent(cookie.event); @@ -9141,14 +9141,14 @@ static void test_ddrawstreamsample_completion_status(void) CloseHandle(thread);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* NewSegment does not affect the values passed to AdviseTime. */ hr = IPin_NewSegment(pin, 22222222, 33333333, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
thread = ammediastream_async_receive_time(&source, 11111111 + 20000, 11111111 + 20000, test_data, sizeof(test_data)); @@ -9159,7 +9159,7 @@ static void test_ddrawstreamsample_completion_status(void) ok(cookie.offset == 12345678 - filter_start_time, "Got offset %s.\n", wine_dbgstr_longlong(cookie.offset));
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_NOUPDATEOK, 0); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Receive returned prematurely.\n");
@@ -9171,13 +9171,13 @@ static void test_ddrawstreamsample_completion_status(void) /* COMPSTAT_NOUPDATEOK does not cause Receive to return. * Receive waits for the next sample to be queued and updates it. */ hr = IDirectDrawStreamSample_Update(stream_sample1, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
thread = ammediastream_async_receive_time(&source, 11111111 + 30000, 11111111 + 30000, test_data, sizeof(test_data)); @@ -9188,7 +9188,7 @@ static void test_ddrawstreamsample_completion_status(void) ok(cookie.offset == 12345678 - filter_start_time, "Got offset %s.\n", wine_dbgstr_longlong(cookie.offset));
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_NOUPDATEOK | COMPSTAT_WAIT, INFINITE); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Receive returned prematurely.\n");
@@ -9198,7 +9198,7 @@ static void test_ddrawstreamsample_completion_status(void) ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Receive returned prematurely.\n");
hr = IDirectDrawStreamSample_Update(stream_sample1, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread); @@ -9206,7 +9206,7 @@ static void test_ddrawstreamsample_completion_status(void) /* COMPSTAT_ABORT does not cause Receive to return. * Receive waits for the next sample to be queued and updates it. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
thread = ammediastream_async_receive_time(&source, 11111111 + 40000, 11111111 + 40000, test_data, sizeof(test_data)); @@ -9217,7 +9217,7 @@ static void test_ddrawstreamsample_completion_status(void) ok(cookie.offset == 12345678 - filter_start_time, "Got offset %s.\n", wine_dbgstr_longlong(cookie.offset));
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, COMPSTAT_ABORT, 0); - ok(hr == MS_S_NOUPDATE, "Got hr %#x.\n", hr); + ok(hr == MS_S_NOUPDATE, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Receive returned prematurely.\n");
@@ -9227,14 +9227,14 @@ static void test_ddrawstreamsample_completion_status(void) ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Receive returned prematurely.\n");
hr = IDirectDrawStreamSample_Update(stream_sample1, 0, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
/* Stopping the stream causes Receive to return and leaves the sample with MS_S_PENDING status. */ hr = IDirectDrawStreamSample_Update(stream_sample1, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
thread = ammediastream_async_receive_time(&source, 11111111 + 50000, 11111111 + 50000, test_data, sizeof(test_data)); @@ -9245,33 +9245,33 @@ static void test_ddrawstreamsample_completion_status(void) ok(cookie.offset == 12345678 - filter_start_time, "Got offset %s.\n", wine_dbgstr_longlong(cookie.offset));
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n"); CloseHandle(thread);
hr = IDirectDrawStreamSample_CompletionStatus(stream_sample1, 0, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
CloseHandle(cookie.advise_time_called_event); ref = IDirectDrawStreamSample_Release(stream_sample1); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirectDrawStreamSample_Release(stream_sample2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_ddrawstreamsample_get_sample_times(void) @@ -9299,26 +9299,26 @@ static void test_ddrawstreamsample_get_sample_times(void) IPin *pin;
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!filter, "Expected non-null filter.\n"); hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (void **)&ddraw_stream); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaStream_QueryInterface(stream, &IID_IMemInputPin, (void **)&mem_input_pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph != NULL, "Expected non-NULL graph.\n"); hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&graph_media_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testfilter_init(&source); hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); testclock_init(&clock);
video_info = rgb32_video_info; @@ -9327,37 +9327,37 @@ static void test_ddrawstreamsample_get_sample_times(void) mt = rgb32_mt; mt.pbFormat = (BYTE *)&video_info; hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &stream_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.time = 12345678;
current_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == 0, "Got current time %s.\n", wine_dbgstr_longlong(current_time));
hr = IMediaFilter_SetSyncSource(graph_media_filter, &clock.IReferenceClock_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
current_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == 0, "Got current time %s.\n", wine_dbgstr_longlong(current_time));
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaStreamFilter_GetCurrentStreamTime(filter, &filter_start_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
clock.get_time_hr = E_FAIL;
current_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == 0xdeadbeefddf15da1 + filter_start_time, "Expected current time %s, got %s.\n", wine_dbgstr_longlong(0xdeadbeefddf15da1 + filter_start_time), wine_dbgstr_longlong(current_time));
@@ -9365,7 +9365,7 @@ static void test_ddrawstreamsample_get_sample_times(void)
current_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == filter_start_time, "Expected current time %s, got %s.\n", wine_dbgstr_longlong(filter_start_time), wine_dbgstr_longlong(current_time));
@@ -9373,55 +9373,55 @@ static void test_ddrawstreamsample_get_sample_times(void)
current_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current_time == filter_start_time + 11111111, "Expected current time %s, got %s.\n", wine_dbgstr_longlong(filter_start_time + 11111111), wine_dbgstr_longlong(current_time));
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 0, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 0, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
hr = IDirectDrawStreamSample_Update(stream_sample, SSUPDATE_ASYNC, NULL, NULL, 0); - ok(hr == MS_S_PENDING, "Got hr %#x.\n", hr); + ok(hr == MS_S_PENDING, "Got hr %#lx.\n", hr);
media_sample = ammediastream_allocate_sample(&source, test_data, sizeof(test_data)); start_time = 12345678; end_time = 23456789; hr = IMediaSample_SetTime(media_sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(mem_input_pin, media_sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(media_sample);
start_time = 0xdeadbeefdeadbeef; end_time = 0xdeadbeefdeadbeef; hr = IDirectDrawStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start_time == 12345678, "Got start time %s.\n", wine_dbgstr_longlong(start_time)); ok(end_time == 23456789, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IGraphBuilder_Disconnect(graph, pin); IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
ref = IDirectDrawStreamSample_Release(stream_sample); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IAMMultiMediaStream_Release(mmstream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMediaFilter_Release(graph_media_filter); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMediaStreamFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IMemInputPin_Release(mem_input_pin); IDirectDrawMediaStream_Release(ddraw_stream); ref = IMediaStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(amstream)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109043
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/apphelp/tests/Makefile.in | 1 - dlls/apphelp/tests/apphelp.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/apphelp/tests/Makefile.in b/dlls/apphelp/tests/Makefile.in index a1f28608371..2a05c019955 100644 --- a/dlls/apphelp/tests/Makefile.in +++ b/dlls/apphelp/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = apphelp.dll IMPORTS = ole32
diff --git a/dlls/apphelp/tests/apphelp.c b/dlls/apphelp/tests/apphelp.c index 81104d28512..dd01f7630ae 100644 --- a/dlls/apphelp/tests/apphelp.c +++ b/dlls/apphelp/tests/apphelp.c @@ -64,13 +64,13 @@ static void test_ApphelpCheckShellObject(void) flags = 0xdeadbeef; SetLastError(0xdeadbeef); res = pApphelpCheckShellObject(objects[i], FALSE, &flags); - ok(res && (flags == 0), "%s 0: got %d and %s with 0x%x (expected TRUE and 0)\n", + ok(res && (flags == 0), "%s 0: got %d and %s with 0x%lx (expected TRUE and 0)\n", wine_dbgstr_guid(objects[i]), res, wine_dbgstr_longlong(flags), GetLastError());
flags = 0xdeadbeef; SetLastError(0xdeadbeef); res = pApphelpCheckShellObject(objects[i], TRUE, &flags); - ok(res && (flags == 0), "%s 1: got %d and %s with 0x%x (expected TRUE and 0)\n", + ok(res && (flags == 0), "%s 1: got %d and %s with 0x%lx (expected TRUE and 0)\n", wine_dbgstr_guid(objects[i]), res, wine_dbgstr_longlong(flags), GetLastError());
} @@ -78,7 +78,7 @@ static void test_ApphelpCheckShellObject(void) /* NULL as pointer to flags is checked */ SetLastError(0xdeadbeef); res = pApphelpCheckShellObject(&GUID_NULL, FALSE, NULL); - ok(res, "%s 0: got %d with 0x%x (expected != FALSE)\n", wine_dbgstr_guid(&GUID_NULL), res, GetLastError()); + ok(res, "%s 0: got %d with 0x%lx (expected != FALSE)\n", wine_dbgstr_guid(&GUID_NULL), res, GetLastError());
/* NULL as CLSID* crash on Windows */ if (0) @@ -86,7 +86,7 @@ static void test_ApphelpCheckShellObject(void) flags = 0xdeadbeef; SetLastError(0xdeadbeef); res = pApphelpCheckShellObject(NULL, FALSE, &flags); - trace("NULL as CLSID*: got %d and %s with 0x%x\n", res, wine_dbgstr_longlong(flags), GetLastError()); + trace("NULL as CLSID*: got %d and %s with 0x%lx\n", res, wine_dbgstr_longlong(flags), GetLastError()); } }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109044
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/atl100/tests/Makefile.in | 2 - dlls/atl100/tests/atl.c | 120 +++++++++++++++++++++-------------------- 2 files changed, 61 insertions(+), 61 deletions(-)
diff --git a/dlls/atl100/tests/Makefile.in b/dlls/atl100/tests/Makefile.in index eebf4ce5c75..61ebeb32c6c 100644 --- a/dlls/atl100/tests/Makefile.in +++ b/dlls/atl100/tests/Makefile.in @@ -1,6 +1,6 @@ TESTDLL = atl100.dll IMPORTS = uuid atl100 oleaut32 ole32 advapi32 user32 -EXTRADEFS = -DWINE_NO_LONG_TYPES -D_ATL_VER=_ATL_VER_100 +EXTRADEFS = -D_ATL_VER=_ATL_VER_100
C_SRCS = \ atl.c diff --git a/dlls/atl100/tests/atl.c b/dlls/atl100/tests/atl.c index 71e25b3fb3e..e161878f8ea 100644 --- a/dlls/atl100/tests/atl.c +++ b/dlls/atl100/tests/atl.c @@ -143,7 +143,7 @@ static void test_winmodule(void)
winmod.cbSize = 0xdeadbeef; hres = AtlWinModuleInit(&winmod); - ok(hres == E_INVALIDARG, "AtlWinModuleInit failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "AtlWinModuleInit failed: %08lx\n", hres);
winmod.cbSize = sizeof(winmod); winmod.m_pCreateWndList = (void*)0xdeadbeef; @@ -152,9 +152,9 @@ static void test_winmodule(void) winmod.m_rgWindowClassAtoms.m_nSize = 0xdeadbeef; winmod.m_rgWindowClassAtoms.m_nAllocSize = 0xdeadbeef; hres = AtlWinModuleInit(&winmod); - ok(hres == S_OK, "AtlWinModuleInit failed: %08x\n", hres); + ok(hres == S_OK, "AtlWinModuleInit failed: %08lx\n", hres); ok(!winmod.m_pCreateWndList, "winmod.m_pCreateWndList = %p\n", winmod.m_pCreateWndList); - ok(winmod.m_csWindowCreate.LockCount == -1, "winmod.m_csWindowCreate.LockCount = %d\n", + ok(winmod.m_csWindowCreate.LockCount == -1, "winmod.m_csWindowCreate.LockCount = %ld\n", winmod.m_csWindowCreate.LockCount); ok(winmod.m_rgWindowClassAtoms.m_aT == (void*)0xdeadbeef, "winmod.m_rgWindowClassAtoms.m_aT = %p\n", winmod.m_rgWindowClassAtoms.m_aT); @@ -168,21 +168,21 @@ static void test_winmodule(void) AtlWinModuleAddCreateWndData(&winmod, create_data, (void*)0xdead0001); ok(winmod.m_pCreateWndList == create_data, "winmod.m_pCreateWndList != create_data\n"); ok(create_data[0].m_pThis == (void*)0xdead0001, "unexpected create_data[0].m_pThis %p\n", create_data[0].m_pThis); - ok(create_data[0].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[0].m_dwThreadID %x\n", + ok(create_data[0].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[0].m_dwThreadID %lx\n", create_data[0].m_dwThreadID); ok(!create_data[0].m_pNext, "unexpected create_data[0].m_pNext %p\n", create_data[0].m_pNext);
AtlWinModuleAddCreateWndData(&winmod, create_data+1, (void*)0xdead0002); ok(winmod.m_pCreateWndList == create_data+1, "winmod.m_pCreateWndList != create_data\n"); ok(create_data[1].m_pThis == (void*)0xdead0002, "unexpected create_data[1].m_pThis %p\n", create_data[1].m_pThis); - ok(create_data[1].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[1].m_dwThreadID %x\n", + ok(create_data[1].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[1].m_dwThreadID %lx\n", create_data[1].m_dwThreadID); ok(create_data[1].m_pNext == create_data, "unexpected create_data[1].m_pNext %p\n", create_data[1].m_pNext);
AtlWinModuleAddCreateWndData(&winmod, create_data+2, (void*)0xdead0003); ok(winmod.m_pCreateWndList == create_data+2, "winmod.m_pCreateWndList != create_data\n"); ok(create_data[2].m_pThis == (void*)0xdead0003, "unexpected create_data[2].m_pThis %p\n", create_data[2].m_pThis); - ok(create_data[2].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[2].m_dwThreadID %x\n", + ok(create_data[2].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[2].m_dwThreadID %lx\n", create_data[2].m_dwThreadID); ok(create_data[2].m_pNext == create_data+1, "unexpected create_data[2].m_pNext %p\n", create_data[2].m_pNext);
@@ -223,7 +223,7 @@ static void _test_key_not_exists(unsigned line, HKEY root, const char *key_name) DWORD res;
res = RegOpenKeyA(root, key_name, &key); - ok_(__FILE__,line)(res == ERROR_FILE_NOT_FOUND, "Attempting to open %s returned %u\n", key_name, res); + ok_(__FILE__,line)(res == ERROR_FILE_NOT_FOUND, "Attempting to open %s returned %lu\n", key_name, res); if(res == ERROR_SUCCESS) RegCloseKey(key); } @@ -246,14 +246,14 @@ static void test_regcat(void) }
hres = AtlRegisterClassCategoriesHelper(&CLSID_Test, catmap, TRUE); - ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08x\n", hres); + ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08lx\n", hres);
test_key_exists(HKEY_CLASSES_ROOT, "CLSID\{" CLSID_TEST_STR "}"); test_key_exists(HKEY_CLASSES_ROOT, "CLSID\{" CLSID_TEST_STR "}\Implemented Categories\{" CATID_CATTEST1_STR "}"); test_key_exists(HKEY_CLASSES_ROOT, "CLSID\{" CLSID_TEST_STR "}\Required Categories\{" CATID_CATTEST2_STR "}");
hres = AtlRegisterClassCategoriesHelper(&CLSID_Test, catmap, FALSE); - ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08x\n", hres); + ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08lx\n", hres);
test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\{" CLSID_TEST_STR "}\Implemented Categories"); test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\{" CLSID_TEST_STR "}\Required Categories"); @@ -262,13 +262,13 @@ static void test_regcat(void) ok(RegDeleteKeyA(HKEY_CLASSES_ROOT, "CLSID\{" CLSID_TEST_STR "}") == ERROR_SUCCESS, "Could not delete key\n");
hres = AtlRegisterClassCategoriesHelper(&CLSID_Test, NULL, TRUE); - ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08x\n", hres); + ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08lx\n", hres);
test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\{" CLSID_TEST_STR "}");
b = 10; hres = AtlGetPerUserRegistration(&b); - ok(hres == S_OK, "AtlGetPerUserRegistration failed: %08x\n", hres); + ok(hres == S_OK, "AtlGetPerUserRegistration failed: %08lx\n", hres); ok(!b, "AtlGetPerUserRegistration returned %x\n", b); }
@@ -285,7 +285,7 @@ static void test_typelib(void)
typelib = NULL; hres = AtlLoadTypeLib(inst, NULL, &path, &typelib); - ok(hres == S_OK, "AtlLoadTypeLib failed: %08x\n", hres); + ok(hres == S_OK, "AtlLoadTypeLib failed: %08lx\n", hres); FreeLibrary(inst);
len = SysStringLen(path); @@ -301,7 +301,7 @@ static void test_typelib(void)
typelib = NULL; hres = AtlLoadTypeLib(inst, NULL, &path, &typelib); - ok(hres == S_OK, "AtlLoadTypeLib failed: %08x\n", hres); + ok(hres == S_OK, "AtlLoadTypeLib failed: %08lx\n", hres); FreeLibrary(inst);
len = SysStringLen(path); @@ -360,7 +360,7 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dwCookie) { - ok(dwCookie == 0xdeadbeef, "dwCookie = %x\n", dwCookie); + ok(dwCookie == 0xdeadbeef, "dwCookie = %lx\n", dwCookie); advise_cnt--; return S_OK; } @@ -439,18 +439,18 @@ static void test_cp(void) HRESULT hres;
hres = AtlAdvise(NULL, (IUnknown*)0xdeed0000, &CLSID_Test, &cookie); - ok(hres == E_INVALIDARG, "expect E_INVALIDARG, returned %08x\n", hres); + ok(hres == E_INVALIDARG, "expect E_INVALIDARG, returned %08lx\n", hres);
hres = AtlUnadvise(NULL, &CLSID_Test, 0xdeadbeef); - ok(hres == E_INVALIDARG, "expect E_INVALIDARG, returned %08x\n", hres); + ok(hres == E_INVALIDARG, "expect E_INVALIDARG, returned %08lx\n", hres);
hres = AtlAdvise((IUnknown*)&ConnectionPointContainer, (IUnknown*)0xdead0000, &CLSID_Test, &cookie); - ok(hres == S_OK, "AtlAdvise failed: %08x\n", hres); - ok(cookie == 0xdeadbeef, "cookie = %x\n", cookie); + ok(hres == S_OK, "AtlAdvise failed: %08lx\n", hres); + ok(cookie == 0xdeadbeef, "cookie = %lx\n", cookie); ok(advise_cnt == 1, "advise_cnt = %d\n", advise_cnt);
hres = AtlUnadvise((IUnknown*)&ConnectionPointContainer, &CLSID_Test, 0xdeadbeef); - ok(hres == S_OK, "AtlUnadvise failed: %08x\n", hres); + ok(hres == S_OK, "AtlUnadvise failed: %08lx\n", hres); ok(!advise_cnt, "advise_cnt = %d\n", advise_cnt); }
@@ -511,7 +511,7 @@ static HRESULT WINAPI ProvideClassInfo2_GetClassInfo(IProvideClassInfo2 *iface,
static HRESULT WINAPI ProvideClassInfo2_GetGUID(IProvideClassInfo2 *iface, DWORD dwGuidKind, GUID *pGUID) { - ok(dwGuidKind == GUIDKIND_DEFAULT_SOURCE_DISP_IID, "unexpected dwGuidKind %x\n", dwGuidKind); + ok(dwGuidKind == GUIDKIND_DEFAULT_SOURCE_DISP_IID, "unexpected dwGuidKind %lx\n", dwGuidKind); *pGUID = DIID_DispHTMLBody; return S_OK; } @@ -575,13 +575,13 @@ static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID l HRESULT hres;
ok(!iTInfo, "iTInfo = %d\n", iTInfo); - ok(!lcid, "lcid = %x\n", lcid); + ok(!lcid, "lcid = %lx\n", lcid);
hres = LoadTypeLib(L"mshtml.tlb", &typelib); - ok(hres == S_OK, "LoadTypeLib failed: %08x\n", hres); + ok(hres == S_OK, "LoadTypeLib failed: %08lx\n", hres);
hres = ITypeLib_GetTypeInfoOfGuid(typelib, &IID_IHTMLElement, ppTInfo); - ok(hres == S_OK, "GetTypeInfoOfGuid failed: %08x\n", hres); + ok(hres == S_OK, "GetTypeInfoOfGuid failed: %08lx\n", hres);
ITypeLib_Release(typelib); return S_OK; @@ -624,7 +624,7 @@ static void test_source_iface(void)
maj_ver = min_ver = 0xdead; hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid, &maj_ver, &min_ver); - ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08x\n", hres); + ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08lx\n", hres); ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n", wine_dbgstr_guid(&libid)); ok(IsEqualGUID(&iid, &DIID_DispHTMLBody), "iid = %s\n", wine_dbgstr_guid(&iid)); ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver, min_ver); @@ -634,7 +634,7 @@ static void test_source_iface(void)
maj_ver = min_ver = 0xdead; hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid, &maj_ver, &min_ver); - ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08x\n", hres); + ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08lx\n", hres); ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n", wine_dbgstr_guid(&libid)); ok(IsEqualGUID(&iid, &DIID_HTMLDocumentEvents), "iid = %s\n", wine_dbgstr_guid(&iid)); ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver, min_ver); @@ -643,7 +643,7 @@ static void test_source_iface(void)
maj_ver = min_ver = 0xdead; hres = AtlGetObjectSourceInterface((IUnknown*)&Dispatch, &libid, &iid, &maj_ver, &min_ver); - ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08x\n", hres); + ok(hres == S_OK, "AtlGetObjectSourceInterface failed: %08lx\n", hres); ok(IsEqualGUID(&libid, &LIBID_MSHTML), "libid = %s\n", wine_dbgstr_guid(&libid)); ok(IsEqualGUID(&iid, &IID_NULL), "iid = %s\n", wine_dbgstr_guid(&iid)); ok(maj_ver == 4 && min_ver == 0, "ver = %d.%d\n", maj_ver, min_ver); @@ -684,7 +684,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = (IUnknown *)0xdeadbeef; res = AtlAxGetControl(hwnd, &control); - ok(res == E_FAIL, "Expected E_FAIL, returned %08x\n", res); + ok(res == E_FAIL, "Expected E_FAIL, returned %08lx\n", res); ok(!control, "returned %p\n", control); if (control) IUnknown_Release(control); DestroyWindow(hwnd); @@ -693,7 +693,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = (IUnknown *)0xdeadbeef; res = AtlAxGetControl(hwnd, &control); - ok(res == E_FAIL, "Expected E_FAIL, returned %08x\n", res); + ok(res == E_FAIL, "Expected E_FAIL, returned %08lx\n", res); ok(!control, "returned %p\n", control); if (control) IUnknown_Release(control); DestroyWindow(hwnd); @@ -706,7 +706,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = NULL; res = AtlAxGetControl(hwnd, &control); - ok(res == S_OK, "AtlAxGetControl failed with res %08x\n", res); + ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res); ok(control != NULL, "AtlAxGetControl failed!\n"); IUnknown_Release(control); DestroyWindow(hwnd); @@ -715,7 +715,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = NULL; res = AtlAxGetControl(hwnd, &control); - ok(res == S_OK, "AtlAxGetControl failed with res %08x\n", res); + ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res); ok(control != NULL, "AtlAxGetControl failed!\n"); IUnknown_Release(control); DestroyWindow(hwnd); @@ -724,7 +724,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = NULL; res = AtlAxGetControl(hwnd, &control); - ok(res == S_OK, "AtlAxGetControl failed with res %08x\n", res); + ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res); ok(control != NULL, "AtlAxGetControl failed!\n"); IUnknown_Release(control); DestroyWindow(hwnd); @@ -734,7 +734,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = NULL; res = AtlAxGetControl(hwnd, &control); - ok(res == S_OK, "AtlAxGetControl failed with res %08x\n", res); + ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res); ok(control != NULL, "AtlAxGetControl failed!\n"); IUnknown_Release(control); DestroyWindow(hwnd); @@ -743,7 +743,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = NULL; res = AtlAxGetControl(hwnd, &control); - ok(res == S_OK, "AtlAxGetControl failed with res %08x\n", res); + ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res); ok(control != NULL, "AtlAxGetControl failed!\n"); IUnknown_Release(control); DestroyWindow(hwnd); @@ -767,7 +767,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = NULL; res = AtlAxGetControl(hwnd, &control); - ok(res == S_OK, "AtlAxGetControl failed with res %08x\n", res); + ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res); ok(control != NULL, "AtlAxGetControl failed!\n"); IUnknown_Release(control); DestroyWindow(hwnd); @@ -779,7 +779,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = NULL; res = AtlAxGetControl(hwnd, &control); - ok(res == S_OK, "AtlAxGetControl failed with res %08x\n", res); + ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res); ok(control != NULL, "AtlAxGetControl failed!\n"); IUnknown_Release(control); DestroyWindow(hwnd); @@ -791,7 +791,7 @@ static void test_ax_win(void) ok(hwnd != NULL, "CreateWindow failed!\n"); control = NULL; res = AtlAxGetControl(hwnd, &control); - ok(res == S_OK, "AtlAxGetControl failed with res %08x\n", res); + ok(res == S_OK, "AtlAxGetControl failed with res %08lx\n", res); ok(control != NULL, "AtlAxGetControl failed!\n"); IUnknown_Release(control); DestroyWindow(hwnd); @@ -832,29 +832,29 @@ static void test_AtlAxAttachControl(void) LONG val;
hr = AtlAxAttachControl(NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
container = (IUnknown *)0xdeadbeef; hr = AtlAxAttachControl(NULL, NULL, &container); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr); ok(container == (IUnknown *)0xdeadbeef, "Expected the output container pointer to be untouched, got %p\n", container);
hwnd = create_container_window(); hr = AtlAxAttachControl(NULL, hwnd, NULL); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr); DestroyWindow(hwnd);
hwnd = create_container_window(); container = (IUnknown *)0xdeadbeef; hr = AtlAxAttachControl(NULL, hwnd, &container); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr); ok(container == (IUnknown *)0xdeadbeef, "returned %p\n", container); DestroyWindow(hwnd);
hr = CoCreateInstance(&CLSID_WebBrowser, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, &IID_IOleObject, (void **)&control); - ok(hr == S_OK, "Expected CoCreateInstance to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected CoCreateInstance to return S_OK, got 0x%08lx\n", hr);
if (FAILED(hr)) { @@ -863,31 +863,31 @@ static void test_AtlAxAttachControl(void) }
hr = AtlAxAttachControl(control, NULL, NULL); - ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); + ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08lx\n", hr);
container = NULL; hr = AtlAxAttachControl(control, NULL, &container); - ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); + ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08lx\n", hr); ok(container != NULL, "got %p\n", container); IUnknown_Release(container);
hwnd = create_container_window(); SetWindowLongW(hwnd, GWLP_USERDATA, 0xdeadbeef); hr = AtlAxAttachControl(control, hwnd, NULL); - ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08lx\n", hr); val = GetWindowLongW(hwnd, GWLP_USERDATA); - ok(val == 0xdeadbeef, "returned %08x\n", val); + ok(val == 0xdeadbeef, "returned %08lx\n", val); DestroyWindow(hwnd);
hwnd = create_container_window(); SetWindowLongW(hwnd, GWLP_USERDATA, 0xdeadbeef); container = NULL; hr = AtlAxAttachControl(control, hwnd, &container); - ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08lx\n", hr); ok(container != NULL, "Expected not NULL!\n"); IUnknown_Release(container); val = GetWindowLongW(hwnd, GWLP_USERDATA); - ok(val == 0xdeadbeef, "Expected unchanged, returned %08x\n", val); + ok(val == 0xdeadbeef, "Expected unchanged, returned %08lx\n", val); DestroyWindow(hwnd);
IUnknown_Release(control); @@ -905,7 +905,7 @@ static void test_AtlAxCreateControl(void) container = NULL; control = (IUnknown *)0xdeadbeef; hr = AtlAxCreateControlEx(NULL, NULL, NULL, &container, &control, NULL, NULL); - todo_wine ok(hr == S_FALSE, "got 0x%08x\n", hr); + todo_wine ok(hr == S_FALSE, "got 0x%08lx\n", hr); todo_wine ok(container != NULL, "returned %p\n", container); ok(!control, "returned %p\n", control);
@@ -914,7 +914,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(NULL, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine ok(container != NULL, "returned %p!\n", container); ok(!control, "returned %p\n", control); DestroyWindow(hwnd); @@ -924,7 +924,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(L"", hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine ok(container != NULL, "returned %p!\n", container); ok(!control, "returned %p\n", control); DestroyWindow(hwnd); @@ -934,7 +934,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(L"random", hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == CO_E_CLASSSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "got 0x%08lx\n", hr); ok(!container, "returned %p!\n", container); ok(!control, "returned %p\n", control); DestroyWindow(hwnd); @@ -944,7 +944,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(progid1W, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(container != NULL, "returned %p!\n", container); ok(control != NULL, "returned %p\n", control); IUnknown_Release(container); @@ -956,7 +956,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(clsid1W, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(container != NULL, "returned %p!\n", container); ok(control != NULL, "returned %p\n", control); IUnknown_Release(container); @@ -968,7 +968,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(url1W, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(container != NULL, "returned %p!\n", container); ok(control != NULL, "returned %p\n", control); IUnknown_Release(container); @@ -980,7 +980,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(mshtml1W, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(container != NULL, "returned %p!\n", container); ok(control != NULL, "returned %p\n", control); IUnknown_Release(container); @@ -992,7 +992,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(mshtml2W, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(container != NULL, "returned %p!\n", container); ok(control != NULL, "returned %p\n", control); IUnknown_Release(container); @@ -1004,7 +1004,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(mshtml3W, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == CO_E_CLASSSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "got 0x%08lx\n", hr); ok(!container, "returned %p!\n", container); ok(!control, "returned %p\n", control); DestroyWindow(hwnd); @@ -1024,7 +1024,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(pathW, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(container != NULL, "returned %p!\n", container); ok(control != NULL, "returned %p\n", control); IUnknown_Release(container); @@ -1039,7 +1039,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(file_uri1W, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(container != NULL, "returned %p!\n", container); ok(control != NULL, "returned %p\n", control); IUnknown_Release(container); @@ -1054,7 +1054,7 @@ static void test_AtlAxCreateControl(void) hwnd = create_container_window(); ok(hwnd != NULL, "create window failed!\n"); hr = AtlAxCreateControlEx(file_uri1W, hwnd, NULL, &container, &control, &IID_NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(container != NULL, "returned %p!\n", container); ok(control != NULL, "returned %p\n", control); IUnknown_Release(container);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109045
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/atl/tests/Makefile.in | 2 +- dlls/atl/tests/atl_ax.c | 14 +++++++------- dlls/atl/tests/module.c | 28 ++++++++++++++-------------- dlls/atl/tests/registrar.c | 26 +++++++++++++------------- 4 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/dlls/atl/tests/Makefile.in b/dlls/atl/tests/Makefile.in index 11af85f23a2..aee6cfd92d8 100644 --- a/dlls/atl/tests/Makefile.in +++ b/dlls/atl/tests/Makefile.in @@ -1,6 +1,6 @@ TESTDLL = atl.dll IMPORTS = uuid atl oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 -EXTRADEFS = -DWINE_NO_LONG_TYPES -D_ATL_VER=_ATL_VER_30 +EXTRADEFS = -D_ATL_VER=_ATL_VER_30
C_SRCS = \ atl_ax.c \ diff --git a/dlls/atl/tests/atl_ax.c b/dlls/atl/tests/atl_ax.c index 94db3640ee3..26e4ea5a54d 100644 --- a/dlls/atl/tests/atl_ax.c +++ b/dlls/atl/tests/atl_ax.c @@ -73,20 +73,20 @@ static void test_AtlAxAttachControl(void) IUnknown *pObj, *pContainer;
hr = pAtlAxAttachControl(NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
pContainer = (IUnknown *)0xdeadbeef; hr = pAtlAxAttachControl(NULL, NULL, &pContainer); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr); ok(pContainer == (IUnknown *)0xdeadbeef, "Expected the output container pointer to be untouched, got %p\n", pContainer);
hr = pAtlAxAttachControl(NULL, hwnd, NULL); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
hr = CoCreateInstance(&CLSID_WebBrowser, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, &IID_IOleObject, (void **)&pObj); - ok(hr == S_OK, "Expected CoCreateInstance to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected CoCreateInstance to return S_OK, got 0x%08lx\n", hr);
if (FAILED(hr)) { @@ -95,16 +95,16 @@ static void test_AtlAxAttachControl(void) }
hr = pAtlAxAttachControl(pObj, NULL, NULL); - ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); + ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08lx\n", hr);
pContainer = NULL; hr = pAtlAxAttachControl(pObj, NULL, &pContainer); - ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); + ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08lx\n", hr); ok(pContainer != NULL, "got %p\n", pContainer); IUnknown_Release(pContainer);
hr = pAtlAxAttachControl(pObj, hwnd, NULL); - ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08lx\n", hr);
IUnknown_Release(pObj);
diff --git a/dlls/atl/tests/module.c b/dlls/atl/tests/module.c index db8bd28742f..8bb8a533c1a 100644 --- a/dlls/atl/tests/module.c +++ b/dlls/atl/tests/module.c @@ -70,29 +70,29 @@ static void test_winmodule(void) winmod.m_pCreateWndList = (void*)0xdeadbeef; winmod.m_csWindowCreate.LockCount = 0xdeadbeef; hres = AtlModuleInit(&winmod, NULL, NULL); - ok(hres == S_OK, "AtlModuleInit failed: %08x\n", hres); + ok(hres == S_OK, "AtlModuleInit failed: %08lx\n", hres); ok(!winmod.m_pCreateWndList, "winmod.m_pCreateWndList = %p\n", winmod.m_pCreateWndList); - ok(winmod.m_csWindowCreate.LockCount == -1, "winmod.m_csWindowCreate.LockCount = %d\n", + ok(winmod.m_csWindowCreate.LockCount == -1, "winmod.m_csWindowCreate.LockCount = %ld\n", winmod.m_csWindowCreate.LockCount);
AtlModuleAddCreateWndData(&winmod, create_data, (void*)0xdead0001); ok(winmod.m_pCreateWndList == create_data, "winmod.m_pCreateWndList != create_data\n"); ok(create_data[0].m_pThis == (void*)0xdead0001, "unexpected create_data[0].m_pThis %p\n", create_data[0].m_pThis); - ok(create_data[0].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[0].m_dwThreadID %x\n", + ok(create_data[0].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[0].m_dwThreadID %lx\n", create_data[0].m_dwThreadID); ok(!create_data[0].m_pNext, "unexpected create_data[0].m_pNext %p\n", create_data[0].m_pNext);
AtlModuleAddCreateWndData(&winmod, create_data+1, (void*)0xdead0002); ok(winmod.m_pCreateWndList == create_data+1, "winmod.m_pCreateWndList != create_data\n"); ok(create_data[1].m_pThis == (void*)0xdead0002, "unexpected create_data[1].m_pThis %p\n", create_data[1].m_pThis); - ok(create_data[1].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[1].m_dwThreadID %x\n", + ok(create_data[1].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[1].m_dwThreadID %lx\n", create_data[1].m_dwThreadID); ok(create_data[1].m_pNext == create_data, "unexpected create_data[1].m_pNext %p\n", create_data[1].m_pNext);
AtlModuleAddCreateWndData(&winmod, create_data+2, (void*)0xdead0003); ok(winmod.m_pCreateWndList == create_data+2, "winmod.m_pCreateWndList != create_data\n"); ok(create_data[2].m_pThis == (void*)0xdead0003, "unexpected create_data[2].m_pThis %p\n", create_data[2].m_pThis); - ok(create_data[2].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[2].m_dwThreadID %x\n", + ok(create_data[2].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[2].m_dwThreadID %lx\n", create_data[2].m_dwThreadID); ok(create_data[2].m_pNext == create_data+1, "unexpected create_data[2].m_pNext %p\n", create_data[2].m_pNext);
@@ -149,7 +149,7 @@ static void test_winclassinfo(void) winmod.cbSize = sizeof(winmod); winmod.m_pCreateWndList = (void*)0xdeadbeef; hres = AtlModuleInit(&winmod, NULL, NULL); - ok(hres == S_OK, "AtlModuleInit failed: %08x\n", hres); + ok(hres == S_OK, "AtlModuleInit failed: %08lx\n", hres); ok(!winmod.m_pCreateWndList, "winmod.m_pCreateWndList = %p\n", winmod.m_pCreateWndList);
atom = AtlModuleRegisterWndClassInfoW(&winmod, &wci, &wndProc); @@ -181,28 +181,28 @@ static void test_term(void) test.cbSize = sizeof(_ATL_MODULEW);
hres = AtlModuleInit(&test, NULL, NULL); - ok (hres == S_OK, "AtlModuleInit failed (0x%x).\n", hres); + ok (hres == S_OK, "AtlModuleInit failed (0x%lx).\n", hres);
hres = AtlModuleAddTermFunc(&test, term_callback, ex); - ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%x).\n", hres); + ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%lx).\n", hres);
cb_val = 0xdeadbeef; hres = AtlModuleTerm(&test); - ok (hres == S_OK, "AtlModuleTerm failed (0x%x).\n", hres); - ok (cb_val == ex, "wrong callback value (0x%lx).\n", cb_val); + ok (hres == S_OK, "AtlModuleTerm failed (0x%lx).\n", hres); + ok (cb_val == ex, "wrong callback value (0x%Ix).\n", cb_val);
test.cbSize = FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer);
hres = AtlModuleInit(&test, NULL, NULL); - ok (hres == S_OK, "AtlModuleInit failed (0x%x).\n", hres); + ok (hres == S_OK, "AtlModuleInit failed (0x%lx).\n", hres);
hres = AtlModuleAddTermFunc(&test, term_callback, 0x23); - ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%x).\n", hres); + ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%lx).\n", hres);
cb_val = 0xdeadbeef; hres = AtlModuleTerm(&test); - ok (hres == S_OK, "AtlModuleTerm failed (0x%x).\n", hres); - ok (cb_val == 0xdeadbeef, "wrong callback value (0x%lx).\n", cb_val); + ok (hres == S_OK, "AtlModuleTerm failed (0x%lx).\n", hres); + ok (cb_val == 0xdeadbeef, "wrong callback value (0x%Ix).\n", cb_val); }
START_TEST(module) diff --git a/dlls/atl/tests/registrar.c b/dlls/atl/tests/registrar.c index f9ec9529dd8..e332bbce0de 100644 --- a/dlls/atl/tests/registrar.c +++ b/dlls/atl/tests/registrar.c @@ -68,7 +68,7 @@ static void test_registrar(void) hr = CoCreateInstance(&CLSID_Registrar, NULL, CLSCTX_INPROC_SERVER, &IID_IRegistrar, (void**)®istrar); if (FAILED(hr)) { - win_skip("creating IRegistrar failed, hr = 0x%08X\n", hr); + win_skip("creating IRegistrar failed, hr = 0x%08lX\n", hr); return; }
@@ -84,7 +84,7 @@ static void test_registrar(void)
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, count); hr = IRegistrar_StringRegister(registrar, textW); - ok(hr == S_OK, "StringRegister failed: %08x\n", hr); + ok(hr == S_OK, "StringRegister failed: %08lx\n", hr); if (FAILED(hr)) { IRegistrar_Release(registrar); @@ -92,44 +92,44 @@ static void test_registrar(void) }
lret = RegOpenKeyA(HKEY_CURRENT_USER, "eebf73c4-50fd-478f-bbcf-db212221227a", &key); - ok(lret == ERROR_SUCCESS, "error %d opening registry key\n", lret); + ok(lret == ERROR_SUCCESS, "error %ld opening registry key\n", lret);
size = sizeof(dword); lret = RegQueryValueExA(key, "dword_unquoted_hex", NULL, NULL, (BYTE*)&dword, &size); - ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %d\n", lret); + ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %ld\n", lret); ok(dword != 0xA, "unquoted hex is not supposed to be preserved\n");
size = sizeof(dword); lret = RegQueryValueExA(key, "dword_quoted_hex", NULL, NULL, (BYTE*)&dword, &size); - ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %d\n", lret); + ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %ld\n", lret); ok(dword != 0xA, "quoted hex is not supposed to be preserved\n");
size = sizeof(dword); lret = RegQueryValueExA(key, "dword_unquoted_dec", NULL, NULL, (BYTE*)&dword, &size); - ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %d\n", lret); - ok(dword == 1, "unquoted dec is not supposed to be %d\n", dword); + ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %ld\n", lret); + ok(dword == 1, "unquoted dec is not supposed to be %ld\n", dword);
size = sizeof(dword); lret = RegQueryValueExA(key, "dword_quoted_dec", NULL, NULL, (BYTE*)&dword, &size); - ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %d\n", lret); - ok(dword == 1, "quoted dec is not supposed to be %d\n", dword); + ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %ld\n", lret); + ok(dword == 1, "quoted dec is not supposed to be %ld\n", dword);
size = 4; lret = RegQueryValueExA(key, "binary_quoted", NULL, NULL, bytes, &size); - ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %d\n", lret); + ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %ld\n", lret); ok(bytes[0] == 0xde && bytes[1] == 0xad && bytes[2] == 0xbe && bytes[3] == 0xef, "binary quoted value was not preserved (it's 0x%02X%02X%02X%02X)\n", 0xff & bytes[0], 0xff & bytes[1], 0xff & bytes[2], 0xff & bytes[3]);
size = 4; lret = RegQueryValueExA(key, "binary_unquoted", NULL, NULL, bytes, &size); - ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %d\n", lret); + ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %ld\n", lret); ok(bytes[0] == 0xde && bytes[1] == 0xad && bytes[2] == 0x01 && bytes[3] == 0x23, "binary unquoted value was not preserved (it's 0x%02X%02X%02X%02X)\n", 0xff & bytes[0], 0xff & bytes[1], 0xff & bytes[2], 0xff & bytes[3]);
hr = IRegistrar_StringUnregister(registrar, textW); - ok(SUCCEEDED(hr), "IRegistrar_StringUnregister failed, hr = 0x%08X\n", hr); + ok(SUCCEEDED(hr), "IRegistrar_StringUnregister failed, hr = 0x%08lX\n", hr); RegCloseKey(key);
HeapFree(GetProcessHeap(), 0, textW); @@ -148,7 +148,7 @@ static void test_aggregation(void) hres = CoCreateInstance(&CLSID_Registrar, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void**)&unk); ok(hres == CLASS_E_NOAGGREGATION || broken(hres == E_INVALIDARG), - "CoCreateInstance failed: %08x, expected CLASS_E_NOAGGREGATION\n", hres); + "CoCreateInstance failed: %08lx, expected CLASS_E_NOAGGREGATION\n", hres); ok(!unk || unk == (IUnknown*)0xdeadbeef, "unk = %p\n", unk); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109046
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/avifil32/tests/Makefile.in | 1 dlls/avifil32/tests/api.c | 188 ++++++++++++++++++++------------------- 2 files changed, 94 insertions(+), 95 deletions(-)
diff --git a/dlls/avifil32/tests/Makefile.in b/dlls/avifil32/tests/Makefile.in index 1472a12f69b..dad7974456e 100644 --- a/dlls/avifil32/tests/Makefile.in +++ b/dlls/avifil32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = avifil32.dll IMPORTS = avifil32 ole32
diff --git a/dlls/avifil32/tests/api.c b/dlls/avifil32/tests/api.c index 23c845cb328..f7571f48b6a 100644 --- a/dlls/avifil32/tests/api.c +++ b/dlls/avifil32/tests/api.c @@ -186,38 +186,38 @@ static void test_AVISaveOptions(void)
SetLastError(0xdeadbeef); hres = CreateEditableStream(&streams[0], NULL); - ok(hres == AVIERR_OK, "0: got 0x%x and %p (expected AVIERR_OK)\n", hres, streams[0]); + ok(hres == AVIERR_OK, "0: got 0x%lx and %p (expected AVIERR_OK)\n", hres, streams[0]);
SetLastError(0xdeadbeef); hres = CreateEditableStream(&streams[1], NULL); - ok(hres == AVIERR_OK, "1: got 0x%x and %p (expected AVIERR_OK)\n", hres, streams[1]); + ok(hres == AVIERR_OK, "1: got 0x%lx and %p (expected AVIERR_OK)\n", hres, streams[1]);
SetLastError(0xdeadbeef); hres = EditStreamSetNameA(streams[0], winetest0); - ok(hres == AVIERR_OK, "0: got 0x%x (expected AVIERR_OK)\n", hres); + ok(hres == AVIERR_OK, "0: got 0x%lx (expected AVIERR_OK)\n", hres);
SetLastError(0xdeadbeef); hres = EditStreamSetNameA(streams[1], winetest1); - ok(hres == AVIERR_OK, "1: got 0x%x (expected AVIERR_OK)\n", hres); + ok(hres == AVIERR_OK, "1: got 0x%lx (expected AVIERR_OK)\n", hres);
if (winetest_interactive) { SetLastError(0xdeadbeef); res = AVISaveOptions(0, ICMF_CHOOSE_DATARATE |ICMF_CHOOSE_KEYFRAME | ICMF_CHOOSE_ALLCOMPRESSORS, 2, streams, poptions); - trace("got %u with 0x%x/%u\n", res, GetLastError(), GetLastError()); + trace("got %lu with 0x%lx/%lu\n", res, GetLastError(), GetLastError()); }
SetLastError(0xdeadbeef); lres = AVISaveOptionsFree(2, poptions); - ok(lres == AVIERR_OK, "got 0x%x with 0x%x/%u\n", lres, GetLastError(), GetLastError()); + ok(lres == AVIERR_OK, "got 0x%lx with 0x%lx/%lu\n", lres, GetLastError(), GetLastError());
SetLastError(0xdeadbeef); res = AVIStreamRelease(streams[0]); - ok(res == 0, "0: got refcount %u (expected 0)\n", res); + ok(res == 0, "0: got refcount %lu (expected 0)\n", res);
SetLastError(0xdeadbeef); res = AVIStreamRelease(streams[1]); - ok(res == 0, "1: got refcount %u (expected 0)\n", res); + ok(res == 0, "1: got refcount %lu (expected 0)\n", res);
}
@@ -230,14 +230,14 @@ static void test_EditStreamSetInfo(void) AVISTREAMINFOA info, info2;
hres = CreateEditableStream(&stream, NULL); - ok(hres == AVIERR_OK, "got 0x%08X, expected AVIERR_OK\n", hres); + ok(hres == AVIERR_OK, "got 0x%08lX, expected AVIERR_OK\n", hres);
/* Size parameter is somehow checked (notice the crash with size=-1 below) */ hres = EditStreamSetInfoA(stream, NULL, 0); - ok( hres == AVIERR_BADSIZE, "got 0x%08X, expected AVIERR_BADSIZE\n", hres); + ok( hres == AVIERR_BADSIZE, "got 0x%08lX, expected AVIERR_BADSIZE\n", hres);
hres = EditStreamSetInfoA(stream, NULL, sizeof(AVISTREAMINFOA)-1 ); - ok( hres == AVIERR_BADSIZE, "got 0x%08X, expected AVIERR_BADSIZE\n", hres); + ok( hres == AVIERR_BADSIZE, "got 0x%08lX, expected AVIERR_BADSIZE\n", hres);
if(0) { @@ -251,15 +251,15 @@ static void test_EditStreamSetInfo(void) }
hres = AVIStreamInfoA(stream, &info, sizeof(info) ); - ok( hres == 0, "got 0x%08X, expected 0\n", hres); + ok( hres == 0, "got 0x%08lX, expected 0\n", hres);
/* Does the function check what's it's updating ? */
#define IS_INFO_UPDATED(m) do { \ hres = EditStreamSetInfoA(stream, &info, sizeof(info) ); \ - ok( hres == 0, "got 0x%08X, expected 0\n", hres); \ + ok( hres == 0, "got 0x%08lX, expected 0\n", hres); \ hres = AVIStreamInfoA(stream, &info2, sizeof(info2) ); \ - ok( hres == 0, "got 0x%08X, expected 0\n", hres); \ + ok( hres == 0, "got 0x%08lX, expected 0\n", hres); \ ok( info2.m == info.m, "EditStreamSetInfo did not update "#m" parameter\n" ); \ } while(0)
@@ -403,80 +403,80 @@ static void test_default_data(void) res = AVIStreamReadFormat(pStream1, AVIStreamStart(pStream1), &wfx, &lSize); ok(res == 0, "Unable to read format: error=%u\n", res);
- ok(asi0.fccType == streamtypeVIDEO, "got 0x%x (expected streamtypeVIDEO)\n", asi0.fccType); - ok(asi0.fccHandler == 0x30323449, "got 0x%x (expected 0x30323449)\n", asi0.fccHandler); - ok(asi0.dwFlags == 0, "got %u (expected 0)\n", asi0.dwFlags); + ok(asi0.fccType == streamtypeVIDEO, "got 0x%lx (expected streamtypeVIDEO)\n", asi0.fccType); + ok(asi0.fccHandler == 0x30323449, "got 0x%lx (expected 0x30323449)\n", asi0.fccHandler); + ok(asi0.dwFlags == 0, "got %lu (expected 0)\n", asi0.dwFlags); ok(asi0.wPriority == 0, "got %u (expected 0)\n", asi0.wPriority); ok(asi0.wLanguage == 0, "got %u (expected 0)\n", asi0.wLanguage); - ok(asi0.dwScale == 1001, "got %u (expected 1001)\n", asi0.dwScale); - ok(asi0.dwRate == 30000, "got %u (expected 30000)\n", asi0.dwRate); - ok(asi0.dwStart == 0, "got %u (expected 0)\n", asi0.dwStart); - ok(asi0.dwLength == 1, "got %u (expected 1)\n", asi0.dwLength); - ok(asi0.dwInitialFrames == 0, "got %u (expected 0)\n", asi0.dwInitialFrames); - ok(asi0.dwSuggestedBufferSize == 0, "got %u (expected 0)\n", asi0.dwSuggestedBufferSize); - ok(asi0.dwQuality == 0xffffffff, "got 0x%x (expected 0xffffffff)\n", asi0.dwQuality); - ok(asi0.dwSampleSize == 0, "got %u (expected 0)\n", asi0.dwSampleSize); - ok(asi0.rcFrame.left == 0, "got %u (expected 0)\n", asi0.rcFrame.left); - ok(asi0.rcFrame.top == 0, "got %u (expected 0)\n", asi0.rcFrame.top); - ok(asi0.rcFrame.right == 8, "got %u (expected 8)\n", asi0.rcFrame.right); /* these are based on the values in the mah and not */ - ok(asi0.rcFrame.bottom == 6, "got %u (expected 6)\n", asi0.rcFrame.bottom);/* on the ones in the ash which are 0 here */ - ok(asi0.dwEditCount == 0, "got %u (expected 0)\n", asi0.dwEditCount); - ok(asi0.dwFormatChangeCount == 0, "got %u (expected 0)\n", asi0.dwFormatChangeCount); - - ok(asi1.fccType == streamtypeAUDIO, "got 0x%x (expected streamtypeVIDEO)\n", asi1.fccType); - ok(asi1.fccHandler == 0x1, "got 0x%x (expected 0x1)\n", asi1.fccHandler); - ok(asi1.dwFlags == 0, "got %u (expected 0)\n", asi1.dwFlags); + ok(asi0.dwScale == 1001, "got %lu (expected 1001)\n", asi0.dwScale); + ok(asi0.dwRate == 30000, "got %lu (expected 30000)\n", asi0.dwRate); + ok(asi0.dwStart == 0, "got %lu (expected 0)\n", asi0.dwStart); + ok(asi0.dwLength == 1, "got %lu (expected 1)\n", asi0.dwLength); + ok(asi0.dwInitialFrames == 0, "got %lu (expected 0)\n", asi0.dwInitialFrames); + ok(asi0.dwSuggestedBufferSize == 0, "got %lu (expected 0)\n", asi0.dwSuggestedBufferSize); + ok(asi0.dwQuality == 0xffffffff, "got 0x%lx (expected 0xffffffff)\n", asi0.dwQuality); + ok(asi0.dwSampleSize == 0, "got %lu (expected 0)\n", asi0.dwSampleSize); + ok(asi0.rcFrame.left == 0, "got %lu (expected 0)\n", asi0.rcFrame.left); + ok(asi0.rcFrame.top == 0, "got %lu (expected 0)\n", asi0.rcFrame.top); + ok(asi0.rcFrame.right == 8, "got %lu (expected 8)\n", asi0.rcFrame.right); /* these are based on the values in the mah and not */ + ok(asi0.rcFrame.bottom == 6, "got %lu (expected 6)\n", asi0.rcFrame.bottom);/* on the ones in the ash which are 0 here */ + ok(asi0.dwEditCount == 0, "got %lu (expected 0)\n", asi0.dwEditCount); + ok(asi0.dwFormatChangeCount == 0, "got %lu (expected 0)\n", asi0.dwFormatChangeCount); + + ok(asi1.fccType == streamtypeAUDIO, "got 0x%lx (expected streamtypeVIDEO)\n", asi1.fccType); + ok(asi1.fccHandler == 0x1, "got 0x%lx (expected 0x1)\n", asi1.fccHandler); + ok(asi1.dwFlags == 0, "got %lu (expected 0)\n", asi1.dwFlags); ok(asi1.wPriority == 0, "got %u (expected 0)\n", asi1.wPriority); ok(asi1.wLanguage == 0, "got %u (expected 0)\n", asi1.wLanguage); - ok(asi1.dwScale == 1, "got %u (expected 1)\n", asi1.dwScale); - ok(asi1.dwRate == 11025, "got %u (expected 11025)\n", asi1.dwRate); - ok(asi1.dwStart == 0, "got %u (expected 0)\n", asi1.dwStart); - ok(asi1.dwLength == 1637, "got %u (expected 1637)\n", asi1.dwLength); - ok(asi1.dwInitialFrames == 0, "got %u (expected 0)\n", asi1.dwInitialFrames); - ok(asi1.dwSuggestedBufferSize == 0, "got %u (expected 0)\n", asi1.dwSuggestedBufferSize); - ok(asi1.dwQuality == 0xffffffff, "got 0x%x (expected 0xffffffff)\n", asi1.dwQuality); - ok(asi1.dwSampleSize == 2, "got %u (expected 2)\n", asi1.dwSampleSize); - ok(asi1.rcFrame.left == 0, "got %u (expected 0)\n", asi1.rcFrame.left); - ok(asi1.rcFrame.top == 0, "got %u (expected 0)\n", asi1.rcFrame.top); - ok(asi1.rcFrame.right == 0, "got %u (expected 0)\n", asi1.rcFrame.right); - ok(asi1.rcFrame.bottom == 0, "got %u (expected 0)\n", asi1.rcFrame.bottom); - ok(asi1.dwEditCount == 0, "got %u (expected 0)\n", asi1.dwEditCount); - ok(asi1.dwFormatChangeCount == 0, "got %u (expected 0)\n", asi1.dwFormatChangeCount); + ok(asi1.dwScale == 1, "got %lu (expected 1)\n", asi1.dwScale); + ok(asi1.dwRate == 11025, "got %lu (expected 11025)\n", asi1.dwRate); + ok(asi1.dwStart == 0, "got %lu (expected 0)\n", asi1.dwStart); + ok(asi1.dwLength == 1637, "got %lu (expected 1637)\n", asi1.dwLength); + ok(asi1.dwInitialFrames == 0, "got %lu (expected 0)\n", asi1.dwInitialFrames); + ok(asi1.dwSuggestedBufferSize == 0, "got %lu (expected 0)\n", asi1.dwSuggestedBufferSize); + ok(asi1.dwQuality == 0xffffffff, "got 0x%lx (expected 0xffffffff)\n", asi1.dwQuality); + ok(asi1.dwSampleSize == 2, "got %lu (expected 2)\n", asi1.dwSampleSize); + ok(asi1.rcFrame.left == 0, "got %lu (expected 0)\n", asi1.rcFrame.left); + ok(asi1.rcFrame.top == 0, "got %lu (expected 0)\n", asi1.rcFrame.top); + ok(asi1.rcFrame.right == 0, "got %lu (expected 0)\n", asi1.rcFrame.right); + ok(asi1.rcFrame.bottom == 0, "got %lu (expected 0)\n", asi1.rcFrame.bottom); + ok(asi1.dwEditCount == 0, "got %lu (expected 0)\n", asi1.dwEditCount); + ok(asi1.dwFormatChangeCount == 0, "got %lu (expected 0)\n", asi1.dwFormatChangeCount);
ok(wfx.wFormatTag == 1, "got %u (expected 1)\n",wfx.wFormatTag); ok(wfx.nChannels == 2, "got %u (expected 2)\n",wfx.nChannels); ok(wfx.wFormatTag == 1, "got %u (expected 1)\n",wfx.wFormatTag); - ok(wfx.nSamplesPerSec == 11025, "got %u (expected 11025)\n",wfx.nSamplesPerSec); - ok(wfx.nAvgBytesPerSec == 22050, "got %u (expected 22050)\n",wfx.nAvgBytesPerSec); + ok(wfx.nSamplesPerSec == 11025, "got %lu (expected 11025)\n",wfx.nSamplesPerSec); + ok(wfx.nAvgBytesPerSec == 22050, "got %lu (expected 22050)\n",wfx.nAvgBytesPerSec); ok(wfx.nBlockAlign == 2, "got %u (expected 2)\n",wfx.nBlockAlign);
refcount = get_file_refcount(pFile); - ok(refcount == 3, "got %u (expected 3)\n", refcount); + ok(refcount == 3, "got %lu (expected 3)\n", refcount);
AVIStreamRelease(pStream0);
refcount = get_file_refcount(pFile); - ok(refcount == 2, "got %u (expected 2)\n", refcount); + ok(refcount == 2, "got %lu (expected 2)\n", refcount);
AVIStreamAddRef(pStream1);
refcount = get_file_refcount(pFile); - ok(refcount == 2, "got %u (expected 2)\n", refcount); + ok(refcount == 2, "got %lu (expected 2)\n", refcount);
AVIStreamRelease(pStream1); AVIStreamRelease(pStream1);
refcount = get_file_refcount(pFile); - ok(refcount == 1, "got %u (expected 1)\n", refcount); + ok(refcount == 1, "got %lu (expected 1)\n", refcount);
refcount = AVIStreamRelease(pStream1); - ok(refcount == (ULONG)-1, "got %u (expected 4294967295)\n", refcount); + ok(refcount == (ULONG)-1, "got %lu (expected 4294967295)\n", refcount);
refcount = get_file_refcount(pFile); - ok(refcount == 1, "got %u (expected 1)\n", refcount); + ok(refcount == 1, "got %lu (expected 1)\n", refcount);
refcount = AVIFileRelease(pFile); - ok(refcount == 0, "got %u (expected 0)\n", refcount); + ok(refcount == 0, "got %lu (expected 0)\n", refcount);
ok(DeleteFileA(filename) !=0, "Deleting file %s failed\n", filename); } @@ -531,7 +531,7 @@ static void test_ash1_corruption(void)
/* The result will still be 2, because the value is dynamically replaced with the nBlockAlign value from the stream format header. The next test will prove this */ - ok(asi1.dwSampleSize == 2, "got %u (expected 2)\n", asi1.dwSampleSize); + ok(asi1.dwSampleSize == 2, "got %lu (expected 2)\n", asi1.dwSampleSize);
AVIStreamRelease(pStream1); AVIFileRelease(pFile); @@ -565,7 +565,7 @@ static void test_ash1_corruption2(void) ok(AVIStreamInfoA(pStream1, &asi1, sizeof(asi1)) == 0, "Unable to read stream info\n");
/* The result will also be the corrupt value, as explained above. */ - ok(asi1.dwSampleSize == 0xdead, "got 0x%x (expected 0xdead)\n", asi1.dwSampleSize); + ok(asi1.dwSampleSize == 0xdead, "got 0x%lx (expected 0xdead)\n", asi1.dwSampleSize);
AVIStreamRelease(pStream1); AVIFileRelease(pFile); @@ -601,10 +601,10 @@ static HRESULT WINAPI unk_QueryInterface(IUnknown *iface, REFIID riid, void **pp if (hr == S_OK) { trace("Working around COM aggregation ref counting bug\n"); - ok(ref == This->ref, "Outer ref count expected %d got %d\n", ref, This->ref); + ok(ref == This->ref, "Outer ref count expected %ld got %ld\n", ref, This->ref); IUnknown_AddRef((IUnknown*)*ppv); ref = IUnknown_Release(This->inner_unk); - ok(ref == 1, "Inner ref count expected 1 got %d\n", ref); + ok(ref == 1, "Inner ref count expected 1 got %ld\n", ref); }
return hr; @@ -643,40 +643,40 @@ static void test_COM(void) /* COM aggregation */ hr = CoCreateInstance(&CLSID_AVIFile, &unk_obj.IUnknown_iface, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&unk_obj.inner_unk); - ok(hr == S_OK, "COM aggregation failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "COM aggregation failed: %08lx, expected S_OK\n", hr); hr = IUnknown_QueryInterface(&unk_obj.IUnknown_iface, &IID_IAVIFile, (void**)&avif); - ok(hr == S_OK, "QueryInterface for IID_IAVIFile failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IAVIFile failed: %08lx\n", hr); refcount = IAVIFile_AddRef(avif); ok(refcount == unk_obj.ref, "AVIFile just pretends to support COM aggregation\n"); refcount = IAVIFile_Release(avif); ok(refcount == unk_obj.ref, "AVIFile just pretends to support COM aggregation\n"); hr = IAVIFile_QueryInterface(avif, &IID_IPersistFile, (void**)&pf); - ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08lx\n", hr); refcount = IPersistFile_Release(pf); ok(refcount == unk_obj.ref, "AVIFile just pretends to support COM aggregation\n"); refcount = IAVIFile_Release(avif); - ok(refcount == 19, "Outer ref count should be back at 19 but is %d\n", refcount); + ok(refcount == 19, "Outer ref count should be back at 19 but is %ld\n", refcount); refcount = IUnknown_Release(unk_obj.inner_unk); - ok(refcount == 0, "Inner ref count should be 0 but is %u\n", refcount); + ok(refcount == 0, "Inner ref count should be 0 but is %lu\n", refcount);
/* Invalid RIID */ hr = CoCreateInstance(&CLSID_AVIFile, NULL, CLSCTX_INPROC_SERVER, &IID_IAVIStream, (void**)&avif); - ok(hr == E_NOINTERFACE, "AVIFile create failed: %08x, expected E_NOINTERFACE\n", hr); + ok(hr == E_NOINTERFACE, "AVIFile create failed: %08lx, expected E_NOINTERFACE\n", hr);
/* Same refcount */ hr = CoCreateInstance(&CLSID_AVIFile, NULL, CLSCTX_INPROC_SERVER, &IID_IAVIFile, (void**)&avif); - ok(hr == S_OK, "AVIFile create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "AVIFile create failed: %08lx, expected S_OK\n", hr); refcount = IAVIFile_AddRef(avif); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); hr = IAVIFile_QueryInterface(avif, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); hr = IAVIFile_QueryInterface(avif, &IID_IPersistFile, (void**)&pf); - ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08lx\n", hr); refcount = IPersistFile_AddRef(pf); - ok(refcount == 6, "refcount == %u, expected 6\n", refcount); + ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
while (IAVIFile_Release(avif)); } @@ -694,49 +694,49 @@ static void test_COM_wavfile(void) /* COM aggregation */ hr = CoCreateInstance(&CLSID_WAVFile, &unk_obj.IUnknown_iface, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&unk_obj.inner_unk); - ok(hr == S_OK, "COM aggregation failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "COM aggregation failed: %08lx, expected S_OK\n", hr); hr = IUnknown_QueryInterface(&unk_obj.IUnknown_iface, &IID_IAVIFile, (void**)&avif); - ok(hr == S_OK, "QueryInterface for IID_IAVIFile failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IAVIFile failed: %08lx\n", hr); refcount = IAVIFile_AddRef(avif); ok(refcount == unk_obj.ref, "WAVFile just pretends to support COM aggregation\n"); refcount = IAVIFile_Release(avif); ok(refcount == unk_obj.ref, "WAVFile just pretends to support COM aggregation\n"); hr = IAVIFile_QueryInterface(avif, &IID_IPersistFile, (void**)&pf); - ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08lx\n", hr); refcount = IPersistFile_Release(pf); ok(refcount == unk_obj.ref, "WAVFile just pretends to support COM aggregation\n"); refcount = IAVIFile_Release(avif); - ok(refcount == 19, "Outer ref count should be back at 19 but is %d\n", refcount); + ok(refcount == 19, "Outer ref count should be back at 19 but is %ld\n", refcount); refcount = IUnknown_Release(unk_obj.inner_unk); - ok(refcount == 0, "Inner ref count should be 0 but is %u\n", refcount); + ok(refcount == 0, "Inner ref count should be 0 but is %lu\n", refcount);
/* Invalid RIID */ hr = CoCreateInstance(&CLSID_WAVFile, NULL, CLSCTX_INPROC_SERVER, &IID_IAVIStreaming, (void**)&avif); - ok(hr == E_NOINTERFACE, "WAVFile create failed: %08x, expected E_NOINTERFACE\n", hr); + ok(hr == E_NOINTERFACE, "WAVFile create failed: %08lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all WAVFile interfaces */ hr = CoCreateInstance(&CLSID_WAVFile, NULL, CLSCTX_INPROC_SERVER, &IID_IAVIFile, (void**)&avif); - ok(hr == S_OK, "WAVFile create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "WAVFile create failed: %08lx, expected S_OK\n", hr); refcount = IAVIFile_AddRef(avif); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IAVIFile_QueryInterface(avif, &IID_IPersistFile, (void**)&pf); - ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08lx\n", hr); refcount = IPersistFile_AddRef(pf); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); refcount = IPersistFile_Release(pf);
hr = IAVIFile_QueryInterface(avif, &IID_IAVIStream, (void**)&avis); - ok(hr == S_OK, "QueryInterface for IID_IAVIStream failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IAVIStream failed: %08lx\n", hr); refcount = IAVIStream_AddRef(avis); - ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + ok(refcount == 5, "refcount == %lu, expected 5\n", refcount); refcount = IAVIStream_Release(avis);
hr = IAVIFile_QueryInterface(avif, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 6, "refcount == %u, expected 6\n", refcount); + ok(refcount == 6, "refcount == %lu, expected 6\n", refcount); refcount = IUnknown_Release(unk);
while (IAVIFile_Release(avif)); @@ -752,20 +752,20 @@ static void test_COM_editstream(void)
/* Same refcount for all AVIEditStream interfaces */ hr = CreateEditableStream(&stream, NULL); - ok(hr == S_OK, "AVIEditStream create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "AVIEditStream create failed: %08lx, expected S_OK\n", hr); refcount = IAVIStream_AddRef(stream); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IAVIStream_QueryInterface(stream, &IID_IAVIEditStream, (void**)&edit); - ok(hr == S_OK, "QueryInterface for IID_IAVIEditStream failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IAVIEditStream failed: %08lx\n", hr); refcount = IAVIEditStream_AddRef(edit); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); refcount = IAVIEditStream_Release(edit);
hr = IAVIEditStream_QueryInterface(edit, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + ok(refcount == 5, "refcount == %lu, expected 5\n", refcount); IUnknown_Release(unk);
while (IAVIEditStream_Release(edit));
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109047
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/cabinet/tests/Makefile.in | 1 - dlls/cabinet/tests/extract.c | 22 ++++++++-------- dlls/cabinet/tests/fdi.c | 54 ++++++++++++++++++++-------------------- 3 files changed, 38 insertions(+), 39 deletions(-)
diff --git a/dlls/cabinet/tests/Makefile.in b/dlls/cabinet/tests/Makefile.in index 0a1f708ad22..f301617473d 100644 --- a/dlls/cabinet/tests/Makefile.in +++ b/dlls/cabinet/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = cabinet.dll IMPORTS = cabinet
diff --git a/dlls/cabinet/tests/extract.c b/dlls/cabinet/tests/extract.c index c3d45102f2d..2e37dc7cda6 100644 --- a/dlls/cabinet/tests/extract.c +++ b/dlls/cabinet/tests/extract.c @@ -379,7 +379,7 @@ static void test_Extract(void) session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; res = pExtract(&session, "extract.cab"); node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); @@ -410,7 +410,7 @@ static void test_Extract(void) session.Operation = EXTRACT_FILLFILELIST; res = pExtract(&session, "extract.cab"); node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); @@ -435,7 +435,7 @@ static void test_Extract(void) session.Operation = EXTRACT_EXTRACTFILES; res = pExtract(&session, "extract.cab"); node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); @@ -463,7 +463,7 @@ static void test_Extract(void) /* Extract does not extract files if the dest dir does not exist */ res = pExtract(&session, "extract.cab"); node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); @@ -496,7 +496,7 @@ static void test_Extract(void) CreateDirectoryA("dest", NULL); res = pExtract(&session, "extract.cab"); node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); @@ -524,7 +524,7 @@ static void test_Extract(void) session.FileList = NULL; res = pExtract(&session, "extract.cab"); node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); @@ -550,7 +550,7 @@ static void test_Extract(void) session.Operation = 0; res = pExtract(&session, "extract.cab"); node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); @@ -576,7 +576,7 @@ static void test_Extract(void) session.FilterList = session.FileList; res = pExtract(&session, "extract.cab"); node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); + ok(res == S_OK, "Expected S_OK, got %ld\n", res); ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); @@ -610,7 +610,7 @@ static void test_Extract(void) res = pExtract(&session, "nonexistent.cab"); node = session.FileList; ok(res == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", res); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", res); ok(session.Error.erfOper == FDIERROR_CABINET_NOT_FOUND, "Expected FDIERROR_CABINET_NOT_FOUND, got %d\n", session.Error.erfOper); ok(session.FileSize == 0, "Expected 0, got %d\n", session.FileSize); @@ -643,7 +643,7 @@ static void test_Extract(void) res = pExtract(&session, "extract.cab"); node = session.FileList; ok(res == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) || res == E_FAIL, - "Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08x\n", res); + "Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08lx\n", res); ok(session.FileSize == 6, "Expected 6, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_USER_ABORT, "Expected FDIERROR_USER_ABORT, got %d\n", session.Error.erfOper); @@ -681,7 +681,7 @@ static void test_Extract(void) res = pExtract(&session, "extract.cab"); node = session.FileList; ok(res == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) || res == E_FAIL, - "Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08x\n", res); + "Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08lx\n", res); ok(session.FileSize == 26, "Expected 26, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_USER_ABORT, "Expected FDIERROR_USER_ABORT, got %d\n", session.Error.erfOper); diff --git a/dlls/cabinet/tests/fdi.c b/dlls/cabinet/tests/fdi.c index 732f816bda3..a44f9eeae2d 100644 --- a/dlls/cabinet/tests/fdi.c +++ b/dlls/cabinet/tests/fdi.c @@ -190,7 +190,7 @@ static INT_PTR CDECL fdi_open_static(char *pszFile, int oflag, int pmode)
static UINT CDECL fdi_read_static(INT_PTR hf, void *pv, UINT cb) { - ok(hf == 0, "unexpected hf %lx\n", hf); + ok(hf == 0, "unexpected hf %Ix\n", hf); return fdi_read(static_fdi_handle, pv, cb); }
@@ -208,7 +208,7 @@ static int CDECL fdi_close_static(INT_PTR hf)
static LONG CDECL fdi_seek_static(INT_PTR hf, LONG dist, int seektype) { - ok(hf == 0, "unexpected hf %lx\n", hf); + ok(hf == 0, "unexpected hf %Ix\n", hf); return fdi_seek(static_fdi_handle, dist, seektype); }
@@ -233,7 +233,7 @@ static void test_FDICreate(void) cpuUNKNOWN, &erf); ok(hfdi != NULL, "Expected non-NULL context\n"); ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(erf.erfOper == 0x1abe11ed, "Expected 0x1abe11ed, got %d\n", erf.erfOper); ok(erf.erfType == 0x5eed1e55, "Expected 0x5eed1e55, got %d\n", erf.erfType); ok(erf.fError == 0x1ead1e55, "Expected 0x1ead1e55, got %d\n", erf.fError); @@ -250,7 +250,7 @@ static void test_FDICreate(void) cpuUNKNOWN, &erf); ok(hfdi != NULL, "Expected non-NULL context\n"); ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok((erf.erfOper == 0x1abe11ed || erf.erfOper == 0 /* Vista */), "Expected 0x1abe11ed or 0, got %d\n", erf.erfOper); ok((erf.erfType == 0x5eed1e55 || erf.erfType == 0 /* Vista */), "Expected 0x5eed1e55 or 0, got %d\n", erf.erfType); ok((erf.fError == 0x1ead1e55 || erf.fError == 0 /* Vista */), "Expected 0x1ead1e55 or 0, got %d\n", erf.fError); @@ -266,7 +266,7 @@ static void test_FDICreate(void) cpuUNKNOWN, &erf); ok(hfdi != NULL, "Expected non-NULL context\n"); ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok((erf.erfOper == 0x1abe11ed || erf.erfOper == 0 /* Vista */), "Expected 0x1abe11ed or 0, got %d\n", erf.erfOper); ok((erf.erfType == 0x5eed1e55 || erf.erfType == 0 /* Vista */), "Expected 0x5eed1e55 or 0, got %d\n", erf.erfType); ok((erf.fError == 0x1ead1e55 || erf.fError == 0 /* Vista */), "Expected 0x1ead1e55 or 0, got %d\n", erf.fError); @@ -282,7 +282,7 @@ static void test_FDICreate(void) cpuUNKNOWN, &erf); ok(hfdi != NULL, "Expected non-NULL context\n"); ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok((erf.erfOper == 0x1abe11ed || erf.erfOper == 0 /* Vista */), "Expected 0x1abe11ed or 0, got %d\n", erf.erfOper); ok((erf.erfType == 0x5eed1e55 || erf.erfType == 0 /* Vista */), "Expected 0x5eed1e55 or 0, got %d\n", erf.erfType); ok((erf.fError == 0x1ead1e55 || erf.fError == 0 /* Vista */), "Expected 0x1ead1e55 or 0, got %d\n", erf.fError); @@ -298,7 +298,7 @@ static void test_FDICreate(void) cpuUNKNOWN, &erf); ok(hfdi != NULL, "Expected non-NULL context\n"); ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok((erf.erfOper == 0x1abe11ed || erf.erfOper == 0 /* Vista */), "Expected 0x1abe11ed or 0, got %d\n", erf.erfOper); ok((erf.erfType == 0x5eed1e55 || erf.erfType == 0 /* Vista */), "Expected 0x5eed1e55 or 0, got %d\n", erf.erfType); ok((erf.fError == 0x1ead1e55 || erf.fError == 0 /* Vista */), "Expected 0x1ead1e55 or 0, got %d\n", erf.fError); @@ -314,7 +314,7 @@ static void test_FDICreate(void) cpuUNKNOWN, &erf); ok(hfdi != NULL, "Expected non-NULL context\n"); ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok((erf.erfOper == 0x1abe11ed || erf.erfOper == 0 /* Vista */), "Expected 0x1abe11ed or 0, got %d\n", erf.erfOper); ok((erf.erfType == 0x5eed1e55 || erf.erfType == 0 /* Vista */), "Expected 0x5eed1e55 or 0, got %d\n", erf.erfType); ok((erf.fError == 0x1ead1e55 || erf.fError == 0 /* Vista */), "Expected 0x1ead1e55 or 0, got %d\n", erf.fError); @@ -330,7 +330,7 @@ static void test_FDICreate(void) cpuUNKNOWN, NULL); /* XP sets hfdi to a non-NULL value, but Vista sets it to NULL! */ ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); /* NULL is passed to FDICreate instead of &erf, so don't retest the erf member values. */
FDIDestroy(hfdi); @@ -345,7 +345,7 @@ static void test_FDICreate(void) 0xcafebabe, &erf); ok(hfdi != NULL, "Expected non-NULL context\n"); ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok((erf.erfOper == 0x1abe11ed || erf.erfOper == 0 /* Vista */), "Expected 0x1abe11ed or 0, got %d\n", erf.erfOper); ok((erf.erfType == 0x5eed1e55 || erf.erfType == 0 /* Vista */), "Expected 0x5eed1e55 or 0, got %d\n", erf.erfType); ok((erf.fError == 0x1ead1e55 || erf.fError == 0 /* Vista */), "Expected 0x1ead1e55 or 0, got %d\n", erf.fError); @@ -365,7 +365,7 @@ static void test_FDICreate(void) "Expected FDIERROR_ALLOC_FAIL, got %d\n", erf.erfOper); ok(erf.fError == TRUE, "Expected TRUE, got %d\n", erf.fError); ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(erf.erfType == 0, "Expected 0, got %d\n", erf.erfType); }
@@ -668,8 +668,8 @@ static void test_FDIIsCabinet(void) ret = FDIIsCabinet(hfdi, -1, &cabinfo); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - ok(cabinfo.cbCabinet == 0, "Expected 0, got %d\n", cabinfo.cbCabinet); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); + ok(cabinfo.cbCabinet == 0, "Expected 0, got %ld\n", cabinfo.cbCabinet); ok(cabinfo.cFiles == 0, "Expected 0, got %d\n", cabinfo.cFiles); ok(cabinfo.cFolders == 0, "Expected 0, got %d\n", cabinfo.cFolders); ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet); @@ -683,8 +683,8 @@ static void test_FDIIsCabinet(void) SetLastError(0xdeadbeef); ret = FDIIsCabinet(hfdi, fd, &cabinfo); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(cabinfo.cbCabinet == 0, "Expected 0, got %d\n", cabinfo.cbCabinet); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); + ok(cabinfo.cbCabinet == 0, "Expected 0, got %ld\n", cabinfo.cbCabinet); ok(cabinfo.cFiles == 0, "Expected 0, got %d\n", cabinfo.cFiles); ok(cabinfo.cFolders == 0, "Expected 0, got %d\n", cabinfo.cFolders); ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet); @@ -699,11 +699,11 @@ static void test_FDIIsCabinet(void) SetLastError(0xdeadbeef); ret = FDIIsCabinet(hfdi, fd, &cabinfo); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(cabinfo.cFiles == 4, "Expected 4, got %d\n", cabinfo.cFiles); ok(cabinfo.cFolders == 1, "Expected 1, got %d\n", cabinfo.cFolders); ok(cabinfo.setID == 0xbeef, "Expected 0xbeef, got %d\n", cabinfo.setID); - ok(cabinfo.cbCabinet == 182, "Expected 182, got %d\n", cabinfo.cbCabinet); + ok(cabinfo.cbCabinet == 182, "Expected 182, got %ld\n", cabinfo.cbCabinet); ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet);
fdi_close(fd); @@ -720,11 +720,11 @@ static void test_FDIIsCabinet(void) SetLastError(0xdeadbeef); ret = FDIIsCabinet(hfdi, 0, &cabinfo); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(cabinfo.cFiles == 4, "Expected 4, got %d\n", cabinfo.cFiles); ok(cabinfo.cFolders == 1, "Expected 1, got %d\n", cabinfo.cFolders); ok(cabinfo.setID == 0xbeef, "Expected 0xbeef, got %d\n", cabinfo.setID); - ok(cabinfo.cbCabinet == 182, "Expected 182, got %d\n", cabinfo.cbCabinet); + ok(cabinfo.cbCabinet == 182, "Expected 182, got %ld\n", cabinfo.cbCabinet); ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet);
fdi_close(static_fdi_handle); @@ -778,9 +778,9 @@ static UINT CDECL fdi_mem_write(INT_PTR hf, void *pv, UINT cb) { static const char expected[] = "Hello World!";
- trace("mem_write(%#lx,%p,%u)\n", hf, pv, cb); + trace("mem_write(%#Ix,%p,%u)\n", hf, pv, cb);
- ok(hf == 0x12345678, "expected 0x12345678, got %#lx\n", hf); + ok(hf == 0x12345678, "expected 0x12345678, got %#Ix\n", hf); ok(cb == 12, "expected 12, got %u\n", cb); ok(!memcmp(pv, expected, 12), "expected %s, got %s\n", expected, (const char *)pv);
@@ -827,7 +827,7 @@ static INT_PTR CDECL fdi_mem_notify(FDINOTIFICATIONTYPE fdint, FDINOTIFICATION * switch (fdint) { case fdintCLOSE_FILE_INFO: - trace("mem_notify: CLOSE_FILE_INFO %s, handle %#lx\n", info->psz1, info->hf); + trace("mem_notify: CLOSE_FILE_INFO %s, handle %#Ix\n", info->psz1, info->hf);
ok(!strcmp(info->psz1, expected), "expected %s, got %s\n", expected, info->psz1); ok(info->date == 0x1225, "expected 0x1225, got %#x\n", info->date); @@ -838,9 +838,9 @@ static INT_PTR CDECL fdi_mem_notify(FDINOTIFICATIONTYPE fdint, FDINOTIFICATION *
case fdintCOPY_FILE: { - trace("mem_notify: COPY_FILE %s, %d bytes\n", info->psz1, info->cb); + trace("mem_notify: COPY_FILE %s, %ld bytes\n", info->psz1, info->cb);
- ok(info->cb == 12, "expected 12, got %u\n", info->cb); + ok(info->cb == 12, "expected 12, got %lu\n", info->cb); ok(!strcmp(info->psz1, expected), "expected %s, got %s\n", expected, info->psz1); ok(info->iFolder == 0x1234, "expected 0x1234, got %#x\n", info->iFolder); return 0x12345678; /* call write() callback */ @@ -893,7 +893,7 @@ static void test_FDICopy(void) ret = FDICopy(hfdi, name, path, 0, CopyProgress, NULL, 0); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
FDIDestroy(hfdi); } @@ -910,7 +910,7 @@ static void test_FDICopy(void) SetLastError(0xdeadbeef); ret = FDICopy(hfdi, name, path, 0, CopyProgress, NULL, 0); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(GetLastError() == 0, "Expected 0f, got %d\n", GetLastError()); + ok(GetLastError() == 0, "Expected 0f, got %ld\n", GetLastError());
FDIDestroy(hfdi);
@@ -927,7 +927,7 @@ static void test_FDICopy(void) memset(&info, 0, sizeof(info)); ret = FDIIsCabinet(hfdi, fd, &info); ok(ret, "FDIIsCabinet error %d\n", erf.erfOper); - ok(info.cbCabinet == 0x59, "expected 0x59, got %#x\n", info.cbCabinet); + ok(info.cbCabinet == 0x59, "expected 0x59, got %#lx\n", info.cbCabinet); ok(info.cFiles == 1, "expected 1, got %d\n", info.cFiles); ok(info.cFolders == 1, "expected 1, got %d\n", info.cFolders); ok(info.setID == 0x1225, "expected 0x1225, got %#x\n", info.setID);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109048
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/comcat/tests/Makefile.in | 1 - dlls/comcat/tests/comcat.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/comcat/tests/Makefile.in b/dlls/comcat/tests/Makefile.in index 905bb1dcd0c..51e92329a05 100644 --- a/dlls/comcat/tests/Makefile.in +++ b/dlls/comcat/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = comcat.dll IMPORTS = ole32 advapi32
diff --git a/dlls/comcat/tests/comcat.c b/dlls/comcat/tests/comcat.c index 97048cc46b8..b561756f9da 100644 --- a/dlls/comcat/tests/comcat.c +++ b/dlls/comcat/tests/comcat.c @@ -29,7 +29,7 @@
#include "wine/test.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
static BOOL register_testentry(void) { @@ -88,8 +88,8 @@ static void do_enum(void) ok_ole_success(hr,"ICatInformation_EnumClassesOfCategories");
hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched); - ok (hr == S_FALSE,"Expected S_FALSE, got 0x%08x\n", hr); - ok (fetched == 0,"Fetched wrong number of guids %u\n",fetched); + ok (hr == S_FALSE,"Expected S_FALSE, got 0x%08lx\n", hr); + ok (fetched == 0,"Fetched wrong number of guids %lu\n",fetched); IEnumGUID_Release(pIEnum);
if (register_testentry()) @@ -98,8 +98,8 @@ static void do_enum(void) ok_ole_success(hr,"ICatInformation_EnumClassesOfCategories");
hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched); - ok (hr == S_OK,"Expected S_OK, got 0x%08x\n", hr); - ok (fetched == 1,"Fetched wrong number of guids %u\n",fetched); + ok (hr == S_OK,"Expected S_OK, got 0x%08lx\n", hr); + ok (fetched == 1,"Fetched wrong number of guids %lu\n",fetched); ok (IsEqualGUID(the_guid,&wanted_guid),"Guids do not match\n");
IEnumGUID_Release(pIEnum);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109049
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/comdlg32/tests/Makefile.in | 1 dlls/comdlg32/tests/filedlg.c | 126 +++-- dlls/comdlg32/tests/finddlg.c | 2 dlls/comdlg32/tests/fontdlg.c | 8 dlls/comdlg32/tests/itemdlg.c | 936 ++++++++++++++++++++------------------- dlls/comdlg32/tests/printdlg.c | 56 +- 6 files changed, 564 insertions(+), 565 deletions(-)
diff --git a/dlls/comdlg32/tests/Makefile.in b/dlls/comdlg32/tests/Makefile.in index 451f9e54275..96c53ae25aa 100644 --- a/dlls/comdlg32/tests/Makefile.in +++ b/dlls/comdlg32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = comdlg32.dll IMPORTS = uuid shell32 ole32 comdlg32 winspool user32 gdi32
diff --git a/dlls/comdlg32/tests/filedlg.c b/dlls/comdlg32/tests/filedlg.c index 142eb371a46..318baabc1ef 100644 --- a/dlls/comdlg32/tests/filedlg.c +++ b/dlls/comdlg32/tests/filedlg.c @@ -50,7 +50,7 @@ static void toolbarcheck( HWND hDlg) } ok( ctrl != NULL, "could not get the toolbar control\n"); ret = SendMessageA( ctrl, TB_ADDSTRINGA, 0, (LPARAM)"winetestwinetest\0\0"); - ok( ret == 0, "addstring returned %d (expected 0)\n", ret); + ok( ret == 0, "addstring returned %ld (expected 0)\n", ret); maxtextrows = SendMessageA( ctrl, TB_GETTEXTROWS, 0, 0); ok( maxtextrows == 0 || broken(maxtextrows == 1), /* Win2k and below */ "Get(Max)TextRows returned %d (expected 0)\n", maxtextrows); @@ -108,25 +108,25 @@ static void test_DialogCancel(void)
PrintDlgA(NULL); ok(CDERR_INITIALIZATION == CommDlgExtendedError(), - "expected CDERR_INITIALIZATION, got %d\n", CommDlgExtendedError()); + "expected CDERR_INITIALIZATION, got %ld\n", CommDlgExtendedError());
result = GetOpenFileNameA(&ofn); ok(FALSE == result, "expected FALSE, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", + ok(0 == CommDlgExtendedError(), "expected 0, got %ld\n", CommDlgExtendedError());
PrintDlgA(NULL); ok(CDERR_INITIALIZATION == CommDlgExtendedError(), - "expected CDERR_INITIALIZATION, got %d\n", CommDlgExtendedError()); + "expected CDERR_INITIALIZATION, got %ld\n", CommDlgExtendedError());
result = GetSaveFileNameA(&ofn); ok(FALSE == result, "expected FALSE, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", + ok(0 == CommDlgExtendedError(), "expected 0, got %ld\n", CommDlgExtendedError());
PrintDlgA(NULL); ok(CDERR_INITIALIZATION == CommDlgExtendedError(), - "expected CDERR_INITIALIZATION, got %d\n", CommDlgExtendedError()); + "expected CDERR_INITIALIZATION, got %ld\n", CommDlgExtendedError());
/* Before passing the ofn to Unicode functions, remove the ANSI strings */ ofn.lpstrFilter = NULL; @@ -135,7 +135,7 @@ static void test_DialogCancel(void)
PrintDlgA(NULL); ok(CDERR_INITIALIZATION == CommDlgExtendedError(), - "expected CDERR_INITIALIZATION, got %d\n", CommDlgExtendedError()); + "expected CDERR_INITIALIZATION, got %ld\n", CommDlgExtendedError());
SetLastError(0xdeadbeef); result = GetOpenFileNameW((LPOPENFILENAMEW) &ofn); @@ -144,7 +144,7 @@ static void test_DialogCancel(void) else { ok(FALSE == result, "expected FALSE, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", CommDlgExtendedError()); + ok(0 == CommDlgExtendedError(), "expected 0, got %ld\n", CommDlgExtendedError()); }
SetLastError(0xdeadbeef); @@ -154,7 +154,7 @@ static void test_DialogCancel(void) else { ok(FALSE == result, "expected FALSE, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", CommDlgExtendedError()); + ok(0 == CommDlgExtendedError(), "expected 0, got %ld\n", CommDlgExtendedError()); } }
@@ -173,7 +173,7 @@ static UINT_PTR CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wPa RECT rect = {0, 0, 0, 0};
hr = IShellBrowser_QueryActiveShellView(shell_browser, &shell_view); - ok(SUCCEEDED(hr), "QueryActiveShellView returned %#x\n", hr); + ok(SUCCEEDED(hr), "QueryActiveShellView returned %#lx\n", hr); if (FAILED(hr)) goto cleanup;
hr = IShellView_QueryInterface(shell_view, &IID_IShellView2, (void **)&shell_view2); @@ -182,11 +182,11 @@ static UINT_PTR CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wPa win_skip("IShellView2 not supported\n"); goto cleanup; } - ok(SUCCEEDED(hr), "QueryInterface returned %#x\n", hr); + ok(SUCCEEDED(hr), "QueryInterface returned %#lx\n", hr); if (FAILED(hr)) goto cleanup;
hr = IShellView2_DestroyViewWindow(shell_view2); - ok(SUCCEEDED(hr), "DestroyViewWindow returned %#x\n", hr); + ok(SUCCEEDED(hr), "DestroyViewWindow returned %#lx\n", hr);
folder_settings.ViewMode = FVM_LIST; folder_settings.fFlags = 0; @@ -205,17 +205,17 @@ static UINT_PTR CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wPa win_skip("CreateViewWindow2 is broken on Vista/W2K8\n"); goto cleanup; } - ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#x\n", hr); + ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#lx\n", hr); if (FAILED(hr)) goto cleanup;
hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings); - ok(SUCCEEDED(hr), "GetCurrentInfo returned %#x\n", hr); + ok(SUCCEEDED(hr), "GetCurrentInfo returned %#lx\n", hr); ok(folder_settings.ViewMode == FVM_LIST, "view mode is %d, expected FVM_LIST\n", folder_settings.ViewMode);
hr = IShellView2_DestroyViewWindow(shell_view2); - ok(SUCCEEDED(hr), "DestroyViewWindow returned %#x\n", hr); + ok(SUCCEEDED(hr), "DestroyViewWindow returned %#lx\n", hr);
/* XP and W2K3 need this. On W2K the call to DestroyWindow() fails and has * no side effects. NT4 doesn't get here. (FIXME: Vista doesn't get here yet). @@ -224,11 +224,11 @@ static UINT_PTR CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wPa
view_params.pvid = &VID_Details; hr = IShellView2_CreateViewWindow2(shell_view2, &view_params); - ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#x\n", hr); + ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#lx\n", hr); if (FAILED(hr)) goto cleanup;
hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings); - ok(SUCCEEDED(hr), "GetCurrentInfo returned %#x\n", hr); + ok(SUCCEEDED(hr), "GetCurrentInfo returned %#lx\n", hr); ok(folder_settings.ViewMode == FVM_DETAILS || broken(folder_settings.ViewMode == FVM_LIST), /* nt4 */ "view mode is %d, expected FVM_DETAILS\n", folder_settings.ViewMode); @@ -275,9 +275,9 @@ static void test_create_view_window2(void) ofn.lpfnHook = create_view_window2_hook; ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER; ret = GetOpenFileNameA(&ofn); - ok(!ret, "GetOpenFileNameA returned %#x\n", ret); + ok(!ret, "GetOpenFileNameA returned %#lx\n", ret); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); }
static void test_create_view_template(void) @@ -295,9 +295,9 @@ static void test_create_view_template(void) ofn.lpTemplateName = "template1"; ofn.lpstrFilter="text\0*.txt\0All\0*\0\0"; ret = GetOpenFileNameA(&ofn); - ok(!ret, "GetOpenFileNameA returned %#x\n", ret); + ok(!ret, "GetOpenFileNameA returned %#lx\n", ret); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); }
/* test cases for resizing of the file dialog */ @@ -397,10 +397,10 @@ static UINT_PTR WINAPI resize_template_hook(HWND dlg, UINT msg, WPARAM wParam, L GetWindowRect( parent, &rc); todo_wine_if( resize_testcases[index].todo){ ok( resize == rc.right - rc.left - initrc.right + initrc.left, - "testid %d size-x change %d expected %d\n", index, + "testid %d size-x change %ld expected %d\n", index, rc.right - rc.left - initrc.right + initrc.left, resize); ok( resize == rc.bottom - rc.top - initrc.bottom + initrc.top, - "testid %d size-y change %d expected %d\n", index, + "testid %d size-y change %ld expected %d\n", index, rc.bottom - rc.top - initrc.bottom + initrc.top, resize); } if( resize_testcases[index].testcontrols) { @@ -532,9 +532,9 @@ static void test_resize(void) ofn.Flags = resize_testcases[i].flags | OFN_ENABLEHOOK | OFN_EXPLORER| OFN_ENABLETEMPLATE | OFN_SHOWHELP ; ret = GetOpenFileNameA(&ofn); - ok(!ret, "GetOpenFileName returned %#x\n", ret); + ok(!ret, "GetOpenFileName returned %#lx\n", ret); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); } }
@@ -628,7 +628,7 @@ static void test_ok(void) BOOL cdret;
cdret = GetCurrentDirectoryA(sizeof(curdir), curdir); - ok(cdret, "Failed to get current dir err %d\n", GetLastError()); + ok(cdret, "Failed to get current dir err %ld\n", GetLastError()); if (!GetTempFileNameA(".", "txt", 0, tmpfilename)) { skip("Failed to create a temporary file name\n"); return; @@ -646,14 +646,14 @@ static void test_ok(void) ok( ok_testcases[i].expclose == ok_testcases[i].actclose, "testid %d: Open File dialog should %shave closed.\n", i, ok_testcases[i].expclose ? "" : "NOT "); - ok(ret == ok_testcases[i].expclose, "testid %d: GetOpenFileName returned %#x\n", i, ret); + ok(ret == ok_testcases[i].expclose, "testid %d: GetOpenFileName returned %#lx\n", i, ret); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); cdret = SetCurrentDirectoryA(curdir); - ok(cdret, "Failed to restore current dir err %d\n", GetLastError()); + ok(cdret, "Failed to restore current dir err %ld\n", GetLastError()); } ret = DeleteFileA( tmpfilename); - ok( ret, "Failed to delete temporary file %s err %d\n", tmpfilename, GetLastError()); + ok( ret, "Failed to delete temporary file %s err %ld\n", tmpfilename, GetLastError()); }
/* test arranging with a custom template */ @@ -759,18 +759,18 @@ static UINT_PTR WINAPI template_hook_arrange(HWND dlgChild, UINT msg, WPARAM wPa if( !(style & WS_SIZEBOX)) { /* without the OFN_ENABLESIZING flag */ ok( wrcParent.bottom - wrcParent.top == expecty, - "Wrong height of dialog %d, expected %d\n", + "Wrong height of dialog %ld, expected %d\n", wrcParent.bottom - wrcParent.top, expecty); ok( wrcParent.right - wrcParent.left == expectx, - "Wrong width of dialog %d, expected %d\n", + "Wrong width of dialog %ld, expected %d\n", wrcParent.right - wrcParent.left, expectx); } else { /* with the OFN_ENABLESIZING flag */ ok( wrcParent.bottom - wrcParent.top > expecty, - "Wrong height of dialog %d, expected more than %d\n", + "Wrong height of dialog %ld, expected more than %d\n", wrcParent.bottom - wrcParent.top, expecty); ok( wrcParent.right - wrcParent.left > expectx, - "Wrong width of dialog %d, expected more than %d\n", + "Wrong width of dialog %ld, expected more than %d\n", wrcParent.right - wrcParent.left, expectx); }
@@ -851,9 +851,9 @@ static void test_arrange(void) itemtemplateBtn->cx = arrange_tests[i].poszBtn.cx; itemtemplateBtn->cy = arrange_tests[i].poszBtn.cy; ret = GetOpenFileNameA(&ofn); - ok(!ret, "GetOpenFileNameA returned %#x\n", ret); + ok(!ret, "GetOpenFileNameA returned %#lx\n", ret); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); } }
@@ -912,12 +912,12 @@ static void test_getfolderpath(void)
result = GetOpenFileNameA(&ofn); ok(FALSE == result, "expected FALSE, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", + ok(0 == CommDlgExtendedError(), "expected 0, got %ld\n", CommDlgExtendedError());
result = GetSaveFileNameA(&ofn); ok(FALSE == result, "expected FALSE, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", + ok(0 == CommDlgExtendedError(), "expected 0, got %ld\n", CommDlgExtendedError()); }
@@ -942,24 +942,24 @@ static void test_resizable2(void) ret = GetOpenFileNameA(&ofn); ok( ret == TRUE, "File Dialog should have been sizable\n"); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATE; ret = GetOpenFileNameA(&ofn); ok( !ret, "File Dialog should NOT have been sizable\n"); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATEHANDLE; ofn.hInstance = LoadResource( GetModuleHandleA(NULL), FindResourceA( GetModuleHandleA(NULL), "template1", (LPSTR)RT_DIALOG)); ofn.lpTemplateName = NULL; ret = GetOpenFileNameA(&ofn); ok( !ret, "File Dialog should NOT have been sizable\n"); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); ofn.Flags = OFN_EXPLORER | OFN_ENABLEHOOK; ret = GetOpenFileNameA(&ofn); ok( !ret, "File Dialog should NOT have been sizable\n"); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret); }
static void test_mru(void) @@ -982,15 +982,15 @@ static void test_mru(void)
SetLastError(0xdeadbeef); ret = CreateDirectoryA(test_dir_name, NULL); - ok(ret == TRUE, "CreateDirectoryA should have succeeded: %d\n", GetLastError()); + ok(ret == TRUE, "CreateDirectoryA should have succeeded: %ld\n", GetLastError());
/* "teach" comdlg32 about this directory */ strcpy(filename_buf, test_full_path); SetLastError(0xdeadbeef); ret = GetOpenFileNameA(&ofn); - ok(ret, "GetOpenFileNameA should have succeeded: %d\n", GetLastError()); + ok(ret, "GetOpenFileNameA should have succeeded: %ld\n", GetLastError()); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %x\n", ret); + ok(!ret, "CommDlgExtendedError returned %lx\n", ret); ok(testcase.actclose, "Open File dialog should have closed.\n"); ok(!strcmp(ofn.lpstrFile, test_full_path), "Expected to get %s, got %s\n", test_full_path, ofn.lpstrFile);
@@ -999,16 +999,16 @@ static void test_mru(void) strcpy(filename_buf, test_file_name); SetLastError(0xdeadbeef); ret = GetOpenFileNameA(&ofn); - ok(ret, "GetOpenFileNameA should have succeeded: %d\n", GetLastError()); + ok(ret, "GetOpenFileNameA should have succeeded: %ld\n", GetLastError()); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %x\n", ret); + ok(!ret, "CommDlgExtendedError returned %lx\n", ret); ok(testcase.actclose, "Open File dialog should have closed.\n"); if(strcmp(ofn.lpstrFile, test_full_path) != 0) win_skip("Platform doesn't save MRU data\n");
SetLastError(0xdeadbeef); ret = RemoveDirectoryA(test_dir_name); - ok(ret == TRUE, "RemoveDirectoryA should have succeeded: %d\n", GetLastError()); + ok(ret == TRUE, "RemoveDirectoryA should have succeeded: %ld\n", GetLastError()); }
static UINT_PTR WINAPI test_extension_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -1040,7 +1040,7 @@ static void test_extension_helper(OPENFILENAMEA* ofn, const char *filter, ok(boolret, "%s: expected TRUE\n", filter);
ret = CommDlgExtendedError(); - ok(!ret, "%s: CommDlgExtendedError returned %#x\n", filter, ret); + ok(!ret, "%s: CommDlgExtendedError returned %#lx\n", filter, ret);
filename_ptr = ofn->lpstrFile + ofn->nFileOffset; ok(strcmp(filename_ptr, expected_filename) == 0, @@ -1071,7 +1071,7 @@ static void test_extension(void) };
boolret = GetTempPathA(sizeof(dir), dir); - ok(boolret, "Failed to get current dir err %d\n", GetLastError()); + ok(boolret, "Failed to get current dir err %ld\n", GetLastError());
ofn.hwndOwner = NULL; ofn.lpstrFile = filename; @@ -1168,9 +1168,9 @@ static void test_null_filename(void) ofnA.lpstrFilter = "text\0*.txt\0All\0*\0\0"; ofnA.lpstrDefExt = NULL; ret = GetOpenFileNameA(&ofnA); - todo_wine ok(ret, "GetOpenFileNameA returned %#x\n", ret); + todo_wine ok(ret, "GetOpenFileNameA returned %#lx\n", ret); ret = CommDlgExtendedError(); - todo_wine ok(!ret, "CommDlgExtendedError returned %#x, should be 0\n", ret); + todo_wine ok(!ret, "CommDlgExtendedError returned %#lx, should be 0\n", ret);
todo_wine ok(ofnA.nFileOffset != 0xdead, "ofnA.nFileOffset is 0xdead\n"); todo_wine ok(ofnA.nFileExtension != 0xbeef, "ofnA.nFileExtension is 0xbeef\n"); @@ -1180,9 +1180,9 @@ static void test_null_filename(void) ofnA.nFileOffset = 0xdead; ofnA.nFileExtension = 0xbeef; ret = GetOpenFileNameA(&ofnA); - ok(ret, "GetOpenFileNameA returned %#x\n", ret); + ok(ret, "GetOpenFileNameA returned %#lx\n", ret); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret);
ok(ofnA.nFileOffset != 0xdead, "ofnA.nFileOffset is 0xdead\n"); ok(ofnA.nFileExtension == 0, "ofnA.nFileExtension is 0x%x, should be 0\n", ofnA.nFileExtension); @@ -1199,9 +1199,9 @@ static void test_null_filename(void) ofnW.lpstrFilter = filterW; ofnW.lpstrDefExt = NULL; ret = GetOpenFileNameW(&ofnW); - todo_wine ok(ret, "GetOpenFileNameW returned %#x\n", ret); + todo_wine ok(ret, "GetOpenFileNameW returned %#lx\n", ret); ret = CommDlgExtendedError(); - todo_wine ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + todo_wine ok(!ret, "CommDlgExtendedError returned %#lx\n", ret);
todo_wine ok(ofnW.nFileOffset != 0xdead, "ofnW.nFileOffset is 0xdead\n"); todo_wine ok(ofnW.nFileExtension != 0xbeef, "ofnW.nFileExtension is 0xbeef\n"); @@ -1211,9 +1211,9 @@ static void test_null_filename(void) ofnW.nFileOffset = 0xdead; ofnW.nFileExtension = 0xbeef; ret = GetOpenFileNameW(&ofnW); - ok(ret, "GetOpenFileNameA returned %#x\n", ret); + ok(ret, "GetOpenFileNameA returned %#lx\n", ret); ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + ok(!ret, "CommDlgExtendedError returned %#lx\n", ret);
ok(ofnW.nFileOffset != 0xdead, "ofnW.nFileOffset is 0xdead\n"); ok(ofnW.nFileExtension == 0, "ofnW.nFileExtension is 0x%x, should be 0\n", ofnW.nFileExtension); @@ -1244,7 +1244,7 @@ static void test_directory_filename(void) ofnA.lpstrFilter = "text\0*.txt\0All\0*\0\0"; ofnA.lpstrDefExt = NULL; ret = GetOpenFileNameA(&ofnA); - todo_wine ok(!ret, "GetOpenFileNameA returned %#x\n", ret); + todo_wine ok(!ret, "GetOpenFileNameA returned %#lx\n", ret);
/* unicode tests */ ofnW.lStructSize = OPENFILENAME_SIZE_VERSION_400W; @@ -1256,7 +1256,7 @@ static void test_directory_filename(void) ofnW.lpstrFilter = filterW; ofnW.lpstrDefExt = NULL; ret = GetOpenFileNameW(&ofnW); - todo_wine ok(!ret, "GetOpenFileNameW returned %#x\n", ret); + todo_wine ok(!ret, "GetOpenFileNameW returned %#lx\n", ret); }
static UINT_PTR WINAPI test_ole_init_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -1264,7 +1264,7 @@ static UINT_PTR WINAPI test_ole_init_wndproc(HWND dlg, UINT msg, WPARAM wParam, HRESULT hr;
hr = OleInitialize(NULL); - ok(hr == S_FALSE, "OleInitialize() returned %#x\n", hr); + ok(hr == S_FALSE, "OleInitialize() returned %#lx\n", hr); OleUninitialize();
if (msg == WM_NOTIFY) @@ -1291,7 +1291,7 @@ static LRESULT CALLBACK hook_proc(int code, WPARAM wp, LPARAM lp) hr = OleInitialize(NULL); ok((first_dlg ? hr == S_OK : hr == S_FALSE) || broken(first_dlg && hr == S_FALSE), - "OleInitialize() returned %#x (first dialog %#x)\n", hr, first_dlg); + "OleInitialize() returned %#lx (first dialog %#x)\n", hr, first_dlg); OleUninitialize(); first_dlg = FALSE; } @@ -1320,7 +1320,7 @@ static void test_ole_initialization(void) ok(!ret, "GetOpenFileNameA returned %#x\n", ret);
hr = OleInitialize(NULL); - ok(hr == S_OK, "OleInitialize() returned %#x\n", hr); + ok(hr == S_OK, "OleInitialize() returned %#lx\n", hr); OleUninitialize();
UnhookWindowsHookEx(hook); diff --git a/dlls/comdlg32/tests/finddlg.c b/dlls/comdlg32/tests/finddlg.c index be983081c59..6a67b2f6d3a 100644 --- a/dlls/comdlg32/tests/finddlg.c +++ b/dlls/comdlg32/tests/finddlg.c @@ -58,7 +58,7 @@ static void test_param_check(void) ok(is_ok, "%s should%s fail\n", #FUNC, FAIL ? "" : "n't"); \ if (FAIL && is_ok) { \ DWORD ext_err = CommDlgExtendedError(); \ - ok(ext_err == ERR_CODE, "expected err %x got %x\n", \ + ok(ext_err == ERR_CODE, "expected err %x got %lx\n", \ ERR_CODE, ext_err); \ } else { \ DestroyWindow(hwnd); \ diff --git a/dlls/comdlg32/tests/fontdlg.c b/dlls/comdlg32/tests/fontdlg.c index 2836ba1e9ef..a96e6dc1590 100644 --- a/dlls/comdlg32/tests/fontdlg.c +++ b/dlls/comdlg32/tests/fontdlg.c @@ -108,8 +108,8 @@ static void test_ChooseFontA(void)
ok(ret == TRUE, "ChooseFontA returned FALSE\n"); ok(cfa.iPointSize == expected_pointsize, "Expected %i, got %i\n", expected_pointsize, cfa.iPointSize); - ok(lfa.lfHeight == expected_lfheight, "Expected %i, got %i\n", expected_lfheight, lfa.lfHeight); - ok(lfa.lfWeight == FW_NORMAL, "Expected FW_NORMAL, got %i\n", lfa.lfWeight); + ok(lfa.lfHeight == expected_lfheight, "Expected %i, got %li\n", expected_lfheight, lfa.lfHeight); + ok(lfa.lfWeight == FW_NORMAL, "Expected FW_NORMAL, got %li\n", lfa.lfWeight); ok(lfa.lfCharSet == SYMBOL_CHARSET, "Expected SYMBOL_CHARSET, got %i\n", lfa.lfCharSet); ok(strcmp(lfa.lfFaceName, "Symbol") == 0, "Expected Symbol, got %s\n", lfa.lfFaceName);
@@ -142,8 +142,8 @@ static void test_ChooseFontA(void)
ok(ret == TRUE, "ChooseFontA returned FALSE\n"); ok(cfa.iPointSize == expected_pointsize, "Expected %i, got %i\n", expected_pointsize, cfa.iPointSize); - ok(lfa.lfHeight == expected_lfheight, "Expected %i, got %i\n", expected_lfheight, lfa.lfHeight); - ok(lfa.lfWeight == FW_NORMAL, "Expected FW_NORMAL, got %i\n", lfa.lfWeight); + ok(lfa.lfHeight == expected_lfheight, "Expected %i, got %li\n", expected_lfheight, lfa.lfHeight); + ok(lfa.lfWeight == FW_NORMAL, "Expected FW_NORMAL, got %li\n", lfa.lfWeight); ok((strcmp(lfa.lfFaceName, "Symbol") == 0) || broken(*lfa.lfFaceName == 0), "Expected Symbol, got %s\n", lfa.lfFaceName);
diff --git a/dlls/comdlg32/tests/itemdlg.c b/dlls/comdlg32/tests/itemdlg.c index c38457a0a13..bba869ad091 100644 --- a/dlls/comdlg32/tests/itemdlg.c +++ b/dlls/comdlg32/tests/itemdlg.c @@ -96,10 +96,10 @@ static HWND get_hwnd_from_ifiledialog(IFileDialog *pfd) HRESULT hr;
hr = IFileDialog_QueryInterface(pfd, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IOleWindow_GetWindow(pow, &dlg_hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
IOleWindow_Release(pow);
@@ -213,7 +213,7 @@ static HRESULT WINAPI IFileDialogEvents_fnOnFolderChange(IFileDialogEvents *ifac ok(dlg_hwnd != NULL, "Got NULL.\n");
hr = IFileDialog_SetFileName(pfd, This->set_filename); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
if(!This->set_filename_tried) { @@ -290,7 +290,7 @@ static HRESULT WINAPI IFileDialogEvents_fnOnOverwrite(IFileDialogEvents *iface, This->OnOverwrite++; ok(*pResponse == FDEOR_DEFAULT, "overwrite response %u\n", *pResponse); *pResponse = FDEOR_ACCEPT; - ok(!This->OnFileOk, "OnFileOk already called %u times\n", This->OnFileOk); + ok(!This->OnFileOk, "OnFileOk already called %lu times\n", This->OnFileOk); return S_OK; }
@@ -337,88 +337,88 @@ static BOOL test_instantiation(void) win_skip("Could not instantiate the FileOpenDialog.\n"); return FALSE; } - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IFileDialog, (void**)&pfd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IFileDialog_Release(pfd);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IFileDialogCustomize, (void**)&punk); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IFileDialogCustomizeAlt, (void**)&unk2); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(punk == unk2, "got %p, %p\n", punk, unk2); IUnknown_Release(punk); IUnknown_Release(unk2);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IFileSaveDialog, (void**)&pfsd); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IFileSaveDialog_Release(pfsd);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IServiceProvider, (void**)&psp); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { IExplorerBrowser *peb; IShellBrowser *psb;
hr = IServiceProvider_QueryService(psp, &SID_SExplorerBrowserFrame, &IID_ICommDlgBrowser, (void**)&punk); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* since win8, the result is E_NOTIMPL for all other services */ hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_IExplorerBrowser, (void**)&peb); - ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08lx (expected E_NOTIMPL)\n", hr); if(SUCCEEDED(hr)) IExplorerBrowser_Release(peb); hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_IShellBrowser, (void**)&psb); - ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08lx (expected E_NOTIMPL)\n", hr); if(SUCCEEDED(hr)) IShellBrowser_Release(psb); hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_ICommDlgBrowser, (void**)&punk); - ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08lx (expected E_NOTIMPL)\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IServiceProvider_QueryService(psp, &SID_STopLevelBrowser, &IID_IUnknown, (void**)&punk); - ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08lx (expected E_NOTIMPL)\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IServiceProvider_QueryService(psp, &IID_IUnknown, &IID_IUnknown, (void**)&punk); - ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08x (expected E_NOTIMPL)\n", hr); + ok(hr == E_NOTIMPL || broken(hr == E_FAIL), "got 0x%08lx (expected E_NOTIMPL)\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
IServiceProvider_Release(psp); }
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IFileDialogEvents, (void**)&punk); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IExplorerBrowser, (void**)&punk); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IExplorerBrowserEvents, (void**)&punk); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_ICommDlgBrowser3, (void**)&punk); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IShellBrowser, (void**)&punk); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { HWND hwnd;
hr = IOleWindow_ContextSensitiveHelp(pow, TRUE); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IOleWindow_ContextSensitiveHelp(pow, FALSE); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
if(0) { @@ -427,14 +427,14 @@ static BOOL test_instantiation(void) }
hr = IOleWindow_GetWindow(pow, &hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(hwnd == NULL, "Got %p\n", hwnd);
IOleWindow_Release(pow); }
ref = IFileOpenDialog_Release(pfod); - ok(!ref, "Got refcount %d, should have been released.\n", ref); + ok(!ref, "Got refcount %ld, should have been released.\n", ref);
/* Instantiate FileSaveDialog */ hr = CoCreateInstance(&CLSID_FileSaveDialog, NULL, CLSCTX_INPROC_SERVER, @@ -444,56 +444,56 @@ static BOOL test_instantiation(void) win_skip("Could not instantiate the FileSaveDialog.\n"); return FALSE; } - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IFileDialog, (void**)&pfd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IFileDialog_Release(pfd);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IFileDialogCustomize, (void**)&punk); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IFileDialogCustomizeAlt, (void**)&unk2); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(punk == unk2, "got %p, %p\n", punk, unk2); IUnknown_Release(punk); IUnknown_Release(unk2);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IFileOpenDialog, (void**)&pfod); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IFileOpenDialog_Release(pfod);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IFileDialogEvents, (void**)&punk); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IFileDialog_Release(pfd);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IExplorerBrowser, (void**)&punk); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IExplorerBrowserEvents, (void**)&punk); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_ICommDlgBrowser3, (void**)&punk); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IShellBrowser, (void**)&punk); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { HWND hwnd;
hr = IOleWindow_ContextSensitiveHelp(pow, TRUE); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IOleWindow_ContextSensitiveHelp(pow, FALSE); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
if(0) { @@ -502,7 +502,7 @@ static BOOL test_instantiation(void) }
hr = IOleWindow_GetWindow(pow, &hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(hwnd == NULL, "Got %p\n", hwnd);
IOleWindow_Release(pow); @@ -510,7 +510,7 @@ static BOOL test_instantiation(void)
ref = IFileSaveDialog_Release(pfsd); - ok(!ref, "Got refcount %d, should have been released.\n", ref); + ok(!ref, "Got refcount %ld, should have been released.\n", ref); return TRUE; }
@@ -558,205 +558,205 @@ static void test_basics(void) /* Instantiate FileOpenDialog and FileSaveDialog */ hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileOpenDialog, (void**)&pfod); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = CoCreateInstance(&CLSID_FileSaveDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileSaveDialog, (void**)&pfsd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
/* ClearClientData */ todo_wine { hr = IFileOpenDialog_ClearClientData(pfod); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_ClearClientData(pfsd); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); }
/* GetOptions */ hr = IFileOpenDialog_GetOptions(pfod, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_GetOptions(pfsd, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
/* Check default options */ hr = IFileOpenDialog_GetOptions(pfod, &fdoptions); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(fdoptions == (FOS_PATHMUSTEXIST | FOS_FILEMUSTEXIST | FOS_NOCHANGEDIR), - "Unexpected default options: 0x%08x\n", fdoptions); + "Unexpected default options: 0x%08lx\n", fdoptions); hr = IFileSaveDialog_GetOptions(pfsd, &fdoptions); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(fdoptions == (FOS_OVERWRITEPROMPT | FOS_NOREADONLYRETURN | FOS_PATHMUSTEXIST | FOS_NOCHANGEDIR), - "Unexpected default options: 0x%08x\n", fdoptions); + "Unexpected default options: 0x%08lx\n", fdoptions);
/* Check SetOptions invalid options handling */ for (i = 0; i < ARRAY_SIZE(invalid_fos); i++) { hr = IFileOpenDialog_SetOptions(pfod, invalid_fos[i]); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_GetOptions(pfod, &fdoptions); - ok(hr == S_OK, "got 0x%08x.\n", hr); - ok(fdoptions == (FOS_PATHMUSTEXIST | FOS_FILEMUSTEXIST | FOS_NOCHANGEDIR), "got %08x\n", fdoptions); + ok(hr == S_OK, "got 0x%08lx.\n", hr); + ok(fdoptions == (FOS_PATHMUSTEXIST | FOS_FILEMUSTEXIST | FOS_NOCHANGEDIR), "got %08lx\n", fdoptions);
hr = IFileSaveDialog_SetOptions(pfsd, invalid_fos[i]); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_GetOptions(pfsd, &fdoptions); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(fdoptions == (FOS_OVERWRITEPROMPT | FOS_NOREADONLYRETURN | FOS_PATHMUSTEXIST | FOS_NOCHANGEDIR), - "got %08x\n", fdoptions); + "got %08lx\n", fdoptions); }
/* GetResult */ hr = IFileOpenDialog_GetResult(pfod, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_GetResult(pfsd, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
psi = (void*)0xdeadbeef; hr = IFileOpenDialog_GetResult(pfod, &psi); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); ok(psi == (void*)0xdeadbeef, "got %p.\n", psi); psi = (void*)0xdeadbeef; hr = IFileSaveDialog_GetResult(pfsd, &psi); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); ok(psi == (void*)0xdeadbeef, "got %p.\n", psi);
/* GetCurrentSelection */ if(0) { /* Crashes on Vista/W2K8. Tests below passes on Windows 7 */ hr = IFileOpenDialog_GetCurrentSelection(pfod, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_GetCurrentSelection(pfsd, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_GetCurrentSelection(pfod, &psi); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_GetCurrentSelection(pfsd, &psi); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); }
/* GetFileName */ hr = IFileOpenDialog_GetFileName(pfod, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); filename = (void*)0xdeadbeef; hr = IFileOpenDialog_GetFileName(pfod, &filename); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); ok(filename == NULL, "got %p\n", filename); hr = IFileSaveDialog_GetFileName(pfsd, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); filename = (void*)0xdeadbeef; hr = IFileSaveDialog_GetFileName(pfsd, &filename); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); ok(filename == NULL, "got %p\n", filename);
/* GetFileTypeIndex */ hr = IFileOpenDialog_GetFileTypeIndex(pfod, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); filetype = 0x12345; hr = IFileOpenDialog_GetFileTypeIndex(pfod, &filetype); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(filetype == 0, "got %d.\n", filetype); hr = IFileSaveDialog_GetFileTypeIndex(pfsd, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); filetype = 0x12345; hr = IFileSaveDialog_GetFileTypeIndex(pfsd, &filetype); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(filetype == 0, "got %d.\n", filetype);
/* SetFileTypes / SetFileTypeIndex */ hr = IFileOpenDialog_SetFileTypes(pfod, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetFileTypes(pfod, 0, filterspec); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileOpenDialog_SetFileTypeIndex(pfod, 0); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetFileTypeIndex(pfod, 1); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetFileTypes(pfod, 1, filterspec); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetFileTypes(pfod, 0, filterspec); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetFileTypes(pfod, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetFileTypeIndex(pfod, 0); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_GetFileTypeIndex(pfod, &filetype); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(filetype == 1, "got %d\n", filetype); hr = IFileOpenDialog_SetFileTypeIndex(pfod, 100); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_GetFileTypeIndex(pfod, &filetype); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(filetype == 1, "got %d\n", filetype); hr = IFileOpenDialog_SetFileTypes(pfod, 1, filterspec); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetFileTypes(pfod, 1, &filterspec[1]); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr);
hr = IFileSaveDialog_SetFileTypeIndex(pfsd, 0); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_SetFileTypeIndex(pfsd, 1); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_SetFileTypes(pfsd, 2, filterspec); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_GetFileTypeIndex(pfsd, &filetype); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); /* I hope no one relies on this one */ todo_wine ok(filetype == 0, "got %d\n", filetype); hr = IFileSaveDialog_SetFileTypeIndex(pfsd, 0); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_GetFileTypeIndex(pfsd, &filetype); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(filetype == 1, "got %d\n", filetype); hr = IFileSaveDialog_SetFileTypeIndex(pfsd, 100); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_GetFileTypeIndex(pfsd, &filetype); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(filetype == 2, "got %d\n", filetype); hr = IFileSaveDialog_SetFileTypes(pfsd, 1, filterspec); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_SetFileTypes(pfsd, 1, &filterspec[1]); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr);
/* SetFilter */ todo_wine { hr = IFileOpenDialog_SetFilter(pfod, NULL); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_SetFilter(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); }
/* SetFolder */ hr = IFileOpenDialog_SetFolder(pfod, NULL); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_SetFolder(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
/* SetDefaultExtension */ hr = IFileOpenDialog_SetDefaultExtension(pfod, NULL); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetDefaultExtension(pfod, txt); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetDefaultExtension(pfod, null); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileSaveDialog_SetDefaultExtension(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_SetDefaultExtension(pfsd, txt); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_SetDefaultExtension(pfsd, null); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
/* SetDefaultFolder */ hr = IFileOpenDialog_SetDefaultFolder(pfod, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetDefaultFolder(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IFileOpenDialog_SetDefaultFolder(pfod, psidesktop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetDefaultFolder(pfsd, psidesktop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if(0) { @@ -767,27 +767,27 @@ static void test_basics(void)
/* GetFolder / SetFolder */ hr = IFileOpenDialog_GetFolder(pfod, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
hr = IFileOpenDialog_GetFolder(pfod, &psi_original); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { hr = IFileOpenDialog_SetFolder(pfod, psidesktop); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileOpenDialog_SetFolder(pfod, psi_original); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); IShellItem_Release(psi_original); }
hr = IFileSaveDialog_GetFolder(pfsd, &psi_original); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { hr = IFileSaveDialog_SetFolder(pfsd, psidesktop); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileSaveDialog_SetFolder(pfsd, psi_original); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); IShellItem_Release(psi_original); }
@@ -800,105 +800,105 @@ static void test_basics(void) }
hr = IFileOpenDialog_AddPlace(pfod, psidesktop, FDAP_TOP + 1); - todo_wine ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + todo_wine ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); hr = IFileOpenDialog_AddPlace(pfod, psidesktop, FDAP_BOTTOM); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_AddPlace(pfod, psidesktop, FDAP_TOP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IFileSaveDialog_AddPlace(pfsd, psidesktop, FDAP_TOP + 1); - todo_wine ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + todo_wine ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); hr = IFileSaveDialog_AddPlace(pfsd, psidesktop, FDAP_BOTTOM); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_AddPlace(pfsd, psidesktop, FDAP_TOP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* SetFileName */ hr = IFileOpenDialog_SetFileName(pfod, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_SetFileName(pfod, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
filename = NULL; hr = IFileOpenDialog_GetFileName(pfod, &filename); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!lstrcmpW(filename, null), "Strings do not match.\n"); CoTaskMemFree(filename);
hr = IFileOpenDialog_SetFileName(pfod, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
filename = (void*)0xdeadbeef; hr = IFileOpenDialog_GetFileName(pfod, &filename); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr); ok(filename == NULL, "got %p.\n", filename);
hr = IFileOpenDialog_SetFileName(pfod, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_GetFileName(pfod, &filename); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!lstrcmpW(filename, txt), "Strings do not match.\n"); CoTaskMemFree(filename);
hr = IFileSaveDialog_SetFileName(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetFileName(pfsd, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetFileName(pfsd, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_GetFileName(pfsd, &filename); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!lstrcmpW(filename, txt), "Strings do not match.\n"); CoTaskMemFree(filename);
/* SetFileNameLabel */ hr = IFileOpenDialog_SetFileNameLabel(pfod, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_SetFileNameLabel(pfod, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_SetFileNameLabel(pfod, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IFileSaveDialog_SetFileNameLabel(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetFileNameLabel(pfsd, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetFileNameLabel(pfsd, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Close */ hr = IFileOpenDialog_Close(pfod, S_FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_Close(pfsd, S_FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* SetOkButtonLabel */ hr = IFileOpenDialog_SetOkButtonLabel(pfod, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_SetOkButtonLabel(pfod, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_SetOkButtonLabel(pfod, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetOkButtonLabel(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetOkButtonLabel(pfsd, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetOkButtonLabel(pfsd, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* SetTitle */ hr = IFileOpenDialog_SetTitle(pfod, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_SetTitle(pfod, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileOpenDialog_SetTitle(pfod, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetTitle(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetTitle(pfsd, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetTitle(pfsd, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/** IFileOpenDialog specific **/
@@ -910,7 +910,7 @@ static void test_basics(void) } psia = (void*)0xdeadbeef; hr = IFileOpenDialog_GetResults(pfod, &psia); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); ok(psia == NULL, "got %p.\n", psia);
/* GetSelectedItems */ @@ -918,10 +918,10 @@ static void test_basics(void) { /* Crashes under W2K8 */ hr = IFileOpenDialog_GetSelectedItems(pfod, NULL); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); psia = (void*)0xdeadbeef; hr = IFileOpenDialog_GetSelectedItems(pfod, &psia); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); ok(psia == (void*)0xdeadbeef, "got %p.\n", psia); }
@@ -937,10 +937,10 @@ static void test_basics(void)
/* GetProperties */ hr = IFileSaveDialog_GetProperties(pfsd, NULL); - todo_wine ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr); + todo_wine ok(hr == E_UNEXPECTED, "got 0x%08lx\n", hr); pps = (void*)0xdeadbeef; hr = IFileSaveDialog_GetProperties(pfsd, &pps); - todo_wine ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr); + todo_wine ok(hr == E_UNEXPECTED, "got 0x%08lx\n", hr); ok(pps == (void*)0xdeadbeef, "got %p\n", pps);
/* SetProperties */ @@ -948,72 +948,72 @@ static void test_basics(void) { /* Crashes under W2K8 */ hr = IFileSaveDialog_SetProperties(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); }
/* SetCollectedProperties */ todo_wine { hr = IFileSaveDialog_SetCollectedProperties(pfsd, NULL, TRUE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetCollectedProperties(pfsd, NULL, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); }
/* SetSaveAsItem */ todo_wine { hr = IFileSaveDialog_SetSaveAsItem(pfsd, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileSaveDialog_SetSaveAsItem(pfsd, psidesktop); - ok(hr == MK_E_NOOBJECT, "got 0x%08x\n", hr); + ok(hr == MK_E_NOOBJECT, "got 0x%08lx\n", hr); }
/** IFileDialog2 **/
hr = IFileOpenDialog_QueryInterface(pfod, &IID_IFileDialog2, (void**)&pfd2); - ok((hr == S_OK) || broken(hr == E_NOINTERFACE), "got 0x%08x\n", hr); + ok((hr == S_OK) || broken(hr == E_NOINTERFACE), "got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { /* SetCancelButtonLabel */ hr = IFileDialog2_SetOkButtonLabel(pfd2, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileDialog2_SetOkButtonLabel(pfd2, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileDialog2_SetOkButtonLabel(pfd2, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* SetNavigationRoot */ todo_wine { hr = IFileDialog2_SetNavigationRoot(pfd2, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); hr = IFileDialog2_SetNavigationRoot(pfd2, psidesktop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); }
IFileDialog2_Release(pfd2); }
hr = IFileSaveDialog_QueryInterface(pfsd, &IID_IFileDialog2, (void**)&pfd2); - ok((hr == S_OK) || broken(hr == E_NOINTERFACE), "got 0x%08x\n", hr); + ok((hr == S_OK) || broken(hr == E_NOINTERFACE), "got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { /* SetCancelButtonLabel */ hr = IFileDialog2_SetOkButtonLabel(pfd2, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileDialog2_SetOkButtonLabel(pfd2, null); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IFileDialog2_SetOkButtonLabel(pfd2, txt); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* SetNavigationRoot */ todo_wine { hr = IFileDialog2_SetNavigationRoot(pfd2, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); hr = IFileDialog2_SetNavigationRoot(pfd2, psidesktop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); }
IFileDialog2_Release(pfd2); @@ -1022,20 +1022,20 @@ static void test_basics(void) /* Cleanup */ IShellItem_Release(psidesktop); ref = IFileOpenDialog_Release(pfod); - ok(!ref, "Got refcount %d, should have been released.\n", ref); + ok(!ref, "Got refcount %ld, should have been released.\n", ref); ref = IFileSaveDialog_Release(pfsd); - ok(!ref, "Got refcount %d, should have been released.\n", ref); + ok(!ref, "Got refcount %ld, should have been released.\n", ref); }
static void ensure_zero_events_(const char *file, int line, IFileDialogEventsImpl *impl) { - ok_(file, line)(!impl->OnFileOk, "OnFileOk: %d\n", impl->OnFileOk); - ok_(file, line)(!impl->OnFolderChanging, "OnFolderChanging: %d\n", impl->OnFolderChanging); - ok_(file, line)(!impl->OnFolderChange, "OnFolderChange: %d\n", impl->OnFolderChange); - ok_(file, line)(!impl->OnSelectionChange, "OnSelectionChange: %d\n", impl->OnSelectionChange); - ok_(file, line)(!impl->OnShareViolation, "OnShareViolation: %d\n", impl->OnShareViolation); - ok_(file, line)(!impl->OnTypeChange, "OnTypeChange: %d\n", impl->OnTypeChange); - ok_(file, line)(!impl->OnOverwrite, "OnOverwrite: %d\n", impl->OnOverwrite); + ok_(file, line)(!impl->OnFileOk, "OnFileOk: %ld\n", impl->OnFileOk); + ok_(file, line)(!impl->OnFolderChanging, "OnFolderChanging: %ld\n", impl->OnFolderChanging); + ok_(file, line)(!impl->OnFolderChange, "OnFolderChange: %ld\n", impl->OnFolderChange); + ok_(file, line)(!impl->OnSelectionChange, "OnSelectionChange: %ld\n", impl->OnSelectionChange); + ok_(file, line)(!impl->OnShareViolation, "OnShareViolation: %ld\n", impl->OnShareViolation); + ok_(file, line)(!impl->OnTypeChange, "OnTypeChange: %ld\n", impl->OnTypeChange); + ok_(file, line)(!impl->OnOverwrite, "OnOverwrite: %ld\n", impl->OnOverwrite); impl->OnFileOk = impl->OnFolderChanging = impl->OnFolderChange = 0; impl->OnSelectionChange = impl->OnShareViolation = impl->OnTypeChange = 0; impl->OnOverwrite = 0; @@ -1057,55 +1057,55 @@ static void test_advise_helper(IFileDialog *pfd) if (0) { hr = IFileDialog_Advise(pfd, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); hr = IFileDialog_Advise(pfd, pfde, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); } hr = IFileDialog_Advise(pfd, NULL, &cookie[0]); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - ok(pfdeimpl->ref == 1, "got ref %d\n", pfdeimpl->ref); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); + ok(pfdeimpl->ref == 1, "got ref %ld\n", pfdeimpl->ref); ensure_zero_events(pfdeimpl);
hr = IFileDialog_Unadvise(pfd, 0); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); for(i = 0; i < 10; i++) { hr = IFileDialog_Advise(pfd, pfde, &cookie[i]); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cookie[i] == i+cookie[0], "Got cookie: %d\n", cookie[i]); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cookie[i] == i+cookie[0], "Got cookie: %ld\n", cookie[i]); } - ok(pfdeimpl->ref == 10+1, "got ref %d\n", pfdeimpl->ref); + ok(pfdeimpl->ref == 10+1, "got ref %ld\n", pfdeimpl->ref); ensure_zero_events(pfdeimpl);
for(i = 3; i < 7; i++) { hr = IFileDialog_Unadvise(pfd, cookie[i]); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); } - ok(pfdeimpl->ref == 6+1, "got ref %d\n", pfdeimpl->ref); + ok(pfdeimpl->ref == 6+1, "got ref %ld\n", pfdeimpl->ref); ensure_zero_events(pfdeimpl);
for(i = 0; i < 3; i++) { hr = IFileDialog_Unadvise(pfd, cookie[i]); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); } - ok(pfdeimpl->ref == 3+1, "got ref %d\n", pfdeimpl->ref); + ok(pfdeimpl->ref == 3+1, "got ref %ld\n", pfdeimpl->ref); ensure_zero_events(pfdeimpl);
for(i = 7; i < 10; i++) { hr = IFileDialog_Unadvise(pfd, cookie[i]); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); } - ok(pfdeimpl->ref == 1, "got ref %d\n", pfdeimpl->ref); + ok(pfdeimpl->ref == 1, "got ref %ld\n", pfdeimpl->ref); ensure_zero_events(pfdeimpl);
hr = IFileDialog_Unadvise(pfd, cookie[9]+1); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - ok(pfdeimpl->ref == 1, "got ref %d\n", pfdeimpl->ref); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); + ok(pfdeimpl->ref == 1, "got ref %ld\n", pfdeimpl->ref); ensure_zero_events(pfdeimpl);
hr = IFileDialog_Advise(pfd, pfde, &cookie[0]); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cookie[0] >= 1, "got cookie: %d\n", cookie[0]); - ok(pfdeimpl->ref == 1+1, "got ref %d\n", pfdeimpl->ref); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cookie[0] >= 1, "got cookie: %ld\n", cookie[0]); + ok(pfdeimpl->ref == 1+1, "got ref %ld\n", pfdeimpl->ref); ensure_zero_events(pfdeimpl);
hr = IFileDialog_Unadvise(pfd, cookie[0]); @@ -1130,18 +1130,18 @@ static void test_advise(void) trace("Testing FileOpenDialog (advise)\n"); hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&pfd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); test_advise_helper(pfd); ref = IFileDialog_Release(pfd); - ok(!ref, "Got refcount %d, should have been released.\n", ref); + ok(!ref, "Got refcount %ld, should have been released.\n", ref);
trace("Testing FileSaveDialog (advise)\n"); hr = CoCreateInstance(&CLSID_FileSaveDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&pfd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); test_advise_helper(pfd); ref = IFileDialog_Release(pfd); - ok(!ref, "Got refcount %d, should have been released.\n", ref); + ok(!ref, "Got refcount %ld, should have been released.\n", ref); }
static void filedialog_change_filetype(IFileDialog *pfd, HWND dlg_hwnd) @@ -1191,35 +1191,35 @@ static void test_events(void) */ hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&pfd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->events_test = IFDEVENT_TEST2;
hr = IFileDialog_Advise(pfd, pfde, &cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_Show(pfd, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "got 0x%08x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "got 0x%08lx.\n", hr);
- ok(pfdeimpl->OnFolderChanging == 1, "Got %d\n", pfdeimpl->OnFolderChanging); + ok(pfdeimpl->OnFolderChanging == 1, "Got %ld\n", pfdeimpl->OnFolderChanging); pfdeimpl->OnFolderChanging = 0; - ok(pfdeimpl->OnFolderChange == 1, "Got %d\n", pfdeimpl->OnFolderChange); + ok(pfdeimpl->OnFolderChange == 1, "Got %ld\n", pfdeimpl->OnFolderChange); pfdeimpl->OnFolderChange = 0; /* pfdeimpl->OnSelectionChange too unreliable to test. Can be 0, 1 or even 2. */ pfdeimpl->OnSelectionChange = 0; - ok(pfdeimpl->OnTypeChange == 0, "Got %d\n", pfdeimpl->OnTypeChange); + ok(pfdeimpl->OnTypeChange == 0, "Got %ld\n", pfdeimpl->OnTypeChange); pfdeimpl->OnTypeChange = 0;
ensure_zero_events(pfdeimpl);
hr = IFileDialog_Unadvise(pfd, cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
IFileDialogEvents_Release(pfde); ref = IFileDialog_Release(pfd); - ok(!ref || broken(ref /* win2008_64 (intermittently) */), "Got %d\n", ref); + ok(!ref || broken(ref /* win2008_64 (intermittently) */), "Got %ld\n", ref);
/* @@ -1227,41 +1227,41 @@ static void test_events(void) */ hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&pfd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->events_test = IFDEVENT_TEST2;
hr = IFileDialog_Advise(pfd, pfde, &cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_SetFileTypes(pfd, 2, filterspec); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
ensure_zero_events(pfdeimpl);
hr = IFileDialog_Show(pfd, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "got 0x%08x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "got 0x%08lx.\n", hr);
- ok(pfdeimpl->OnFolderChanging == 1, "Got %d\n", pfdeimpl->OnFolderChanging); + ok(pfdeimpl->OnFolderChanging == 1, "Got %ld\n", pfdeimpl->OnFolderChanging); pfdeimpl->OnFolderChanging = 0; - ok(pfdeimpl->OnFolderChange == 1, "Got %d\n", pfdeimpl->OnFolderChange); + ok(pfdeimpl->OnFolderChange == 1, "Got %ld\n", pfdeimpl->OnFolderChange); pfdeimpl->OnFolderChange = 0; /* pfdeimpl->OnSelectionChange too unreliable to test. Can be 0, 1 or even 2. */ pfdeimpl->OnSelectionChange = 0; /* Called once just by showing the dialog */ - ok(pfdeimpl->OnTypeChange == 1, "Got %d\n", pfdeimpl->OnTypeChange); + ok(pfdeimpl->OnTypeChange == 1, "Got %ld\n", pfdeimpl->OnTypeChange); pfdeimpl->OnTypeChange = 0;
ensure_zero_events(pfdeimpl);
hr = IFileDialog_Unadvise(pfd, cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
IFileDialogEvents_Release(pfde); ref = IFileDialog_Release(pfd); - ok(!ref || broken(ref /* win2008_64 (intermittently) */), "Got %d\n", ref); + ok(!ref || broken(ref /* win2008_64 (intermittently) */), "Got %ld\n", ref);
/* @@ -1269,41 +1269,41 @@ static void test_events(void) */ hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&pfd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->events_test = IFDEVENT_TEST3;
hr = IFileDialog_Advise(pfd, pfde, &cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_SetFileTypes(pfd, 2, filterspec); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
ensure_zero_events(pfdeimpl);
hr = IFileDialog_Show(pfd, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "got 0x%08x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "got 0x%08lx.\n", hr);
- ok(pfdeimpl->OnFolderChanging == 1, "Got %d\n", pfdeimpl->OnFolderChanging); + ok(pfdeimpl->OnFolderChanging == 1, "Got %ld\n", pfdeimpl->OnFolderChanging); pfdeimpl->OnFolderChanging = 0; - ok(pfdeimpl->OnFolderChange == 1, "Got %d\n", pfdeimpl->OnFolderChange); + ok(pfdeimpl->OnFolderChange == 1, "Got %ld\n", pfdeimpl->OnFolderChange); pfdeimpl->OnFolderChange = 0; /* pfdeimpl->OnSelectionChange too unreliable to test. Can be 0, 1 or even 2. */ pfdeimpl->OnSelectionChange = 0; /* Called once by showing the dialog and once again when changing the filetype */ - todo_wine ok(pfdeimpl->OnTypeChange == 2, "Got %d\n", pfdeimpl->OnTypeChange); + todo_wine ok(pfdeimpl->OnTypeChange == 2, "Got %ld\n", pfdeimpl->OnTypeChange); pfdeimpl->OnTypeChange = 0;
ensure_zero_events(pfdeimpl);
hr = IFileDialog_Unadvise(pfd, cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
IFileDialogEvents_Release(pfde); ref = IFileDialog_Release(pfd); - ok(!ref || broken(ref /* win2008_64 (intermittently) */), "Got %d\n", ref); + ok(!ref || broken(ref /* win2008_64 (intermittently) */), "Got %ld\n", ref); }
static void touch_file(LPCWSTR filename) @@ -1329,48 +1329,48 @@ static void test_filename_savedlg_(LPCWSTR set_filename, LPCWSTR defext,
hr = CoCreateInstance(&CLSID_FileSaveDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileSaveDialog, (void**)&pfsd); - ok_(file,line)(hr == S_OK, "Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "Got 0x%08lx\n", hr);
if(fs_count) { hr = IFileSaveDialog_SetFileTypes(pfsd, fs_count, filterspec); - ok_(file,line)(hr == S_OK, "SetFileTypes failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "SetFileTypes failed: Got 0x%08lx\n", hr); }
if(defext) { hr = IFileSaveDialog_SetDefaultExtension(pfsd, defext); - ok_(file,line)(hr == S_OK, "SetDefaultExtensions failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "SetDefaultExtensions failed: Got 0x%08lx\n", hr); }
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->set_filename = set_filename; hr = IFileSaveDialog_Advise(pfsd, pfde, &cookie); - ok_(file,line)(hr == S_OK, "Advise failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "Advise failed: Got 0x%08lx\n", hr);
hr = IFileSaveDialog_Show(pfsd, NULL); - ok_(file,line)(hr == S_OK, "Show failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "Show failed: Got 0x%08lx\n", hr);
hr = IFileSaveDialog_GetFileName(pfsd, &filename); - ok_(file,line)(hr == S_OK, "GetFileName failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetFileName failed: Got 0x%08lx\n", hr); ok_(file,line)(!lstrcmpW(filename, set_filename), "Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename);
hr = IFileSaveDialog_GetResult(pfsd, &psi); - ok_(file,line)(hr == S_OK, "GetResult failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetResult failed: Got 0x%08lx\n", hr);
hr = IShellItem_GetDisplayName(psi, SIGDN_PARENTRELATIVEPARSING, &filename); - ok_(file,line)(hr == S_OK, "GetDisplayName failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetDisplayName failed: Got 0x%08lx\n", hr); ok_(file,line)(!lstrcmpW(filename, exp_filename), "(GetDisplayName) Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename); IShellItem_Release(psi);
hr = IFileSaveDialog_Unadvise(pfsd, cookie); - ok_(file,line)(hr == S_OK, "Unadvise failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "Unadvise failed: Got 0x%08lx\n", hr);
ref = IFileSaveDialog_Release(pfsd); - ok_(file,line)(!ref, "Got refcount %d, should have been released.\n", ref); + ok_(file,line)(!ref, "Got refcount %ld, should have been released.\n", ref);
IFileDialogEvents_Release(pfde); } @@ -1393,51 +1393,51 @@ static void test_filename_opendlg_(LPCWSTR set_filename, IShellItem *psi_current
hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileOpenDialog, (void**)&pfod); - ok_(file,line)(hr == S_OK, "CoCreateInstance failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "CoCreateInstance failed: Got 0x%08lx\n", hr);
if(defext) { hr = IFileOpenDialog_SetDefaultExtension(pfod, defext); - ok_(file,line)(hr == S_OK, "SetDefaultExtensions failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "SetDefaultExtensions failed: Got 0x%08lx\n", hr); }
if(fs_count) { hr = IFileOpenDialog_SetFileTypes(pfod, 2, filterspec); - ok_(file,line)(hr == S_OK, "SetFileTypes failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "SetFileTypes failed: Got 0x%08lx\n", hr); }
hr = IFileOpenDialog_SetFolder(pfod, psi_current); - ok_(file,line)(hr == S_OK, "SetFolder failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "SetFolder failed: Got 0x%08lx\n", hr);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->set_filename = set_filename; pfdeimpl->set_filename_tried = FALSE; hr = IFileOpenDialog_Advise(pfod, pfde, &cookie); - ok_(file,line)(hr == S_OK, "Advise failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "Advise failed: Got 0x%08lx\n", hr);
hr = IFileOpenDialog_Show(pfod, NULL); ok_(file,line)(hr == S_OK || (!exp_filename && hr == HRESULT_FROM_WIN32(ERROR_CANCELLED)), - "Show failed: Got 0x%08x\n", hr); + "Show failed: Got 0x%08lx\n", hr); if(hr == S_OK) { hr = IFileOpenDialog_GetResult(pfod, &psi); - ok_(file,line)(hr == S_OK, "GetResult failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetResult failed: Got 0x%08lx\n", hr);
hr = IShellItem_GetDisplayName(psi, SIGDN_PARENTRELATIVEPARSING, &filename); - ok_(file,line)(hr == S_OK, "GetDisplayName(Result) failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetDisplayName(Result) failed: Got 0x%08lx\n", hr); ok_(file,line)(!lstrcmpW(filename, exp_filename), "(GetResult) Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename); IShellItem_Release(psi);
hr = IFileOpenDialog_GetResults(pfod, &psia); - ok_(file,line)(hr == S_OK, "GetResults failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetResults failed: Got 0x%08lx\n", hr); hr = IShellItemArray_GetItemAt(psia, 0, &psi); - ok_(file,line)(hr == S_OK, "GetItemAt failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetItemAt failed: Got 0x%08lx\n", hr);
hr = IShellItem_GetDisplayName(psi, SIGDN_PARENTRELATIVEPARSING, &filename); - ok_(file,line)(hr == S_OK, "GetDisplayName(Results) failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetDisplayName(Results) failed: Got 0x%08lx\n", hr); ok_(file,line)(!lstrcmpW(filename, exp_filename), "(GetResults) Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename);
@@ -1447,23 +1447,23 @@ static void test_filename_opendlg_(LPCWSTR set_filename, IShellItem *psi_current else { hr = IFileOpenDialog_GetResult(pfod, &psi); - ok_(file,line)(hr == E_UNEXPECTED, "GetResult: Got 0x%08x\n", hr); + ok_(file,line)(hr == E_UNEXPECTED, "GetResult: Got 0x%08lx\n", hr);
hr = IFileOpenDialog_GetResults(pfod, &psia); - ok_(file,line)(hr == E_FAIL, "GetResults: Got 0x%08x\n", hr); + ok_(file,line)(hr == E_FAIL, "GetResults: Got 0x%08lx\n", hr); }
hr = IFileOpenDialog_GetFileName(pfod, &filename); - ok_(file,line)(hr == S_OK, "GetFileName failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "GetFileName failed: Got 0x%08lx\n", hr); ok_(file,line)(!lstrcmpW(filename, set_filename), "(GetFileName) Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename);
hr = IFileOpenDialog_Unadvise(pfod, cookie); - ok_(file,line)(hr == S_OK, "Unadvise failed: Got 0x%08x\n", hr); + ok_(file,line)(hr == S_OK, "Unadvise failed: Got 0x%08lx\n", hr);
ref = IFileOpenDialog_Release(pfod); - ok_(file,line)(!ref, "Got refcount %d, should have been released.\n", ref); + ok_(file,line)(!ref, "Got refcount %ld, should have been released.\n", ref);
IFileDialogEvents_Release(pfde); } @@ -1520,7 +1520,7 @@ static void test_filename(void) GetCurrentDirectoryW(MAX_PATH, buf); ok(!!pSHCreateItemFromParsingName, "SHCreateItemFromParsingName is missing.\n"); hr = pSHCreateItemFromParsingName(buf, NULL, &IID_IShellItem, (void**)&psi_current); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
touch_file(filename_noextW); touch_file(filename_defextW); @@ -1643,10 +1643,10 @@ static void test_customize(void) HRESULT hr; hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&pfod); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_QueryInterface(pfod, &IID_IFileDialogCustomize, (void**)&pfdc); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(FAILED(hr)) { skip("Skipping IFileDialogCustomize tests.\n"); @@ -1656,195 +1656,195 @@ static void test_customize(void)
i = 0; hr = IFileDialogCustomize_AddPushButton(pfdc, i, pushbutton1W); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddPushButton(pfdc, i, pushbutton1W); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr);
hr = IFileDialog_QueryInterface(pfod, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = IOleWindow_GetWindow(pow, &dlg_hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(dlg_hwnd == NULL, "NULL\n"); IOleWindow_Release(pow);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, label2); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_EnableOpenDropDown(pfdc, i); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_EnableOpenDropDown(pfdc, ++i); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_EnableOpenDropDown(pfdc, i); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_EnableOpenDropDown(pfdc, i+1); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == E_NOTIMPL, "got 0x%08x.\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx.\n", hr); ok(cdstate == 0xdeadbeef, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, 0); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(!cdstate, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, CDCS_ENABLEDVISIBLE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, label2); - ok(hr == E_NOTIMPL, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == E_NOTIMPL, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_AddMenu(pfdc, i, menuW); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddMenu(pfdc, ++i, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, label2); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_AddPushButton(pfdc, i, pushbutton2W); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddPushButton(pfdc, ++i, pushbutton2W); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, label2); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_AddComboBox(pfdc, i); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddComboBox(pfdc, ++i); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, label2); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_AddRadioButtonList(pfdc, i); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddRadioButtonList(pfdc, ++i); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, radiobutton1W); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, radiobutton1W); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, radiobutton2W); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_AddCheckButton(pfdc, i, label, TRUE); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddCheckButton(pfdc, ++i, checkbutton1W, TRUE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, checkbutton2W); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
if(SUCCEEDED(hr)) { BOOL checked; hr = IFileDialogCustomize_GetCheckButtonState(pfdc, i, &checked); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(checked, "checkbox not checked.\n");
hr = IFileDialogCustomize_SetCheckButtonState(pfdc, i, FALSE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_GetCheckButtonState(pfdc, i, &checked); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(!checked, "checkbox checked.\n");
hr = IFileDialogCustomize_SetCheckButtonState(pfdc, i, TRUE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_GetCheckButtonState(pfdc, i, &checked); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(checked, "checkbox not checked.\n"); }
hr = IFileDialogCustomize_AddEditBox(pfdc, i, label); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddEditBox(pfdc, ++i, editbox1W); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr);
/* Does not affect the text in the editbox */ hr = IFileDialogCustomize_SetControlLabel(pfdc, i, editbox2W); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_GetEditBoxText(pfdc, i, &tmpstr); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { ok(!lstrcmpW(tmpstr, editbox1W), "got %s.\n", wine_dbgstr_w(tmpstr)); @@ -1852,10 +1852,10 @@ static void test_customize(void) }
hr = IFileDialogCustomize_SetEditBoxText(pfdc, i, label2); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_GetEditBoxText(pfdc, i, &tmpstr); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { ok(!lstrcmpW(tmpstr, label2), "got %s.\n", wine_dbgstr_w(tmpstr)); @@ -1863,96 +1863,96 @@ static void test_customize(void) }
hr = IFileDialogCustomize_AddSeparator(pfdc, i); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddSeparator(pfdc, ++i); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, separatorW); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_AddText(pfdc, i, label); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddText(pfdc, ++i, textW); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, text2W); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
hr = IFileDialogCustomize_StartVisualGroup(pfdc, i, label); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_StartVisualGroup(pfdc, ++i, visualgroup1W); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - ok(hr == E_NOINTERFACE, "got 0x%08x.\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_SetControlLabel(pfdc, i, visualgroup2W); - ok(hr == S_OK, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == S_OK, "got 0x%08lx (control: %d).\n", hr, i);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_StartVisualGroup(pfdc, ++i, label); - ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_EndVisualGroup(pfdc); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
i++; /* Nonexisting control */ hr = IFileDialogCustomize_AddControlItem(pfdc, i, 0, label); - todo_wine ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_SetControlLabel(pfdc, i, label2); - ok(hr == E_INVALIDARG, "got 0x%08x (control: %d).\n", hr, i); + ok(hr == E_INVALIDARG, "got 0x%08lx (control: %d).\n", hr, i); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, i, &cdstate); - todo_wine ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr); ok(cdstate == 0xdeadbeef, "got 0x%08x.\n", cdstate);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->events_test = IFDEVENT_TEST1; hr = IFileDialog_Advise(pfod, pfde, &cookie); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IFileDialog_Show(pfod, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "Got 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "Got 0x%08lx\n", hr);
hr = IFileDialog_Unadvise(pfod, cookie); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
IFileDialogEvents_Release(pfde); IFileDialogCustomize_Release(pfdc); ref = IFileDialog_Release(pfod); - ok(!ref, "Refcount not zero (%d).\n", ref); + ok(!ref, "Refcount not zero (%ld).\n", ref);
hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&pfod); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_QueryInterface(pfod, &IID_IFileDialogCustomize, (void**)&pfdc); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
i = 0; hr = IFileDialogCustomize_AddMenu(pfdc, ++i, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { DWORD selected; @@ -1961,42 +1961,42 @@ static void test_customize(void) for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_AddControlItem(pfdc, i, j, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); }
hr = IFileDialogCustomize_GetSelectedControlItem(pfdc, i, &selected); - ok(hr == E_NOTIMPL, "got 0x%08x.\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, 0); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == 0, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, CDCS_ENABLEDVISIBLE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_RemoveAllControlItems(pfdc, i); - ok(hr == E_NOTIMPL, "got 0x%08x.\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx.\n", hr);
for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_RemoveControlItem(pfdc, i, j); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); } } hr = IFileDialogCustomize_AddPushButton(pfdc, ++i, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_AddComboBox(pfdc, ++i); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { DWORD selected = -1; @@ -2005,54 +2005,54 @@ static void test_customize(void) for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_AddControlItem(pfdc, i, j, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); }
hr = IFileDialogCustomize_GetSelectedControlItem(pfdc, i, &selected); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); - ok(selected == -1, "got %d.\n", selected); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); + ok(selected == -1, "got %ld.\n", selected);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, 0); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == 0, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, CDCS_ENABLEDVISIBLE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_SetSelectedControlItem(pfdc, i, j); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_GetSelectedControlItem(pfdc, i, &selected); - ok(hr == S_OK, "got 0x%08x.\n", hr); - ok(selected == j, "got %d.\n", selected); + ok(hr == S_OK, "got 0x%08lx.\n", hr); + ok(selected == j, "got %ld.\n", selected); } j++; hr = IFileDialogCustomize_SetSelectedControlItem(pfdc, i, j); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_RemoveAllControlItems(pfdc, i); - ok(hr == E_NOTIMPL, "got 0x%08x.\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx.\n", hr);
for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_RemoveControlItem(pfdc, i, j); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); } }
hr = IFileDialogCustomize_AddRadioButtonList(pfdc, ++i); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { DWORD selected = -1; @@ -2061,53 +2061,53 @@ static void test_customize(void) for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_AddControlItem(pfdc, i, j, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); }
hr = IFileDialogCustomize_GetSelectedControlItem(pfdc, i, &selected); - ok(hr == E_FAIL, "got 0x%08x.\n", hr); - ok(selected == -1, "got %d.\n", selected); + ok(hr == E_FAIL, "got 0x%08lx.\n", hr); + ok(selected == -1, "got %ld.\n", selected);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, 0); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == 0, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, CDCS_ENABLEDVISIBLE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_SetSelectedControlItem(pfdc, i, j); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); hr = IFileDialogCustomize_GetSelectedControlItem(pfdc, i, &selected); - ok(hr == S_OK, "got 0x%08x.\n", hr); - ok(selected == j, "got %d.\n", selected); + ok(hr == S_OK, "got 0x%08lx.\n", hr); + ok(selected == j, "got %ld.\n", selected); } j++; hr = IFileDialogCustomize_SetSelectedControlItem(pfdc, i, j); - ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_RemoveAllControlItems(pfdc, i); - ok(hr == E_NOTIMPL, "got 0x%08x.\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx.\n", hr);
for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_RemoveControlItem(pfdc, i, j); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); } } hr = IFileDialogCustomize_EnableOpenDropDown(pfdc, ++i); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); if(SUCCEEDED(hr)) { DWORD selected = -1; @@ -2116,166 +2116,166 @@ static void test_customize(void) for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_AddControlItem(pfdc, i, j, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); }
hr = IFileDialogCustomize_GetSelectedControlItem(pfdc, i, &selected); - ok(hr == S_OK, "got 0x%08x.\n", hr); - ok(selected == 0, "got %d.\n", selected); + ok(hr == S_OK, "got 0x%08lx.\n", hr); + ok(selected == 0, "got %ld.\n", selected);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, 0); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == 0, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetControlItemState(pfdc, i, 0, CDCS_ENABLEDVISIBLE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlItemState(pfdc, i, 0, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate); hr = IFileDialogCustomize_SetSelectedControlItem(pfdc, i, 0); - todo_wine ok(hr == E_NOTIMPL, "got 0x%08x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "got 0x%08lx.\n", hr);
hr = IFileDialogCustomize_RemoveAllControlItems(pfdc, i); - ok(hr == E_NOTIMPL, "got 0x%08x.\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx.\n", hr);
for(j = 0; j < 10; j++) { hr = IFileDialogCustomize_RemoveControlItem(pfdc, i, j); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); } }
IFileDialogCustomize_Release(pfdc); ref = IFileDialog_Release(pfod); - ok(!ref, "Refcount not zero (%d).\n", ref); + ok(!ref, "Refcount not zero (%ld).\n", ref);
/* Some more tests for VisualGroup behavior */ hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&pfod); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_QueryInterface(pfod, &IID_IFileDialogCustomize, (void**)&pfdc); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
i = -1; id_vgroup1 = ++i; hr = IFileDialogCustomize_StartVisualGroup(pfdc, id_vgroup1, visualgroup1W); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_vgroup1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
id_text = ++i; hr = IFileDialogCustomize_AddText(pfdc, id_text, label); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_text, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
id_editbox1 = ++i; hr = IFileDialogCustomize_AddEditBox(pfdc, id_editbox1, editbox1W); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_editbox1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
/* Set all Visible but not Enabled */ hr = IFileDialogCustomize_SetControlState(pfdc, id_vgroup1, CDCS_VISIBLE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_vgroup1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_VISIBLE, "got 0x%08x.\n", cdstate); cdstate = 0xdeadbeef;
hr = IFileDialogCustomize_GetControlState(pfdc, id_text, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_editbox1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
/* Set text to Visible but not Enabled */ hr = IFileDialogCustomize_SetControlState(pfdc, id_text, CDCS_VISIBLE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_vgroup1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_VISIBLE, "got 0x%08x.\n", cdstate); cdstate = 0xdeadbeef;
hr = IFileDialogCustomize_GetControlState(pfdc, id_text, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_VISIBLE, "got 0x%08x.\n", cdstate);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_editbox1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
/* Set vgroup to inactive */ hr = IFileDialogCustomize_SetControlState(pfdc, id_vgroup1, CDCS_INACTIVE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_vgroup1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_INACTIVE, "got 0x%08x.\n", cdstate);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_text, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_VISIBLE, "got 0x%08x.\n", cdstate);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_editbox1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
/* Set vgroup to Enabled and Visible again */ hr = IFileDialogCustomize_SetControlState(pfdc, id_vgroup1, CDCS_ENABLEDVISIBLE); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_vgroup1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_text, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_VISIBLE, "got 0x%08x.\n", cdstate);
cdstate = 0xdeadbeef; hr = IFileDialogCustomize_GetControlState(pfdc, id_editbox1, &cdstate); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); ok(cdstate == CDCS_ENABLEDVISIBLE, "got 0x%08x.\n", cdstate);
hr = IFileDialogCustomize_MakeProminent(pfdc, id_vgroup1); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
IFileDialogCustomize_Release(pfdc); ref = IFileDialog_Release(pfod); - ok(!ref, "Refcount not zero (%d).\n", ref); + ok(!ref, "Refcount not zero (%ld).\n", ref); }
static void test_persistent_state(void) @@ -2285,7 +2285,7 @@ static void test_persistent_state(void)
hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&fd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
if (0) { @@ -2294,10 +2294,10 @@ if (0) }
hr = IFileDialog_SetClientGuid(fd, &IID_IUnknown); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IFileDialog_SetClientGuid(fd, &IID_NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IFileDialog_Release(fd); } @@ -2317,40 +2317,40 @@ static void test_overwrite(void) GetCurrentDirectoryW(MAX_PATH, buf); ok(!!pSHCreateItemFromParsingName, "SHCreateItemFromParsingName is missing.\n"); hr = pSHCreateItemFromParsingName(buf, NULL, &IID_IShellItem, (void**)&psi_current); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
touch_file(filename_winetest);
/* FOS_OVERWRITEPROMPT has no effect on open dialog */ hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&fd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_SetOptions(fd, FOS_OVERWRITEPROMPT | FOS_NOCHANGEDIR); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_SetFolder(fd, psi_current); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->set_filename = filename_winetest; hr = IFileDialog_Advise(fd, pfde, &cookie); - ok(hr == S_OK, "Advise failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "Advise failed: Got 0x%08lx\n", hr);
hr = IFileDialog_Show(fd, NULL); - ok(hr == S_OK, "Show failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "Show failed: Got 0x%08lx\n", hr);
- ok(!pfdeimpl->OnOverwrite, "got %u overwrite events\n", pfdeimpl->OnOverwrite); - ok(pfdeimpl->OnFileOk == 1, "got %u ok events\n", pfdeimpl->OnFileOk); + ok(!pfdeimpl->OnOverwrite, "got %lu overwrite events\n", pfdeimpl->OnOverwrite); + ok(pfdeimpl->OnFileOk == 1, "got %lu ok events\n", pfdeimpl->OnFileOk);
hr = IFileDialog_GetFileName(fd, &filename); - ok(hr == S_OK, "GetFileName failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "GetFileName failed: Got 0x%08lx\n", hr); ok(!lstrcmpW(filename, filename_winetest), "Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename);
hr = IFileDialog_Unadvise(fd, cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
IFileDialog_Release(fd);
@@ -2359,33 +2359,33 @@ static void test_overwrite(void) /* Save dialog doesn't check for overwrite without FOS_OVERWRITEPROMPT set */ hr = CoCreateInstance(&CLSID_FileSaveDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&fd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_SetOptions(fd, FOS_NOREADONLYRETURN | FOS_PATHMUSTEXIST | FOS_NOCHANGEDIR); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_SetFolder(fd, psi_current); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->set_filename = filename_winetest; hr = IFileDialog_Advise(fd, pfde, &cookie); - ok(hr == S_OK, "Advise failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "Advise failed: Got 0x%08lx\n", hr);
hr = IFileDialog_Show(fd, NULL); - ok(hr == S_OK, "Show failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "Show failed: Got 0x%08lx\n", hr);
- ok(!pfdeimpl->OnOverwrite, "got %u overwrite events\n", pfdeimpl->OnOverwrite); - ok(pfdeimpl->OnFileOk == 1, "got %u ok events\n", pfdeimpl->OnFileOk); + ok(!pfdeimpl->OnOverwrite, "got %lu overwrite events\n", pfdeimpl->OnOverwrite); + ok(pfdeimpl->OnFileOk == 1, "got %lu ok events\n", pfdeimpl->OnFileOk);
hr = IFileDialog_GetFileName(fd, &filename); - ok(hr == S_OK, "GetFileName failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "GetFileName failed: Got 0x%08lx\n", hr); ok(!lstrcmpW(filename, filename_winetest), "Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename);
hr = IFileDialog_Unadvise(fd, cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
IFileDialog_Release(fd);
@@ -2394,30 +2394,30 @@ static void test_overwrite(void) /* Save dialog with FOS_OVERWRITEPROMPT set */ hr = CoCreateInstance(&CLSID_FileSaveDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&fd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_SetFolder(fd, psi_current); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->set_filename = filename_winetest; hr = IFileDialog_Advise(fd, pfde, &cookie); - ok(hr == S_OK, "Advise failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "Advise failed: Got 0x%08lx\n", hr);
hr = IFileDialog_Show(fd, NULL); - ok(hr == S_OK, "Show failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "Show failed: Got 0x%08lx\n", hr);
- ok(pfdeimpl->OnOverwrite == 1, "got %u overwrite events\n", pfdeimpl->OnOverwrite); - ok(pfdeimpl->OnFileOk == 1, "got %u ok events\n", pfdeimpl->OnFileOk); + ok(pfdeimpl->OnOverwrite == 1, "got %lu overwrite events\n", pfdeimpl->OnOverwrite); + ok(pfdeimpl->OnFileOk == 1, "got %lu ok events\n", pfdeimpl->OnFileOk);
hr = IFileDialog_GetFileName(fd, &filename); - ok(hr == S_OK, "GetFileName failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "GetFileName failed: Got 0x%08lx\n", hr); ok(!lstrcmpW(filename, filename_winetest), "Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename);
hr = IFileDialog_Unadvise(fd, cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
IFileDialog_Release(fd);
@@ -2428,30 +2428,30 @@ static void test_overwrite(void) /* Save dialog with FOS_OVERWRITEPROMPT set but without existing file */ hr = CoCreateInstance(&CLSID_FileSaveDialog, NULL, CLSCTX_INPROC_SERVER, &IID_IFileDialog, (void**)&fd); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
hr = IFileDialog_SetFolder(fd, psi_current); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
pfde = IFileDialogEvents_Constructor(); pfdeimpl = impl_from_IFileDialogEvents(pfde); pfdeimpl->set_filename = filename_winetest; hr = IFileDialog_Advise(fd, pfde, &cookie); - ok(hr == S_OK, "Advise failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "Advise failed: Got 0x%08lx\n", hr);
hr = IFileDialog_Show(fd, NULL); - ok(hr == S_OK, "Show failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "Show failed: Got 0x%08lx\n", hr);
- ok(!pfdeimpl->OnOverwrite, "got %u overwrite events\n", pfdeimpl->OnOverwrite); - ok(pfdeimpl->OnFileOk == 1, "got %u ok events\n", pfdeimpl->OnFileOk); + ok(!pfdeimpl->OnOverwrite, "got %lu overwrite events\n", pfdeimpl->OnOverwrite); + ok(pfdeimpl->OnFileOk == 1, "got %lu ok events\n", pfdeimpl->OnFileOk);
hr = IFileDialog_GetFileName(fd, &filename); - ok(hr == S_OK, "GetFileName failed: Got 0x%08x\n", hr); + ok(hr == S_OK, "GetFileName failed: Got 0x%08lx\n", hr); ok(!lstrcmpW(filename, filename_winetest), "Got %s\n", wine_dbgstr_w(filename)); CoTaskMemFree(filename);
hr = IFileDialog_Unadvise(fd, cookie); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr);
IFileDialog_Release(fd);
diff --git a/dlls/comdlg32/tests/printdlg.c b/dlls/comdlg32/tests/printdlg.c index 0376872e67c..6bef12bcb05 100644 --- a/dlls/comdlg32/tests/printdlg.c +++ b/dlls/comdlg32/tests/printdlg.c @@ -65,7 +65,7 @@ static void test_PageSetupDlgA(void) SetLastError(0xdeadbeef); res = PageSetupDlgA(NULL); ok( !res && (CommDlgExtendedError() == CDERR_INITIALIZATION), - "returned %u with %u and 0x%x (expected '0' and " + "returned %lu with %lu and 0x%lx (expected '0' and " "CDERR_INITIALIZATION)\n", res, GetLastError(), CommDlgExtendedError());
ZeroMemory(pDlg, sizeof(PAGESETUPDLGA)); @@ -73,7 +73,7 @@ static void test_PageSetupDlgA(void) SetLastError(0xdeadbeef); res = PageSetupDlgA(pDlg); ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE), - "returned %u with %u and 0x%x (expected '0' and " + "returned %lu with %lu and 0x%lx (expected '0' and " "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
ZeroMemory(pDlg, sizeof(PAGESETUPDLGA)); @@ -82,7 +82,7 @@ static void test_PageSetupDlgA(void) SetLastError(0xdeadbeef); res = PageSetupDlgA(pDlg); ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE), - "returned %u with %u and 0x%x (expected '0' and CDERR_STRUCTSIZE)\n", + "returned %lu with %lu and 0x%lx (expected '0' and CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
@@ -92,7 +92,7 @@ static void test_PageSetupDlgA(void) SetLastError(0xdeadbeef); res = PageSetupDlgA(pDlg); ok( res || (CommDlgExtendedError() == PDERR_NODEFAULTPRN), - "returned %u with %u and 0x%x (expected '!= 0' or '0' and " + "returned %lu with %lu and 0x%lx (expected '!= 0' or '0' and " "PDERR_NODEFAULTPRN)\n", res, GetLastError(), CommDlgExtendedError());
if (!res && (CommDlgExtendedError() == PDERR_NODEFAULTPRN)) { @@ -146,7 +146,7 @@ static void test_PrintDlgA(void) SetLastError(0xdeadbeef); res = PrintDlgA(NULL); ok( !res && (CommDlgExtendedError() == CDERR_INITIALIZATION), - "returned %d with 0x%x and 0x%x (expected '0' and " + "returned %ld with 0x%lx and 0x%lx (expected '0' and " "CDERR_INITIALIZATION)\n", res, GetLastError(), CommDlgExtendedError());
ZeroMemory(pDlg, sizeof(PRINTDLGA)); @@ -154,7 +154,7 @@ static void test_PrintDlgA(void) SetLastError(0xdeadbeef); res = PrintDlgA(pDlg); ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE), - "returned %d with 0x%x and 0x%x (expected '0' and " + "returned %ld with 0x%lx and 0x%lx (expected '0' and " "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
ZeroMemory(pDlg, sizeof(PRINTDLGA)); @@ -163,7 +163,7 @@ static void test_PrintDlgA(void) SetLastError(0xdeadbeef); res = PrintDlgA(pDlg); ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE), - "returned %u with %u and 0x%x (expected '0' and " + "returned %lu with %lu and 0x%lx (expected '0' and " "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
@@ -173,7 +173,7 @@ static void test_PrintDlgA(void) SetLastError(0xdeadbeef); res = PrintDlgA(pDlg); ok( res || (CommDlgExtendedError() == PDERR_NODEFAULTPRN), - "returned %d with 0x%x and 0x%x (expected '!= 0' or '0' and " + "returned %ld with 0x%lx and 0x%lx (expected '!= 0' or '0' and " "PDERR_NODEFAULTPRN)\n", res, GetLastError(), CommDlgExtendedError());
if (!res && (CommDlgExtendedError() == PDERR_NODEFAULTPRN)) { @@ -213,7 +213,7 @@ static void test_PrintDlgA(void) res = GetProfileStringA(PrinterPortsA, device, emptyA, buffer, sizeof(buffer)); ptr = strchr(buffer, ','); ok( (res > 1) && (ptr != NULL), - "got %u with %u and %p for '%s' (expected '>1' and '!= NULL')\n", + "got %lu with %lu and %p for '%s' (expected '>1' and '!= NULL')\n", res, GetLastError(), ptr, buffer);
if (ptr) ptr[0] = '\0'; @@ -240,7 +240,7 @@ static void test_PrintDlgA(void) pDlg->Flags = PD_ENABLEPRINTHOOK; pDlg->lpfnPrintHook = print_hook_proc; res = PrintDlgA(pDlg); - ok(res, "PrintDlg error %#x\n", CommDlgExtendedError()); + ok(res, "PrintDlg error %#lx\n", CommDlgExtendedError()); /* Version of Microsoft XPS Document Writer driver shipped before Win7 * reports that it can print multiple copies, but returns 1. */ @@ -259,7 +259,7 @@ static void test_PrintDlgA(void) pDlg->Flags = PD_ENABLEPRINTHOOK | PD_USEDEVMODECOPIES; pDlg->lpfnPrintHook = print_hook_proc; res = PrintDlgA(pDlg); - ok(res, "PrintDlg error %#x\n", CommDlgExtendedError()); + ok(res, "PrintDlg error %#lx\n", CommDlgExtendedError()); ok(pDlg->nCopies == 1, "expected nCopies 1, got %d\n", pDlg->nCopies); ok(pDlg->hDevMode != 0, "hDevMode should not be 0\n"); dm = GlobalLock(pDlg->hDevMode); @@ -308,7 +308,7 @@ static HRESULT WINAPI callback_SelectionChange(IPrintDialogCallback *iface) static HRESULT WINAPI callback_HandleMessage(IPrintDialogCallback *iface, HWND hdlg, UINT msg, WPARAM wp, LPARAM lp, LRESULT *res) { - trace("callback_HandleMessage %p,%04x,%lx,%lx,%p\n", hdlg, msg, wp, lp, res); + trace("callback_HandleMessage %p,%04x,%Ix,%Ix,%p\n", hdlg, msg, wp, lp, res); /* *res = PD_RESULT_PRINT; */ return S_OK; } @@ -386,7 +386,7 @@ static void test_PrintDlgExW(void) SetLastError(0xdeadbeef); res = pPrintDlgExW(NULL); ok( (res == E_INVALIDARG), - "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n", + "got 0x%lx with %lu and %lu (expected 'E_INVALIDARG')\n", res, GetLastError(), CommDlgExtendedError() ); }
@@ -400,7 +400,7 @@ static void test_PrintDlgExW(void) SetLastError(0xdeadbeef); res = pPrintDlgExW(pDlg); ok( (res == E_INVALIDARG), - "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n", + "got 0x%lx with %lu and %lu (expected 'E_INVALIDARG')\n", res, GetLastError(), CommDlgExtendedError());
@@ -410,7 +410,7 @@ static void test_PrintDlgExW(void) SetLastError(0xdeadbeef); res = pPrintDlgExW(pDlg); ok( (res == E_INVALIDARG), - "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n", + "got 0x%lx with %lu and %lu (expected 'E_INVALIDARG')\n", res, GetLastError(), CommDlgExtendedError());
@@ -419,7 +419,7 @@ static void test_PrintDlgExW(void) SetLastError(0xdeadbeef); res = pPrintDlgExW(pDlg); ok( (res == E_HANDLE), - "got 0x%x with %u and %u (expected 'E_HANDLE')\n", + "got 0x%lx with %lu and %lu (expected 'E_HANDLE')\n", res, GetLastError(), CommDlgExtendedError());
/* nStartPage must be START_PAGE_GENERAL for the general page or a valid property sheet index */ @@ -428,7 +428,7 @@ static void test_PrintDlgExW(void) pDlg->hwndOwner = GetDesktopWindow(); pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING | PD_NOPAGENUMS; res = pPrintDlgExW(pDlg); - ok((res == E_INVALIDARG), "got 0x%x (expected 'E_INVALIDARG')\n", res); + ok((res == E_INVALIDARG), "got 0x%lx (expected 'E_INVALIDARG')\n", res);
/* Use PD_NOPAGENUMS or set nMaxPageRanges and lpPageRanges */ ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); @@ -437,7 +437,7 @@ static void test_PrintDlgExW(void) pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING; pDlg->nStartPage = START_PAGE_GENERAL; res = pPrintDlgExW(pDlg); - ok((res == E_INVALIDARG), "got 0x%x (expected 'E_INVALIDARG')\n", res); + ok((res == E_INVALIDARG), "got 0x%lx (expected 'E_INVALIDARG')\n", res);
/* this is invalid: a valid lpPageRanges with 0 for nMaxPageRanges */ ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); @@ -447,7 +447,7 @@ static void test_PrintDlgExW(void) pDlg->lpPageRanges = pagerange; pDlg->nStartPage = START_PAGE_GENERAL; res = pPrintDlgExW(pDlg); - ok((res == E_INVALIDARG), "got 0x%x (expected 'E_INVALIDARG')\n", res); + ok((res == E_INVALIDARG), "got 0x%lx (expected 'E_INVALIDARG')\n", res);
/* this is invalid: NULL for lpPageRanges with a valid nMaxPageRanges */ ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); @@ -457,7 +457,7 @@ static void test_PrintDlgExW(void) pDlg->nMaxPageRanges = 1; pDlg->nStartPage = START_PAGE_GENERAL; res = pPrintDlgExW(pDlg); - ok((res == E_INVALIDARG), "got 0x%x (expected 'E_INVALIDARG')\n", res); + ok((res == E_INVALIDARG), "got 0x%lx (expected 'E_INVALIDARG')\n", res);
/* this works: lpPageRanges with a valid nMaxPageRanges */ ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); @@ -475,7 +475,7 @@ static void test_PrintDlgExW(void) return; }
- ok(res == S_OK, "got 0x%x (expected S_OK)\n", res); + ok(res == S_OK, "got 0x%lx (expected S_OK)\n", res);
dn = GlobalLock(pDlg->hDevNames); ok(dn != NULL, "expected '!= NULL' for GlobalLock(%p)\n",pDlg->hDevNames); @@ -498,7 +498,7 @@ static void test_PrintDlgExW(void) pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING | PD_NOPAGENUMS; pDlg->nStartPage = START_PAGE_GENERAL; res = pPrintDlgExW(pDlg); - ok(res == S_OK, "got 0x%x (expected S_OK)\n", res); + ok(res == S_OK, "got 0x%lx (expected S_OK)\n", res); GlobalFree(pDlg->hDevMode); GlobalFree(pDlg->hDevNames);
@@ -509,7 +509,7 @@ static void test_PrintDlgExW(void) pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING | PD_NOPAGENUMS | PD_RETURNDC; pDlg->nStartPage = START_PAGE_GENERAL; res = pPrintDlgExW(pDlg); - ok(res == S_OK, "got 0x%x (expected S_OK)\n", res); + ok(res == S_OK, "got 0x%lx (expected S_OK)\n", res); ok(pDlg->hDC != NULL, "HDC missing for PD_RETURNDC\n"); GlobalFree(pDlg->hDevMode); GlobalFree(pDlg->hDevNames); @@ -522,7 +522,7 @@ static void test_PrintDlgExW(void) pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING | PD_NOPAGENUMS | PD_RETURNIC; pDlg->nStartPage = START_PAGE_GENERAL; res = pPrintDlgExW(pDlg); - ok(res == S_OK, "got 0x%x (expected S_OK)\n", res); + ok(res == S_OK, "got 0x%lx (expected S_OK)\n", res); ok(pDlg->hDC != NULL, "HDC missing for PD_RETURNIC\n"); GlobalFree(pDlg->hDevMode); GlobalFree(pDlg->hDevNames); @@ -545,8 +545,8 @@ static void test_PrintDlgExW(void) pDlg->lpCallback = &unknown; pDlg->dwResultAction = S_OK; res = pPrintDlgExW(pDlg); - ok(res == S_OK, "got 0x%x (expected S_OK)\n", res); - ok(pDlg->dwResultAction == PD_RESULT_PRINT, "expected PD_RESULT_PRINT, got %#x\n", pDlg->dwResultAction); + ok(res == S_OK, "got 0x%lx (expected S_OK)\n", res); + ok(pDlg->dwResultAction == PD_RESULT_PRINT, "expected PD_RESULT_PRINT, got %#lx\n", pDlg->dwResultAction); ok(pDlg->hDC != NULL, "HDC missing for PD_RETURNIC\n"); GlobalFree(pDlg->hDevMode); GlobalFree(pDlg->hDevNames); @@ -602,7 +602,7 @@ static void test_abort_proc(void)
ok(job_id > 0 || GetLastError() == ERROR_SPL_NO_STARTDOC, /* Vista can fail with this error when using the XPS driver */ - "StartDocA failed ret %d gle %d\n", job_id, GetLastError()); + "StartDocA failed ret %d gle %ld\n", job_id, GetLastError());
if(job_id <= 0) { @@ -630,7 +630,7 @@ static void test_abort_proc(void) end: SetLastError(0xdeadbeef); if(!DeleteFileA(filename)) - trace("Failed to delete temporary file (err = %x)\n", GetLastError()); + trace("Failed to delete temporary file (err = %lx)\n", GetLastError()); }
/* ########################### */
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109050
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
comdlg32: itemdlg: Timeout
=== w7u_adm (32 bit report) ===
comdlg32: itemdlg: Timeout
=== w7u_el (32 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064v1507 (32 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064v1809 (32 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064 (32 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064_tsign (32 bit report) ===
comdlg32: itemdlg: Timeout
=== w10pro64 (32 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064v1507 (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064v1809 (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064 (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064_2qxl (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w1064_tsign (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w10pro64 (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w10pro64_ar (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w10pro64_he (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w10pro64_ja (64 bit report) ===
comdlg32: itemdlg: Timeout
=== w10pro64_zh_CN (64 bit report) ===
comdlg32: itemdlg: Timeout
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/comsvcs/tests/Makefile.in | 1 dlls/comsvcs/tests/comsvcs.c | 126 ++++++++++++++++++++-------------------- dlls/comsvcs/tests/property.c | 20 +++--- 3 files changed, 73 insertions(+), 74 deletions(-)
diff --git a/dlls/comsvcs/tests/Makefile.in b/dlls/comsvcs/tests/Makefile.in index a0b9b4ebfca..1d9146ba5b6 100644 --- a/dlls/comsvcs/tests/Makefile.in +++ b/dlls/comsvcs/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = comsvcs.dll IMPORTS = uuid oleaut32 ole32
diff --git a/dlls/comsvcs/tests/comsvcs.c b/dlls/comsvcs/tests/comsvcs.c index 2049f555f4a..9f258b24f29 100644 --- a/dlls/comsvcs/tests/comsvcs.c +++ b/dlls/comsvcs/tests/comsvcs.c @@ -63,7 +63,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__,line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
struct test_driver @@ -186,7 +186,7 @@ static void create_dispenser(void) struct test_driver driver;
hr = CoCreateInstance( &CLSID_DispenserManager, NULL, CLSCTX_ALL, &IID_IDispenserManager, (void**)&dispenser); - ok(hr == S_OK, "Failed to create object 0x%08x\n", hr); + ok(hr == S_OK, "Failed to create object 0x%08lx\n", hr); if(FAILED(hr)) { win_skip("DispenserManager not available\n"); @@ -196,13 +196,13 @@ static void create_dispenser(void) thread = CreateThread(NULL, 0, com_thread, NULL, 0, NULL); ok(!WaitForSingleObject(thread, 1000), "wait failed\n"); GetExitCodeThread(thread, &ret); - ok(ret == CO_E_NOTINITIALIZED, "got unexpected hr %#x\n", ret); + ok(ret == CO_E_NOTINITIALIZED, "got unexpected hr %#lx\n", ret); CloseHandle(thread);
init_test_driver(&driver);
hr = IDispenserManager_RegisterDispenser(dispenser, &driver.IDispenserDriver_iface, L"SC.Pool 0 0", &holder1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* The above call creates an MTA thread, but we need to wait for it to * actually initialize. */ @@ -210,15 +210,15 @@ static void create_dispenser(void) thread = CreateThread(NULL, 0, com_thread, NULL, 0, NULL); ok(!WaitForSingleObject(thread, 20000), "wait failed\n"); GetExitCodeThread(thread, &ret); - ok(ret == S_OK, "got unexpected hr %#x\n", ret); + ok(ret == S_OK, "got unexpected hr %#lx\n", ret); CloseHandle(thread);
hr = IDispenserManager_RegisterDispenser(dispenser, &driver.IDispenserDriver_iface, L"SC.Pool 0 0", &holder2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(holder1 != holder2, "same holder object returned\n");
hr = IDispenserManager_RegisterDispenser(dispenser, &driver.IDispenserDriver_iface, L"SC.Pool 1 1", &holder3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if(holder1) { @@ -227,7 +227,7 @@ static void create_dispenser(void)
str = SysAllocString(L"data1"); hr = IHolder_AllocResource(holder1, (RESTYPID)str, &resid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(resid == 10, "got %d\n", (int)resid); SysFreeString(str);
@@ -236,13 +236,13 @@ static void create_dispenser(void)
SET_EXPECT(driver_ResetResource); hr = IHolder_FreeResource(holder1, resid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine CHECK_CALLED(driver_ResetResource);
SET_EXPECT(driver_DestroyResource); SET_EXPECT(driver_Release); hr = IHolder_Close(holder1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CHECK_CALLED(driver_Release); CHECK_CALLED(driver_DestroyResource);
@@ -255,7 +255,7 @@ static void create_dispenser(void)
str = SysAllocString(L"data1"); hr = IHolder_AllocResource(holder2, (RESTYPID)str, &resid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(resid == 10, "got %d\n", (int)resid); SysFreeString(str);
@@ -264,7 +264,7 @@ static void create_dispenser(void)
SET_EXPECT(driver_ResetResource); hr = IHolder_FreeResource(holder2, resid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine CHECK_CALLED(driver_ResetResource);
/* DestroyResource return doesn't directly affect the Holder Close return value */ @@ -272,7 +272,7 @@ static void create_dispenser(void) SET_EXPECT(driver_DestroyResource); SET_EXPECT(driver_Release); hr = IHolder_Close(holder2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CHECK_CALLED(driver_Release); CHECK_CALLED(driver_DestroyResource); driver.destroy_resource_hr = S_OK; @@ -282,7 +282,7 @@ static void create_dispenser(void) { SET_EXPECT(driver_Release); hr = IHolder_Close(holder3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CHECK_CALLED(driver_Release); IHolder_Release(holder3); } @@ -301,7 +301,7 @@ static void test_new_moniker_serialize(const WCHAR *clsid, const WCHAR *progid, DWORD *ptr;
hr = IMoniker_GetSizeMax(moniker, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
expected_size = sizeof(GUID) + 2 * sizeof(DWORD); if (progid) @@ -312,24 +312,24 @@ static void test_new_moniker_serialize(const WCHAR *clsid, const WCHAR *progid,
size.QuadPart = 0; hr = IMoniker_GetSizeMax(moniker, &size); - ok(hr == S_OK, "Failed to get size, hr %#x.\n", hr); - ok(size.QuadPart == expected_size, "Unexpected size %s, expected %#x.\n", wine_dbgstr_longlong(size.QuadPart), + ok(hr == S_OK, "Failed to get size, hr %#lx.\n", hr); + ok(size.QuadPart == expected_size, "Unexpected size %s, expected %#lx.\n", wine_dbgstr_longlong(size.QuadPart), expected_size);
hr = CreateStreamOnHGlobal(NULL, 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 = IMoniker_Save(moniker, stream, FALSE); - ok(hr == S_OK, "Failed to save moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to save moniker, hr %#lx.\n", hr);
hr = GetHGlobalFromStream(stream, &hglobal); - ok(hr == S_OK, "Failed to get a handle, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a handle, hr %#lx.\n", hr);
ptr = GlobalLock(hglobal); ok(!!ptr, "Failed to get data pointer.\n");
hr = CLSIDFromString(clsid, &guid); - ok(hr == S_OK, "Failed to get CLSID, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get CLSID, hr %#lx.\n", hr); ok(IsEqualGUID((GUID *)ptr, &guid), "Unexpected buffer content.\n"); ptr += sizeof(GUID)/sizeof(DWORD);
@@ -376,51 +376,51 @@ static void test_new_moniker(void) WCHAR *str;
hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "Failed to create bind context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create bind context, hr %#lx.\n", hr);
eaten = 0; hr = MkParseDisplayName(bindctx, L"new:20d04fe0-3aea-1069-a2d8-08002b30309d", &eaten, &moniker); - ok(hr == S_OK, "Failed to parse display name, hr %#x.\n", hr); - ok(eaten == 40, "Unexpected eaten length %u.\n", eaten); + ok(hr == S_OK, "Failed to parse display name, hr %#lx.\n", hr); + ok(eaten == 40, "Unexpected eaten length %lu.\n", eaten);
hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rot_data); - ok(hr == S_OK, "Failed to get IROTData, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IROTData, hr %#lx.\n", hr); IROTData_Release(rot_data);
eaten = 0; hr = IMoniker_ParseDisplayName(moniker, bindctx, NULL, (WCHAR *)L"new:20d04fe0-3aea-1069-a2d8-08002b30309d", &eaten, &moniker2); - ok(hr == S_OK, "Failed to parse display name, hr %#x.\n", hr); - ok(eaten == 40, "Unexpected eaten length %u.\n", eaten); + ok(hr == S_OK, "Failed to parse display name, hr %#lx.\n", hr); + ok(eaten == 40, "Unexpected eaten length %lu.\n", eaten); IMoniker_Release(moniker2);
hr = IMoniker_QueryInterface(moniker, &IID_IParseDisplayName, (void **)&obj); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
/* Object creation. */ hr = CLSIDFromProgID(L"new", &clsid); - ok(hr == S_OK, "Failed to get clsid, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clsid, hr %#lx.\n", hr);
hr = CreateClassMoniker(&clsid, &class_moniker); - ok(hr == S_OK, "Failed to create class moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create class moniker, hr %#lx.\n", hr);
hr = IMoniker_BindToObject(class_moniker, bindctx, NULL, &IID_IParseDisplayName, (void **)&obj); - ok(hr == S_OK, "Failed to get parsing interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parsing interface, hr %#lx.\n", hr); IUnknown_Release(obj);
hr = IMoniker_BindToObject(class_moniker, bindctx, NULL, &IID_IClassFactory, (void **)&obj); - ok(hr == S_OK, "Failed to get parsing interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parsing interface, hr %#lx.\n", hr); IUnknown_Release(obj);
hr = CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IParseDisplayName, (void **)&obj); - ok(hr == S_OK, "Failed to get parsing interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parsing interface, hr %#lx.\n", hr); IUnknown_Release(obj);
hr = CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void **)&obj); - ok(hr == S_OK, "Failed to get parsing interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parsing interface, hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(obj, &IID_IParseDisplayName, (void **)&obj2); - ok(hr == S_OK, "Failed to get parsing interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parsing interface, hr %#lx.\n", hr); IUnknown_Release(obj);
IMoniker_Release(class_moniker); @@ -428,73 +428,73 @@ static void test_new_moniker(void) /* Reducing. */ moniker_left = (void *)0xdeadbeef; hr = IMoniker_Reduce(moniker, bindctx, MKRREDUCE_ONE, &moniker_left, &moniker2); - ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#lx.\n", hr); ok(moniker_left == (void *)0xdeadbeef, "Unexpected left moniker.\n"); ok(moniker2 == moniker, "Unexpected returned moniker.\n"); IMoniker_Release(moniker2);
hr = IMoniker_Reduce(moniker, bindctx, MKRREDUCE_ONE, NULL, &moniker2); - ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#lx.\n", hr); ok(moniker2 == moniker, "Unexpected returned moniker.\n"); IMoniker_Release(moniker2);
hr = IMoniker_Reduce(moniker, bindctx, MKRREDUCE_ONE, NULL, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Hashing */ hash = 0; hr = IMoniker_Hash(moniker, &hash); - ok(hr == S_OK, "Failed to get a hash, hr %#x.\n", hr); - ok(hash == 0x20d04fe0, "Unexpected hash value %#x.\n", hash); + ok(hr == S_OK, "Failed to get a hash, hr %#lx.\n", hr); + ok(hash == 0x20d04fe0, "Unexpected hash value %#lx.\n", hash);
moniker_type = MKSYS_CLASSMONIKER; hr = IMoniker_IsSystemMoniker(moniker, &moniker_type); - ok(hr == S_FALSE || broken(hr == S_OK) /* XP */, "Unexpected hr %#x.\n", hr); - ok(moniker_type == MKSYS_NONE, "Unexpected moniker type %d.\n", moniker_type); + ok(hr == S_FALSE || broken(hr == S_OK) /* XP */, "Unexpected hr %#lx.\n", hr); + ok(moniker_type == MKSYS_NONE, "Unexpected moniker type %ld.\n", moniker_type);
hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL); todo_wine - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); todo_wine - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == MK_E_UNAVAILABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_UNAVAILABLE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&obj); - ok(hr == S_OK, "Failed to bind to object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to bind to object, hr %#lx.\n", hr); IUnknown_Release(obj);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&obj); todo_wine - ok(hr == MK_E_NOSTORAGE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOSTORAGE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Inverse(moniker, &inverse); - ok(hr == S_OK, "Failed to create inverse moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create inverse moniker, hr %#lx.\n", hr); moniker_type = MKSYS_NONE; hr = IMoniker_IsSystemMoniker(inverse, &moniker_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(moniker_type == MKSYS_ANTIMONIKER, "Unexpected moniker type %d.\n", moniker_type); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(moniker_type == MKSYS_ANTIMONIKER, "Unexpected moniker type %ld.\n", moniker_type); IMoniker_Release(inverse);
hr = IMoniker_Enum(moniker, FALSE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
obj = (IUnknown *)moniker; hr = IMoniker_Enum(moniker, FALSE, (IEnumMoniker **)&obj); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(obj == NULL, "Unexpected return value.\n");
/* Serialization. */ test_new_moniker_serialize(L"{20d04fe0-3aea-1069-a2d8-08002b30309d}", NULL, moniker);
hr = IMoniker_IsDirty(moniker); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetClassID(moniker, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker);
@@ -504,39 +504,39 @@ static void test_new_moniker(void) bind_opts.dwClassContext = CLSCTX_INPROC_SERVER;
hr = CoGetObject(L"new:msxml2.domdocument", (BIND_OPTS *)&bind_opts, &IID_IXMLDOMDocument, (void **)&obj); - ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create object, hr %#lx.\n", hr); IUnknown_Release(obj);
IBindCtx_Release(bindctx);
/* Returned object is not bound to context. */ hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "Failed to create bind context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create bind context, hr %#lx.\n", hr);
eaten = 0; hr = MkParseDisplayName(bindctx, L"new:msxml2.domdocument", &eaten, &moniker); - ok(hr == S_OK, "Failed to parse display name, hr %#x.\n", hr); - ok(eaten, "Unexpected eaten length %u.\n", eaten); + ok(hr == S_OK, "Failed to parse display name, hr %#lx.\n", hr); + ok(eaten, "Unexpected eaten length %lu.\n", eaten);
hr = CLSIDFromProgID(L"msxml2.domdocument", &clsid); - ok(hr == S_OK, "Failed to get clsid, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clsid, hr %#lx.\n", hr);
hr = StringFromCLSID(&clsid, &str); - ok(hr == S_OK, "Failed to get guid string, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get guid string, hr %#lx.\n", hr);
test_new_moniker_serialize(str, L"msxml2.domdocument", moniker); CoTaskMemFree(str);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&obj); - ok(hr == S_OK, "Failed to bind to object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to bind to object, hr %#lx.\n", hr); EXPECT_REF(obj, 1);
hr = IBindCtx_GetRunningObjectTable(bindctx, &rot); - ok(hr == S_OK, "Failed to get rot, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get rot, hr %#lx.\n", hr);
hr = IRunningObjectTable_GetObject(rot, moniker, &obj2); todo_wine - ok(hr == MK_E_UNAVAILABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_UNAVAILABLE, "Unexpected hr %#lx.\n", hr);
IRunningObjectTable_Release(rot);
diff --git a/dlls/comsvcs/tests/property.c b/dlls/comsvcs/tests/property.c index 7be62987507..08ab8ec978a 100644 --- a/dlls/comsvcs/tests/property.c +++ b/dlls/comsvcs/tests/property.c @@ -70,35 +70,35 @@ static void test_interfaces(void)
hr = CoCreateInstance(&CLSID_SharedPropertyGroupManager, &test_outer, CLSCTX_INPROC_SERVER, &IID_ISharedPropertyGroupManager, (void **)&manager); - ok(hr == CLASS_E_NOAGGREGATION, "Got hr %#x.\n", hr); + ok(hr == CLASS_E_NOAGGREGATION, "Got hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_SharedPropertyGroupManager, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
expected_refcount = get_refcount(unk) + 1; hr = IUnknown_QueryInterface(unk, &IID_ISharedPropertyGroupManager, (void **)&manager); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); refcount = get_refcount(unk); - ok(refcount == expected_refcount, "Got refcount: %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount: %lu, expected %lu.\n", refcount, expected_refcount);
expected_refcount = get_refcount(manager) + 1; hr = CoCreateInstance(&CLSID_SharedPropertyGroupManager, NULL, CLSCTX_INPROC_SERVER, &IID_ISharedPropertyGroupManager, (void **)&manager1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(manager1 == manager, "Got wrong pointer: %p.\n", manager1); refcount = get_refcount(manager1); - ok(refcount == expected_refcount, "Got refcount: %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount: %lu, expected %lu.\n", refcount, expected_refcount); refcount = get_refcount(manager); - ok(refcount == expected_refcount, "Got refcount: %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount: %lu, expected %lu.\n", refcount, expected_refcount); ISharedPropertyGroupManager_Release(manager1);
hr = IUnknown_QueryInterface(unk, &IID_IDispatch, (void **)&dispatch); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); refcount = get_refcount(dispatch); - ok(refcount == expected_refcount, "Got refcount: %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount: %lu, expected %lu.\n", refcount, expected_refcount); refcount = get_refcount(manager); - ok(refcount == expected_refcount, "Got refcount: %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount: %lu, expected %lu.\n", refcount, expected_refcount);
IDispatch_Release(dispatch); IUnknown_Release(unk);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109051
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/credui/tests/Makefile.in | 1 - dlls/credui/tests/credui.c | 36 ++++++++++++++++++------------------ 2 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/dlls/credui/tests/Makefile.in b/dlls/credui/tests/Makefile.in index b2a8c778df4..4442837ed11 100644 --- a/dlls/credui/tests/Makefile.in +++ b/dlls/credui/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = credui.dll IMPORTS = credui
diff --git a/dlls/credui/tests/credui.c b/dlls/credui/tests/credui.c index f2b71d603cc..715ae35b130 100644 --- a/dlls/credui/tests/credui.c +++ b/dlls/credui/tests/credui.c @@ -50,10 +50,10 @@ static void test_CredUIPromptForCredentials(void)
ret = CredUIConfirmCredentialsW(NULL, TRUE); ok(ret == ERROR_INVALID_PARAMETER /* 2003 + */ || ret == ERROR_NOT_FOUND /* XP */, - "CredUIConfirmCredentials should have returned ERROR_INVALID_PARAMETER or ERROR_NOT_FOUND instead of %d\n", ret); + "CredUIConfirmCredentials should have returned ERROR_INVALID_PARAMETER or ERROR_NOT_FOUND instead of %ld\n", ret);
ret = CredUIConfirmCredentialsW(wszServerName, TRUE); - ok(ret == ERROR_NOT_FOUND, "CredUIConfirmCredentials should have returned ERROR_NOT_FOUND instead of %d\n", ret); + ok(ret == ERROR_NOT_FOUND, "CredUIConfirmCredentials should have returned ERROR_NOT_FOUND instead of %ld\n", ret);
username[0] = '\0'; password[0] = '\0'; @@ -61,19 +61,19 @@ static void test_CredUIPromptForCredentials(void) ARRAY_SIZE(username), password, ARRAY_SIZE(password), NULL, CREDUI_FLAGS_ALWAYS_SHOW_UI); - ok(ret == ERROR_INVALID_FLAGS, "CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %d\n", ret); + ok(ret == ERROR_INVALID_FLAGS, "CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %ld\n", ret);
ret = CredUIPromptForCredentialsW(NULL, NULL, NULL, 0, username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), NULL, CREDUI_FLAGS_ALWAYS_SHOW_UI | CREDUI_FLAGS_GENERIC_CREDENTIALS); - ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %ld\n", ret);
ret = CredUIPromptForCredentialsW(NULL, wszServerName, NULL, 0, username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), NULL, CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX); - ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %ld\n", ret);
if (winetest_interactive) { @@ -81,11 +81,11 @@ static void test_CredUIPromptForCredentials(void) ARRAY_SIZE(username), password, ARRAY_SIZE(password), &save, CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret); if (ret == ERROR_SUCCESS) { ret = CredUIConfirmCredentialsW(wszServerName, FALSE); - ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %ld\n", ret); }
credui_info.pszCaptionText = L"CREDUI_FLAGS_EXPECT_CONFIRMATION"; @@ -93,11 +93,11 @@ static void test_CredUIPromptForCredentials(void) username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), &save, CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret); if (ret == ERROR_SUCCESS) { ret = CredUIConfirmCredentialsW(wszServerName, FALSE); - ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %ld\n", ret); }
credui_info.pszCaptionText = L"CREDUI_FLAGS_INCORRECT_PASSWORD|CREDUI_FLAGS_EXPECT_CONFIRMATION"; @@ -105,11 +105,11 @@ static void test_CredUIPromptForCredentials(void) username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), NULL, CREDUI_FLAGS_INCORRECT_PASSWORD|CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret); if (ret == ERROR_SUCCESS) { ret = CredUIConfirmCredentialsW(wszServerName, FALSE); - ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %ld\n", ret); }
@@ -119,7 +119,7 @@ static void test_CredUIPromptForCredentials(void) username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), &save, CREDUI_FLAGS_DO_NOT_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret); ok(save, "save flag should have been untouched\n");
save = FALSE; @@ -128,12 +128,12 @@ static void test_CredUIPromptForCredentials(void) username, ARRAY_SIZE(username), password, ARRAY_SIZE(password), &save, CREDUI_FLAGS_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret); ok(!save, "save flag should have been untouched\n"); if (ret == ERROR_SUCCESS) { ret = CredUIConfirmCredentialsW(wszServerName, FALSE); - ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret); + ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %ld\n", ret); }
} @@ -160,17 +160,17 @@ static void test_SspiPromptForCredentials(void) info.pszCaptionText = L"basic"; info.hbmBanner = NULL; ret = pSspiPromptForCredentialsW( NULL, &info, 0, L"basic", NULL, &id, &save, 0 ); - ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); + ok( ret == ERROR_INVALID_PARAMETER, "got %lu\n", ret );
ret = pSspiPromptForCredentialsW( L"SspiTest", &info, 0, NULL, NULL, &id, &save, 0 ); - ok( ret == ERROR_NO_SUCH_PACKAGE, "got %u\n", ret ); + ok( ret == ERROR_NO_SUCH_PACKAGE, "got %lu\n", ret );
if (winetest_interactive) { id = NULL; save = -1; ret = pSspiPromptForCredentialsW( L"SspiTest", &info, 0, L"basic", NULL, &id, &save, 0 ); - ok( ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "got %u\n", ret ); + ok( ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "got %lu\n", ret ); if (ret == ERROR_SUCCESS) { ok( id != NULL, "id not set\n" ); @@ -179,7 +179,7 @@ static void test_SspiPromptForCredentials(void) username = creds = NULL; domain = (const WCHAR *)0xdeadbeef; status = pSspiEncodeAuthIdentityAsStrings( id, &username, &domain, &creds ); - ok( status == SEC_E_OK, "got %u\n", status ); + ok( status == SEC_E_OK, "got %lu\n", status ); ok( username != NULL, "username not set\n" ); ok( domain == NULL, "domain not set\n" ); ok( creds != NULL, "creds not set\n" );
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109052
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 error: patch failed: dlls/credui/tests/Makefile.in:1 error: patch failed: dlls/credui/tests/credui.c:50 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 error: patch failed: dlls/credui/tests/Makefile.in:1 error: patch failed: dlls/credui/tests/credui.c:50 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/crypt32/tests/Makefile.in | 1 dlls/crypt32/tests/base64.c | 148 ++-- dlls/crypt32/tests/cert.c | 790 ++++++++++---------- dlls/crypt32/tests/chain.c | 140 ++-- dlls/crypt32/tests/crl.c | 204 +++-- dlls/crypt32/tests/ctl.c | 56 + dlls/crypt32/tests/encode.c | 1474 +++++++++++++++++++------------------- dlls/crypt32/tests/main.c | 94 +- dlls/crypt32/tests/message.c | 260 +++---- dlls/crypt32/tests/msg.c | 758 ++++++++++---------- dlls/crypt32/tests/object.c | 24 - dlls/crypt32/tests/oid.c | 130 ++- dlls/crypt32/tests/protectdata.c | 20 - dlls/crypt32/tests/sip.c | 40 + dlls/crypt32/tests/store.c | 608 ++++++++-------- dlls/crypt32/tests/str.c | 104 +-- 16 files changed, 2425 insertions(+), 2426 deletions(-)
diff --git a/dlls/crypt32/tests/Makefile.in b/dlls/crypt32/tests/Makefile.in index 3a227243221..339cff30e0f 100644 --- a/dlls/crypt32/tests/Makefile.in +++ b/dlls/crypt32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = crypt32.dll IMPORTS = crypt32 advapi32 user32 shlwapi shell32 bcrypt
diff --git a/dlls/crypt32/tests/base64.c b/dlls/crypt32/tests/base64.c index 64148342b2b..a1517b294ad 100644 --- a/dlls/crypt32/tests/base64.c +++ b/dlls/crypt32/tests/base64.c @@ -115,18 +115,18 @@ static void encodeAndCompareBase64_A(const BYTE *toEncode, DWORD toEncodeLen,
strLen = 0; ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen == required, "Unexpected required length %u, expected %u.\n", required, strLen); + ok(ret, "CryptBinaryToStringA failed: %ld\n", GetLastError()); + ok(strLen == required, "Unexpected required length %lu, expected %lu.\n", required, strLen);
strLen2 = strLen; ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen == strLen2, "Unexpected required length %u, expected %u.\n", strLen2, strLen); + ok(ret, "CryptBinaryToStringA failed: %ld\n", GetLastError()); + ok(strLen == strLen2, "Unexpected required length %lu, expected %lu.\n", strLen2, strLen);
strLen2 = strLen - 1; ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen == strLen2, "Unexpected required length %u, expected %u.\n", strLen2, strLen); + ok(ret, "CryptBinaryToStringA failed: %ld\n", GetLastError()); + ok(strLen == strLen2, "Unexpected required length %lu, expected %lu.\n", strLen2, strLen);
str = heap_alloc(strLen);
@@ -134,17 +134,17 @@ static void encodeAndCompareBase64_A(const BYTE *toEncode, DWORD toEncodeLen, strLen2 = strLen - 1; str[0] = 0x12; ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, str, &strLen2); - ok((!ret && GetLastError() == ERROR_MORE_DATA) || broken(ret) /* XP */, "CryptBinaryToStringA failed %d, error %d.\n", + ok((!ret && GetLastError() == ERROR_MORE_DATA) || broken(ret) /* XP */, "CryptBinaryToStringA failed %d, error %ld.\n", ret, GetLastError()); - ok(strLen2 == strLen || broken(strLen2 == strLen - 1), "Expected length %d, got %d\n", strLen, strLen2); + ok(strLen2 == strLen || broken(strLen2 == strLen - 1), "Expected length %ld, got %ld\n", strLen, strLen2); if (header) ok(str[0] == header[0], "Unexpected buffer contents %#x.\n", str[0]); else ok(str[0] == expected[0], "Unexpected buffer contents %#x.\n", str[0]); strLen2 = strLen; ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, str, &strLen2); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", strLen - 1, strLen2); + ok(ret, "CryptBinaryToStringA failed: %ld\n", GetLastError()); + ok(strLen2 == strLen - 1, "Expected length %ld, got %ld\n", strLen - 1, strLen2);
ptr = str; if (header) @@ -177,23 +177,23 @@ static void encode_compare_base64_W(const BYTE *toEncode, DWORD toEncodeLen, DWO
strLen = 0; ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); - ok(strLen == required, "Unexpected required length %u, expected %u.\n", strLen, required); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); + ok(strLen == required, "Unexpected required length %lu, expected %u.\n", strLen, required);
/* Same call with non-zero length value. */ strLen2 = strLen; ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen2); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); ok(strLen == strLen2, "Unexpected required length.\n");
strLen2 = strLen - 1; ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen2); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); ok(strLen == strLen2, "Unexpected required length.\n");
strLen2 = strLen - 1; ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen2); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); ok(strLen == strLen2, "Unexpected required length.\n");
strW = heap_alloc(strLen * sizeof(WCHAR)); @@ -204,7 +204,7 @@ static void encode_compare_base64_W(const BYTE *toEncode, DWORD toEncodeLen, DWO strLen2 = strLen - 1; strW[0] = 0x1234; ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, strW, &strLen2); - ok((!ret && GetLastError() == ERROR_MORE_DATA) || broken(ret) /* XP */, "CryptBinaryToStringW failed, %d, error %d\n", + ok((!ret && GetLastError() == ERROR_MORE_DATA) || broken(ret) /* XP */, "CryptBinaryToStringW failed, %d, error %ld\n", ret, GetLastError()); if (headerW) ok(strW[0] == 0x1234, "Unexpected buffer contents %#x.\n", strW[0]); @@ -213,9 +213,9 @@ static void encode_compare_base64_W(const BYTE *toEncode, DWORD toEncodeLen, DWO
strLen2 = strLen; ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, strW, &strLen2); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError());
- ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", strLen - 1, strLen); + ok(strLen2 == strLen - 1, "Expected length %ld, got %ld\n", strLen - 1, strLen);
ptr = strW; if (headerW) @@ -271,12 +271,12 @@ static void test_CryptBinaryToString(void)
ret = CryptBinaryToStringA(NULL, 0, 0, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
strLen = 123; ret = CryptBinaryToStringA(NULL, 0, 0, NULL, &strLen); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); ok(strLen == 123, "Unexpected length.\n");
if (0) @@ -284,7 +284,7 @@ static void test_CryptBinaryToString(void)
strLen = 123; ret = CryptBinaryToStringW(NULL, 0, 0, NULL, &strLen); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "Unexpected error %d\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "Unexpected error %ld\n", GetLastError()); ok(strLen == 123, "Unexpected length.\n");
for (i = 0; i < ARRAY_SIZE(tests); i++) @@ -295,27 +295,27 @@ static void test_CryptBinaryToString(void)
strLen = 0; ret = CryptBinaryToStringA(tests[i].toEncode, tests[i].toEncodeLen, CRYPT_STRING_BINARY, NULL, &strLen); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen == tests[i].toEncodeLen, "Unexpected required length %u.\n", strLen); + ok(ret, "CryptBinaryToStringA failed: %ld\n", GetLastError()); + ok(strLen == tests[i].toEncodeLen, "Unexpected required length %lu.\n", strLen);
strLen2 = strLen; str = heap_alloc(strLen); ret = CryptBinaryToStringA(tests[i].toEncode, tests[i].toEncodeLen, CRYPT_STRING_BINARY, str, &strLen2); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen == strLen2, "Expected length %u, got %u\n", strLen, strLen2); + ok(ret, "CryptBinaryToStringA failed: %ld\n", GetLastError()); + ok(strLen == strLen2, "Expected length %lu, got %lu\n", strLen, strLen2); ok(!memcmp(str, tests[i].toEncode, tests[i].toEncodeLen), "Unexpected value\n"); heap_free(str);
strLen = 0; ret = CryptBinaryToStringW(tests[i].toEncode, tests[i].toEncodeLen, CRYPT_STRING_BINARY, NULL, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); - ok(strLen == tests[i].toEncodeLen, "Unexpected required length %u.\n", strLen); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); + ok(strLen == tests[i].toEncodeLen, "Unexpected required length %lu.\n", strLen);
strLen2 = strLen; strW = heap_alloc(strLen); ret = CryptBinaryToStringW(tests[i].toEncode, tests[i].toEncodeLen, CRYPT_STRING_BINARY, strW, &strLen2); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); - ok(strLen == strLen2, "Expected length %u, got %u\n", strLen, strLen2); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); + ok(strLen == strLen2, "Expected length %lu, got %lu\n", strLen, strLen2); ok(!memcmp(strW, tests[i].toEncode, tests[i].toEncodeLen), "Unexpected value\n"); heap_free(strW);
@@ -349,14 +349,14 @@ static void test_CryptBinaryToString(void)
ret = CryptBinaryToStringA(testsNoCR[i].toEncode, testsNoCR[i].toEncodeLen, CRYPT_STRING_BINARY | CRYPT_STRING_NOCR, NULL, &strLen); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringA failed: %ld\n", GetLastError());
strLen2 = strLen; str = heap_alloc(strLen); ret = CryptBinaryToStringA(testsNoCR[i].toEncode, testsNoCR[i].toEncodeLen, CRYPT_STRING_BINARY | CRYPT_STRING_NOCR, str, &strLen2); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen == strLen2, "Expected length %d, got %d\n", strLen, strLen2); + ok(ret, "CryptBinaryToStringA failed: %ld\n", GetLastError()); + ok(strLen == strLen2, "Expected length %ld, got %ld\n", strLen, strLen2); ok(!memcmp(str, testsNoCR[i].toEncode, testsNoCR[i].toEncodeLen), "Unexpected value\n"); heap_free(str);
@@ -390,7 +390,7 @@ static void test_CryptBinaryToString(void) strLen = 0; ret = CryptBinaryToStringW(input, 3, CRYPT_STRING_HEXRAW, NULL, &strLen); ok(ret, "Failed to get string length.\n"); - ok(strLen == 9 || broken(strLen == 7), "Unexpected string length %d.\n", strLen); + ok(strLen == 9 || broken(strLen == 7), "Unexpected string length %ld.\n", strLen); if (strLen == 7) { win_skip("CryptBinaryToString(HEXRAW) not supported\n"); @@ -404,13 +404,13 @@ static void test_CryptBinaryToString(void) { strLen = 0; ret = CryptBinaryToStringW(input, sizeof(input), CRYPT_STRING_HEXRAW|flags[i], NULL, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); ok(strLen > 0, "Unexpected string length.\n");
strLen = ~0; ret = CryptBinaryToStringW(input, sizeof(input), CRYPT_STRING_HEXRAW|flags[i], NULL, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); if (flags[i] & CRYPT_STRING_NOCRLF) strLen2 = 0; else if (flags[i] & CRYPT_STRING_NOCR) @@ -418,7 +418,7 @@ static void test_CryptBinaryToString(void) else strLen2 = 2; strLen2 += sizeof(input) * 2 + 1; - ok(strLen == strLen2, "Expected length %d, got %d\n", strLen2, strLen); + ok(strLen == strLen2, "Expected length %ld, got %ld\n", strLen2, strLen);
hex = heap_alloc(strLen * sizeof(WCHAR)); memset(hex, 0xcc, strLen * sizeof(WCHAR)); @@ -440,17 +440,17 @@ static void test_CryptBinaryToString(void) *ptr++ = 0; ret = CryptBinaryToStringW(input, sizeof(input), CRYPT_STRING_HEXRAW|flags[i], hex, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); strLen2--; - ok(strLen == strLen2, "Expected length %d, got %d\n", strLen, strLen2); + ok(strLen == strLen2, "Expected length %ld, got %ld\n", strLen, strLen2); ok(!memcmp(hex, cmp, strLen * sizeof(WCHAR)), "Unexpected value\n");
/* adjusts size if buffer too big */ strLen *= 2; ret = CryptBinaryToStringW(input, sizeof(input), CRYPT_STRING_HEXRAW|flags[i], hex, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); - ok(strLen == strLen2, "Expected length %d, got %d\n", strLen, strLen2); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); + ok(strLen == strLen2, "Expected length %ld, got %ld\n", strLen, strLen2);
/* no writes if buffer too small */ strLen /= 2; @@ -460,9 +460,9 @@ static void test_CryptBinaryToString(void) SetLastError(0xdeadbeef); ret = CryptBinaryToStringW(input, sizeof(input), CRYPT_STRING_HEXRAW|flags[i], hex, &strLen); - ok(!ret && GetLastError() == ERROR_MORE_DATA,"Expected ERROR_MORE_DATA, got ret=%d le=%u\n", + ok(!ret && GetLastError() == ERROR_MORE_DATA,"Expected ERROR_MORE_DATA, got ret=%d le=%lu\n", ret, GetLastError()); - ok(strLen == strLen2, "Expected length %d, got %d\n", strLen, strLen2); + ok(strLen == strLen2, "Expected length %ld, got %ld\n", strLen, strLen2); ok(!memcmp(hex, cmp, strLen * sizeof(WCHAR)), "Unexpected value\n");
heap_free(hex); @@ -474,14 +474,14 @@ static void test_CryptBinaryToString(void) { strLen = 0; ret = CryptBinaryToStringW(input, sizes[k], CRYPT_STRING_HEX | flags[i], NULL, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); ok(strLen > 0, "Unexpected string length.\n");
strLen = ~0; ret = CryptBinaryToStringW(input, sizes[k], CRYPT_STRING_HEX | flags[i], NULL, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); strLen2 = binary_to_hex_len(sizes[k], CRYPT_STRING_HEX | flags[i]); - ok(strLen == strLen2, "%u: Expected length %d, got %d\n", i, strLen2, strLen); + ok(strLen == strLen2, "%lu: Expected length %ld, got %ld\n", i, strLen2, strLen);
hex = heap_alloc(strLen * sizeof(WCHAR) + 256); memset(hex, 0xcc, strLen * sizeof(WCHAR)); @@ -529,16 +529,16 @@ static void test_CryptBinaryToString(void) *ptr++ = 0;
ret = CryptBinaryToStringW(input, sizes[k], CRYPT_STRING_HEX | flags[i], hex, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); strLen2--; - ok(strLen == strLen2, "%u: Expected length %d, got %d\n", i, strLen, strLen2); - ok(!memcmp(hex, cmp, strLen * sizeof(WCHAR)), "%u: got %s\n", i, wine_dbgstr_wn(hex, strLen)); + ok(strLen == strLen2, "%lu: Expected length %ld, got %ld\n", i, strLen, strLen2); + ok(!memcmp(hex, cmp, strLen * sizeof(WCHAR)), "%lu: got %s\n", i, wine_dbgstr_wn(hex, strLen));
/* adjusts size if buffer too big */ strLen *= 2; ret = CryptBinaryToStringW(input, sizes[k], CRYPT_STRING_HEX | flags[i], hex, &strLen); - ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); - ok(strLen == strLen2, "%u: Expected length %d, got %d\n", i, strLen, strLen2); + ok(ret, "CryptBinaryToStringW failed: %ld\n", GetLastError()); + ok(strLen == strLen2, "%lu: Expected length %ld, got %ld\n", i, strLen, strLen2);
/* no writes if buffer too small */ strLen /= 2; @@ -547,10 +547,10 @@ static void test_CryptBinaryToString(void) memset(cmp, 0xcc, strLen * sizeof(WCHAR)); SetLastError(0xdeadbeef); ret = CryptBinaryToStringW(input, sizes[k], CRYPT_STRING_HEX | flags[i], hex, &strLen); - ok(!ret && GetLastError() == ERROR_MORE_DATA,"Expected ERROR_MORE_DATA, got ret=%d le=%u\n", + ok(!ret && GetLastError() == ERROR_MORE_DATA,"Expected ERROR_MORE_DATA, got ret=%d le=%lu\n", ret, GetLastError()); - ok(strLen == strLen2, "%u: Expected length %d, got %d\n", i, strLen, strLen2); - ok(!memcmp(hex, cmp, strLen * sizeof(WCHAR)), "%u: got %s\n", i, wine_dbgstr_wn(hex, strLen)); + ok(strLen == strLen2, "%lu: Expected length %ld, got %ld\n", i, strLen, strLen2); + ok(!memcmp(hex, cmp, strLen * sizeof(WCHAR)), "%lu: got %s\n", i, wine_dbgstr_wn(hex, strLen));
heap_free(hex); heap_free(cmp); @@ -585,7 +585,7 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header, strcat(str, trailer); ret = CryptStringToBinaryA(str, 0, useFormat, NULL, &bufLen, NULL, NULL); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); + ok(ret, "CryptStringToBinaryA failed: %ld\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, bufLen); if (buf) { @@ -594,16 +594,16 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header, /* check as normal, make sure last two parameters are optional */ ret = CryptStringToBinaryA(str, 0, useFormat, buf, &bufLen, NULL, NULL); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); + ok(ret, "CryptStringToBinaryA failed: %ld\n", GetLastError()); ok(bufLen == expectedLen, - "Expected length %d, got %d\n", expectedLen, bufLen); + "Expected length %ld, got %ld\n", expectedLen, bufLen); ok(!memcmp(buf, expected, bufLen), "Unexpected value\n"); /* check last two params */ ret = CryptStringToBinaryA(str, 0, useFormat, buf, &bufLen, &skipped, &usedFormat); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); - ok(skipped == 0, "Expected skipped 0, got %d\n", skipped); - ok(usedFormat == expectedFormat, "Expected format %d, got %d\n", + ok(ret, "CryptStringToBinaryA failed: %ld\n", GetLastError()); + ok(skipped == 0, "Expected skipped 0, got %ld\n", skipped); + ok(usedFormat == expectedFormat, "Expected format %ld, got %ld\n", expectedFormat, usedFormat); HeapFree(GetProcessHeap(), 0, buf); } @@ -619,10 +619,10 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header, NULL); /* expect failure with no header, and success with one */ if (header) - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); + ok(ret, "CryptStringToBinaryA failed: %ld\n", GetLastError()); else ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected !ret and last error ERROR_INVALID_DATA, got ret=%d, error=%d\n", ret, GetLastError()); + "Expected !ret and last error ERROR_INVALID_DATA, got ret=%d, error=%ld\n", ret, GetLastError()); if (ret) { buf = HeapAlloc(GetProcessHeap(), 0, bufLen); @@ -632,9 +632,9 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header,
ret = CryptStringToBinaryA(str, 0, useFormat, buf, &bufLen, &skipped, &usedFormat); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); + ok(ret, "CryptStringToBinaryA failed: %ld\n", GetLastError()); ok(skipped == strlen(garbage), - "Expected %d characters of "%s" skipped when trying format %08x, got %d (used format is %08x)\n", + "Expected %d characters of "%s" skipped when trying format %08lx, got %ld (used format is %08lx)\n", lstrlenA(garbage), str, useFormat, skipped, usedFormat); HeapFree(GetProcessHeap(), 0, buf); } @@ -668,14 +668,14 @@ static void decodeBase64WithLenFmt(LPCSTR str, int len, DWORD fmt, LPCSTR expect if (expected) { BOOL correct = ret && strcmp(expected, (char*)buf) == 0; ok(correct || (isBroken && broken(!ret)), - "base64 "%s" len %d: expected "%s", got "%s" (ret %d, le %d)\n", + "base64 "%s" len %d: expected "%s", got "%s" (ret %d, le %ld)\n", str, len, expected, (char*)buf, ret, GetLastError()); if (correct) - ok(fmtUsed == fmt, "base64 "%s" len %d: expected fmt %d, used %d\n", + ok(fmtUsed == fmt, "base64 "%s" len %d: expected fmt %ld, used %ld\n", str, len, fmt, fmtUsed); } else { ok(!ret && GetLastError() == le, - "base64 "%s" len %d: expected failure, got "%s" (ret %d, le %d)\n", + "base64 "%s" len %d: expected failure, got "%s" (ret %d, le %ld)\n", str, len, (char*)buf, ret, GetLastError()); }
@@ -715,20 +715,20 @@ static void testStringToBinaryA(void)
ret = CryptStringToBinaryA(NULL, 0, 0, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got ret=%d le=%u\n", ret, GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got ret=%d le=%lu\n", ret, GetLastError()); ret = CryptStringToBinaryA(NULL, 0, 0, NULL, &bufLen, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got ret=%d le=%u\n", ret, GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got ret=%d le=%lu\n", ret, GetLastError()); /* Bogus format */ ret = CryptStringToBinaryA(tests[0].base64, 0, 0, NULL, &bufLen, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got ret=%d le=%u\n", ret, GetLastError()); + "Expected ERROR_INVALID_DATA, got ret=%d le=%lu\n", ret, GetLastError()); /* Decoding doesn't expect the NOCR flag to be specified */ ret = CryptStringToBinaryA(tests[0].base64, 1, CRYPT_STRING_BASE64 | CRYPT_STRING_NOCR, NULL, &bufLen, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got ret=%d le=%u\n", ret, GetLastError()); + "Expected ERROR_INVALID_DATA, got ret=%d le=%lu\n", ret, GetLastError()); /* Bad strings */ for (i = 0; i < ARRAY_SIZE(badStrings); i++) { @@ -736,7 +736,7 @@ static void testStringToBinaryA(void) ret = CryptStringToBinaryA(badStrings[i].str, 0, badStrings[i].format, NULL, &bufLen, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "%d: Expected ERROR_INVALID_DATA, got ret=%d le=%u\n", i, ret, GetLastError()); + "%ld: Expected ERROR_INVALID_DATA, got ret=%d le=%lu\n", i, ret, GetLastError()); } /* Weird base64 strings (invalid padding, extra white-space etc.) */ decodeBase64WithLen("V=", 0, 0, ERROR_INVALID_DATA); @@ -793,7 +793,7 @@ static void testStringToBinaryA(void) bufLen = 4; ret = CryptStringToBinaryA("VVVVVVVV", 8, CRYPT_STRING_BASE64, (BYTE*)buf, &bufLen, NULL, NULL); ok(!ret && bufLen == 4 && buf[0] == 0, - "Expected ret 0, bufLen 4, buf[0] '\0', got ret %d, bufLen %d, buf[0] '%c'\n", + "Expected ret 0, bufLen 4, buf[0] '\0', got ret %d, bufLen %ld, buf[0] '%c'\n", ret, bufLen, buf[0]);
/* Good strings */ @@ -805,7 +805,7 @@ static void testStringToBinaryA(void) */ ret = CryptStringToBinaryA(tests[i].base64, 1, CRYPT_STRING_BASE64, NULL, &bufLen, NULL, NULL); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); + ok(ret, "CryptStringToBinaryA failed: %ld\n", GetLastError()); /* Check with the precise format */ decodeAndCompareBase64_A(tests[i].base64, NULL, NULL, CRYPT_STRING_BASE64, CRYPT_STRING_BASE64, tests[i].toEncode, @@ -862,7 +862,7 @@ static void testStringToBinaryA(void) */ ret = CryptStringToBinaryA(testsNoCR[i].base64, 1, CRYPT_STRING_BASE64, NULL, &bufLen, NULL, NULL); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); + ok(ret, "CryptStringToBinaryA failed: %ld\n", GetLastError()); /* Check with the precise format */ decodeAndCompareBase64_A(testsNoCR[i].base64, NULL, NULL, CRYPT_STRING_BASE64, CRYPT_STRING_BASE64, testsNoCR[i].toEncode, diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index b96f94cc662..99b9487be46 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -148,7 +148,7 @@ static void testAddCert(void)
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %ld\n", GetLastError()); if (!store) return;
@@ -161,13 +161,13 @@ static void testAddCert(void) sizeof(bigCert), 0, NULL); ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || GetLastError() == E_INVALIDARG), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", + "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), 0, NULL); ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || GetLastError() == E_INVALIDARG), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", + "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08lx\n", GetLastError()); }
@@ -178,7 +178,7 @@ static void testAddCert(void) ret = CertAddEncodedCertificateToStore(0, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); if (context) CertFreeCertificateContext(context); if (!ret && GetLastError() == OSS_DATA_ERROR) @@ -189,16 +189,16 @@ static void testAddCert(void)
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert2, sizeof(bigCert2), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); /* This has the same name as bigCert, so finding isn't done by name */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, certWithUsage, sizeof(certWithUsage), CERT_STORE_ADD_NEW, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ok(context != NULL, "Expected a context\n"); if (context) @@ -213,7 +213,7 @@ static void testAddCert(void) /* Set the same hash as bigCert2, and try to readd it */ ret = CertSetCertificateContextProperty(context, CERT_HASH_PROP_ID, 0, &hash); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError()); ret = CertAddCertificateContextToStore(store, context, CERT_STORE_ADD_NEW, NULL); @@ -232,7 +232,7 @@ static void testAddCert(void) ret = CertAddCertificateContextToStore(store, context, CERT_STORE_ADD_NEW, NULL); ok(!ret && GetLastError() == CRYPT_E_EXISTS, - "Expected CRYPT_E_EXISTS, got %08x\n", GetLastError()); + "Expected CRYPT_E_EXISTS, got %08lx\n", GetLastError()); CertFreeCertificateContext(context); }
@@ -243,7 +243,7 @@ static void testAddCert(void) ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert2WithDifferentSerial, sizeof(bigCert2WithDifferentSerial), CERT_STORE_ADD_NEW, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); if (context) CertDeleteCertificateFromStore(context); @@ -255,7 +255,7 @@ static void testAddCert(void) ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCertWithDifferentSubject, sizeof(bigCertWithDifferentSubject), CERT_STORE_ADD_NEW, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); if (context) CertDeleteCertificateFromStore(context); @@ -267,14 +267,14 @@ static void testAddCert(void) ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCertWithDifferentIssuer, sizeof(bigCertWithDifferentIssuer), CERT_STORE_ADD_NEW, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); if (context) CertDeleteCertificateFromStore(context);
collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(collection != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(collection != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (collection) { /* Add store to the collection, but disable updates */ @@ -289,19 +289,19 @@ static void testAddCert(void) ret = CertAddCertificateContextToStore(collection, context, CERT_STORE_ADD_NEW, NULL); ok(!ret && GetLastError() == CRYPT_E_EXISTS, - "Expected CRYPT_E_EXISTS, got %08x\n", GetLastError()); + "Expected CRYPT_E_EXISTS, got %08lx\n", GetLastError()); /* Replacing an existing certificate context is allowed, even * though updates to the collection aren't.. */ ret = CertAddCertificateContextToStore(collection, context, CERT_STORE_ADD_REPLACE_EXISTING, NULL); - ok(ret, "CertAddCertificateContextToStore failed: %08x\n", + ok(ret, "CertAddCertificateContextToStore failed: %08lx\n", GetLastError()); /* use the existing certificate and ask for a copy of the context*/ copyContext = NULL; ret = CertAddCertificateContextToStore(collection, context, CERT_STORE_ADD_USE_EXISTING, ©Context); - ok(ret, "CertAddCertificateContextToStore failed: %08x\n", + ok(ret, "CertAddCertificateContextToStore failed: %08lx\n", GetLastError()); ok(copyContext != NULL, "Expected on output a non NULL copyContext\n"); if (copyContext) @@ -310,7 +310,7 @@ static void testAddCert(void) ret = CertAddCertificateContextToStore(collection, context, CERT_STORE_ADD_ALWAYS, NULL); ok(!ret && GetLastError() == E_ACCESSDENIED, - "Expected E_ACCESSDENIED, got %08x\n", GetLastError()); + "Expected E_ACCESSDENIED, got %08lx\n", GetLastError()); CertFreeCertificateContext(context); }
@@ -332,18 +332,18 @@ static void checkHash(const BYTE *data, DWORD dataLen, ALG_ID algID, memset(hashProperty, 0, sizeof(hashProperty)); size = sizeof(hash); ret = CryptHashCertificate(0, algID, 0, data, dataLen, hash, &size); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); + ok(ret, "CryptHashCertificate failed: %08lx\n", GetLastError()); ret = CertGetCertificateContextProperty(context, propID, NULL, &dwSizeWithNull); - ok(ret, "algID %08x, propID %d: CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "algID %08x, propID %ld: CertGetCertificateContextProperty failed: %08lx\n", algID, propID, GetLastError()); ret = CertGetCertificateContextProperty(context, propID, hashProperty, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); - ok(!memcmp(hash, hashProperty, size), "Unexpected hash for property %d\n", + ok(!memcmp(hash, hashProperty, size), "Unexpected hash for property %ld\n", propID); - ok(size == dwSizeWithNull, "Unexpected length of hash for property: received %d instead of %d\n", + ok(size == dwSizeWithNull, "Unexpected length of hash for property: received %ld instead of %ld\n", dwSizeWithNull,size); }
@@ -411,7 +411,7 @@ static void testCertProperties(void) CERT_KEY_CONTEXT keyContext;
ok(context != NULL || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertCreateCertificateContext failed: %08x\n", GetLastError()); + "CertCreateCertificateContext failed: %08lx\n", GetLastError()); if (!context) return;
@@ -426,12 +426,12 @@ static void testCertProperties(void) if (propID) numProps++; } while (propID != 0); - ok(numProps == 0, "Expected 0 properties, got %d\n", numProps); + ok(numProps == 0, "Expected 0 properties, got %ld\n", numProps);
/* Tests with a NULL cert context. Prop ID 0 fails.. */ ret = CertSetCertificateContextProperty(NULL, 0, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* while this just crashes. ret = CertSetCertificateContextProperty(NULL, CERT_KEY_PROV_HANDLE_PROP_ID, 0, NULL); @@ -439,7 +439,7 @@ static void testCertProperties(void)
ret = CertSetCertificateContextProperty(context, 0, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Can't set the cert property directly, this crashes. ret = CertSetCertificateContextProperty(context, CERT_CERT_PROP_ID, 0, bigCert2); @@ -458,12 +458,12 @@ static void testCertProperties(void) ret = CertGetCertificateContextProperty(context, CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* And, an implicit property */ size = sizeof(access); ret = CertGetCertificateContextProperty(context, CERT_ACCESS_STATE_PROP_ID, &access, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); ok(!(access & CERT_ACCESS_STATE_WRITE_PERSIST_FLAG), "Didn't expect a persisted cert\n"); @@ -478,18 +478,18 @@ static void testCertProperties(void) blob.cbData = sizeof(hash); ret = CertSetCertificateContextProperty(context, CERT_HASH_PROP_ID, 0, &blob); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError()); size = sizeof(hashProperty); ret = CertGetCertificateContextProperty(context, CERT_HASH_PROP_ID, hashProperty, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); ok(!memcmp(hashProperty, hash, sizeof(hash)), "Unexpected hash\n"); /* Delete the (bogus) hash, and get the real one */ ret = CertSetCertificateContextProperty(context, CERT_HASH_PROP_ID, 0, NULL); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError()); checkHash(bigCert, sizeof(bigCert), CALG_SHA1, context, CERT_HASH_PROP_ID); @@ -504,7 +504,7 @@ static void testCertProperties(void) if (propID) numProps++; } while (propID != 0); - ok(numProps == 1, "Expected 1 properties, got %d\n", numProps); + ok(numProps == 1, "Expected 1 properties, got %ld\n", numProps);
/* Check a few other implicit properties */ checkHash(bigCert, sizeof(bigCert), CALG_MD5, context, @@ -518,57 +518,57 @@ static void testCertProperties(void) (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == CRYPT_E_NOT_FOUND || GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError());
/* Test key contexts and handles and such */ size = 0; ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); size = sizeof(CERT_KEY_CONTEXT); ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, &keyContext, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* Key context with an invalid size */ keyContext.cbSize = 0; ret = CertSetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, 0, &keyContext); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); size = sizeof(keyContext); ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, &keyContext, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); keyContext.cbSize = sizeof(keyContext); keyContext.hCryptProv = 0; keyContext.dwKeySpec = AT_SIGNATURE; ret = CertSetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, 0, &keyContext); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError()); /* Now that that's set, the key prov handle property is also gettable. */ size = sizeof(keyContext.hCryptProv); ret = CertGetCertificateContextProperty(context, CERT_KEY_PROV_HANDLE_PROP_ID, &keyContext.hCryptProv, &size); - ok(ret, "Expected to get the CERT_KEY_PROV_HANDLE_PROP_ID, got %08x\n", + ok(ret, "Expected to get the CERT_KEY_PROV_HANDLE_PROP_ID, got %08lx\n", GetLastError()); /* Remove the key prov handle property.. */ ret = CertSetCertificateContextProperty(context, CERT_KEY_PROV_HANDLE_PROP_ID, 0, NULL); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError()); /* and the key context's CSP is set to NULL. */ size = sizeof(keyContext); ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, &keyContext, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); ok(keyContext.hCryptProv == 0, "Expected no hCryptProv\n");
@@ -579,7 +579,7 @@ static void testCertProperties(void) ret = CertGetCertificateContextProperty(context, CERT_KEY_IDENTIFIER_PROP_ID, NULL, &size); ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_DATA, got %08lx\n", GetLastError()); CertFreeCertificateContext(context); /* This cert does have a public key, but its subject key identifier still * isn't available: */ @@ -588,7 +588,7 @@ static void testCertProperties(void) ret = CertGetCertificateContextProperty(context, CERT_KEY_IDENTIFIER_PROP_ID, NULL, &size); ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_DATA, got %08lx\n", GetLastError()); CertFreeCertificateContext(context); /* This cert with a subject key extension can have its key identifier * property retrieved: @@ -597,7 +597,7 @@ static void testCertProperties(void) v1CertWithSubjectKeyId, sizeof(v1CertWithSubjectKeyId)); ret = CertGetCertificateContextProperty(context, CERT_KEY_IDENTIFIER_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); if (ret) { LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size); @@ -606,7 +606,7 @@ static void testCertProperties(void) { ret = CertGetCertificateContextProperty(context, CERT_KEY_IDENTIFIER_PROP_ID, buf, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); ok(!memcmp(buf, subjectKeyId, size), "Unexpected subject key id\n"); HeapFree(GetProcessHeap(), 0, buf); @@ -620,8 +620,8 @@ static void testCertProperties(void) size = 0; ret = CertGetCertificateContextProperty(context, CERT_SIGNATURE_HASH_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); - ok(size == sizeof(selfSignedSignatureHash), "unexpected size %d\n", size); + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); + ok(size == sizeof(selfSignedSignatureHash), "unexpected size %ld\n", size); ret = CertGetCertificateContextProperty(context, CERT_SIGNATURE_HASH_PROP_ID, hashProperty, &size); if (ret) @@ -639,22 +639,22 @@ static void testCreateCert(void) SetLastError(0xdeadbeef); cert = CertCreateCertificateContext(0, NULL, 0); ok(!cert && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); cert = CertCreateCertificateContext(0, selfSignedCert, sizeof(selfSignedCert)); ok(!cert && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); cert = CertCreateCertificateContext(X509_ASN_ENCODING, NULL, 0); ok(!cert && (GetLastError() == CRYPT_E_ASN1_EOD || broken(GetLastError() == OSS_MORE_INPUT /* NT4 */)), - "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError());
cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert, sizeof(selfSignedCert)); - ok(cert != NULL, "creating cert failed: %08x\n", GetLastError()); + ok(cert != NULL, "creating cert failed: %08lx\n", GetLastError()); /* Even in-memory certs are expected to have a store associated with them */ ok(cert->hCertStore != NULL, "expected created cert to have a store\n"); /* The cert doesn't have the archived property set (which would imply it @@ -664,13 +664,13 @@ static void testCreateCert(void) ret = CertGetCertificateContextProperty(cert, CERT_ARCHIVED_PROP_ID, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* Strangely, enumerating the certs in the store finds none. */ enumCert = NULL; count = 0; while ((enumCert = CertEnumCertificatesInStore(cert->hCertStore, enumCert))) count++; - ok(!count, "expected 0, got %d\n", count); + ok(!count, "expected 0, got %ld\n", count); CertFreeCertificateContext(cert); }
@@ -682,14 +682,14 @@ static void testDupCert(void)
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %ld\n", GetLastError()); if (!store) return;
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); if (!ret && GetLastError() == OSS_DATA_ERROR) { skip("bigCert can't be decoded, skipping tests\n"); @@ -699,7 +699,7 @@ static void testDupCert(void) if (context) { ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong cert size %d\n", context->cbCertEncoded); + "Wrong cert size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, sizeof(bigCert)), "Unexpected encoded cert in context\n"); ok(context->hCertStore == store, "Unexpected store\n"); @@ -725,7 +725,7 @@ static void testDupCert(void) ok(ret, "CertFreeCertificateContext failed\n");
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %ld\n", GetLastError());
ret = CertAddCertificateContextToStore(store, context, CERT_STORE_ADD_NEW, &storeContext); ok(ret, "CertAddCertificateContextToStore failed\n"); @@ -737,7 +737,7 @@ static void testDupCert(void) ok(storeContext->pCertInfo != context->pCertInfo, "unexpected pCertInfo\n");
store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store2 != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store2 != NULL, "CertOpenStore failed: %ld\n", GetLastError());
ret = CertAddCertificateContextToStore(store2, storeContext, CERT_STORE_ADD_NEW, &storeContext2); ok(ret, "CertAddCertificateContextToStore failed\n"); @@ -781,7 +781,7 @@ static void testLinkCert(void) ok(context != NULL, "CertCreateCertificateContext failed\n");
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %ld\n", GetLastError());
ret = CertAddCertificateLinkToStore(store, context, CERT_STORE_ADD_NEW, &link); ok(ret, "CertAddCertificateContextToStore failed\n"); @@ -1141,14 +1141,14 @@ static void testFindCert(void)
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %ld\n", GetLastError()); if (!store) return;
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_NEW, NULL); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); if (!ret && GetLastError() == OSS_DATA_ERROR) { skip("bigCert can't be decoded, skipping tests\n"); @@ -1156,12 +1156,12 @@ static void testFindCert(void) } ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert2, sizeof(bigCert2), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); /* This has the same name as bigCert */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, certWithUsage, sizeof(certWithUsage), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError());
/* Crashes @@ -1175,7 +1175,7 @@ static void testFindCert(void) certInfo.SerialNumber.cbData = sizeof(serialNum); context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_ISSUER_NAME, &certInfo.Subject, NULL); - ok(context != NULL, "CertFindCertificateInStore failed: %08x\n", + ok(context != NULL, "CertFindCertificateInStore failed: %08lx\n", GetLastError()); if (context) { @@ -1195,7 +1195,7 @@ static void testFindCert(void) certInfo.Subject.cbData = sizeof(subjectName2); context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_SUBJECT_NAME, &certInfo.Subject, NULL); - ok(context != NULL, "CertFindCertificateInStore failed: %08x\n", + ok(context != NULL, "CertFindCertificateInStore failed: %08lx\n", GetLastError()); if (context) { @@ -1216,7 +1216,7 @@ static void testFindCert(void) certInfo.Issuer.cbData = sizeof(subjectName2); context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_SUBJECT_CERT, &certInfo, NULL); - ok(context != NULL, "CertFindCertificateInStore failed: %08x\n", + ok(context != NULL, "CertFindCertificateInStore failed: %08lx\n", GetLastError()); if (context) { @@ -1249,7 +1249,7 @@ static void testFindCert(void) blob.cbData = sizeof(bigCertHash); context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_SHA1_HASH, &blob, NULL); - ok(context != NULL, "CertFindCertificateInStore failed: %08x\n", + ok(context != NULL, "CertFindCertificateInStore failed: %08lx\n", GetLastError()); if (context) { @@ -1291,7 +1291,7 @@ static void testFindCert(void) CERT_FIND_ISSUER_STR, malcolm, NULL); ok(!context, "expected no certs\n"); ok(GetLastError() == CRYPT_E_NOT_FOUND, - "expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError());
CertCloseStore(store, 0);
@@ -1300,19 +1300,19 @@ static void testFindCert(void) CERT_STORE_CREATE_NEW_FLAG, NULL); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, iTunesCert0, sizeof(iTunesCert0), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, iTunesCert1, sizeof(iTunesCert1), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, iTunesCert2, sizeof(iTunesCert2), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, iTunesCert3, sizeof(iTunesCert3), CERT_STORE_ADD_NEW, &subject); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError());
/* The certInfo's issuer does not match any subject, but the serial @@ -1366,14 +1366,14 @@ static void testGetSubjectCert(void)
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %ld\n", GetLastError()); if (!store) return;
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); if (!ret && GetLastError() == OSS_DATA_ERROR) { skip("bigCert can't be decoded, skipping tests\n"); @@ -1381,34 +1381,34 @@ static void testGetSubjectCert(void) } ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert2, sizeof(bigCert2), CERT_STORE_ADD_NEW, &context1); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ok(context1 != NULL, "Expected a context\n"); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, certWithUsage, sizeof(certWithUsage), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError());
context2 = CertGetSubjectCertificateFromStore(store, X509_ASN_ENCODING, NULL); ok(!context2 && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); context2 = CertGetSubjectCertificateFromStore(store, X509_ASN_ENCODING, &info); ok(!context2 && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); info.SerialNumber.cbData = sizeof(serialNum); info.SerialNumber.pbData = serialNum; context2 = CertGetSubjectCertificateFromStore(store, X509_ASN_ENCODING, &info); ok(!context2 && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); info.Issuer.cbData = sizeof(subjectName2); info.Issuer.pbData = subjectName2; context2 = CertGetSubjectCertificateFromStore(store, X509_ASN_ENCODING, &info); ok(context2 != NULL, - "CertGetSubjectCertificateFromStore failed: %08x\n", GetLastError()); + "CertGetSubjectCertificateFromStore failed: %08lx\n", GetLastError()); /* Not only should this find a context, but it should be the same * (same address) as context1. */ @@ -1569,16 +1569,16 @@ static void testGetIssuerCert(void) HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL);
- ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError());
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, expiredCert, sizeof(expiredCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError());
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, childOfExpired, sizeof(childOfExpired), CERT_STORE_ADD_ALWAYS, &child); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError());
/* These crash: @@ -1587,13 +1587,13 @@ static void testGetIssuerCert(void) */ parent = CertGetIssuerCertificateFromStore(NULL, NULL, NULL, &flags); ok(!parent && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, NULL, NULL, &flags); ok(!parent && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(!parent && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Confusing: the caller cannot set either of the * CERT_STORE_NO_*_FLAGs, as these are not checks, * they're results: @@ -1601,24 +1601,24 @@ static void testGetIssuerCert(void) flags = CERT_STORE_NO_CRL_FLAG | CERT_STORE_NO_ISSUER_FLAG; parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(!parent && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Perform no checks */ flags = 0; parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent != NULL, "CertGetIssuerCertificateFromStore failed: %08x\n", + ok(parent != NULL, "CertGetIssuerCertificateFromStore failed: %08lx\n", GetLastError()); if (parent) CertFreeCertificateContext(parent); /* Check revocation and signature only */ flags = CERT_STORE_REVOCATION_FLAG | CERT_STORE_SIGNATURE_FLAG; parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent != NULL, "CertGetIssuerCertificateFromStore failed: %08x\n", + ok(parent != NULL, "CertGetIssuerCertificateFromStore failed: %08lx\n", GetLastError()); /* Confusing: CERT_STORE_REVOCATION_FLAG succeeds when there is no CRL by * setting CERT_STORE_NO_CRL_FLAG. */ ok(flags == (CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG), - "Expected CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG, got %08x\n", + "Expected CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG, got %08lx\n", flags); if (parent) CertFreeCertificateContext(parent); @@ -1637,33 +1637,33 @@ static void testGetIssuerCert(void) /* With only the child certificate, no issuer will be found */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain7_1, sizeof(chain7_1), CERT_STORE_ADD_ALWAYS, &child); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(parent == NULL, "Expected no issuer\n"); - ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError()); + ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08lX\n", GetLastError()); /* Adding an issuer allows one (and only one) issuer to be found */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain10_1, sizeof(chain10_1), CERT_STORE_ADD_ALWAYS, &cert1); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(parent == cert1, "Expected cert1 to be the issuer\n"); parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); ok(parent == NULL, "Expected only one issuer\n"); - ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError()); + ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08lX\n", GetLastError()); /* Adding a second issuer allows two issuers to be found - and the second * issuer is found before the first, implying certs are added to the head * of a list. */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain10_0, sizeof(chain10_0), CERT_STORE_ADD_ALWAYS, &cert2); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(parent == cert2, "Expected cert2 to be the first issuer\n"); parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); ok(parent == cert1, "Expected cert1 to be the second issuer\n"); parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); ok(parent == NULL, "Expected no more than two issuers\n"); - ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError()); + ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08lX\n", GetLastError()); CertFreeCertificateContext(child); CertFreeCertificateContext(cert1); CertFreeCertificateContext(cert2); @@ -1677,33 +1677,33 @@ static void testGetIssuerCert(void) /* With only the child certificate, no issuer will be found */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain7_1, sizeof(chain7_1), CERT_STORE_ADD_ALWAYS, &child); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(parent == NULL, "Expected no issuer\n"); - ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError()); + ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08lX\n", GetLastError()); /* Adding an issuer allows one (and only one) issuer to be found */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain10_0, sizeof(chain10_0), CERT_STORE_ADD_ALWAYS, &cert1); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(parent == cert1, "Expected cert1 to be the issuer\n"); parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); ok(parent == NULL, "Expected only one issuer\n"); - ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError()); + ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08lX\n", GetLastError()); /* Adding a second issuer allows two issuers to be found - and the second * issuer is found before the first, implying certs are added to the head * of a list. */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain10_1, sizeof(chain10_1), CERT_STORE_ADD_ALWAYS, &cert2); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(parent == cert2, "Expected cert2 to be the first issuer\n"); parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); ok(parent == cert1, "Expected cert1 to be the second issuer\n"); parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); ok(parent == NULL, "Expected no more than two issuers\n"); - ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError()); + ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08lX\n", GetLastError());
/* Self-sign a certificate, add to the store and test getting the issuer */ size = 0; @@ -1717,7 +1717,7 @@ static void testGetIssuerCert(void) cert3 = CertCreateSelfSignCertificate(0, &certsubject, 0, NULL, NULL, NULL, NULL, NULL); ok(cert3 != NULL, "CertCreateSelfSignCertificate should have worked\n"); ret = CertAddCertificateContextToStore(store, cert3, CERT_STORE_ADD_REPLACE_EXISTING, 0); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); CertFreeCertificateContext(cert3); cert3 = CertEnumCertificatesInStore(store, NULL); ok(cert3 != NULL, "CertEnumCertificatesInStore should have worked\n"); @@ -1726,7 +1726,7 @@ static void testGetIssuerCert(void) parent = CertGetIssuerCertificateFromStore(store, cert3, NULL, &flags); ok(!parent, "Expected NULL\n"); ok(GetLastError() == CRYPT_E_SELF_SIGNED, - "Expected CRYPT_E_SELF_SIGNED, got %08X\n", GetLastError()); + "Expected CRYPT_E_SELF_SIGNED, got %08lX\n", GetLastError()); CertFreeCertificateContext(child); CertFreeCertificateContext(cert1); CertFreeCertificateContext(cert2); @@ -1736,7 +1736,7 @@ static void testGetIssuerCert(void)
/* Test root storage self-signed certificate */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, rootW); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); flags = 0; cert1 = CertEnumCertificatesInStore(store, NULL); ok(cert1 != NULL, "CertEnumCertificatesInStore should have worked\n"); @@ -1744,7 +1744,7 @@ static void testGetIssuerCert(void) parent = CertGetIssuerCertificateFromStore(store, cert1, NULL, &flags); ok(!parent, "Expected NULL\n"); ok(GetLastError() == CRYPT_E_SELF_SIGNED, - "Expected CRYPT_E_SELF_SIGNED, got %08X\n", GetLastError()); + "Expected CRYPT_E_SELF_SIGNED, got %08lX\n", GetLastError()); CertFreeCertificateContext(cert1); CertCloseStore(store, 0); } @@ -1770,17 +1770,17 @@ static void testCryptHashCert(void) /* Test empty hash */ ret = CryptHashCertificate(0, 0, 0, toHash, sizeof(toHash), NULL, &hashLen); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); - ok(hashLen == sizeof(hash), "Got unexpected size of hash %d\n", hashLen); + ok(ret, "CryptHashCertificate failed: %08lx\n", GetLastError()); + ok(hashLen == sizeof(hash), "Got unexpected size of hash %ld\n", hashLen); /* Test with empty buffer */ ret = CryptHashCertificate(0, 0, 0, NULL, 0, hash, &hashLen); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); + ok(ret, "CryptHashCertificate failed: %08lx\n", GetLastError()); ok(!memcmp(hash, emptyHash, sizeof(emptyHash)), "Unexpected hash of nothing\n"); /* Test a known value */ ret = CryptHashCertificate(0, 0, 0, toHash, sizeof(toHash), hash, &hashLen); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); + ok(ret, "CryptHashCertificate failed: %08lx\n", GetLastError()); ok(!memcmp(hash, knownHash, sizeof(knownHash)), "Unexpected hash\n"); }
@@ -1810,22 +1810,22 @@ static void testCryptHashCert2(void) /* Test empty hash */ hashLen = sizeof(hash); ret = pCryptHashCertificate2(SHA1, 0, NULL, NULL, 0, hash, &hashLen); - ok(ret, "CryptHashCertificate2 failed: %08x\n", GetLastError()); - ok(hashLen == sizeof(hash), "Got unexpected size of hash %d\n", hashLen); + ok(ret, "CryptHashCertificate2 failed: %08lx\n", GetLastError()); + ok(hashLen == sizeof(hash), "Got unexpected size of hash %ld\n", hashLen); ok(!memcmp(hash, emptyHash, sizeof(emptyHash)), "Unexpected hash of nothing\n");
/* Test known hash */ hashLen = sizeof(hash); ret = pCryptHashCertificate2(SHA1, 0, NULL, toHash, sizeof(toHash), hash, &hashLen); - ok(ret, "CryptHashCertificate2 failed: %08x\n", GetLastError()); - ok(hashLen == sizeof(hash), "Got unexpected size of hash %d\n", hashLen); + ok(ret, "CryptHashCertificate2 failed: %08lx\n", GetLastError()); + ok(hashLen == sizeof(hash), "Got unexpected size of hash %ld\n", hashLen); ok(!memcmp(hash, knownHash, sizeof(knownHash)), "Unexpected hash\n");
/* Test null hash size pointer just sets hash size */ hashLen = 0; ret = pCryptHashCertificate2(SHA1, 0, NULL, toHash, sizeof(toHash), NULL, &hashLen); - ok(ret, "CryptHashCertificate2 failed: %08x\n", GetLastError()); - ok(hashLen == sizeof(hash), "Hash size not set correctly (%d)\n", hashLen); + ok(ret, "CryptHashCertificate2 failed: %08lx\n", GetLastError()); + ok(hashLen == sizeof(hash), "Hash size not set correctly (%ld)\n", hashLen);
/* Null algorithm ID crashes Windows implementations */ if (0) { @@ -1839,14 +1839,14 @@ static void testCryptHashCert2(void) SetLastError(0xdeadbeef); ret = pCryptHashCertificate2(invalidAlgorithm, 0, NULL, toHash, sizeof(toHash), hash, &hashLen); ok(!ret && GetLastError() == STATUS_NOT_FOUND, - "Expected STATUS_NOT_FOUND (0x%08x), got 0x%08x\n", STATUS_NOT_FOUND, GetLastError()); + "Expected STATUS_NOT_FOUND (0x%08lx), got 0x%08lx\n", STATUS_NOT_FOUND, GetLastError());
/* Test hash buffer too small */ hashLen = sizeof(hash) / 2; SetLastError(0xdeadbeef); ret = pCryptHashCertificate2(SHA1, 0, NULL, toHash, sizeof(toHash), hash, &hashLen); ok(!ret && GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA (%d), got %d\n", ERROR_MORE_DATA, GetLastError()); + "Expected ERROR_MORE_DATA (%d), got %ld\n", ERROR_MORE_DATA, GetLastError());
/* Null hash length crashes Windows implementations */ if (0) { @@ -1864,20 +1864,20 @@ static void verifySig(HCRYPTPROV csp, const BYTE *toSign, size_t toSignLen, HCRYPTHASH hash; BOOL ret = CryptCreateHash(csp, CALG_SHA1, 0, 0, &hash);
- ok(ret, "CryptCreateHash failed: %08x\n", GetLastError()); + ok(ret, "CryptCreateHash failed: %08lx\n", GetLastError()); if (ret) { BYTE mySig[64]; DWORD mySigSize = sizeof(mySig);
ret = CryptHashData(hash, toSign, toSignLen, 0); - ok(ret, "CryptHashData failed: %08x\n", GetLastError()); + ok(ret, "CryptHashData failed: %08lx\n", GetLastError()); /* use the A variant so the test can run on Win9x */ ret = CryptSignHashA(hash, AT_SIGNATURE, NULL, 0, mySig, &mySigSize); - ok(ret, "CryptSignHash failed: %08x\n", GetLastError()); + ok(ret, "CryptSignHash failed: %08lx\n", GetLastError()); if (ret) { - ok(mySigSize == sigLen, "Expected sig length %d, got %d\n", + ok(mySigSize == sigLen, "Expected sig length %d, got %ld\n", sigLen, mySigSize); ok(!memcmp(mySig, sig, sigLen), "Unexpected signature\n"); } @@ -1907,40 +1907,40 @@ static void testSignCert(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, ret = CryptSignCertificate(0, 0, 0, toBeSigned->pbData, toBeSigned->cbData, &algoID, NULL, NULL, &size); ok(!ret && GetLastError() == NTE_BAD_ALGID, - "Expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + "Expected NTE_BAD_ALGID, got %08lx\n", GetLastError()); algoID.pszObjId = (LPSTR)sigOID; ret = CryptSignCertificate(0, 0, 0, toBeSigned->pbData, toBeSigned->cbData, &algoID, NULL, NULL, &size); ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == NTE_BAD_ALGID), - "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", + "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08lx\n", GetLastError()); ret = CryptSignCertificate(0, AT_SIGNATURE, 0, toBeSigned->pbData, toBeSigned->cbData, &algoID, NULL, NULL, &size); ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == NTE_BAD_ALGID), - "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", + "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08lx\n", GetLastError());
/* No keys exist in the new CSP yet.. */ ret = CryptSignCertificate(csp, AT_SIGNATURE, 0, toBeSigned->pbData, toBeSigned->cbData, &algoID, NULL, NULL, &size); ok(!ret && (GetLastError() == NTE_BAD_KEYSET || GetLastError() == - NTE_NO_KEY), "Expected NTE_BAD_KEYSET or NTE_NO_KEY, got %08x\n", + NTE_NO_KEY), "Expected NTE_BAD_KEYSET or NTE_NO_KEY, got %08lx\n", GetLastError()); ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key); - ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); + ok(ret, "CryptGenKey failed: %08lx\n", GetLastError()); if (ret) { ret = CryptSignCertificate(csp, AT_SIGNATURE, 0, toBeSigned->pbData, toBeSigned->cbData, &algoID, NULL, NULL, &size); - ok(ret, "CryptSignCertificate failed: %08x\n", GetLastError()); - ok(size <= *sigLen, "Expected size <= %d, got %d\n", *sigLen, size); + ok(ret, "CryptSignCertificate failed: %08lx\n", GetLastError()); + ok(size <= *sigLen, "Expected size <= %ld, got %ld\n", *sigLen, size); if (ret) { ret = CryptSignCertificate(csp, AT_SIGNATURE, 0, toBeSigned->pbData, toBeSigned->cbData, &algoID, NULL, sig, &size); - ok(ret, "CryptSignCertificate failed: %08x\n", GetLastError()); + ok(ret, "CryptSignCertificate failed: %08lx\n", GetLastError()); if (ret) { *sigLen = size; @@ -1967,15 +1967,15 @@ static void testVerifyCertSig(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, } ret = CryptVerifyCertificateSignature(0, 0, NULL, 0, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = CryptVerifyCertificateSignature(csp, 0, NULL, 0, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = CryptVerifyCertificateSignature(csp, X509_ASN_ENCODING, NULL, 0, NULL); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG), - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08lx\n", GetLastError()); info.ToBeSigned.cbData = toBeSigned->cbData; info.ToBeSigned.pbData = toBeSigned->pbData; info.SignatureAlgorithm.pszObjId = (LPSTR)sigOID; @@ -1985,7 +1985,7 @@ static void testVerifyCertSig(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, info.Signature.cUnusedBits = 0; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, X509_CERT, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &cert, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (cert) { PCERT_PUBLIC_KEY_INFO pubKeyInfo = NULL; @@ -2005,12 +2005,12 @@ static void testVerifyCertSig(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, (LPSTR)sigOID, 0, NULL, pubKeyInfo, &pubKeySize); - ok(ret, "CryptExportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptExportKey failed: %08lx\n", GetLastError()); if (ret) { ret = CryptVerifyCertificateSignature(csp, X509_ASN_ENCODING, cert, size, pubKeyInfo); - ok(ret, "CryptVerifyCertificateSignature failed: %08x\n", + ok(ret, "CryptVerifyCertificateSignature failed: %08lx\n", GetLastError()); } HeapFree(GetProcessHeap(), 0, pubKeyInfo); @@ -2039,14 +2039,14 @@ static void testVerifyCertSigEx(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigne } ret = pCryptVerifyCertificateSignatureEx(0, 0, 0, NULL, 0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = pCryptVerifyCertificateSignatureEx(csp, 0, 0, NULL, 0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, 0, NULL, 0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* This crashes ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, NULL, 0, NULL, 0, NULL); @@ -2060,7 +2060,7 @@ static void testVerifyCertSigEx(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigne info.Signature.cUnusedBits = 0; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, X509_CERT, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &cert, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (cert) { CRYPT_DATA_BLOB certBlob = { 0, NULL }; @@ -2069,7 +2069,7 @@ static void testVerifyCertSigEx(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigne ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, 0, NULL, 0, NULL); ok(!ret && GetLastError() == CRYPT_E_ASN1_EOD, - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError()); certBlob.cbData = 1; certBlob.pbData = (void *)0xdeadbeef; ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, @@ -2077,7 +2077,7 @@ static void testVerifyCertSigEx(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigne ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || GetLastError() == CRYPT_E_ASN1_EOD /* Win9x */ || GetLastError() == CRYPT_E_ASN1_BADTAG /* Win98 */), - "Expected STATUS_ACCESS_VIOLATION, CRYPT_E_ASN1_EOD, OR CRYPT_E_ASN1_BADTAG, got %08x\n", + "Expected STATUS_ACCESS_VIOLATION, CRYPT_E_ASN1_EOD, OR CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError());
certBlob.cbData = size; @@ -2085,12 +2085,12 @@ static void testVerifyCertSigEx(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigne ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, 0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, CRYPT_VERIFY_CERT_SIGN_ISSUER_NULL, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* This crashes ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, @@ -2103,13 +2103,13 @@ static void testVerifyCertSigEx(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigne { ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, (LPSTR)sigOID, 0, NULL, pubKeyInfo, &size); - ok(ret, "CryptExportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptExportKey failed: %08lx\n", GetLastError()); if (ret) { ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY, pubKeyInfo, 0, NULL); - ok(ret, "CryptVerifyCertificateSignatureEx failed: %08x\n", + ok(ret, "CryptVerifyCertificateSignatureEx failed: %08lx\n", GetLastError()); } HeapFree(GetProcessHeap(), 0, pubKeyInfo); @@ -2133,7 +2133,7 @@ static void testCertSigs(void) CRYPT_DELETEKEYSET); ret = CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: %08lx\n", GetLastError());
testSignCert(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, &sigSize); testVerifyCertSig(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, sigSize); @@ -2142,7 +2142,7 @@ static void testCertSigs(void) CryptReleaseContext(csp, 0); ret = CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: %08lx\n", GetLastError()); }
static const BYTE md5SignedEmptyCert[] = { @@ -2178,22 +2178,22 @@ static void testSignAndEncodeCert(void) ret = CryptSignAndEncodeCertificate(0, 0, 0, NULL, NULL, &algID, NULL, NULL, &size); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, NULL, NULL, &algID, NULL, NULL, &size); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = CryptSignAndEncodeCertificate(0, 0, 0, X509_CERT_TO_BE_SIGNED, NULL, &algID, NULL, NULL, &size); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); /* Crashes on some win9x boxes */ if (0) { ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, NULL, &algID, NULL, NULL, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* Crashes ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, @@ -2204,7 +2204,7 @@ static void testSignAndEncodeCert(void) ok(!ret && (GetLastError() == NTE_BAD_ALGID || GetLastError() == OSS_BAD_PTR), /* win9x */ - "Expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + "Expected NTE_BAD_ALGID, got %08lx\n", GetLastError()); algID.pszObjId = oid_rsa_md5rsa; ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, NULL, &size); @@ -2212,7 +2212,7 @@ static void testSignAndEncodeCert(void) (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == NTE_BAD_ALGID || GetLastError() == OSS_BAD_PTR), /* Win9x */ - "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", + "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08lx\n", GetLastError()); algID.pszObjId = oid_rsa_md5; ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, @@ -2226,14 +2226,14 @@ static void testSignAndEncodeCert(void) { ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, buf, &size); - ok(ret, "CryptSignAndEncodeCertificate failed: %08x\n", + ok(ret, "CryptSignAndEncodeCertificate failed: %08lx\n", GetLastError()); /* Tricky: because the NULL parameters may either be omitted or * included as an asn.1-encoded NULL (0x05,0x00), two different * values are allowed. */ ok(size == sizeof(md5SignedEmptyCert) || - size == sizeof(md5SignedEmptyCertNoNull), "Unexpected size %d\n", + size == sizeof(md5SignedEmptyCertNoNull), "Unexpected size %ld\n", size); if (size == sizeof(md5SignedEmptyCert)) ok(!memcmp(buf, md5SignedEmptyCert, size), @@ -2276,19 +2276,19 @@ static void testCreateSelfSignCert(void) CRYPT_DELETEKEYSET); ret = CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: %08lx\n", GetLastError());
context = pCertCreateSelfSignCertificate(csp, &name, 0, NULL, NULL, NULL, NULL, NULL); ok(!context && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key); - ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); + ok(ret, "CryptGenKey failed: %08lx\n", GetLastError()); if (ret) { context = pCertCreateSelfSignCertificate(csp, &name, 0, NULL, NULL, NULL, NULL, NULL); - ok(context != NULL, "CertCreateSelfSignCertificate failed: %08x\n", + ok(context != NULL, "CertCreateSelfSignCertificate failed: %08lx\n", GetLastError()); if (context) { @@ -2306,7 +2306,7 @@ static void testCreateSelfSignCert(void) { ret = CertGetCertificateContextProperty(context, CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); if (ret) { @@ -2316,7 +2316,7 @@ static void testCreateSelfSignCert(void) ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W), "Unexpected provider\n"); ok(pInfo->dwKeySpec == AT_SIGNATURE, - "Expected AT_SIGNATURE, got %d\n", pInfo->dwKeySpec); + "Expected AT_SIGNATURE, got %ld\n", pInfo->dwKeySpec); } HeapFree(GetProcessHeap(), 0, pInfo); } @@ -2331,16 +2331,16 @@ static void testCreateSelfSignCert(void) CryptReleaseContext(csp, 0); ret = CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: %08lx\n", GetLastError());
/* Do the same test with a CSP, AT_KEYEXCHANGE and key info */ CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_DELETEKEYSET); ret = CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: %08lx\n", GetLastError()); ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key); - ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); + ok(ret, "CryptGenKey failed: %08lx\n", GetLastError());
memset(&info,0,sizeof(info)); info.dwProvType = PROV_RSA_FULL; @@ -2355,7 +2355,7 @@ static void testCreateSelfSignCert(void) if (context != NULL) CertFreeCertificateContext(context); else - ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08x\n", + ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08lx\n", GetLastError()); /* Again, with a CSP, AT_SIGNATURE and key info */ info.dwKeySpec = AT_SIGNATURE; @@ -2363,7 +2363,7 @@ static void testCreateSelfSignCert(void) context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL, NULL, NULL); ok(context != NULL, - "CertCreateSelfSignCertificate failed: %08x\n", GetLastError()); + "CertCreateSelfSignCertificate failed: %08lx\n", GetLastError()); if (context) { DWORD size = 0; @@ -2380,7 +2380,7 @@ static void testCreateSelfSignCert(void) { ret = CertGetCertificateContextProperty(context, CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); if (ret) { @@ -2390,7 +2390,7 @@ static void testCreateSelfSignCert(void) ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W), "Unexpected provider\n"); ok(pInfo->dwKeySpec == AT_SIGNATURE, - "Expected AT_SIGNATURE, got %d\n", pInfo->dwKeySpec); + "Expected AT_SIGNATURE, got %ld\n", pInfo->dwKeySpec); } HeapFree(GetProcessHeap(), 0, pInfo); } @@ -2403,13 +2403,13 @@ static void testCreateSelfSignCert(void) CryptReleaseContext(csp, 0); ret = CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: %08lx\n", GetLastError());
/* Do the same test with no CSP, AT_KEYEXCHANGE and key info */ info.dwKeySpec = AT_KEYEXCHANGE; context = pCertCreateSelfSignCertificate(0, &name, 0, &info, NULL, NULL, NULL, NULL); - ok(context != NULL, "CertCreateSelfSignCertificate failed: %08x\n", + ok(context != NULL, "CertCreateSelfSignCertificate failed: %08lx\n", GetLastError()); if (context) { @@ -2427,7 +2427,7 @@ static void testCreateSelfSignCert(void) { ret = CertGetCertificateContextProperty(context, CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); if (ret) { @@ -2437,7 +2437,7 @@ static void testCreateSelfSignCert(void) ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W), "Unexpected provider\n"); ok(pInfo->dwKeySpec == AT_KEYEXCHANGE, - "Expected AT_KEYEXCHANGE, got %d\n", pInfo->dwKeySpec); + "Expected AT_KEYEXCHANGE, got %ld\n", pInfo->dwKeySpec); } HeapFree(GetProcessHeap(), 0, pInfo); } @@ -2454,14 +2454,14 @@ static void testCreateSelfSignCert(void) CRYPT_DELETEKEYSET); ret = CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: %08lx\n", GetLastError());
context = pCertCreateSelfSignCertificate(csp, &name, 0, NULL, NULL, NULL, NULL, NULL); ok(!context && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); ret = CryptGenKey(csp, AT_KEYEXCHANGE, 0, &key); - ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); + ok(ret, "CryptGenKey failed: %08lx\n", GetLastError()); CryptDestroyKey(key);
memset(&info,0,sizeof(info)); @@ -2477,7 +2477,7 @@ static void testCreateSelfSignCert(void) if (context != NULL) CertFreeCertificateContext(context); else - ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08x\n", + ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08lx\n", GetLastError()); /* Again, with a CSP, AT_KEYEXCHANGE and key info. This succeeds because the * CSP has an AT_KEYEXCHANGE key in it. @@ -2487,7 +2487,7 @@ static void testCreateSelfSignCert(void) context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL, NULL, NULL); ok(context != NULL, - "CertCreateSelfSignCertificate failed: %08x\n", GetLastError()); + "CertCreateSelfSignCertificate failed: %08lx\n", GetLastError()); if (context) { DWORD size = 0; @@ -2504,7 +2504,7 @@ static void testCreateSelfSignCert(void) { ret = CertGetCertificateContextProperty(context, CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); if (ret) { @@ -2514,7 +2514,7 @@ static void testCreateSelfSignCert(void) ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W), "Unexpected provider\n"); ok(pInfo->dwKeySpec == AT_KEYEXCHANGE, - "Expected AT_KEYEXCHANGE, got %d\n", pInfo->dwKeySpec); + "Expected AT_KEYEXCHANGE, got %ld\n", pInfo->dwKeySpec); } HeapFree(GetProcessHeap(), 0, pInfo); } @@ -2526,7 +2526,7 @@ static void testCreateSelfSignCert(void) CryptReleaseContext(csp, 0); ret = CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: %08lx\n", GetLastError());
}
@@ -2566,7 +2566,7 @@ static void testIntendedKeyUsage(void) /* The unused bytes are filled with 0. */ ret = CertGetIntendedKeyUsage(X509_ASN_ENCODING, &info, usage_bytes, sizeof(usage_bytes)); - ok(ret, "CertGetIntendedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertGetIntendedKeyUsage failed: %08lx\n", GetLastError()); ok(!memcmp(usage_bytes, expected_usage1, sizeof(expected_usage1)), "unexpected value\n"); /* The usage bytes are copied in big-endian order. */ @@ -2574,7 +2574,7 @@ static void testIntendedKeyUsage(void) ext.Value.pbData = usage2; ret = CertGetIntendedKeyUsage(X509_ASN_ENCODING, &info, usage_bytes, sizeof(usage_bytes)); - ok(ret, "CertGetIntendedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertGetIntendedKeyUsage failed: %08lx\n", GetLastError()); ok(!memcmp(usage_bytes, expected_usage2, sizeof(expected_usage2)), "unexpected value\n"); } @@ -2591,15 +2591,15 @@ static void testKeyUsage(void) /* Test base cases */ ret = CertGetEnhancedKeyUsage(NULL, 0, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); size = 1; ret = CertGetEnhancedKeyUsage(NULL, 0, NULL, &size); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); size = 0; ret = CertGetEnhancedKeyUsage(NULL, 0, NULL, &size); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); /* These crash ret = CertSetEnhancedKeyUsage(NULL, NULL); usage.cUsageIdentifier = 0; @@ -2608,7 +2608,7 @@ static void testKeyUsage(void) /* Test with a cert with no enhanced key usage extension */ context = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(context != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); if (context) { @@ -2618,7 +2618,7 @@ static void testKeyUsage(void)
ret = CertGetEnhancedKeyUsage(context, 0, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); size = 1; ret = CertGetEnhancedKeyUsage(context, 0, NULL, &size); if (ret) @@ -2628,11 +2628,11 @@ static void testKeyUsage(void) * usage set for this cert (which implies it's valid for all uses.) */ ok(GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - ok(size == sizeof(CERT_ENHKEY_USAGE), "Wrong size %d\n", size); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); + ok(size == sizeof(CERT_ENHKEY_USAGE), "Wrong size %ld\n", size); ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %d\n", + ok(ret, "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %ld\n", pUsage->cUsageIdentifier); } else @@ -2641,18 +2641,18 @@ static void testKeyUsage(void) * CRYPT_E_NOT_FOUND. */ ok(GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); } /* I can add a usage identifier when no key usage has been set */ ret = CertAddEnhancedKeyUsageIdentifier(context, oid); - ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", + ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08lx\n", GetLastError()); size = sizeof(buf); ret = CertGetEnhancedKeyUsage(context, CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 1, "Expected 1 usage, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 1, "Expected 1 usage, got %ld\n", pUsage->cUsageIdentifier); if (pUsage->cUsageIdentifier) ok(!strcmp(pUsage->rgpszUsageIdentifier[0], oid), @@ -2660,35 +2660,35 @@ static void testKeyUsage(void) /* Now set an empty key usage */ pUsage->cUsageIdentifier = 0; ret = CertSetEnhancedKeyUsage(context, pUsage); - ok(ret, "CertSetEnhancedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertSetEnhancedKeyUsage failed: %08lx\n", GetLastError()); /* Shouldn't find it in the cert */ size = sizeof(buf); ret = CertGetEnhancedKeyUsage(context, CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* Should find it as an extended property */ ret = CertGetEnhancedKeyUsage(context, CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %ld\n", pUsage->cUsageIdentifier); /* Should find it as either */ ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %ld\n", pUsage->cUsageIdentifier); /* Add a usage identifier */ ret = CertAddEnhancedKeyUsageIdentifier(context, oid); - ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", + ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08lx\n", GetLastError()); size = sizeof(buf); ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 1, "Expected 1 identifier, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 1, "Expected 1 identifier, got %ld\n", pUsage->cUsageIdentifier); if (pUsage->cUsageIdentifier) ok(!strcmp(pUsage->rgpszUsageIdentifier[0], oid), @@ -2697,14 +2697,14 @@ static void testKeyUsage(void) * a duplicate usage identifier on versions prior to Vista */ ret = CertAddEnhancedKeyUsageIdentifier(context, oid); - ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", + ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08lx\n", GetLastError()); size = sizeof(buf); ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); ok(pUsage->cUsageIdentifier == 1 || pUsage->cUsageIdentifier == 2, - "Expected 1 or 2 identifiers, got %d\n", pUsage->cUsageIdentifier); + "Expected 1 or 2 identifiers, got %ld\n", pUsage->cUsageIdentifier); if (pUsage->cUsageIdentifier) ok(!strcmp(pUsage->rgpszUsageIdentifier[0], oid), "Expected %s, got %s\n", oid, pUsage->rgpszUsageIdentifier[0]); @@ -2713,21 +2713,21 @@ static void testKeyUsage(void) "Expected %s, got %s\n", oid, pUsage->rgpszUsageIdentifier[1]); /* Now set a NULL extended property--this deletes the property. */ ret = CertSetEnhancedKeyUsage(context, NULL); - ok(ret, "CertSetEnhancedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertSetEnhancedKeyUsage failed: %08lx\n", GetLastError()); SetLastError(0xbaadcafe); size = sizeof(buf); ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); ok(ret || broken(!ret && GetLastError() == CRYPT_E_NOT_FOUND /* NT4 */), - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); ok(GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError());
CertFreeCertificateContext(context); } /* Now test with a cert with an enhanced key usage extension */ context = CertCreateCertificateContext(X509_ASN_ENCODING, certWithUsage, sizeof(certWithUsage)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(context != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); if (context) { @@ -2739,7 +2739,7 @@ static void testKeyUsage(void) */ ret = CertGetEnhancedKeyUsage(context, CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, bufSize); if (buf) { @@ -2750,8 +2750,8 @@ static void testKeyUsage(void) ret = CertGetEnhancedKeyUsage(context, CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %ld\n", pUsage->cUsageIdentifier); for (i = 0; i < pUsage->cUsageIdentifier; i++) ok(!strcmp(pUsage->rgpszUsageIdentifier[i], keyUsages[i]), @@ -2760,7 +2760,7 @@ static void testKeyUsage(void) HeapFree(GetProcessHeap(), 0, buf); } ret = CertGetEnhancedKeyUsage(context, 0, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, bufSize); if (buf) { @@ -2774,8 +2774,8 @@ static void testKeyUsage(void) * count is positive. I don't enforce that here. */ ok(ret, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %ld\n", pUsage->cUsageIdentifier); for (i = 0; i < pUsage->cUsageIdentifier; i++) ok(!strcmp(pUsage->rgpszUsageIdentifier[i], keyUsages[i]), @@ -2787,13 +2787,13 @@ static void testKeyUsage(void) ret = CertGetEnhancedKeyUsage(context, CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* Adding a usage identifier overrides the cert's usage!? */ ret = CertAddEnhancedKeyUsageIdentifier(context, szOID_RSA_RSA); - ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", + ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08lx\n", GetLastError()); ret = CertGetEnhancedKeyUsage(context, 0, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, bufSize); if (buf) { @@ -2803,8 +2803,8 @@ static void testKeyUsage(void) size = bufSize; ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); ok(ret, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 1, "Expected 1 usage, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 1, "Expected 1 usage, got %ld\n", pUsage->cUsageIdentifier); ok(!strcmp(pUsage->rgpszUsageIdentifier[0], szOID_RSA_RSA), "Expected %s, got %s\n", szOID_RSA_RSA, @@ -2814,7 +2814,7 @@ static void testKeyUsage(void) /* But querying the cert directly returns its usage */ ret = CertGetEnhancedKeyUsage(context, CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, bufSize); if (buf) { @@ -2824,8 +2824,8 @@ static void testKeyUsage(void) ret = CertGetEnhancedKeyUsage(context, CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); ok(ret, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %ld\n", pUsage->cUsageIdentifier); for (i = 0; i < pUsage->cUsageIdentifier; i++) ok(!strcmp(pUsage->rgpszUsageIdentifier[i], keyUsages[i]), @@ -2837,9 +2837,9 @@ static void testKeyUsage(void) * results in the cert's key usage being found. */ ret = CertRemoveEnhancedKeyUsageIdentifier(context, szOID_RSA_RSA); - ok(ret, "CertRemoveEnhancedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertRemoveEnhancedKeyUsage failed: %08lx\n", GetLastError()); ret = CertGetEnhancedKeyUsage(context, 0, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); + ok(ret, "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, bufSize); if (buf) { @@ -2849,8 +2849,8 @@ static void testKeyUsage(void) size = bufSize; ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); ok(ret, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %d\n", + "CertGetEnhancedKeyUsage failed: %08lx\n", GetLastError()); + ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %ld\n", pUsage->cUsageIdentifier); for (i = 0; i < pUsage->cUsageIdentifier; i++) ok(!strcmp(pUsage->rgpszUsageIdentifier[i], keyUsages[i]), @@ -2906,9 +2906,9 @@ static void testGetValidUsages(void) size = numOIDs = 0xdeadbeef; SetLastError(0xdeadbeef); ret = pCertGetValidUsages(1, &contexts[0], &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %d\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %ld\n", GetLastError()); ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs); - ok(size == 0, "Expected size 0, got %d\n", size); + ok(size == 0, "Expected size 0, got %ld\n", size); contexts[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); contexts[1] = CertCreateCertificateContext(X509_ASN_ENCODING, certWithUsage, @@ -2917,16 +2917,16 @@ static void testGetValidUsages(void) cert2WithUsage, sizeof(cert2WithUsage)); size = numOIDs = 0xdeadbeef; ret = pCertGetValidUsages(0, NULL, &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs); - ok(size == 0, "Expected size 0, got %d\n", size); + ok(size == 0, "Expected size 0, got %ld\n", size); size = numOIDs = 0xdeadbeef; ret = pCertGetValidUsages(1, contexts, &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs); - ok(size == 0, "Expected size 0, got %d\n", size); + ok(size == 0, "Expected size 0, got %ld\n", size); ret = pCertGetValidUsages(1, &contexts[1], &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); ok(numOIDs == 3, "Expected 3, got %d\n", numOIDs); ok(size, "Expected non-zero size\n"); oids = HeapAlloc(GetProcessHeap(), 0, size); @@ -2938,9 +2938,9 @@ static void testGetValidUsages(void) SetLastError(0xdeadbeef); ret = pCertGetValidUsages(1, &contexts[1], &numOIDs, oids, &smallSize); ok(!ret && GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError()); ret = pCertGetValidUsages(1, &contexts[1], &numOIDs, oids, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); for (i = 0; i < numOIDs; i++) ok(!lstrcmpA(oids[i], expectedOIDs[i]), "unexpected OID %s\n", oids[i]); @@ -2953,7 +2953,7 @@ static void testGetValidUsages(void) */ size = 0; ret = pCertGetValidUsages(2, contexts, &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); ok(numOIDs == 3, "Expected 3, got %d\n", numOIDs); ok(size, "Expected non-zero size\n"); oids = HeapAlloc(GetProcessHeap(), 0, size); @@ -2962,7 +2962,7 @@ static void testGetValidUsages(void) int i;
ret = pCertGetValidUsages(1, &contexts[1], &numOIDs, oids, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); for (i = 0; i < numOIDs; i++) ok(!lstrcmpA(oids[i], expectedOIDs[i]), "unexpected OID %s\n", oids[i]); @@ -2971,7 +2971,7 @@ static void testGetValidUsages(void) numOIDs = 0xdeadbeef; size = 0; ret = pCertGetValidUsages(1, &contexts[2], &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); ok(numOIDs == 2, "Expected 2, got %d\n", numOIDs); ok(size, "Expected non-zero size\n"); oids = HeapAlloc(GetProcessHeap(), 0, size); @@ -2980,7 +2980,7 @@ static void testGetValidUsages(void) int i;
ret = pCertGetValidUsages(1, &contexts[2], &numOIDs, oids, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); for (i = 0; i < numOIDs; i++) ok(!lstrcmpA(oids[i], expectedOIDs2[i]), "unexpected OID %s\n", oids[i]); @@ -2989,7 +2989,7 @@ static void testGetValidUsages(void) numOIDs = 0xdeadbeef; size = 0; ret = pCertGetValidUsages(3, contexts, &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); ok(numOIDs == 2, "Expected 2, got %d\n", numOIDs); ok(size, "Expected non-zero size\n"); oids = HeapAlloc(GetProcessHeap(), 0, size); @@ -2998,7 +2998,7 @@ static void testGetValidUsages(void) int i;
ret = pCertGetValidUsages(3, contexts, &numOIDs, oids, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); + ok(ret, "CertGetValidUsages failed: %08lx\n", GetLastError()); for (i = 0; i < numOIDs; i++) ok(!lstrcmpA(oids[i], expectedOIDs2[i]), "unexpected OID %s\n", oids[i]); @@ -3047,12 +3047,12 @@ static void testCompareCertName(void) blob1.pbData = emptyCert; blob1.cbData = sizeof(emptyCert); ret = CertCompareCertificateName(0, &blob1, &blob1); - ok(ret, "CertCompareCertificateName failed: %08x\n", GetLastError()); + ok(ret, "CertCompareCertificateName failed: %08lx\n", GetLastError()); /* It doesn't have to be a valid encoded name.. */ blob1.pbData = bogus; blob1.cbData = sizeof(bogus); ret = CertCompareCertificateName(0, &blob1, &blob1); - ok(ret, "CertCompareCertificateName failed: %08x\n", GetLastError()); + ok(ret, "CertCompareCertificateName failed: %08lx\n", GetLastError()); /* Leading zeroes matter.. */ blob2.pbData = bogusPrime; blob2.cbData = sizeof(bogusPrime); @@ -3130,41 +3130,41 @@ static void testIsRDNAttrsInCertificateName(void) SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(0, 0, &name, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); + ok(ret, "CertIsRDNAttrsInCertificateName failed: %08lx\n", GetLastError()); attr[0].pszObjId = oid_1_2_3; rdn.rgRDNAttr = attr; rdn.cRDNAttr = 1; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); attr[0].pszObjId = oid_common_name; attr[0].dwValueType = CERT_RDN_PRINTABLE_STRING; attr[0].Value.cbData = strlen(juan); attr[0].Value.pbData = (BYTE *)juan; ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); + ok(ret, "CertIsRDNAttrsInCertificateName failed: %08lx\n", GetLastError()); /* Again, spaces are not removed for name comparison. */ attr[0].Value.cbData = strlen(juan_with_leading_space); attr[0].Value.pbData = (BYTE *)juan_with_leading_space; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); attr[0].Value.cbData = strlen(juan_with_intermediate_space); attr[0].Value.pbData = (BYTE *)juan_with_intermediate_space; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); attr[0].Value.cbData = strlen(juan_with_trailing_space); attr[0].Value.pbData = (BYTE *)juan_with_trailing_space; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); /* The lower case name isn't matched unless a case insensitive match is * specified. */ @@ -3173,12 +3173,12 @@ static void testIsRDNAttrsInCertificateName(void) SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG, &name, &rdn); ok(ret || broken(!ret && GetLastError() == CRYPT_E_NO_MATCH), /* Older crypt32 */ - "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); + "CertIsRDNAttrsInCertificateName failed: %08lx\n", GetLastError()); /* The values don't match unless they have the same RDN type */ attr[0].dwValueType = CERT_RDN_UNICODE_STRING; attr[0].Value.cbData = lstrlenW(juanW) * sizeof(WCHAR); @@ -3186,19 +3186,19 @@ static void testIsRDNAttrsInCertificateName(void) SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, CERT_UNICODE_IS_RDN_ATTRS_FLAG, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); attr[0].dwValueType = CERT_RDN_IA5_STRING; attr[0].Value.cbData = strlen(juan); attr[0].Value.pbData = (BYTE *)juan; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); /* All attributes must be present */ attr[0].dwValueType = CERT_RDN_PRINTABLE_STRING; attr[0].Value.cbData = strlen(juan); @@ -3211,18 +3211,18 @@ static void testIsRDNAttrsInCertificateName(void) SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); /* Order also matters */ name.pbData = cnThenO; name.cbData = sizeof(cnThenO); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); + ok(ret, "CertIsRDNAttrsInCertificateName failed: %08lx\n", GetLastError()); name.pbData = oThenCN; name.cbData = sizeof(oThenCN); SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); }
static BYTE int1[] = { 0x88, 0xff, 0xff, 0xff }; @@ -3255,7 +3255,7 @@ static void testCompareIntegerBlob(void) { ret = CertCompareIntegerBlob(&intBlobs[i].blob1, &intBlobs[i].blob2); ok(ret == intBlobs[i].areEqual, - "%d: expected blobs %s compare\n", i, intBlobs[i].areEqual ? + "%ld: expected blobs %s compare\n", i, intBlobs[i].areEqual ? "to" : "not to"); } } @@ -3282,23 +3282,23 @@ static void testComparePublicKeyInfo(void) */ /* Empty public keys compare */ ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CertComparePublicKeyInfo failed: %08lx\n", GetLastError()); ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CertComparePublicKeyInfo failed: %08lx\n", GetLastError());
/* Different OIDs appear to compare */ info1.Algorithm.pszObjId = oid_rsa_rsa; info2.Algorithm.pszObjId = oid_rsa_sha1rsa; ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CertComparePublicKeyInfo failed: %08lx\n", GetLastError()); ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CertComparePublicKeyInfo failed: %08lx\n", GetLastError());
info2.Algorithm.pszObjId = oid_x957_dsa; ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CertComparePublicKeyInfo failed: %08lx\n", GetLastError()); ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CertComparePublicKeyInfo failed: %08lx\n", GetLastError());
info1.PublicKey.cbData = sizeof(bits1); info1.PublicKey.pbData = bits1; @@ -3307,9 +3307,9 @@ static void testComparePublicKeyInfo(void) info2.PublicKey.pbData = bits1; info2.PublicKey.cUnusedBits = 0; ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CertComparePublicKeyInfo failed: %08lx\n", GetLastError()); ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CertComparePublicKeyInfo failed: %08lx\n", GetLastError());
info2.Algorithm.pszObjId = oid_rsa_rsa; info1.PublicKey.cbData = sizeof(bits4); @@ -3405,21 +3405,21 @@ static void testHashPublicKeyInfo(void) */ ret = CryptHashPublicKeyInfo(0, 0, 0, 0, NULL, NULL, &len); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); /* Crashes on some win9x boxes */ if (0) { ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, NULL, NULL, &len); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, &info, NULL, &len); ok(ret || broken(!ret), /* win9x */ - "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); + "CryptHashPublicKeyInfo failed: %08lx\n", GetLastError()); if (ret) { - ok(len == 16, "Expected hash size 16, got %d\n", len); + ok(len == 16, "Expected hash size 16, got %ld\n", len); if (len == 16) { static const BYTE emptyHash[] = { 0xb8,0x51,0x3a,0x31,0x0e,0x9f,0x40, @@ -3428,7 +3428,7 @@ static void testHashPublicKeyInfo(void)
ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, &info, buf, &len); - ok(ret, "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CryptHashPublicKeyInfo failed: %08lx\n", GetLastError()); ok(!memcmp(buf, emptyHash, len), "Unexpected hash\n"); } } @@ -3451,13 +3451,13 @@ static void testHashToBeSigned(void) SetLastError(0xdeadbeef); ret = CryptHashToBeSigned(0, 0, NULL, 0, NULL, &size); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, NULL, 0, NULL, &size); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG), /* win9x */ - "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError()); /* Can't sign anything: has to be asn.1 encoded, at least */ SetLastError(0xdeadbeef); ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, int1, sizeof(int1), @@ -3465,7 +3465,7 @@ static void testHashToBeSigned(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_MORE_INPUT), /* win9x */ - "expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); /* Can't be empty, either */ SetLastError(0xdeadbeef); ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, emptyCert, @@ -3473,22 +3473,22 @@ static void testHashToBeSigned(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR), /* win9x */ - "expected CRYPT_E_ASN1_CORRUPT, got %08x\n", GetLastError()); + "expected CRYPT_E_ASN1_CORRUPT, got %08lx\n", GetLastError()); /* Signing a cert works */ ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, md5SignedEmptyCert, sizeof(md5SignedEmptyCert), NULL, &size); ok(ret || broken(!ret), /* win9x */ - "CryptHashToBeSigned failed: %08x\n", GetLastError()); + "CryptHashToBeSigned failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(md5SignedEmptyCertHash), "unexpected size %d\n", size); + ok(size == sizeof(md5SignedEmptyCertHash), "unexpected size %ld\n", size); }
ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, md5SignedEmptyCert, sizeof(md5SignedEmptyCert), hash, &size); ok(ret || broken(!ret && GetLastError() == NTE_BAD_ALGID) /* NT4 */, - "CryptHashToBeSigned failed: %08x\n", GetLastError()); + "CryptHashToBeSigned failed: %08lx\n", GetLastError());
ok(!memcmp(hash, md5SignedEmptyCertHash, size), "unexpected value\n"); } @@ -3537,45 +3537,45 @@ static void testVerifySubjectCert(void) */ flags = 0; ret = CertVerifySubjectCertificateContext(NULL, NULL, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", + ok(ret, "CertVerifySubjectCertificateContext failed; %08lx\n", GetLastError()); flags = CERT_STORE_NO_CRL_FLAG; ret = CertVerifySubjectCertificateContext(NULL, NULL, &flags); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError());
flags = 0; context1 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); ret = CertVerifySubjectCertificateContext(NULL, context1, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", + ok(ret, "CertVerifySubjectCertificateContext failed; %08lx\n", GetLastError()); ret = CertVerifySubjectCertificateContext(context1, NULL, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", + ok(ret, "CertVerifySubjectCertificateContext failed; %08lx\n", GetLastError()); ret = CertVerifySubjectCertificateContext(context1, context1, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", + ok(ret, "CertVerifySubjectCertificateContext failed; %08lx\n", GetLastError());
context2 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCertWithDifferentSubject, sizeof(bigCertWithDifferentSubject)); SetLastError(0xdeadbeef); ret = CertVerifySubjectCertificateContext(context1, context2, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", + ok(ret, "CertVerifySubjectCertificateContext failed; %08lx\n", GetLastError()); flags = CERT_STORE_REVOCATION_FLAG; ret = CertVerifySubjectCertificateContext(context1, context2, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", + ok(ret, "CertVerifySubjectCertificateContext failed; %08lx\n", GetLastError()); ok(flags == (CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG), - "Expected CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG, got %08x\n", + "Expected CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG, got %08lx\n", flags); flags = CERT_STORE_SIGNATURE_FLAG; ret = CertVerifySubjectCertificateContext(context1, context2, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", + ok(ret, "CertVerifySubjectCertificateContext failed; %08lx\n", GetLastError()); ok(flags == CERT_STORE_SIGNATURE_FLAG, - "Expected CERT_STORE_SIGNATURE_FLAG, got %08x\n", flags); + "Expected CERT_STORE_SIGNATURE_FLAG, got %08lx\n", flags); CertFreeCertificateContext(context2);
CertFreeCertificateContext(context1); @@ -3681,24 +3681,24 @@ static void testVerifyRevocation(void) SetLastError(0xdeadbeef); ret = CertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); status.cbSize = sizeof(status); ret = CertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status); - ok(ret, "CertVerifyRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyRevocation failed: %08lx\n", GetLastError()); ret = CertVerifyRevocation(0, 2, 0, NULL, 0, NULL, &status); - ok(ret, "CertVerifyRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyRevocation failed: %08lx\n", GetLastError()); ret = CertVerifyRevocation(2, 0, 0, NULL, 0, NULL, &status); - ok(ret, "CertVerifyRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyRevocation failed: %08lx\n", GetLastError()); certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); SetLastError(0xdeadbeef); ret = CertVerifyRevocation(0, 0, 1, (void **)certs, 0, NULL, &status); ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_DLL, - "Expected CRYPT_E_NO_REVOCATION_DLL, got %08x\n", GetLastError()); + "Expected CRYPT_E_NO_REVOCATION_DLL, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CertVerifyRevocation(0, 2, 1, (void **)certs, 0, NULL, &status); ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_DLL, - "Expected CRYPT_E_NO_REVOCATION_DLL, got %08x\n", GetLastError()); + "Expected CRYPT_E_NO_REVOCATION_DLL, got %08lx\n", GetLastError());
CertFreeCertificateContext(certs[0]);
@@ -3716,36 +3716,36 @@ static void testVerifyRevocation(void) return; } ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_REVOCATION_CHECK, got %08lx\n", GetLastError()); ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); + "expected CRYPT_E_NO_REVOCATION_CHECK, got %08lx\n", status.dwError); + ok(status.dwIndex == 0, "expected index 0, got %ld\n", status.dwIndex); /* Neither can the end cert */ SetLastError(0xdeadbeef); ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, NULL, &status); ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK /* Win9x */ || GetLastError() == CRYPT_E_REVOCATION_OFFLINE), - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", + "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08lx\n", GetLastError()); ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK /* Win9x */ || status.dwError == CRYPT_E_REVOCATION_OFFLINE, - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", + "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08lx\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); + ok(status.dwIndex == 0, "expected index 0, got %ld\n", status.dwIndex); /* Both certs together can't, either (they're not CRLs) */ SetLastError(0xdeadbeef); ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 2, (void **)certs, 0, NULL, &status); ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || GetLastError() == CRYPT_E_REVOCATION_OFFLINE /* WinME */), - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", + "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08lx\n", GetLastError()); ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK || status.dwError == CRYPT_E_REVOCATION_OFFLINE /* WinME */, - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", + "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08lx\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); + ok(status.dwIndex == 0, "expected index 0, got %ld\n", status.dwIndex); /* Now add a CRL to the hCrlStore */ revPara.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); @@ -3756,22 +3756,22 @@ static void testVerifyRevocation(void) 2, (void **)certs, 0, &revPara, &status); ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || GetLastError() == CRYPT_E_REVOCATION_OFFLINE /* WinME */), - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", + "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08lx\n", GetLastError()); ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK || status.dwError == CRYPT_E_REVOCATION_OFFLINE /* WinME */, - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", + "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08lx\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); + ok(status.dwIndex == 0, "expected index 0, got %ld\n", status.dwIndex); /* Specifying CERT_VERIFY_REV_CHAIN_FLAG doesn't change things either */ SetLastError(0xdeadbeef); ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 2, (void **)certs, CERT_VERIFY_REV_CHAIN_FLAG, &revPara, &status); ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_REVOCATION_CHECK, got %08lx\n", GetLastError()); ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); + "expected CRYPT_E_NO_REVOCATION_CHECK, got %08lx\n", status.dwError); + ok(status.dwIndex == 0, "expected index 0, got %ld\n", status.dwIndex); /* Again, specifying the issuer cert: no change */ revPara.pIssuerCert = certs[0]; SetLastError(0xdeadbeef); @@ -3782,11 +3782,11 @@ static void testVerifyRevocation(void) */ ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || broken(GetLastError() == CRYPT_E_REVOKED /* Win2k */)), - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_REVOCATION_CHECK, got %08lx\n", GetLastError()); ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK || broken(status.dwError == CRYPT_E_REVOKED /* Win2k */), - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); + "expected CRYPT_E_NO_REVOCATION_CHECK, got %08lx\n", status.dwError); + ok(status.dwIndex == 0, "expected index 0, got %ld\n", status.dwIndex); CertCloseStore(revPara.hCrlStore, 0); CertFreeCertificateContext(certs[1]); CertFreeCertificateContext(certs[0]); @@ -3881,11 +3881,11 @@ static void testAcquireCertPrivateKey(void) /* Missing private key */ ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, NULL, NULL); ok(!ret && (GetLastError() == CRYPT_E_NO_KEY_PROPERTY || GetLastError() == NTE_BAD_PROV_TYPE /* win10 */), - "Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError()); + "Expected CRYPT_E_NO_KEY_PROPERTY, got %08lx\n", GetLastError()); ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, &keySpec, &callerFree); ok(!ret && (GetLastError() == CRYPT_E_NO_KEY_PROPERTY || GetLastError() == NTE_BAD_PROV_TYPE /* win10 */), - "Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError()); + "Expected CRYPT_E_NO_KEY_PROPERTY, got %08lx\n", GetLastError()); CertSetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, 0, &keyProvInfo); ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, &keySpec, @@ -3893,12 +3893,12 @@ static void testAcquireCertPrivateKey(void) ok(!ret && (GetLastError() == CRYPT_E_NO_KEY_PROPERTY || GetLastError() == NTE_BAD_KEYSET /* win8 */ || GetLastError() == NTE_BAD_PROV_TYPE /* win10 */), - "Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError()); + "Expected CRYPT_E_NO_KEY_PROPERTY, got %08lx\n", GetLastError());
CryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_NEWKEYSET); ret = CryptImportKey(csp, privKey, sizeof(privKey), 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptImportKey failed: %08lx\n", GetLastError()); if (ret) { HCRYPTPROV certCSP; @@ -3910,7 +3910,7 @@ static void testAcquireCertPrivateKey(void) &keySpec, &callerFree); ok(ret || broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", + "CryptAcquireCertificatePrivateKey failed: %08lx\n", GetLastError()); if (ret) { @@ -3922,7 +3922,7 @@ static void testAcquireCertPrivateKey(void) NULL, NULL); ok(ret || broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", + "CryptAcquireCertificatePrivateKey failed: %08lx\n", GetLastError()); CryptReleaseContext(certCSP, 0);
@@ -3932,7 +3932,7 @@ static void testAcquireCertPrivateKey(void) &callerFree); ok(ret || broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", + "CryptAcquireCertificatePrivateKey failed: %08lx\n", GetLastError()); if (ret) { @@ -3945,7 +3945,7 @@ static void testAcquireCertPrivateKey(void) CRYPT_ACQUIRE_CACHE_FLAG, NULL, &certCSP, &keySpec, &callerFree); ok(ret || broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", + "CryptAcquireCertificatePrivateKey failed: %08lx\n", GetLastError()); ok(!callerFree, "Expected callerFree to be FALSE\n"); size = sizeof(keyContext); @@ -3953,7 +3953,7 @@ static void testAcquireCertPrivateKey(void) &keyContext, &size); ok(ret || broken(!ret), /* win95 */ - "CertGetCertificateContextProperty failed: %08x\n", + "CertGetCertificateContextProperty failed: %08lx\n", GetLastError());
/* Remove the cached provider */ @@ -3970,7 +3970,7 @@ static void testAcquireCertPrivateKey(void) &callerFree); ok(ret || broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", + "CryptAcquireCertificatePrivateKey failed: %08lx\n", GetLastError()); ok(!callerFree, "Expected callerFree to be FALSE\n"); size = sizeof(keyContext); @@ -3978,7 +3978,7 @@ static void testAcquireCertPrivateKey(void) &keyContext, &size); ok(ret || broken(!ret), /* win95 */ - "CertGetCertificateContextProperty failed: %08x\n", + "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); CryptReleaseContext(certCSP, 0);
@@ -3988,26 +3988,26 @@ static void testAcquireCertPrivateKey(void) /* Some sanity-checking on public key exporting */ ret = CryptImportPublicKeyInfo(csp, X509_ASN_ENCODING, &cert->pCertInfo->SubjectPublicKeyInfo, &key); - ok(ret, "CryptImportPublicKeyInfo failed: %08x\n", GetLastError()); + ok(ret, "CryptImportPublicKeyInfo failed: %08lx\n", GetLastError()); if (ret) { ret = CryptExportKey(key, 0, PUBLICKEYBLOB, 0, NULL, &size); - ok(ret, "CryptExportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptExportKey failed: %08lx\n", GetLastError()); if (ret) { LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size), encodedKey;
ret = CryptExportKey(key, 0, PUBLICKEYBLOB, 0, buf, &size); - ok(ret, "CryptExportKey failed: %08x\n", GetLastError()); - ok(size == sizeof(exportedPublicKeyBlob), "Unexpected size %d\n", + ok(ret, "CryptExportKey failed: %08lx\n", GetLastError()); + ok(size == sizeof(exportedPublicKeyBlob), "Unexpected size %ld\n", size); ok(!memcmp(buf, exportedPublicKeyBlob, size), "Unexpected value\n"); ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, RSA_CSP_PUBLICKEYBLOB, buf, CRYPT_ENCODE_ALLOC_FLAG, NULL, &encodedKey, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(asnEncodedPublicKey), "Unexpected size %d\n", + ok(size == sizeof(asnEncodedPublicKey), "Unexpected size %ld\n", size); ok(!memcmp(encodedKey, asnEncodedPublicKey, size), "Unexpected value\n"); @@ -4019,18 +4019,18 @@ static void testAcquireCertPrivateKey(void) } ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, NULL, 0, NULL, NULL, &size); - ok(ret, "CryptExportPublicKeyInfoEx failed: %08x\n", GetLastError()); + ok(ret, "CryptExportPublicKeyInfoEx failed: %08lx\n", GetLastError()); if (ret) { PCERT_PUBLIC_KEY_INFO info = HeapAlloc(GetProcessHeap(), 0, size);
ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, NULL, 0, NULL, info, &size); - ok(ret, "CryptExportPublicKeyInfoEx failed: %08x\n", GetLastError()); + ok(ret, "CryptExportPublicKeyInfoEx failed: %08lx\n", GetLastError()); if (ret) { ok(info->PublicKey.cbData == sizeof(asnEncodedPublicKey), - "Unexpected size %d\n", info->PublicKey.cbData); + "Unexpected size %ld\n", info->PublicKey.cbData); ok(!memcmp(info->PublicKey.pbData, asnEncodedPublicKey, info->PublicKey.cbData), "Unexpected value\n"); } @@ -4062,28 +4062,28 @@ static void testGetPublicKeyLength(void) SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(0, &info); ok(ret == 0 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %d, %08x\n", + "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %ld, %08lx\n", ret, GetLastError()); SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); ok(ret == 0 && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG), /* win9x */ - "Expected length 0 and CRYPT_E_ASN1_EOD, got length %d, %08x\n", + "Expected length 0 and CRYPT_E_ASN1_EOD, got length %ld, %08lx\n", ret, GetLastError()); /* With a nearly-empty public key info */ info.Algorithm.pszObjId = oid_rsa_rsa; SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(0, &info); ok(ret == 0 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %d, %08x\n", + "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %ld, %08lx\n", ret, GetLastError()); SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); ok(ret == 0 && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG), /* win9x */ - "Expected length 0 and CRYPT_E_ASN1_EOD, got length %d, %08x\n", + "Expected length 0 and CRYPT_E_ASN1_EOD, got length %ld, %08lx\n", ret, GetLastError()); /* With a bogus key */ info.PublicKey.cbData = sizeof(bogusKey); @@ -4091,14 +4091,14 @@ static void testGetPublicKeyLength(void) SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(0, &info); ok(ret == 0 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %d, %08x\n", + "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %ld, %08lx\n", ret, GetLastError()); SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); ok(ret == 0 && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH), /* win9x */ - "Expected length 0 and CRYPT_E_ASN1_BADTAGTAG, got length %d, %08x\n", + "Expected length 0 and CRYPT_E_ASN1_BADTAGTAG, got length %ld, %08lx\n", ret, GetLastError()); /* With a believable RSA key but a bogus OID */ info.Algorithm.pszObjId = bogusOID; @@ -4107,12 +4107,12 @@ static void testGetPublicKeyLength(void) SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(0, &info); ok(ret == 0 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %d, %08x\n", + "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %ld, %08lx\n", ret, GetLastError()); SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */, - "Expected length 56, got %d\n", ret); + "Expected length 56, got %ld\n", ret); /* An RSA key with the DH OID */ info.Algorithm.pszObjId = oid_rsa_dh; SetLastError(0xdeadbeef); @@ -4120,20 +4120,20 @@ static void testGetPublicKeyLength(void) ok(ret == 0 && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == E_INVALIDARG), /* win9x */ - "Expected length 0 and CRYPT_E_ASN1_BADTAG, got length %d, %08x\n", + "Expected length 0 and CRYPT_E_ASN1_BADTAG, got length %ld, %08lx\n", ret, GetLastError()); /* With the RSA OID */ info.Algorithm.pszObjId = oid_rsa_rsa; SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */, - "Expected length 56, got %d\n", ret); + "Expected length 56, got %ld\n", ret); /* With the RSA OID and a message encoding */ info.Algorithm.pszObjId = oid_rsa_rsa; SetLastError(0xdeadbeef); ret = CertGetPublicKeyLength(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, &info); ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */, - "Expected length 56, got %d\n", ret); + "Expected length 56, got %ld\n", ret); }
static void testKeyProvInfo(void) @@ -4150,10 +4150,10 @@ static void testKeyProvInfo(void)
store = CertOpenStore(CERT_STORE_PROV_SYSTEM_A, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, "My"); - ok(store != NULL, "CertOpenStore error %u\n", GetLastError()); + ok(store != NULL, "CertOpenStore error %lu\n", GetLastError());
cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert, sizeof(selfSignedCert)); - ok(cert != NULL, "CertCreateCertificateContext error %#x\n", GetLastError()); + ok(cert != NULL, "CertCreateCertificateContext error %#lx\n", GetLastError());
info2.pwszContainerName = containerW; info2.pwszProvName = providerW; @@ -4163,39 +4163,39 @@ static void testKeyProvInfo(void) info2.rgProvParam = param; info2.dwKeySpec = 0x11223344; ret = CertSetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, 0, &info2); - ok(ret, "CertSetCertificateContextProperty error %#x\n", GetLastError()); + ok(ret, "CertSetCertificateContextProperty error %#lx\n", GetLastError());
ret = CertGetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty error %#x\n", GetLastError()); + ok(ret, "CertGetCertificateContextProperty error %#lx\n", GetLastError()); info = HeapAlloc(GetProcessHeap(), 0, size); ret = CertGetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, info, &size); - ok(ret, "CertGetCertificateContextProperty error %#x\n", GetLastError()); + ok(ret, "CertGetCertificateContextProperty error %#lx\n", GetLastError()); ok(!lstrcmpW(info->pwszContainerName, containerW), "got %s\n", wine_dbgstr_w(info->pwszContainerName)); ok(!lstrcmpW(info->pwszProvName, providerW), "got %s\n", wine_dbgstr_w(info->pwszProvName)); - ok(info->dwProvType == 0x12345678, "got %#x\n", info->dwProvType); - ok(info->dwFlags == 0x87654321, "got %#x\n", info->dwFlags); - ok(info->dwKeySpec == 0x11223344, "got %#x\n", info->dwKeySpec); - ok(info->cProvParam == 2, "got %#x\n", info->cProvParam); + ok(info->dwProvType == 0x12345678, "got %#lx\n", info->dwProvType); + ok(info->dwFlags == 0x87654321, "got %#lx\n", info->dwFlags); + ok(info->dwKeySpec == 0x11223344, "got %#lx\n", info->dwKeySpec); + ok(info->cProvParam == 2, "got %#lx\n", info->cProvParam); ok(info->rgProvParam != NULL, "got %p\n", info->rgProvParam); - ok(info->rgProvParam[0].dwParam == param[0].dwParam, "got %#x\n", info->rgProvParam[0].dwParam); - ok(info->rgProvParam[0].cbData == param[0].cbData, "got %#x\n", info->rgProvParam[0].cbData); + ok(info->rgProvParam[0].dwParam == param[0].dwParam, "got %#lx\n", info->rgProvParam[0].dwParam); + ok(info->rgProvParam[0].cbData == param[0].cbData, "got %#lx\n", info->rgProvParam[0].cbData); ok(!memcmp(info->rgProvParam[0].pbData, param[0].pbData, param[0].cbData), "param1 mismatch\n"); - ok(info->rgProvParam[0].dwFlags == param[0].dwFlags, "got %#x\n", info->rgProvParam[1].dwFlags); - ok(info->rgProvParam[1].dwParam == param[1].dwParam, "got %#x\n", info->rgProvParam[1].dwParam); - ok(info->rgProvParam[1].cbData == param[1].cbData, "got %#x\n", info->rgProvParam[1].cbData); + ok(info->rgProvParam[0].dwFlags == param[0].dwFlags, "got %#lx\n", info->rgProvParam[1].dwFlags); + ok(info->rgProvParam[1].dwParam == param[1].dwParam, "got %#lx\n", info->rgProvParam[1].dwParam); + ok(info->rgProvParam[1].cbData == param[1].cbData, "got %#lx\n", info->rgProvParam[1].cbData); ok(!memcmp(info->rgProvParam[1].pbData, param[1].pbData, param[1].cbData), "param2 mismatch\n"); - ok(info->rgProvParam[1].dwFlags == param[1].dwFlags, "got %#x\n", info->rgProvParam[1].dwFlags); + ok(info->rgProvParam[1].dwFlags == param[1].dwFlags, "got %#lx\n", info->rgProvParam[1].dwFlags); HeapFree(GetProcessHeap(), 0, info);
ret = CertAddCertificateContextToStore(store, cert, CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddCertificateContextToStore error %#x\n", GetLastError()); + ok(ret, "CertAddCertificateContextToStore error %#lx\n", GetLastError());
CertFreeCertificateContext(cert); CertCloseStore(store, 0);
store = CertOpenStore(CERT_STORE_PROV_SYSTEM_A, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, "My"); - ok(store != NULL, "CertOpenStore error %u\n", GetLastError()); + ok(store != NULL, "CertOpenStore error %lu\n", GetLastError());
name.pbData = subjectName; name.cbData = sizeof(subjectName); @@ -4203,29 +4203,29 @@ static void testKeyProvInfo(void) ok(cert != NULL, "certificate should exist in My store\n");
ret = CertGetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty error %#x\n", GetLastError()); + ok(ret, "CertGetCertificateContextProperty error %#lx\n", GetLastError()); info = HeapAlloc(GetProcessHeap(), 0, size); ret = CertGetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, info, &size); - ok(ret, "CertGetCertificateContextProperty error %#x\n", GetLastError()); + ok(ret, "CertGetCertificateContextProperty error %#lx\n", GetLastError()); ok(!lstrcmpW(info->pwszContainerName, containerW), "got %s\n", wine_dbgstr_w(info->pwszContainerName)); ok(!lstrcmpW(info->pwszProvName, providerW), "got %s\n", wine_dbgstr_w(info->pwszProvName)); - ok(info->dwProvType == 0x12345678, "got %#x\n", info->dwProvType); - ok(info->dwFlags == 0x87654321, "got %#x\n", info->dwFlags); - ok(info->dwKeySpec == 0x11223344, "got %#x\n", info->dwKeySpec); - ok(info->cProvParam == 2, "got %#x\n", info->cProvParam); + ok(info->dwProvType == 0x12345678, "got %#lx\n", info->dwProvType); + ok(info->dwFlags == 0x87654321, "got %#lx\n", info->dwFlags); + ok(info->dwKeySpec == 0x11223344, "got %#lx\n", info->dwKeySpec); + ok(info->cProvParam == 2, "got %#lx\n", info->cProvParam); ok(info->rgProvParam != NULL, "got %p\n", info->rgProvParam); - ok(info->rgProvParam[0].dwParam == param[0].dwParam, "got %#x\n", info->rgProvParam[0].dwParam); - ok(info->rgProvParam[0].cbData == param[0].cbData, "got %#x\n", info->rgProvParam[0].cbData); + ok(info->rgProvParam[0].dwParam == param[0].dwParam, "got %#lx\n", info->rgProvParam[0].dwParam); + ok(info->rgProvParam[0].cbData == param[0].cbData, "got %#lx\n", info->rgProvParam[0].cbData); ok(!memcmp(info->rgProvParam[0].pbData, param[0].pbData, param[0].cbData), "param1 mismatch\n"); - ok(info->rgProvParam[0].dwFlags == param[0].dwFlags, "got %#x\n", info->rgProvParam[1].dwFlags); - ok(info->rgProvParam[1].dwParam == param[1].dwParam, "got %#x\n", info->rgProvParam[1].dwParam); - ok(info->rgProvParam[1].cbData == param[1].cbData, "got %#x\n", info->rgProvParam[1].cbData); + ok(info->rgProvParam[0].dwFlags == param[0].dwFlags, "got %#lx\n", info->rgProvParam[1].dwFlags); + ok(info->rgProvParam[1].dwParam == param[1].dwParam, "got %#lx\n", info->rgProvParam[1].dwParam); + ok(info->rgProvParam[1].cbData == param[1].cbData, "got %#lx\n", info->rgProvParam[1].cbData); ok(!memcmp(info->rgProvParam[1].pbData, param[1].pbData, param[1].cbData), "param2 mismatch\n"); - ok(info->rgProvParam[1].dwFlags == param[1].dwFlags, "got %#x\n", info->rgProvParam[1].dwFlags); + ok(info->rgProvParam[1].dwFlags == param[1].dwFlags, "got %#lx\n", info->rgProvParam[1].dwFlags); HeapFree(GetProcessHeap(), 0, info);
ret = CertDeleteCertificateFromStore(cert); - ok(ret, "CertDeleteCertificateFromStore error %#x\n", GetLastError()); + ok(ret, "CertDeleteCertificateFromStore error %#lx\n", GetLastError());
CertFreeCertificateContext(cert); CertCloseStore(store, 0); @@ -4249,32 +4249,32 @@ static void test_VerifySignature(void) NTSTATUS status;
cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert, sizeof(selfSignedCert)); - ok(cert != NULL, "CertCreateCertificateContext error %#x\n", GetLastError()); + ok(cert != NULL, "CertCreateCertificateContext error %#lx\n", GetLastError());
/* 1. Verify certificate signature with Crypto API */ ret = CryptVerifyCertificateSignature(0, cert->dwCertEncodingType, cert->pbCertEncoded, cert->cbCertEncoded, &cert->pCertInfo->SubjectPublicKeyInfo); - ok(ret, "CryptVerifyCertificateSignature error %#x\n", GetLastError()); + ok(ret, "CryptVerifyCertificateSignature error %#lx\n", GetLastError());
/* 2. Verify certificate signature with Crypto API manually */ ret = CryptAcquireContextA(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContext error %#x\n", GetLastError()); + ok(ret, "CryptAcquireContext error %#lx\n", GetLastError());
ret = CryptImportPublicKeyInfoEx(prov, cert->dwCertEncodingType, &cert->pCertInfo->SubjectPublicKeyInfo, 0, 0, NULL, &key); - ok(ret, "CryptImportPublicKeyInfoEx error %#x\n", GetLastError()); + ok(ret, "CryptImportPublicKeyInfoEx error %#lx\n", GetLastError());
ret = CryptDecodeObjectEx(cert->dwCertEncodingType, X509_CERT, cert->pbCertEncoded, cert->cbCertEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx error %#x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx error %#lx\n", GetLastError());
ret = CryptCreateHash(prov, CALG_SHA1, 0, 0, &hash); - ok(ret, "CryptCreateHash error %#x\n", GetLastError()); + ok(ret, "CryptCreateHash error %#lx\n", GetLastError());
ret = CryptHashData(hash, info->ToBeSigned.pbData, info->ToBeSigned.cbData, 0); - ok(ret, "CryptHashData error %#x\n", GetLastError()); + ok(ret, "CryptHashData error %#lx\n", GetLastError());
ret = CryptVerifySignatureW(hash, info->Signature.pbData, info->Signature.cbData, key, NULL, 0); - ok(ret, "CryptVerifySignature error %#x\n", GetLastError()); + ok(ret, "CryptVerifySignature error %#lx\n", GetLastError());
CryptDestroyHash(hash); CryptDestroyKey(key); @@ -4282,13 +4282,13 @@ static void test_VerifySignature(void)
/* 3. Verify certificate signature with CNG */ ret = CryptImportPublicKeyInfoEx2(cert->dwCertEncodingType, &cert->pCertInfo->SubjectPublicKeyInfo, 0, NULL, &bkey); - ok(ret, "CryptImportPublicKeyInfoEx error %#x\n", GetLastError()); + ok(ret, "CryptImportPublicKeyInfoEx error %#lx\n", GetLastError());
status = BCryptOpenAlgorithmProvider(&alg, BCRYPT_SHA1_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status);
status = BCryptCreateHash(alg, &bhash, NULL, 0, NULL, 0, 0); - ok(!status || broken(status == STATUS_INVALID_PARAMETER) /* Vista */, "got %#x\n", status); + ok(!status || broken(status == STATUS_INVALID_PARAMETER) /* Vista */, "got %#lx\n", status); if (status == STATUS_INVALID_PARAMETER) { win_skip("broken BCryptCreateHash\n"); @@ -4296,15 +4296,15 @@ static void test_VerifySignature(void) }
status = BCryptHashData(bhash, info->ToBeSigned.pbData, info->ToBeSigned.cbData, 0); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status);
status = BCryptFinishHash(bhash, hash_value, sizeof(hash_value), 0); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(!memcmp(hash_value, selfSignedSignatureHash, sizeof(hash_value)), "got wrong hash value\n");
status = BCryptGetProperty(bhash, BCRYPT_HASH_LENGTH, (BYTE *)&hash_len, sizeof(hash_len), &size, 0); - ok(!status, "got %#x\n", status); - ok(hash_len == sizeof(hash_value), "got %u\n", hash_len); + ok(!status, "got %#lx\n", status); + ok(hash_len == sizeof(hash_value), "got %lu\n", hash_len);
sig_value = HeapAlloc(GetProcessHeap(), 0, info->Signature.cbData); for (i = 0; i < info->Signature.cbData; i++) @@ -4312,7 +4312,7 @@ static void test_VerifySignature(void)
pad.pszAlgId = BCRYPT_SHA1_ALGORITHM; status = BCryptVerifySignature(bkey, &pad, hash_value, sizeof(hash_value), sig_value, info->Signature.cbData, BCRYPT_PAD_PKCS1); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status);
HeapFree(GetProcessHeap(), 0, sig_value); BCryptDestroyHash(bhash); diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c index 5f7f6a5b777..9165e87249f 100644 --- a/dlls/crypt32/tests/chain.c +++ b/dlls/crypt32/tests/chain.c @@ -97,18 +97,18 @@ static void testCreateCertChainEngine(void) */ ret = pCertCreateCertificateChainEngine(pConfig, &engine); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Crashes config.cbSize = sizeof(config); ret = pCertCreateCertificateChainEngine(pConfig, NULL); */ config.cbSize = sizeof(config); ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError()); + ok(ret, "CertCreateCertificateChainEngine failed: %08lx\n", GetLastError()); pCertFreeCertificateChainEngine(engine); config.dwFlags = 0xff000000; ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError()); + ok(ret, "CertCreateCertificateChainEngine failed: %08lx\n", GetLastError()); pCertFreeCertificateChainEngine(engine);
/* Creating a cert with no root certs at all is allowed.. */ @@ -116,7 +116,7 @@ static void testCreateCertChainEngine(void) CERT_STORE_CREATE_NEW_FLAG, NULL); config.hRestrictedRoot = store; ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError()); + ok(ret, "CertCreateCertificateChainEngine failed: %08lx\n", GetLastError()); pCertFreeCertificateChainEngine(engine);
/* but creating one with a restricted root with a cert that isn't a member @@ -128,7 +128,7 @@ static void testCreateCertChainEngine(void) /* ERROR_FILE_NOT_FOUND used in Windows 10 */ ok(!ret && ((GetLastError() == CRYPT_E_NOT_FOUND) || (GetLastError() == ERROR_FILE_NOT_FOUND)), - "Expected CRYPT_E_NOT_FOUND or ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND or ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError());
CertCloseStore(store, 0); } @@ -3380,7 +3380,7 @@ static PCCERT_CHAIN_CONTEXT getChain(HCERTCHAINENGINE engine, ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, certArray->rgBlob[i].pbData, certArray->rgBlob[i].cbData, CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "Chain %d: adding cert %d failed: %08x\n", + ok(ret, "Chain %ld: adding cert %ld failed: %08lx\n", testIndex, i, GetLastError()); } } @@ -3388,7 +3388,7 @@ static PCCERT_CHAIN_CONTEXT getChain(HCERTCHAINENGINE engine, X509_ASN_ENCODING, certArray->rgBlob[certArray->cBlob - 1].pbData, certArray->rgBlob[certArray->cBlob - 1].cbData, CERT_STORE_ADD_ALWAYS, &endCert); - ok(ret, "Chain %d: adding end cert failed: %08x\n", + ok(ret, "Chain %ld: adding end cert failed: %08lx\n", testIndex, GetLastError()); if (ret) { @@ -3402,7 +3402,7 @@ static PCCERT_CHAIN_CONTEXT getChain(HCERTCHAINENGINE engine, ret = pCertGetCertificateChain(engine, endCert, &fileTime, includeStore ? store : NULL, &chainPara, flags, NULL, &chain); todo_wine_if (todo & TODO_CHAIN) - ok(ret, "Chain %d: CertGetCertificateChain failed: %08x\n", + ok(ret, "Chain %ld: CertGetCertificateChain failed: %08lx\n", testIndex, GetLastError()); CertFreeCertificateContext(endCert); } @@ -3424,27 +3424,27 @@ static void checkElementStatus(const CERT_TRUST_STATUS *expected, { if (got->dwErrorStatus == expected->dwErrorStatus) ok(got->dwErrorStatus == expected->dwErrorStatus, - "%s[%d], element [%d,%d]: expected error %08x, got %08x\n", + "%s[%ld], element [%ld,%ld]: expected error %08lx, got %08lx\n", testName, testIndex, chainIndex, elementIndex, expected->dwErrorStatus, got->dwErrorStatus); else todo_wine_if (todo & TODO_ERROR) ok(got->dwErrorStatus == expected->dwErrorStatus || broken((got->dwErrorStatus & ~ignore->dwErrorStatus) == (expected->dwErrorStatus & ~ignore->dwErrorStatus)), - "%s[%d], element [%d,%d]: expected error %08x, got %08x. %08x is " + "%s[%ld], element [%ld,%ld]: expected error %08lx, got %08lx. %08x is " "expected if no valid root certificate is available.\n", testName, testIndex, chainIndex, elementIndex, expected->dwErrorStatus, got->dwErrorStatus, CERT_TRUST_IS_UNTRUSTED_ROOT); if (got->dwInfoStatus == expected->dwInfoStatus) ok(got->dwInfoStatus == expected->dwInfoStatus, - "%s[%d], element [%d,%d]: expected info %08x, got %08x\n", + "%s[%ld], element [%ld,%ld]: expected info %08lx, got %08lx\n", testName, testIndex, chainIndex, elementIndex, expected->dwInfoStatus, got->dwInfoStatus); else todo_wine_if (todo & TODO_INFO) ok(got->dwInfoStatus == expected->dwInfoStatus || broken((got->dwInfoStatus & ~ignore->dwInfoStatus) == (expected->dwInfoStatus & ~ignore->dwInfoStatus)), - "%s[%d], element [%d,%d]: expected info %08x, got %08x\n", + "%s[%ld], element [%ld,%ld]: expected info %08lx, got %08lx\n", testName, testIndex, chainIndex, elementIndex, expected->dwInfoStatus, got->dwInfoStatus); } @@ -3456,7 +3456,7 @@ static void checkSimpleChainStatus(const CERT_SIMPLE_CHAIN *simpleChain, { todo_wine_if (todo & TODO_ELEMENTS) ok(simpleChain->cElement == simpleChainStatus->cElement, - "%s[%d]: expected %d elements, got %d\n", testName, testIndex, + "%s[%ld]: expected %ld elements, got %ld\n", testName, testIndex, simpleChainStatus->cElement, simpleChain->cElement); if (simpleChain->cElement == simpleChainStatus->cElement) { @@ -3482,7 +3482,7 @@ static void checkChainStatus(PCCERT_CHAIN_CONTEXT chain, DWORD testIndex) { ok(chain->cChain == chainStatus->cChain, - "%s[%d]: expected %d simple chains, got %d\n", testName, testIndex, + "%s[%ld]: expected %ld simple chains, got %ld\n", testName, testIndex, chainStatus->cChain, chain->cChain); todo_wine_if (todo & TODO_ERROR && chain->TrustStatus.dwErrorStatus != chainStatus->status.dwErrorStatus) @@ -3492,7 +3492,7 @@ static void checkChainStatus(PCCERT_CHAIN_CONTEXT chain, ~chainStatus->statusToIgnore.dwErrorStatus) == (chainStatus->status.dwErrorStatus & ~chainStatus->statusToIgnore.dwErrorStatus)), - "%s[%d]: expected error %08x, got %08x. %08x is expected if no valid " + "%s[%ld]: expected error %08lx, got %08lx. %08x is expected if no valid " "root certificate is available.\n", testName, testIndex, chainStatus->status.dwErrorStatus, chain->TrustStatus.dwErrorStatus, CERT_TRUST_IS_UNTRUSTED_ROOT); @@ -3504,7 +3504,7 @@ static void checkChainStatus(PCCERT_CHAIN_CONTEXT chain, ~chainStatus->statusToIgnore.dwInfoStatus) == (chainStatus->status.dwInfoStatus & ~chainStatus->statusToIgnore.dwInfoStatus)), - "%s[%d]: expected info %08x, got %08x\n", + "%s[%ld]: expected info %08lx, got %08lx\n", testName, testIndex, chainStatus->status.dwInfoStatus, chain->TrustStatus.dwInfoStatus); if (chain->cChain == chainStatus->cChain) @@ -4358,12 +4358,12 @@ static void testGetCertChain(void) /* Crash on Vista */ ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, &chain); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Crash ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, ¶, 0, NULL, NULL); ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, ¶, 0, NULL, @@ -4376,7 +4376,7 @@ static void testGetCertChain(void) /* Crash on Vista */ ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, NULL, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } /* Crash ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, ¶, 0, NULL, NULL); @@ -4389,7 +4389,7 @@ static void testGetCertChain(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_DATA || GetLastError() == CRYPT_E_ASN1_BADTAG /* Vista */, - "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError()); + "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %ld\n", GetLastError()); para.cbSize = sizeof(para); SetLastError(0xdeadbeef); ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, ¶, 0, NULL, @@ -4397,7 +4397,7 @@ static void testGetCertChain(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_DATA || GetLastError() == CRYPT_E_ASN1_BADTAG /* Vista */, - "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError()); + "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %ld\n", GetLastError());
para.cbSize = 0; SetLastError(0xdeadbeef); @@ -4406,7 +4406,7 @@ static void testGetCertChain(void) ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_DATA || GetLastError() == CRYPT_E_ASN1_BADTAG, /* Vista and higher */ - "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError()); + "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %ld\n", GetLastError());
CertFreeCertificateContext(cert);
@@ -4428,7 +4428,7 @@ static void testGetCertChain(void) para.RequestedUsage.Usage.cUsageIdentifier = 1; ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, ¶, 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError()); + ok(ret, "CertGetCertificateChain failed: %08lx\n", GetLastError()); if (ret) { ok(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE, @@ -4438,11 +4438,11 @@ static void testGetCertChain(void) oids[0] = oid_server_auth; ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, ¶, 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError()); + ok(ret, "CertGetCertificateChain failed: %08lx\n", GetLastError()); if (ret) { ok(!(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE), - "didn't expect CERT_TRUST_IS_NOT_VALID_FOR_USAGE, got %x\n", chain->TrustStatus.dwErrorStatus); + "didn't expect CERT_TRUST_IS_NOT_VALID_FOR_USAGE, got %lx\n", chain->TrustStatus.dwErrorStatus); pCertFreeCertificateChain(chain); } oids[1] = one_two_three; @@ -4450,7 +4450,7 @@ static void testGetCertChain(void) para.RequestedUsage.dwType = USAGE_MATCH_TYPE_AND; ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, ¶, 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError()); + ok(ret, "CertGetCertificateChain failed: %08lx\n", GetLastError()); if (ret) { ok(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE, @@ -4460,7 +4460,7 @@ static void testGetCertChain(void) para.RequestedUsage.dwType = USAGE_MATCH_TYPE_OR; ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, ¶, 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError()); + ok(ret, "CertGetCertificateChain failed: %08lx\n", GetLastError()); if (ret) { ok(!(chain->TrustStatus.dwErrorStatus & @@ -4492,7 +4492,7 @@ static void testGetCertChain(void) ~incompleteOpensslChainCheck.status.statusToIgnore.dwErrorStatus) == (incompleteOpensslChainCheck.status.status.dwErrorStatus & ~incompleteOpensslChainCheck.status.statusToIgnore.dwErrorStatus)), - "unexpected chain error status %08x\n", + "unexpected chain error status %08lx\n", chain->TrustStatus.dwErrorStatus); if (opensslChainCheck.status.status.dwErrorStatus == chain->TrustStatus.dwErrorStatus) @@ -4525,7 +4525,7 @@ static void testGetCertChain(void) ~chainCheckEmbeddedNullBroken.status.statusToIgnore.dwErrorStatus) == (chainCheckEmbeddedNullBroken.status.status.dwErrorStatus & ~chainCheckEmbeddedNullBroken.status.statusToIgnore.dwErrorStatus)), - "unexpected chain error status %08x\n", + "unexpected chain error status %08lx\n", chain->TrustStatus.dwErrorStatus); if (chainCheckEmbeddedNull.status.status.dwErrorStatus == chain->TrustStatus.dwErrorStatus) @@ -4539,11 +4539,11 @@ static void testGetCertChain(void) }
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %u\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %lu\n", GetLastError());
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, winehq_org, sizeof(winehq_org), CERT_STORE_ADD_ALWAYS, &cert); - ok(ret, "CertAddEncodedCertificateToStore failed: %u\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %lu\n", GetLastError());
oids[0] = oid_server_auth; memset(¶, 0, sizeof(para)); @@ -4554,7 +4554,7 @@ static void testGetCertChain(void)
/* Pass store that does not contain all certs in chain. */ ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError()); + ok(ret, "CertGetCertificateChain failed: %lu\n", GetLastError());
if(chain->TrustStatus.dwErrorStatus == CERT_TRUST_IS_PARTIAL_CHAIN) { /* win2k */ win_skip("winehq cert reported as partial chain, skipping its tests\n"); @@ -4563,40 +4563,40 @@ static void testGetCertChain(void) return; }
- ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %x\n", + ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %lx\n", chain->TrustStatus.dwErrorStatus); todo_wine - ok(chain->TrustStatus.dwInfoStatus == CERT_TRUST_HAS_PREFERRED_ISSUER, "chain->TrustStatus.dwInfoStatus = %x\n", + ok(chain->TrustStatus.dwInfoStatus == CERT_TRUST_HAS_PREFERRED_ISSUER, "chain->TrustStatus.dwInfoStatus = %lx\n", chain->TrustStatus.dwInfoStatus);
- ok(chain->cChain == 1, "chain->cChain = %d\n", chain->cChain); - ok(!chain->cLowerQualityChainContext, "chain->cLowerQualityChainContext = %x\n", chain->cLowerQualityChainContext); + ok(chain->cChain == 1, "chain->cChain = %ld\n", chain->cChain); + ok(!chain->cLowerQualityChainContext, "chain->cLowerQualityChainContext = %lx\n", chain->cLowerQualityChainContext); ok(!chain->rgpLowerQualityChainContext, "chain->rgpLowerQualityChainContext = %p\n", chain->rgpLowerQualityChainContext);
simple_chain = *chain->rgpChain; - ok(simple_chain->cbSize == sizeof(*simple_chain), "simple_chain->cbSize = %u\n", simple_chain->cbSize); - ok(simple_chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "simple_chain->TrustStatus.dwErrorStatus = %x\n", + ok(simple_chain->cbSize == sizeof(*simple_chain), "simple_chain->cbSize = %lu\n", simple_chain->cbSize); + ok(simple_chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "simple_chain->TrustStatus.dwErrorStatus = %lx\n", simple_chain->TrustStatus.dwErrorStatus); todo_wine ok(simple_chain->TrustStatus.dwInfoStatus == CERT_TRUST_HAS_PREFERRED_ISSUER, - "simple_chain->TrustStatus.dwInfoStatus = %x\n", simple_chain->TrustStatus.dwInfoStatus); - ok(simple_chain->cElement == 3, "simple_chain->cElement = %u\n", simple_chain->cElement); + "simple_chain->TrustStatus.dwInfoStatus = %lx\n", simple_chain->TrustStatus.dwInfoStatus); + ok(simple_chain->cElement == 3, "simple_chain->cElement = %lu\n", simple_chain->cElement);
for(i=0; i < simple_chain->cElement; i++) { chain_elem = simple_chain->rgpElement[i]; - ok(chain_elem->cbSize == sizeof(*chain_elem), "chain_elem->cbSize = %u\n", chain_elem->cbSize); + ok(chain_elem->cbSize == sizeof(*chain_elem), "chain_elem->cbSize = %lu\n", chain_elem->cbSize); if (!i) ok(chain_elem->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, - "chain_elem->TrustStatus.dwErrorStatus = %x\n", chain_elem->TrustStatus.dwErrorStatus); + "chain_elem->TrustStatus.dwErrorStatus = %lx\n", chain_elem->TrustStatus.dwErrorStatus); else if (i == 1) - todo_wine ok(!chain_elem->TrustStatus.dwErrorStatus, "chain_elem->TrustStatus.dwErrorStatus = %x\n", + todo_wine ok(!chain_elem->TrustStatus.dwErrorStatus, "chain_elem->TrustStatus.dwErrorStatus = %lx\n", chain_elem->TrustStatus.dwErrorStatus); else - ok(!chain_elem->TrustStatus.dwErrorStatus, "chain_elem->TrustStatus.dwErrorStatus = %x\n", + ok(!chain_elem->TrustStatus.dwErrorStatus, "chain_elem->TrustStatus.dwErrorStatus = %lx\n", chain_elem->TrustStatus.dwErrorStatus); - trace("info[%u] = %x\n", i, chain_elem->TrustStatus.dwInfoStatus); + trace("info[%lu] = %lx\n", i, chain_elem->TrustStatus.dwInfoStatus); ok(chain_elem->pCertContext->dwCertEncodingType == CRYPT_ASN_ENCODING, - "chain_elem->pCertContext->dwCertEncodingType = %x\n", + "chain_elem->pCertContext->dwCertEncodingType = %lx\n", chain_elem->pCertContext->dwCertEncodingType); }
@@ -4615,28 +4615,28 @@ static void testGetCertChain(void) /* Test revocation flags */ ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_END_CERT, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError()); - ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %x\n", + ok(ret, "CertGetCertificateChain failed: %lu\n", GetLastError()); + ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %lx\n", chain->TrustStatus.dwErrorStatus); pCertFreeCertificateChain(chain);
ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_CHAIN, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError()); + ok(ret, "CertGetCertificateChain failed: %lu\n", GetLastError()); ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER || broken(chain->TrustStatus.dwErrorStatus == (CERT_TRUST_IS_NOT_TIME_VALID|CERT_TRUST_REVOCATION_STATUS_UNKNOWN)), /* XP */ - "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus); + "chain->TrustStatus.dwErrorStatus = %lx\n", chain->TrustStatus.dwErrorStatus); pCertFreeCertificateChain(chain);
ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError()); - ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %x\n", + ok(ret, "CertGetCertificateChain failed: %lu\n", GetLastError()); + ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_HAS_EXACT_MATCH_ISSUER, "chain->TrustStatus.dwErrorStatus = %lx\n", chain->TrustStatus.dwErrorStatus); pCertFreeCertificateChain(chain);
/* Test HCCE_LOCAL_MACHINE */ ret = CertGetCertificateChain(HCCE_LOCAL_MACHINE, cert, &fileTime, store, ¶, 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError()); + ok(ret, "CertGetCertificateChain failed: %lu\n", GetLastError()); pCertFreeCertificateChain(chain);
CertFreeCertificateContext(cert); @@ -4658,11 +4658,11 @@ static void test_CERT_CHAIN_PARA_cbSize(void) ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain0_0, sizeof(chain0_0), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain0_1, sizeof(chain0_1), CERT_STORE_ADD_ALWAYS, &cert); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError());
for (i = 0; i < sizeof(CERT_CHAIN_PARA) + 2; i++) { @@ -4673,7 +4673,7 @@ static void test_CERT_CHAIN_PARA_cbSize(void) para.cbSize = i; ret = pCertGetCertificateChain(NULL, cert, &fileTime, NULL, ¶, 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed %u\n", GetLastError()); + ok(ret, "CertGetCertificateChain failed %lu\n", GetLastError()); pCertFreeCertificateChain(chain); }
@@ -5001,7 +5001,7 @@ static void checkChainPolicyStatus(LPCSTR policy, HCERTCHAINENGINE engine,
if (check->todo & TODO_POLICY) todo_wine ok(ret, - "%s[%d](%s): CertVerifyCertificateChainPolicy failed: %08x\n", + "%s[%ld](%s): CertVerifyCertificateChainPolicy failed: %08lx\n", testName, testIndex, IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, GetLastError()); @@ -5009,13 +5009,13 @@ static void checkChainPolicyStatus(LPCSTR policy, HCERTCHAINENGINE engine, { if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) { - skip("%s[%d]: missing policy %s, skipping test\n", + skip("%s[%ld]: missing policy %s, skipping test\n", testName, testIndex, IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy); pCertFreeCertificateChain(chain); return; } - ok(ret, "%s[%d](%s): CertVerifyCertificateChainPolicy failed: %08x\n", + ok(ret, "%s[%ld](%s): CertVerifyCertificateChainPolicy failed: %08lx\n", testName, testIndex, IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, GetLastError()); @@ -5027,13 +5027,13 @@ static void checkChainPolicyStatus(LPCSTR policy, HCERTCHAINENGINE engine, broken(policyStatus.dwError == CERT_TRUST_NO_ERROR) || (check->brokenStatus && broken(policyStatus.dwError == check->brokenStatus->dwError)), - "%s[%d](%s): expected %08x, got %08x\n", + "%s[%ld](%s): expected %08lx, got %08lx\n", testName, testIndex, IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, check->status.dwError, policyStatus.dwError); if (policyStatus.dwError != check->status.dwError) { - skip("%s[%d](%s): error %08x doesn't match expected %08x, not checking indexes\n", + skip("%s[%ld](%s): error %08lx doesn't match expected %08lx, not checking indexes\n", testName, testIndex, IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, policyStatus.dwError, check->status.dwError); @@ -5044,7 +5044,7 @@ static void checkChainPolicyStatus(LPCSTR policy, HCERTCHAINENGINE engine, ok(policyStatus.lChainIndex == check->status.lChainIndex || (check->brokenStatus && broken(policyStatus.lChainIndex == check->brokenStatus->lChainIndex)), - "%s[%d](%s): expected %d, got %d\n", + "%s[%ld](%s): expected %ld, got %ld\n", testName, testIndex, IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, check->status.lChainIndex, policyStatus.lChainIndex); @@ -5052,7 +5052,7 @@ static void checkChainPolicyStatus(LPCSTR policy, HCERTCHAINENGINE engine, ok(policyStatus.lElementIndex == check->status.lElementIndex || (check->brokenStatus && broken(policyStatus.lElementIndex == check->brokenStatus->lElementIndex)), - "%s[%d](%s): expected %d, got %d\n", + "%s[%ld](%s): expected %ld, got %ld\n", testName, testIndex, IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, check->status.lElementIndex, policyStatus.lElementIndex); @@ -5369,7 +5369,7 @@ static void testVerifyCertChainPolicy(void) SetLastError(0xdeadbeef); ret = pCertVerifyCertificateChainPolicy(NULL, NULL, NULL, &policyStatus); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); /* Crashes ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, NULL, NULL, &policyStatus); @@ -5388,21 +5388,21 @@ static void testVerifyCertChainPolicy(void) /* Size of policy status is apparently ignored, as is pChainPolicyPara */ ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, NULL, &policyStatus); - ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyCertificateChainPolicy failed: %08lx\n", GetLastError()); ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT || policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */ - "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n", policyStatus.dwError); + "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08lx\n", policyStatus.dwError); ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0, - "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex, + "Expected both indexes 0, got %ld, %ld\n", policyStatus.lChainIndex, policyStatus.lElementIndex); ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, &policyPara, &policyStatus); - ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyCertificateChainPolicy failed: %08lx\n", GetLastError()); ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT || policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */ - "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n", policyStatus.dwError); + "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08lx\n", policyStatus.dwError); ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0, - "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex, + "Expected both indexes 0, got %ld, %ld\n", policyStatus.lChainIndex, policyStatus.lElementIndex); pCertFreeCertificateChain(chain); CertFreeCertificateContext(cert); diff --git a/dlls/crypt32/tests/crl.c b/dlls/crypt32/tests/crl.c index c350b20f007..3797fc4cfbf 100644 --- a/dlls/crypt32/tests/crl.c +++ b/dlls/crypt32/tests/crl.c @@ -96,11 +96,11 @@ static void testCreateCRL(void)
context = CertCreateCRLContext(0, NULL, 0); ok(!context && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); context = CertCreateCRLContext(X509_ASN_ENCODING, NULL, 0); GLE = GetLastError(); ok(!context && (GLE == CRYPT_E_ASN1_EOD || GLE == OSS_MORE_INPUT), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", GLE); + "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08lx\n", GLE); context = CertCreateCRLContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); ok(!context, "Expected failure\n"); context = CertCreateCRLContext(X509_ASN_ENCODING, signedCRL, @@ -108,11 +108,11 @@ static void testCreateCRL(void) ok(!context, "Expected failure\n"); context = CertCreateCRLContext(X509_ASN_ENCODING, signedCRL, sizeof(signedCRL)); - ok(context != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); + ok(context != NULL, "CertCreateCRLContext failed: %08lx\n", GetLastError()); if (context) CertFreeCRLContext(context); context = CertCreateCRLContext(X509_ASN_ENCODING, CRL, sizeof(CRL)); - ok(context != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); + ok(context != NULL, "CertCreateCRLContext failed: %08lx\n", GetLastError()); if (context) CertFreeCRLContext(context); } @@ -148,41 +148,41 @@ static void testAddCRL(void) BOOL ret; DWORD GLE;
- ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (!store) return;
/* Bad CRL encoding type */ ret = CertAddEncodedCRLToStore(0, 0, NULL, 0, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddEncodedCRLToStore(store, 0, NULL, 0, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddEncodedCRLToStore(0, 0, signedCRL, sizeof(signedCRL), 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddEncodedCRLToStore(store, 0, signedCRL, sizeof(signedCRL), 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddEncodedCRLToStore(0, 0, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddEncodedCRLToStore(store, 0, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError());
/* No CRL */ ret = CertAddEncodedCRLToStore(0, X509_ASN_ENCODING, NULL, 0, 0, NULL); GLE = GetLastError(); ok(!ret && (GLE == CRYPT_E_ASN1_EOD || GLE == OSS_MORE_INPUT), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", GLE); + "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08lx\n", GLE); ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, NULL, 0, 0, NULL); GLE = GetLastError(); ok(!ret && (GLE == CRYPT_E_ASN1_EOD || GLE == OSS_MORE_INPUT), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", GLE); + "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08lx\n", GLE);
/* Weird--bad add disposition leads to an access violation in Windows. * Both tests crash on some win9x boxes. @@ -193,12 +193,12 @@ static void testAddCRL(void) sizeof(signedCRL), 0, NULL); ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || GetLastError() == E_INVALIDARG /* Vista */), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, sizeof(signedCRL), 0, NULL); ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || GetLastError() == E_INVALIDARG /* Vista */), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08lx\n", GetLastError()); }
/* Weird--can add a CRL to the NULL store (does this have special meaning?) @@ -206,28 +206,28 @@ static void testAddCRL(void) context = NULL; ret = CertAddEncodedCRLToStore(0, X509_ASN_ENCODING, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError()); if (context) CertFreeCRLContext(context);
/* Normal cases: a "signed" CRL is okay.. */ ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError()); /* and an unsigned one is too. */ ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, CRL, sizeof(CRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError());
ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, newerCRL, sizeof(newerCRL), CERT_STORE_ADD_NEW, NULL); ok(!ret && GetLastError() == CRYPT_E_EXISTS, - "Expected CRYPT_E_EXISTS, got %08x\n", GetLastError()); + "Expected CRYPT_E_EXISTS, got %08lx\n", GetLastError());
/* This should replace (one of) the existing CRL(s). */ ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, newerCRL, sizeof(newerCRL), CERT_STORE_ADD_NEWER, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError());
CertCloseStore(store, 0);
@@ -441,12 +441,12 @@ static void testFindCRL(void)
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (!store) return;
ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError());
/* Crashes context = pCertFindCRLInStore(NULL, 0, 0, 0, NULL, NULL); @@ -477,7 +477,7 @@ static void testFindCRL(void) /* Try to match an issuer that isn't in the store */ cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert2, sizeof(bigCert2)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_BY, cert, NULL); ok(context == NULL, "Expected no matching context\n"); @@ -486,7 +486,7 @@ static void testFindCRL(void) /* Match an issuer that is in the store */ cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_BY, cert, NULL); ok(context != NULL, "Expected a context\n"); @@ -522,7 +522,7 @@ static void testFindCRL(void) if (context) { ok(context->cbCrlEncoded == sizeof(signedCRL), - "unexpected CRL size %d\n", context->cbCrlEncoded); + "unexpected CRL size %ld\n", context->cbCrlEncoded); ok(!memcmp(context->pbCrlEncoded, signedCRL, context->cbCrlEncoded), "unexpected CRL data\n"); CertFreeCRLContext(context); @@ -531,14 +531,14 @@ static void testFindCRL(void) ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, v1CRLWithIssuerAndEntry, sizeof(v1CRLWithIssuerAndEntry), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, v2CRLWithIssuingDistPoint, sizeof(v2CRLWithIssuingDistPoint), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, verisignCRL, sizeof(verisignCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError()); issuedForPara.pSubjectCert = cert; issuedForPara.pIssuerCert = cert; context = NULL; @@ -561,19 +561,19 @@ static void testFindCRL(void) * is 0. */ ok(count == 3 || broken(count == 0 /* NT4, Win9x */), - "expected 3 matching CRLs, got %d\n", count); + "expected 3 matching CRLs, got %ld\n", count); /* Only v1CRLWithIssuerAndEntry and v2CRLWithIssuingDistPoint contain * entries, so the count of CRL entries that match cert is 2. */ ok(revoked_count == 2 || broken(revoked_count == 0 /* NT4, Win9x */), - "expected 2 matching CRL entries, got %d\n", revoked_count); + "expected 2 matching CRL entries, got %ld\n", revoked_count);
CertFreeCertificateContext(cert);
/* Try again with a cert that doesn't match any CRLs in the store */ cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCertWithDifferentIssuer, sizeof(bigCertWithDifferentIssuer)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); issuedForPara.pSubjectCert = cert; issuedForPara.pIssuerCert = cert; @@ -592,8 +592,8 @@ static void testFindCRL(void) revoked_count++; } } while (context); - ok(count == 0, "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", + ok(count == 0, "expected 0 matching CRLs, got %ld\n", count); + ok(revoked_count == 0, "expected 0 matching CRL entries, got %ld\n", revoked_count); CertFreeCertificateContext(cert);
@@ -602,7 +602,7 @@ static void testFindCRL(void) */ cert = CertCreateCertificateContext(X509_ASN_ENCODING, verisignCommercialSoftPubCA, sizeof(verisignCommercialSoftPubCA)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); issuedForPara.pIssuerCert = cert; issuedForPara.pSubjectCert = cert; @@ -622,8 +622,8 @@ static void testFindCRL(void) } } while (context); ok(count == 1 || broken(count == 0 /* Win9x, NT4 */), - "expected 1 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", + "expected 1 matching CRLs, got %ld\n", count); + ok(revoked_count == 0, "expected 0 matching CRL entries, got %ld\n", revoked_count); CertFreeCertificateContext(cert);
@@ -662,9 +662,9 @@ static void testFindCRL(void) } } while (context); ok(count == 1 || broken(count == 0 /* Win9x, NT4 */), - "expected 1 matching CRLs, got %d\n", count); + "expected 1 matching CRLs, got %ld\n", count); ok(revoked_count == 1 || broken(revoked_count == 0 /* Win9x, NT4 */), - "expected 1 matching CRL entries, got %d\n", revoked_count); + "expected 1 matching CRL entries, got %ld\n", revoked_count);
/* Test CRL_FIND_ISSUED_BY flags */ count = revoked_count = 0; @@ -681,8 +681,8 @@ static void testFindCRL(void) revoked_count++; } } while (context); - ok(count == 0, "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", + ok(count == 0, "expected 0 matching CRLs, got %ld\n", count); + ok(revoked_count == 0, "expected 0 matching CRL entries, got %ld\n", revoked_count); count = revoked_count = 0; do { @@ -698,8 +698,8 @@ static void testFindCRL(void) revoked_count++; } } while (context); - ok(count == 1, "expected 1 matching CRLs, got %d\n", count); - ok(revoked_count == 1, "expected 1 matching CRL entries, got %d\n", + ok(count == 1, "expected 1 matching CRLs, got %ld\n", count); + ok(revoked_count == 1, "expected 1 matching CRL entries, got %ld\n", revoked_count); count = revoked_count = 0; do { @@ -715,8 +715,8 @@ static void testFindCRL(void) revoked_count++; } } while (context); - ok(count == 0, "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", + ok(count == 0, "expected 0 matching CRLs, got %ld\n", count); + ok(revoked_count == 0, "expected 0 matching CRL entries, got %ld\n", revoked_count); count = revoked_count = 0; do { @@ -733,8 +733,8 @@ static void testFindCRL(void) } } while (context); ok(count == 0 || broken(count == 1 /* Win9x */), - "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", + "expected 0 matching CRLs, got %ld\n", count); + ok(revoked_count == 0, "expected 0 matching CRL entries, got %ld\n", revoked_count); count = revoked_count = 0; do { @@ -751,8 +751,8 @@ static void testFindCRL(void) revoked_count++; } } while (context); - ok(count == 0, "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", + ok(count == 0, "expected 0 matching CRLs, got %ld\n", count); + ok(revoked_count == 0, "expected 0 matching CRL entries, got %ld\n", revoked_count); count = revoked_count = 0; do { @@ -769,8 +769,8 @@ static void testFindCRL(void) revoked_count++; } } while (context); - ok(count == 1, "expected 1 matching CRLs, got %d\n", count); - ok(revoked_count == 1, "expected 1 matching CRL entries, got %d\n", + ok(count == 1, "expected 1 matching CRLs, got %ld\n", count); + ok(revoked_count == 1, "expected 1 matching CRL entries, got %ld\n", revoked_count); CertFreeCertificateContext(rootCert); CertFreeCertificateContext(endCert); @@ -787,7 +787,7 @@ static void testGetCRLFromStore(void) DWORD flags; BOOL ret;
- ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (!store) return;
/* Crash @@ -799,17 +799,17 @@ static void testGetCRLFromStore(void) flags = 0xffffffff; context = CertGetCRLFromStore(store, NULL, NULL, &flags); ok(!context && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError());
/* Test an empty store */ flags = 0; context = CertGetCRLFromStore(store, NULL, NULL, &flags); ok(context == NULL && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError());
ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError());
/* NULL matches any CRL */ flags = 0; @@ -820,17 +820,17 @@ static void testGetCRLFromStore(void) /* This cert's issuer isn't in */ cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert2, sizeof(bigCert2)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); context = CertGetCRLFromStore(store, cert, NULL, &flags); ok(context == NULL && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); CertFreeCertificateContext(cert);
/* But this one is */ cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); context = CertGetCRLFromStore(store, cert, NULL, &flags); ok(context != NULL, "Expected a context\n"); @@ -851,10 +851,10 @@ static void checkCRLHash(const BYTE *data, DWORD dataLen, ALG_ID algID, memset(hashProperty, 0, sizeof(hashProperty)); size = sizeof(hash); ret = CryptHashCertificate(0, algID, 0, data, dataLen, hash, &size); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); + ok(ret, "CryptHashCertificate failed: %08lx\n", GetLastError()); ret = CertGetCRLContextProperty(context, propID, hashProperty, &size); - ok(ret, "CertGetCRLContextProperty failed: %08x\n", GetLastError()); - ok(!memcmp(hash, hashProperty, size), "Unexpected hash for property %d\n", + ok(ret, "CertGetCRLContextProperty failed: %08lx\n", GetLastError()); + ok(!memcmp(hash, hashProperty, size), "Unexpected hash for property %ld\n", propID); }
@@ -863,7 +863,7 @@ static void testCRLProperties(void) PCCRL_CONTEXT context = CertCreateCRLContext(X509_ASN_ENCODING, CRL, sizeof(CRL));
- ok(context != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); + ok(context != NULL, "CertCreateCRLContext failed: %08lx\n", GetLastError()); if (context) { DWORD propID, numProps, access, size; @@ -882,12 +882,12 @@ static void testCRLProperties(void) if (propID) numProps++; } while (propID != 0); - ok(numProps == 0, "Expected 0 properties, got %d\n", numProps); + ok(numProps == 0, "Expected 0 properties, got %ld\n", numProps);
/* Tests with a NULL cert context. Prop ID 0 fails.. */ ret = CertSetCRLContextProperty(NULL, 0, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* while this just crashes. ret = CertSetCRLContextProperty(NULL, CERT_KEY_PROV_HANDLE_PROP_ID, 0, NULL); @@ -895,7 +895,7 @@ static void testCRLProperties(void)
ret = CertSetCRLContextProperty(context, 0, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Can't set the cert property directly, this crashes. ret = CertSetCRLContextProperty(context, CERT_CRL_PROP_ID, 0, CRL); */ @@ -912,14 +912,14 @@ static void testCRLProperties(void) ret = CertGetCRLContextProperty(context, CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* And, an implicit property */ ret = CertGetCRLContextProperty(context, CERT_ACCESS_STATE_PROP_ID, NULL, &size); - ok(ret, "CertGetCRLContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertGetCRLContextProperty failed: %08lx\n", GetLastError()); ret = CertGetCRLContextProperty(context, CERT_ACCESS_STATE_PROP_ID, &access, &size); - ok(ret, "CertGetCRLContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertGetCRLContextProperty failed: %08lx\n", GetLastError()); ok(!(access & CERT_ACCESS_STATE_WRITE_PERSIST_FLAG), "Didn't expect a persisted crl\n"); /* Trying to set this "read only" property crashes. @@ -932,16 +932,16 @@ static void testCRLProperties(void) blob.pbData = hash; blob.cbData = sizeof(hash); ret = CertSetCRLContextProperty(context, CERT_HASH_PROP_ID, 0, &blob); - ok(ret, "CertSetCRLContextProperty failed: %08x\n", + ok(ret, "CertSetCRLContextProperty failed: %08lx\n", GetLastError()); size = sizeof(hashProperty); ret = CertGetCRLContextProperty(context, CERT_HASH_PROP_ID, hashProperty, &size); - ok(ret, "CertSetCRLContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertSetCRLContextProperty failed: %08lx\n", GetLastError()); ok(!memcmp(hashProperty, hash, sizeof(hash)), "Unexpected hash\n"); /* Delete the (bogus) hash, and get the real one */ ret = CertSetCRLContextProperty(context, CERT_HASH_PROP_ID, 0, NULL); - ok(ret, "CertSetCRLContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertSetCRLContextProperty failed: %08lx\n", GetLastError()); checkCRLHash(CRL, sizeof(CRL), CALG_SHA1, context, CERT_HASH_PROP_ID);
/* Now that the hash property is set, we should get one property when @@ -954,7 +954,7 @@ static void testCRLProperties(void) if (propID) numProps++; } while (propID != 0); - ok(numProps == 1, "Expected 1 properties, got %d\n", numProps); + ok(numProps == 1, "Expected 1 properties, got %ld\n", numProps);
/* Check a few other implicit properties */ checkCRLHash(CRL, sizeof(CRL), CALG_MD5, context, @@ -989,10 +989,10 @@ static void testIsValidCRLForCert(void)
crl = CertCreateCRLContext(X509_ASN_ENCODING, v1CRLWithIssuerAndEntry, sizeof(v1CRLWithIssuerAndEntry)); - ok(crl != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); + ok(crl != NULL, "CertCreateCRLContext failed: %08lx\n", GetLastError()); cert1 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok(cert1 != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert1 != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError());
/* Crash @@ -1002,15 +1002,15 @@ static void testIsValidCRLForCert(void)
/* Curiously, any CRL is valid for the NULL certificate */ ret = pCertIsValidCRLForCertificate(NULL, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError());
/* Same issuer for both cert and CRL, this CRL is valid for that cert */ ret = pCertIsValidCRLForCertificate(cert1, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError());
cert2 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCertWithDifferentIssuer, sizeof(bigCertWithDifferentIssuer)); - ok(cert2 != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert2 != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError());
/* Yet more curious: different issuers for these, yet the CRL is valid for @@ -1018,7 +1018,7 @@ static void testIsValidCRLForCert(void) * CRL has a CRL_ISSUING_DIST_POINT extension. */ ret = pCertIsValidCRLForCertificate(cert2, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError());
CertFreeCRLContext(crl);
@@ -1027,38 +1027,38 @@ static void testIsValidCRLForCert(void) */ crl = CertCreateCRLContext(X509_ASN_ENCODING, v2CRLWithIssuingDistPoint, sizeof(v2CRLWithIssuingDistPoint)); - ok(crl != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); + ok(crl != NULL, "CertCreateCRLContext failed: %08lx\n", GetLastError());
ret = pCertIsValidCRLForCertificate(cert1, crl, 0, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); ret = pCertIsValidCRLForCertificate(cert2, crl, 0, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError());
/* With a CRL_ISSUING_DIST_POINT in the CRL, it matches the cert containing * a CRL_DIST_POINTS_INFO extension. */ cert3 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCertWithCRLDistPoints, sizeof(bigCertWithCRLDistPoints)); - ok(cert3 != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert3 != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); ret = pCertIsValidCRLForCertificate(cert3, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError());
CertFreeCRLContext(crl);
/* And again, with a real CRL, the CRL is valid for all three certs. */ crl = CertCreateCRLContext(X509_ASN_ENCODING, verisignCRL, sizeof(verisignCRL)); - ok(crl != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); + ok(crl != NULL, "CertCreateCRLContext failed: %08lx\n", GetLastError());
ret = pCertIsValidCRLForCertificate(cert1, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError()); ret = pCertIsValidCRLForCertificate(cert2, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError()); ret = pCertIsValidCRLForCertificate(cert3, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError());
CertFreeCRLContext(crl);
@@ -1067,18 +1067,18 @@ static void testIsValidCRLForCert(void) */ store = CertOpenStore(CERT_STORE_PROV_MEMORY, X509_ASN_ENCODING, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError());
ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, verisignCRL, sizeof(verisignCRL), CERT_STORE_ADD_ALWAYS, &crl); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError());
ret = pCertIsValidCRLForCertificate(cert1, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError()); ret = pCertIsValidCRLForCertificate(cert2, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError()); ret = pCertIsValidCRLForCertificate(cert3, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); + ok(ret, "CertIsValidCRLForCertificate failed: %08lx\n", GetLastError());
CertFreeCRLContext(crl);
@@ -1111,7 +1111,7 @@ static void testFindCertInCRL(void)
cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(cert != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError());
/* Crash @@ -1127,14 +1127,14 @@ static void testFindCertInCRL(void) crl = CertCreateCRLContext(X509_ASN_ENCODING, verisignCRL, sizeof(verisignCRL)); ret = pCertFindCertificateInCRL(cert, crl, 0, NULL, &entry); - ok(ret, "CertFindCertificateInCRL failed: %08x\n", GetLastError()); + ok(ret, "CertFindCertificateInCRL failed: %08lx\n", GetLastError()); ok(entry == NULL, "Expected not to find an entry in CRL\n"); CertFreeCRLContext(crl);
crl = CertCreateCRLContext(X509_ASN_ENCODING, v1CRLWithIssuerAndEntry, sizeof(v1CRLWithIssuerAndEntry)); ret = pCertFindCertificateInCRL(cert, crl, 0, NULL, &entry); - ok(ret, "CertFindCertificateInCRL failed: %08x\n", GetLastError()); + ok(ret, "CertFindCertificateInCRL failed: %08lx\n", GetLastError()); ok(entry != NULL, "Expected to find an entry in CRL\n"); CertFreeCRLContext(crl);
@@ -1142,7 +1142,7 @@ static void testFindCertInCRL(void) crl = CertCreateCRLContext(X509_ASN_ENCODING, crlWithDifferentIssuer, sizeof(crlWithDifferentIssuer)); ret = pCertFindCertificateInCRL(cert, crl, 0, NULL, &entry); - ok(ret, "CertFindCertificateInCRL failed: %08x\n", GetLastError()); + ok(ret, "CertFindCertificateInCRL failed: %08lx\n", GetLastError()); ok(entry != NULL, "Expected to find an entry in CRL\n"); CertFreeCRLContext(crl);
@@ -1156,18 +1156,18 @@ static void testVerifyCRLRevocation(void) PCCRL_CONTEXT crl;
ret = CertVerifyCRLRevocation(0, NULL, 0, NULL); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyCRLRevocation failed: %08lx\n", GetLastError()); ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, NULL, 0, NULL); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyCRLRevocation failed: %08lx\n", GetLastError());
cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert));
/* Check against no CRL */ ret = CertVerifyCRLRevocation(0, cert->pCertInfo, 0, NULL); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyCRLRevocation failed: %08lx\n", GetLastError()); ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, cert->pCertInfo, 0, NULL); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyCRLRevocation failed: %08lx\n", GetLastError());
/* Check against CRL with entry for the cert */ crl = CertCreateCRLContext(X509_ASN_ENCODING, v1CRLWithIssuerAndEntry, @@ -1183,7 +1183,7 @@ static void testVerifyCRLRevocation(void) /* Check against CRL with different issuer and entry for the cert */ crl = CertCreateCRLContext(X509_ASN_ENCODING, crlWithDifferentIssuer, sizeof(crlWithDifferentIssuer)); - ok(crl != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); + ok(crl != NULL, "CertCreateCRLContext failed: %08lx\n", GetLastError()); ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, cert->pCertInfo, 1, (PCRL_INFO *)&crl->pCrlInfo); ok(!ret, "CertVerifyCRLRevocation should have been revoked\n"); @@ -1194,10 +1194,10 @@ static void testVerifyCRLRevocation(void) sizeof(verisignCRL)); ret = CertVerifyCRLRevocation(0, cert->pCertInfo, 1, (PCRL_INFO *)&crl->pCrlInfo); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyCRLRevocation failed: %08lx\n", GetLastError()); ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, cert->pCertInfo, 1, (PCRL_INFO *)&crl->pCrlInfo); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); + ok(ret, "CertVerifyCRLRevocation failed: %08lx\n", GetLastError()); CertFreeCRLContext(crl);
CertFreeCertificateContext(cert); diff --git a/dlls/crypt32/tests/ctl.c b/dlls/crypt32/tests/ctl.c index 79a60f8c6ee..c94727cda04 100644 --- a/dlls/crypt32/tests/ctl.c +++ b/dlls/crypt32/tests/ctl.c @@ -114,13 +114,13 @@ static void testCreateCTL(void) SetLastError(0xdeadbeef); ctl = CertCreateCTLContext(0, NULL, 0); ok(!ctl && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ctl = CertCreateCTLContext(X509_ASN_ENCODING, NULL, 0); ok(!ctl && (GetLastError() == ERROR_INVALID_DATA || GetLastError() == OSS_MORE_INPUT), /* win9x */ - "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(), + "expected ERROR_INVALID_DATA, got %ld (0x%08lx)\n", GetLastError(), GetLastError()); /* An empty CTL can't be created.. */ SetLastError(0xdeadbeef); @@ -128,7 +128,7 @@ static void testCreateCTL(void) ok(!ctl && (GetLastError() == ERROR_INVALID_DATA || GetLastError() == OSS_DATA_ERROR), /* win9x */ - "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(), + "expected ERROR_INVALID_DATA, got %ld (0x%08lx)\n", GetLastError(), GetLastError()); /* Nor can any of these "signed" CTLs whose inner content OID isn't * szOID_CTL. @@ -139,7 +139,7 @@ static void testCreateCTL(void) (GetLastError() == ERROR_INVALID_DATA || GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ || GetLastError() == ERROR_SUCCESS /* some win98 */), - "expected ERROR_INVALID_DATA, CRYPT_E_UNEXPECTED_MSG_TYPE, or ERROR_SUCCESS, got %d (0x%08x)\n", GetLastError(), + "expected ERROR_INVALID_DATA, CRYPT_E_UNEXPECTED_MSG_TYPE, or ERROR_SUCCESS, got %ld (0x%08lx)\n", GetLastError(), GetLastError()); SetLastError(0xdeadbeef); ctl = CertCreateCTLContext(X509_ASN_ENCODING, ctlWithOneEntry, @@ -149,7 +149,7 @@ static void testCreateCTL(void) GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ || GetLastError() == OSS_DATA_ERROR /* some win98 */ || GetLastError() == ERROR_SUCCESS /* some win98 */), - "expected ERROR_INVALID_DATA, CRYPT_E_UNEXPECTED_MSG_TYPE, OSS_DATA_ERROR, or ERROR_SUCCESS, got %d (0x%08x)\n", GetLastError(), + "expected ERROR_INVALID_DATA, CRYPT_E_UNEXPECTED_MSG_TYPE, OSS_DATA_ERROR, or ERROR_SUCCESS, got %ld (0x%08lx)\n", GetLastError(), GetLastError()); SetLastError(0xdeadbeef); ctl = CertCreateCTLContext(X509_ASN_ENCODING, @@ -158,13 +158,13 @@ static void testCreateCTL(void) (GetLastError() == ERROR_INVALID_DATA || GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ || GetLastError() == ERROR_SUCCESS /* some win98 */), - "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(), + "expected ERROR_INVALID_DATA, got %ld (0x%08lx)\n", GetLastError(), GetLastError()); /* This signed CTL with the appropriate inner content type can be decoded. */ ctl = CertCreateCTLContext(X509_ASN_ENCODING, signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent)); - ok(ctl != NULL, "CertCreateCTLContext failed: %08x\n", GetLastError()); + ok(ctl != NULL, "CertCreateCTLContext failed: %08lx\n", GetLastError()); if (ctl) { /* Even though the CTL was decoded with X509_ASN_ENCODING, the @@ -172,7 +172,7 @@ static void testCreateCTL(void) */ ok(ctl->dwMsgAndCertEncodingType == (X509_ASN_ENCODING | PKCS_7_ASN_ENCODING), - "expected X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, got %08x\n", + "expected X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, got %08lx\n", ctl->dwMsgAndCertEncodingType); CertFreeCTLContext(ctl); } @@ -182,7 +182,7 @@ static void testCreateCTL(void) ctl = CertCreateCTLContext(X509_ASN_ENCODING, signedCTLWithCTLInnerContentAndBadSig, sizeof(signedCTLWithCTLInnerContentAndBadSig)); - ok(ctl != NULL, "CertCreateCTLContext failed: %08x\n", GetLastError()); + ok(ctl != NULL, "CertCreateCTLContext failed: %08lx\n", GetLastError()); if (ctl) CertFreeCTLContext(ctl); } @@ -221,12 +221,12 @@ static void checkHash(const BYTE *data, DWORD dataLen, ALG_ID algID, memset(hashProperty, 0, sizeof(hashProperty)); size = sizeof(hash); ret = CryptHashCertificate(0, algID, 0, data, dataLen, hash, &size); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); + ok(ret, "CryptHashCertificate failed: %08lx\n", GetLastError()); ret = CertGetCTLContextProperty(context, propID, hashProperty, &size); - ok(ret, "CertGetCTLContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertGetCTLContextProperty failed: %08lx\n", GetLastError()); if (ret) ok(!memcmp(hash, hashProperty, size), - "Unexpected hash for property %d\n", propID); + "Unexpected hash for property %ld\n", propID); }
static void testCTLProperties(void) @@ -239,7 +239,7 @@ static void testCTLProperties(void) signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent)); if (!ctl) { - skip("CertCreateCTLContext failed: %08x\n", GetLastError()); + skip("CertCreateCTLContext failed: %08lx\n", GetLastError()); return; }
@@ -251,17 +251,17 @@ static void testCTLProperties(void) if (propID) numProps++; } while (propID != 0); - ok(numProps == 0, "Expected 0 properties, got %d\n", numProps); + ok(numProps == 0, "Expected 0 properties, got %ld\n", numProps);
/* An implicit property */ ret = CertGetCTLContextProperty(ctl, CERT_ACCESS_STATE_PROP_ID, NULL, &size); ok(ret || broken(GetLastError() == CRYPT_E_NOT_FOUND /* some win98 */), - "CertGetCTLContextProperty failed: %08x\n", GetLastError()); + "CertGetCTLContextProperty failed: %08lx\n", GetLastError()); ret = CertGetCTLContextProperty(ctl, CERT_ACCESS_STATE_PROP_ID, &access, &size); ok(ret || broken(GetLastError() == CRYPT_E_NOT_FOUND /* some win98 */), - "CertGetCTLContextProperty failed: %08x\n", GetLastError()); + "CertGetCTLContextProperty failed: %08lx\n", GetLastError()); if (ret) ok(!(access & CERT_ACCESS_STATE_WRITE_PERSIST_FLAG), "Didn't expect a persisted cert\n"); @@ -279,7 +279,7 @@ static void testCTLProperties(void) if (propID) numProps++; } while (propID != 0); - ok(numProps == 1, "Expected 1 properties, got %d\n", numProps); + ok(numProps == 1, "Expected 1 properties, got %ld\n", numProps);
checkHash(signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), CALG_MD5, ctl, @@ -360,12 +360,12 @@ static void testAddCTLToStore(void) ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCTLToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, signedCTLWithCTLInnerContentAndBadSig, sizeof(signedCTLWithCTLInnerContentAndBadSig), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCTLToStore failed: %08lx\n", GetLastError()); /* Check that two exist */ numCTLs = 0; ctl = NULL; @@ -374,7 +374,7 @@ static void testAddCTLToStore(void) if (ctl) numCTLs++; } while (ctl); - ok(numCTLs == 2, "expected 2 CTLs, got %d\n", numCTLs); + ok(numCTLs == 2, "expected 2 CTLs, got %ld\n", numCTLs); CertCloseStore(store, 0);
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, @@ -383,7 +383,7 @@ static void testAddCTLToStore(void) ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCTLToStore failed: %08lx\n", GetLastError()); /* so adding the second CTL fails. */ SetLastError(0xdeadbeef); ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, @@ -391,7 +391,7 @@ static void testAddCTLToStore(void) sizeof(signedCTLWithCTLInnerContentAndBadSig), CERT_STORE_ADD_NEW, NULL); ok(!ret && (GetLastError() == CRYPT_E_EXISTS || GetLastError() == OSS_DATA_ERROR), - "expected CRYPT_E_EXISTS or OSS_DATA_ERROR, got %d %08x\n", ret, GetLastError()); + "expected CRYPT_E_EXISTS or OSS_DATA_ERROR, got %d %08lx\n", ret, GetLastError()); CertCloseStore(store, 0);
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, @@ -402,13 +402,13 @@ static void testAddCTLToStore(void) ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCTLToStore failed: %08lx\n", GetLastError()); expectedCTLs = 1; ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, signedCTLWithUsage, sizeof(signedCTLWithUsage), CERT_STORE_ADD_NEW, NULL); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* some win98 */), - "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); + "CertAddEncodedCTLToStore failed: %08lx\n", GetLastError()); if (ret) expectedCTLs++; /* Check that two exist */ @@ -419,7 +419,7 @@ static void testAddCTLToStore(void) if (ctl) numCTLs++; } while (ctl); - ok(numCTLs == expectedCTLs, "expected %d CTLs, got %d\n", expectedCTLs, + ok(numCTLs == expectedCTLs, "expected %ld CTLs, got %ld\n", expectedCTLs, numCTLs); CertCloseStore(store, 0);
@@ -436,11 +436,11 @@ static void testAddCTLToStore(void) skip("adding a CTL with an empty usage not supported\n"); return; } - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCTLToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, signedCTLWithListID2, sizeof(signedCTLWithListID2), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCTLToStore failed: %08lx\n", GetLastError()); /* Check that two exist */ numCTLs = 0; ctl = NULL; @@ -449,7 +449,7 @@ static void testAddCTLToStore(void) if (ctl) numCTLs++; } while (ctl); - ok(numCTLs == 2, "expected 2 CTLs, got %d\n", numCTLs); + ok(numCTLs == 2, "expected 2 CTLs, got %ld\n", numCTLs); CertCloseStore(store, 0); }
diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c index 9353bd201a7..3ba6b2680a7 100644 --- a/dlls/crypt32/tests/encode.c +++ b/dlls/crypt32/tests/encode.c @@ -110,7 +110,7 @@ static void test_encodeInt(DWORD dwEncoding) ret = pCryptEncodeObjectEx(0, X509_INTEGER, &ints[0].val, 0, NULL, NULL, &bufSize); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); if (0) { /* check with NULL integer buffer. Windows XP incorrectly returns an @@ -119,17 +119,17 @@ static void test_encodeInt(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_INTEGER, NULL, 0, NULL, NULL, &bufSize); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } for (i = 0; i < ARRAY_SIZE(ints); i++) { /* encode as normal integer */ ret = pCryptEncodeObjectEx(dwEncoding, X509_INTEGER, &ints[i].val, 0, NULL, NULL, &bufSize); - ok(ret, "Expected success, got %d\n", GetLastError()); + ok(ret, "Expected success, got %ld\n", GetLastError()); ret = pCryptEncodeObjectEx(dwEncoding, X509_INTEGER, &ints[i].val, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %ld\n", GetLastError()); if (ret) { ok(buf[0] == 2, "Got unexpected type %d for integer (expected 2)\n", @@ -145,10 +145,10 @@ static void test_encodeInt(DWORD dwEncoding) blob.pbData = (BYTE *)&ints[i].val; ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, &blob, 0, NULL, NULL, &bufSize); - ok(ret, "Expected success, got %d\n", GetLastError()); + ok(ret, "Expected success, got %ld\n", GetLastError()); ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, &blob, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %ld\n", GetLastError()); if (ret) { ok(buf[0] == 2, "Got unexpected type %d for integer (expected 2)\n", @@ -169,10 +169,10 @@ static void test_encodeInt(DWORD dwEncoding) blob.pbData = (BYTE *)bigInts[i].val; ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, &blob, 0, NULL, NULL, &bufSize); - ok(ret, "Expected success, got %d\n", GetLastError()); + ok(ret, "Expected success, got %ld\n", GetLastError()); ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, &blob, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %ld\n", GetLastError()); if (ret) { ok(buf[0] == 2, "Got unexpected type %d for integer (expected 2)\n", @@ -192,10 +192,10 @@ static void test_encodeInt(DWORD dwEncoding) blob.pbData = (BYTE*)bigUInts[i].val; ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_UINT, &blob, 0, NULL, NULL, &bufSize); - ok(ret, "Expected success, got %d\n", GetLastError()); + ok(ret, "Expected success, got %ld\n", GetLastError()); ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_UINT, &blob, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %ld\n", GetLastError()); if (ret) { ok(buf[0] == 2, "Got unexpected type %d for integer (expected 2)\n", @@ -230,25 +230,25 @@ static void test_decodeInt(DWORD dwEncoding) ret = pCryptDecodeObjectEx(3, X509_INTEGER, (BYTE *)&ints[0].encoded, ints[0].encoded[1] + 2, 0, NULL, NULL, &bufSize); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); /* check with NULL integer buffer */ ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, NULL, 0, 0, NULL, NULL, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG /* Win9x */), - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08lx\n", GetLastError()); /* check with a valid, but too large, integer */ ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, bigInt, bigInt[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok((!ret && GetLastError() == CRYPT_E_ASN1_LARGE) || broken(ret) /* Win9x */, - "Expected CRYPT_E_ASN1_LARGE, got %d\n", GetLastError()); + "Expected CRYPT_E_ASN1_LARGE, got %ld\n", GetLastError()); /* check with a DER-encoded string */ ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, testStr, testStr[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* Win9x */ ), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %08x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %08lx\n", GetLastError()); for (i = 0; i < ARRAY_SIZE(ints); i++) { @@ -258,12 +258,12 @@ static void test_decodeInt(DWORD dwEncoding) ints[i].encoded, ints[i].encoded[1] + 2, 0, NULL, NULL, &bufSize); ok(ret && GetLastError() == NOERROR, - "Expected success and NOERROR, got %d\n", GetLastError()); + "Expected success and NOERROR, got %ld\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, ints[i].encoded, ints[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %d\n", GetLastError()); - ok(bufSize == sizeof(int), "Wrong size %d\n", bufSize); + ok(ret, "CryptDecodeObjectEx failed: %ld\n", GetLastError()); + ok(bufSize == sizeof(int), "Wrong size %ld\n", bufSize); ok(buf != NULL, "Expected allocated buffer\n"); if (ret) { @@ -278,19 +278,19 @@ static void test_decodeInt(DWORD dwEncoding) bigInts[i].encoded, bigInts[i].encoded[1] + 2, 0, NULL, NULL, &bufSize); ok(ret && GetLastError() == NOERROR, - "Expected success and NOERROR, got %d\n", GetLastError()); + "Expected success and NOERROR, got %ld\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, bigInts[i].encoded, bigInts[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %d\n", GetLastError()); - ok(bufSize >= sizeof(CRYPT_INTEGER_BLOB), "Wrong size %d\n", bufSize); + ok(ret, "CryptDecodeObjectEx failed: %ld\n", GetLastError()); + ok(bufSize >= sizeof(CRYPT_INTEGER_BLOB), "Wrong size %ld\n", bufSize); ok(buf != NULL, "Expected allocated buffer\n"); if (ret) { CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)buf;
ok(blob->cbData == strlen((const char*)bigInts[i].decoded), - "Expected len %d, got %d\n", lstrlenA((const char*)bigInts[i].decoded), + "Expected len %d, got %ld\n", lstrlenA((const char*)bigInts[i].decoded), blob->cbData); ok(!memcmp(blob->pbData, bigInts[i].decoded, blob->cbData), "Unexpected value\n"); @@ -303,19 +303,19 @@ static void test_decodeInt(DWORD dwEncoding) bigUInts[i].encoded, bigUInts[i].encoded[1] + 2, 0, NULL, NULL, &bufSize); ok(ret && GetLastError() == NOERROR, - "Expected success and NOERROR, got %d\n", GetLastError()); + "Expected success and NOERROR, got %ld\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_UINT, bigUInts[i].encoded, bigUInts[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %d\n", GetLastError()); - ok(bufSize >= sizeof(CRYPT_INTEGER_BLOB), "Wrong size %d\n", bufSize); + ok(ret, "CryptDecodeObjectEx failed: %ld\n", GetLastError()); + ok(bufSize >= sizeof(CRYPT_INTEGER_BLOB), "Wrong size %ld\n", bufSize); ok(buf != NULL, "Expected allocated buffer\n"); if (ret) { CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)buf;
ok(blob->cbData == strlen((const char*)bigUInts[i].val), - "Expected len %d, got %d\n", lstrlenA((const char*)bigUInts[i].val), + "Expected len %d, got %ld\n", lstrlenA((const char*)bigUInts[i].val), blob->cbData); ok(!memcmp(blob->pbData, bigUInts[i].val, blob->cbData), "Unexpected value\n"); @@ -325,7 +325,7 @@ static void test_decodeInt(DWORD dwEncoding) /* Decode the value 1 with long-form length */ ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, longForm, sizeof(longForm), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(*(int *)buf == 1, "Expected 1, got %d\n", *(int *)buf); @@ -334,7 +334,7 @@ static void test_decodeInt(DWORD dwEncoding) /* check with extra bytes at the end */ ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, extraBytes, sizeof(extraBytes), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(*(int *)buf == 1, "Expected 1, got %d\n", *(int *)buf); @@ -360,7 +360,7 @@ static void test_decodeInt(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, bigBogus, 0x01ffffff, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } }
@@ -396,7 +396,7 @@ static void test_encodeEnumerated(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, enumeratedTypes[i], &enums[j].val, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %ld\n", GetLastError()); if (ret) { ok(buf[0] == 0xa, @@ -429,9 +429,9 @@ static void test_decodeEnumerated(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, enumeratedTypes[i], enums[j].encoded, enums[j].encoded[1] + 2, 0, NULL, &val, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); ok(bufSize == sizeof(int), - "Got unexpected size %d for enumerated\n", bufSize); + "Got unexpected size %ld for enumerated\n", bufSize); ok(val == enums[j].val, "Unexpected value %d, expected %d\n", val, enums[j].val); } @@ -453,7 +453,7 @@ static void testTimeEncoding(DWORD dwEncoding, LPCSTR structType, BOOL ret;
ret = SystemTimeToFileTime(&time->sysTime, &ft); - ok(ret, "SystemTimeToFileTime failed: %d\n", GetLastError()); + ok(ret, "SystemTimeToFileTime failed: %ld\n", GetLastError()); ret = pCryptEncodeObjectEx(dwEncoding, structType, &ft, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); /* years other than 1950-2050 are not allowed for encodings other than @@ -462,7 +462,7 @@ static void testTimeEncoding(DWORD dwEncoding, LPCSTR structType, if (structType == X509_CHOICE_OF_TIME || (time->sysTime.wYear >= 1950 && time->sysTime.wYear <= 2050)) { - ok(ret, "CryptEncodeObjectEx failed: %d (0x%08x)\n", GetLastError(), + ok(ret, "CryptEncodeObjectEx failed: %ld (0x%08lx)\n", GetLastError(), GetLastError()); ok(buf != NULL, "Expected an allocated buffer\n"); if (ret) @@ -470,7 +470,7 @@ static void testTimeEncoding(DWORD dwEncoding, LPCSTR structType, ok(buf[0] == time->encodedTime[0], "Expected type 0x%02x, got 0x%02x\n", time->encodedTime[0], buf[0]); - ok(buf[1] == time->encodedTime[1], "Expected %d bytes, got %d\n", + ok(buf[1] == time->encodedTime[1], "Expected %d bytes, got %ld\n", time->encodedTime[1], bufSize); ok(!memcmp(time->encodedTime + 2, buf + 2, time->encodedTime[1]), "Got unexpected value for time encoding\n"); @@ -480,7 +480,7 @@ static void testTimeEncoding(DWORD dwEncoding, LPCSTR structType, else ok((!ret && GetLastError() == CRYPT_E_BAD_ENCODE) || broken(GetLastError() == ERROR_SUCCESS), - "Expected CRYPT_E_BAD_ENCODE, got 0x%08x\n", GetLastError()); + "Expected CRYPT_E_BAD_ENCODE, got 0x%08lx\n", GetLastError()); }
static const char *printSystemTime(const SYSTEMTIME *st) @@ -542,7 +542,7 @@ static void testTimeDecoding(DWORD dwEncoding, LPCSTR structType, (time->sysTime.wYear >= 1950 && time->sysTime.wYear <= 2050)) { ok(ret || broken(GetLastError() == OSS_DATA_ERROR), - "CryptDecodeObjectEx failed: %d (0x%08x)\n", GetLastError(), + "CryptDecodeObjectEx failed: %ld (0x%08lx)\n", GetLastError(), GetLastError()); if (ret) compareTime(&time->sysTime, &ft); @@ -550,7 +550,7 @@ static void testTimeDecoding(DWORD dwEncoding, LPCSTR structType, else ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* Win9x */ ), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %08x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %08lx\n", GetLastError()); }
@@ -646,12 +646,12 @@ static void test_decodeFiletime(DWORD dwEncoding)
/* Check bogus length with non-NULL buffer */ ret = SystemTimeToFileTime(×[0].sysTime, &ft1); - ok(ret, "SystemTimeToFileTime failed: %d\n", GetLastError()); + ok(ret, "SystemTimeToFileTime failed: %ld\n", GetLastError()); size = 1; ret = pCryptDecodeObjectEx(dwEncoding, X509_CHOICE_OF_TIME, times[0].encodedTime, times[0].encodedTime[1] + 2, 0, NULL, &ft2, &size); ok(!ret && GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %ld\n", GetLastError()); /* Normal tests */ for (i = 0; i < ARRAY_SIZE(times); i++) { @@ -673,7 +673,7 @@ static void test_decodeFiletime(DWORD dwEncoding) ok((!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR /* Win9x */)) || broken(ret), /* Win9x and NT4 for bin38 */ - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GetLastError()); } } @@ -766,14 +766,14 @@ static void test_encodeName(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, NULL, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* Test with empty CERT_NAME_INFO */ info.cRDN = 0; info.rgRDN = NULL; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(!memcmp(buf, emptySequence, sizeof(emptySequence)), @@ -787,7 +787,7 @@ static void test_encodeName(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* Test with empty CERT_RDN */ rdn.cRDNAttr = 0; @@ -796,7 +796,7 @@ static void test_encodeName(DWORD dwEncoding) info.rgRDN = &rdn; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(!memcmp(buf, emptyRDNs, sizeof(emptyRDNs)), @@ -811,7 +811,7 @@ static void test_encodeName(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* oddly, a bogus OID is accepted by Windows XP; not testing. attrs[0].pszObjId = "bogus"; @@ -839,7 +839,7 @@ static void test_encodeName(DWORD dwEncoding) rdn.rgRDNAttr = attrs; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(!memcmp(buf, twoRDNs, sizeof(twoRDNs)), @@ -853,10 +853,10 @@ static void test_encodeName(DWORD dwEncoding) rdn.cRDNAttr = 1; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(encodedTwoRDNs), "Unexpected size %d\n", size); + ok(size == sizeof(encodedTwoRDNs), "Unexpected size %ld\n", size); ok(!memcmp(buf, encodedTwoRDNs, size), "Unexpected value for re-encoded two RDN array\n"); LocalFree(buf); @@ -867,7 +867,7 @@ static void test_encodeName(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Test a more complex name */ rdn.cRDNAttr = ARRAY_SIZE(rdnAttrs); rdn.rgRDNAttr = rdnAttrs; @@ -877,10 +877,10 @@ static void test_encodeName(DWORD dwEncoding) size = 0; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, X509_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(encodedRDNAttrs), "Wrong size %d\n", size); + ok(size == sizeof(encodedRDNAttrs), "Wrong size %ld\n", size); ok(!memcmp(buf, encodedRDNAttrs, size), "Unexpected value\n"); LocalFree(buf); } @@ -916,14 +916,14 @@ static void test_encodeUnicodeName(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, NULL, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* Test with empty CERT_NAME_INFO */ info.cRDN = 0; info.rgRDN = NULL; ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(!memcmp(buf, emptySequence, sizeof(emptySequence)), @@ -944,8 +944,8 @@ static void test_encodeUnicodeName(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_PRINTABLE_STRING, - "Expected CRYPT_E_INVALID_PRINTABLE_STRING, got %08x\n", GetLastError()); - ok(size == 9, "Unexpected error index %08x\n", size); + "Expected CRYPT_E_INVALID_PRINTABLE_STRING, got %08lx\n", GetLastError()); + ok(size == 9, "Unexpected error index %08lx\n", size); /* Check with two NULL-terminated CERT_RDN_ATTRs. Note DER encoding * forces the order of the encoded attributes to be swapped. */ @@ -963,7 +963,7 @@ static void test_encodeUnicodeName(DWORD dwEncoding) info.rgRDN = &rdn; ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(!memcmp(buf, twoRDNsNoNull, sizeof(twoRDNsNoNull)), @@ -977,10 +977,10 @@ static void test_encodeUnicodeName(DWORD dwEncoding) rdn.cRDNAttr = 1; ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(encodedTwoRDNs), "Unexpected size %d\n", size); + ok(size == sizeof(encodedTwoRDNs), "Unexpected size %ld\n", size); ok(!memcmp(buf, encodedTwoRDNs, size), "Unexpected value for re-encoded two RDN array\n"); LocalFree(buf); @@ -990,10 +990,10 @@ static void test_encodeUnicodeName(DWORD dwEncoding) attrs[0].dwValueType = CERT_RDN_ANY_TYPE; ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - todo_wine ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + todo_wine ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(anyType), "Unexpected size %d\n", size); + ok(size == sizeof(anyType), "Unexpected size %ld\n", size); ok(!memcmp(buf, anyType, size), "Unexpected value\n"); LocalFree(buf); } @@ -1010,16 +1010,16 @@ static void compareNameValues(const CERT_NAME_VALUE *expected, }
ok(got->dwValueType == expected->dwValueType, - "Expected string type %d, got %d\n", expected->dwValueType, + "Expected string type %ld, got %ld\n", expected->dwValueType, got->dwValueType); ok(got->Value.cbData == expected->Value.cbData || got->Value.cbData == expected->Value.cbData - sizeof(WCHAR) /* Win8 */, - "String type %d: unexpected data size, got %d, expected %d\n", + "String type %ld: unexpected data size, got %ld, expected %ld\n", expected->dwValueType, got->Value.cbData, expected->Value.cbData); if (got->Value.cbData && got->Value.pbData) ok(!memcmp(got->Value.pbData, expected->Value.pbData, min(got->Value.cbData, expected->Value.cbData)), - "String type %d: unexpected value\n", expected->dwValueType); + "String type %ld: unexpected value\n", expected->dwValueType); }
static void compareRDNAttrs(const CERT_RDN_ATTR *expected, @@ -1043,7 +1043,7 @@ static void compareRDNAttrs(const CERT_RDN_ATTR *expected, static void compareRDNs(const CERT_RDN *expected, const CERT_RDN *got) { ok(got->cRDNAttr == expected->cRDNAttr, - "Expected %d RDN attrs, got %d\n", expected->cRDNAttr, got->cRDNAttr); + "Expected %ld RDN attrs, got %ld\n", expected->cRDNAttr, got->cRDNAttr); if (got->cRDNAttr) { DWORD i; @@ -1056,7 +1056,7 @@ static void compareRDNs(const CERT_RDN *expected, const CERT_RDN *got) static void compareNames(const CERT_NAME_INFO *expected, const CERT_NAME_INFO *got) { - ok(got->cRDN == expected->cRDN, "Expected %d RDNs, got %d\n", + ok(got->cRDN == expected->cRDN, "Expected %ld RDNs, got %ld\n", expected->cRDN, got->cRDN); if (got->cRDN) { @@ -1087,15 +1087,15 @@ static void test_decodeName(DWORD dwEncoding) emptySequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); /* Interestingly, in Windows, if cRDN is 0, rgRGN may not be NULL. My * decoder works the same way, so only test the count. */ if (ret) { - ok(bufSize == sizeof(CERT_NAME_INFO), "Wrong bufSize %d\n", bufSize); + ok(bufSize == sizeof(CERT_NAME_INFO), "Wrong bufSize %ld\n", bufSize); ok(((CERT_NAME_INFO *)buf)->cRDN == 0, - "Expected 0 RDNs in empty info, got %d\n", + "Expected 0 RDNs in empty info, got %ld\n", ((CERT_NAME_INFO *)buf)->cRDN); LocalFree(buf); } @@ -1103,12 +1103,12 @@ static void test_decodeName(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME, emptyIndefiniteSequence, sizeof(emptyIndefiniteSequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(bufSize == sizeof(CERT_NAME_INFO), "Wrong bufSize %d\n", bufSize); + ok(bufSize == sizeof(CERT_NAME_INFO), "Wrong bufSize %ld\n", bufSize); ok(((CERT_NAME_INFO *)buf)->cRDN == 0, - "Expected 0 RDNs in empty info, got %d\n", + "Expected 0 RDNs in empty info, got %ld\n", ((CERT_NAME_INFO *)buf)->cRDN); LocalFree(buf); } @@ -1118,7 +1118,7 @@ static void test_decodeName(DWORD dwEncoding) emptyRDNs[1] + 2, CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_NAME_INFO *info = (CERT_NAME_INFO *)buf; @@ -1134,7 +1134,7 @@ static void test_decodeName(DWORD dwEncoding) twoRDNs[1] + 2, CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { static CHAR oid_sur_name[] = szOID_SUR_NAME, @@ -1156,13 +1156,13 @@ static void test_decodeName(DWORD dwEncoding) bufSize = 0; ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME, twoRDNsExtraBytes, sizeof(twoRDNsExtraBytes), 0, NULL, NULL, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); /* And, a slightly more complicated name */ buf = NULL; bufSize = 0; ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, X509_NAME, encodedRDNAttrs, sizeof(encodedRDNAttrs), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { rdn.cRDNAttr = ARRAY_SIZE(decodedRdnAttrs); @@ -1186,13 +1186,13 @@ static void test_decodeUnicodeName(DWORD dwEncoding) emptySequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(bufSize == sizeof(CERT_NAME_INFO), - "Got wrong bufSize %d\n", bufSize); + "Got wrong bufSize %ld\n", bufSize); ok(((CERT_NAME_INFO *)buf)->cRDN == 0, - "Expected 0 RDNs in empty info, got %d\n", + "Expected 0 RDNs in empty info, got %ld\n", ((CERT_NAME_INFO *)buf)->cRDN); LocalFree(buf); } @@ -1202,7 +1202,7 @@ static void test_decodeUnicodeName(DWORD dwEncoding) emptyRDNs[1] + 2, CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_NAME_INFO *info = (CERT_NAME_INFO *)buf; @@ -1218,7 +1218,7 @@ static void test_decodeUnicodeName(DWORD dwEncoding) sizeof(twoRDNsNoNull), CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { static CHAR oid_sur_name[] = szOID_SUR_NAME, @@ -1331,10 +1331,10 @@ static void test_encodeNameValue(DWORD dwEncoding) value.Value.cbData = sizeof(printableCommonNameValue); ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(printableCommonNameValue), "Unexpected size %d\n", + ok(size == sizeof(printableCommonNameValue), "Unexpected size %ld\n", size); ok(!memcmp(buf, printableCommonNameValue, size), "Unexpected encoding\n"); @@ -1345,12 +1345,12 @@ static void test_encodeNameValue(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_VALUE, &nameValues[i].value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == OSS_PDU_MISMATCH) /* NT4/Win9x */, - "Type %d: CryptEncodeObjectEx failed: %08x\n", + "Type %ld: CryptEncodeObjectEx failed: %08lx\n", nameValues[i].value.dwValueType, GetLastError()); if (ret) { ok(size == nameValues[i].encodedSize, - "Expected size %d, got %d\n", nameValues[i].encodedSize, size); + "Expected size %ld, got %ld\n", nameValues[i].encodedSize, size); ok(!memcmp(buf, nameValues[i].encoded, size), "Got unexpected encoding\n"); LocalFree(buf); @@ -1359,12 +1359,12 @@ static void test_encodeNameValue(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_VALUE, &embeddedNullNameValue.value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == OSS_PDU_MISMATCH) /* NT4/Win9x */, - "Type %d: CryptEncodeObjectEx failed: %08x\n", + "Type %ld: CryptEncodeObjectEx failed: %08lx\n", embeddedNullNameValue.value.dwValueType, GetLastError()); if (ret) { ok(size == embeddedNullNameValue.encodedSize, - "Expected size %d, got %d\n", embeddedNullNameValue.encodedSize, size); + "Expected size %ld, got %ld\n", embeddedNullNameValue.encodedSize, size); ok(!memcmp(buf, embeddedNullNameValue.encoded, size), "Got unexpected encoding\n"); LocalFree(buf); @@ -1384,7 +1384,7 @@ static void test_decodeNameValue(DWORD dwEncoding) nameValues[i].encoded, nameValues[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, &buf, &bufSize); - ok(ret, "Value type %d: CryptDecodeObjectEx failed: %08x\n", + ok(ret, "Value type %ld: CryptDecodeObjectEx failed: %08lx\n", nameValues[i].value.dwValueType, GetLastError()); if (ret) { @@ -1415,7 +1415,7 @@ static void test_decodeNameValue(DWORD dwEncoding) */ ok(got->dwValueType == CERT_RDN_ENCODED_BLOB || got->dwValueType == CERT_RDN_IA5_STRING, - "Expected CERT_RDN_ENCODED_BLOB or CERT_RDN_IA5_STRING, got %d\n", + "Expected CERT_RDN_ENCODED_BLOB or CERT_RDN_IA5_STRING, got %ld\n", got->dwValueType); if (got->dwValueType == CERT_RDN_ENCODED_BLOB) expected = &rdnEncodedValue; @@ -1424,12 +1424,12 @@ static void test_decodeNameValue(DWORD dwEncoding) if (expected) { ok(got->Value.cbData == expected->Value.cbData, - "String type %d: unexpected data size, got %d, expected %d\n", + "String type %ld: unexpected data size, got %ld, expected %ld\n", got->dwValueType, got->Value.cbData, expected->Value.cbData); if (got->Value.cbData && got->Value.pbData) ok(!memcmp(got->Value.pbData, expected->Value.pbData, min(got->Value.cbData, expected->Value.cbData)), - "String type %d: unexpected value\n", expected->dwValueType); + "String type %ld: unexpected value\n", expected->dwValueType); } LocalFree(buf); } @@ -1471,7 +1471,7 @@ static void test_encodeAltName(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(emptySequence), "Wrong size %d\n", size); + ok(size == sizeof(emptySequence), "Wrong size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); LocalFree(buf); } @@ -1481,14 +1481,14 @@ static void test_encodeAltName(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Test with an empty pointer */ entry.dwAltNameChoice = CERT_ALT_NAME_URL; ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(emptyURL), "Wrong size %d\n", size); + ok(size == sizeof(emptyURL), "Wrong size %ld\n", size); ok(!memcmp(buf, emptyURL, size), "Unexpected value\n"); LocalFree(buf); } @@ -1498,7 +1498,7 @@ static void test_encodeAltName(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(encodedURL), "Wrong size %d\n", size); + ok(size == sizeof(encodedURL), "Wrong size %ld\n", size); ok(!memcmp(buf, encodedURL, size), "Unexpected value\n"); LocalFree(buf); } @@ -1507,16 +1507,16 @@ static void test_encodeAltName(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_IA5_STRING, - "Expected CRYPT_E_INVALID_IA5_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_IA5_STRING, got %08lx\n", GetLastError()); /* The first invalid character is at index 7 */ ok(GET_CERT_ALT_NAME_VALUE_ERR_INDEX(size) == 7, - "Expected invalid char at index 7, got %d\n", + "Expected invalid char at index 7, got %ld\n", GET_CERT_ALT_NAME_VALUE_ERR_INDEX(size)); /* Now with the URL missing a scheme */ U(entry).pwszURL = (LPWSTR)dnsName; ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { /* This succeeds, but it shouldn't, so don't worry about conforming */ @@ -1526,10 +1526,10 @@ static void test_encodeAltName(DWORD dwEncoding) entry.dwAltNameChoice = CERT_ALT_NAME_DNS_NAME; ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(encodedDnsName), "Wrong size %d\n", size); + ok(size == sizeof(encodedDnsName), "Wrong size %ld\n", size); ok(!memcmp(buf, encodedDnsName, size), "Unexpected value\n"); LocalFree(buf); } @@ -1541,7 +1541,7 @@ static void test_encodeAltName(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(encodedIPAddr), "Wrong size %d\n", size); + ok(size == sizeof(encodedIPAddr), "Wrong size %ld\n", size); ok(!memcmp(buf, encodedIPAddr, size), "Unexpected value\n"); LocalFree(buf); } @@ -1552,7 +1552,7 @@ static void test_encodeAltName(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(encodedOidName), "Wrong size %d\n", size); + ok(size == sizeof(encodedOidName), "Wrong size %ld\n", size); ok(!memcmp(buf, encodedOidName, size), "Unexpected value\n"); LocalFree(buf); } @@ -1564,7 +1564,7 @@ static void test_encodeAltName(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(encodedDirectoryName), "Wrong size %d\n", size); + ok(size == sizeof(encodedDirectoryName), "Wrong size %ld\n", size); ok(!memcmp(buf, encodedDirectoryName, size), "Unexpected value\n"); LocalFree(buf); } @@ -1593,38 +1593,38 @@ static void test_decodeAltName(DWORD dwEncoding) NULL, &buf, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08lx\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, bogusType, sizeof(bogusType), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GetLastError()); /* Now expected cases */ ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, emptySequence, emptySequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (CERT_ALT_NAME_INFO *)buf;
- ok(info->cAltEntry == 0, "Expected 0 entries, got %d\n", + ok(info->cAltEntry == 0, "Expected 0 entries, got %ld\n", info->cAltEntry); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, emptyURL, emptyURL[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (CERT_ALT_NAME_INFO *)buf;
- ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", + ok(info->cAltEntry == 1, "Expected 1 entries, got %ld\n", info->cAltEntry); ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", + "Expected CERT_ALT_NAME_URL, got %ld\n", info->rgAltEntry[0].dwAltNameChoice); ok(U(info->rgAltEntry[0]).pwszURL == NULL || !*U(info->rgAltEntry[0]).pwszURL, "Expected empty URL\n"); @@ -1632,33 +1632,33 @@ static void test_decodeAltName(DWORD dwEncoding) } ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, emptyURLExtraBytes, sizeof(emptyURLExtraBytes), 0, NULL, NULL, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedURL, encodedURL[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (CERT_ALT_NAME_INFO *)buf;
- ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", + ok(info->cAltEntry == 1, "Expected 1 entries, got %ld\n", info->cAltEntry); ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", + "Expected CERT_ALT_NAME_URL, got %ld\n", info->rgAltEntry[0].dwAltNameChoice); ok(!lstrcmpW(U(info->rgAltEntry[0]).pwszURL, url), "Unexpected URL\n"); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedDnsName, encodedDnsName[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (CERT_ALT_NAME_INFO *)buf;
- ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", + ok(info->cAltEntry == 1, "Expected 1 entries, got %ld\n", info->cAltEntry); ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_DNS_NAME, - "Expected CERT_ALT_NAME_DNS_NAME, got %d\n", + "Expected CERT_ALT_NAME_DNS_NAME, got %ld\n", info->rgAltEntry[0].dwAltNameChoice); ok(!lstrcmpW(U(info->rgAltEntry[0]).pwszDNSName, dnsName), "Unexpected DNS name\n"); @@ -1666,18 +1666,18 @@ static void test_decodeAltName(DWORD dwEncoding) } ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedIPAddr, encodedIPAddr[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (CERT_ALT_NAME_INFO *)buf;
- ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", + ok(info->cAltEntry == 1, "Expected 1 entries, got %ld\n", info->cAltEntry); ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_IP_ADDRESS, - "Expected CERT_ALT_NAME_IP_ADDRESS, got %d\n", + "Expected CERT_ALT_NAME_IP_ADDRESS, got %ld\n", info->rgAltEntry[0].dwAltNameChoice); ok(U(info->rgAltEntry[0]).IPAddress.cbData == sizeof(localhost), - "Unexpected IP address length %d\n", + "Unexpected IP address length %ld\n", U(info->rgAltEntry[0]).IPAddress.cbData); ok(!memcmp(U(info->rgAltEntry[0]).IPAddress.pbData, localhost, sizeof(localhost)), "Unexpected IP address value\n"); @@ -1685,15 +1685,15 @@ static void test_decodeAltName(DWORD dwEncoding) } ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedOidName, sizeof(encodedOidName), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (CERT_ALT_NAME_INFO *)buf;
- ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", + ok(info->cAltEntry == 1, "Expected 1 entries, got %ld\n", info->cAltEntry); ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_REGISTERED_ID, - "Expected CERT_ALT_NAME_REGISTERED_ID, got %d\n", + "Expected CERT_ALT_NAME_REGISTERED_ID, got %ld\n", info->rgAltEntry[0].dwAltNameChoice); ok(!strcmp(U(info->rgAltEntry[0]).pszRegisteredID, "1.2.3"), "Expected OID 1.2.3, got %s\n", U(info->rgAltEntry[0]).pszRegisteredID); @@ -1702,18 +1702,18 @@ static void test_decodeAltName(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedDirectoryName, sizeof(encodedDirectoryName), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (CERT_ALT_NAME_INFO *)buf;
- ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", + ok(info->cAltEntry == 1, "Expected 1 entries, got %ld\n", info->cAltEntry); ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_DIRECTORY_NAME, - "Expected CERT_ALT_NAME_DIRECTORY_NAME, got %d\n", + "Expected CERT_ALT_NAME_DIRECTORY_NAME, got %ld\n", info->rgAltEntry[0].dwAltNameChoice); ok(U(info->rgAltEntry[0]).DirectoryName.cbData == - sizeof(encodedCommonName), "Unexpected directory name length %d\n", + sizeof(encodedCommonName), "Unexpected directory name length %ld\n", U(info->rgAltEntry[0]).DirectoryName.cbData); ok(!memcmp(U(info->rgAltEntry[0]).DirectoryName.pbData, encodedCommonName, sizeof(encodedCommonName)), @@ -1733,15 +1733,15 @@ static void test_decodeAltName(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, dns_embedded_bell, sizeof(dns_embedded_bell), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (CERT_ALT_NAME_INFO *)buf;
- ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", + ok(info->cAltEntry == 1, "Expected 1 entries, got %ld\n", info->cAltEntry); ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_DNS_NAME, - "Expected CERT_ALT_NAME_DNS_NAME, got %d\n", + "Expected CERT_ALT_NAME_DNS_NAME, got %ld\n", info->rgAltEntry[0].dwAltNameChoice); LocalFree(buf); } @@ -1838,7 +1838,7 @@ static void test_encodeUnicodeNameValue(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, NULL, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* Have to have a string of some sort */ value.dwValueType = 0; /* aka CERT_RDN_ANY_TYPE */ @@ -1847,23 +1847,23 @@ static void test_encodeUnicodeNameValue(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_CHAR_STRING, got %08lx\n", GetLastError()); value.dwValueType = CERT_RDN_ENCODED_BLOB; ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_CHAR_STRING, got %08lx\n", GetLastError()); value.dwValueType = CERT_RDN_ANY_TYPE; value.Value.pbData = (LPBYTE)oneW; ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_CHAR_STRING, got %08lx\n", GetLastError()); value.Value.cbData = sizeof(oneW); ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_CHAR_STRING, got %08lx\n", GetLastError()); /* An encoded string with specified length isn't good enough either */ value.dwValueType = CERT_RDN_ENCODED_BLOB; value.Value.pbData = oneUniversal; @@ -1871,7 +1871,7 @@ static void test_encodeUnicodeNameValue(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_CHAR_STRING, got %08lx\n", GetLastError()); /* More failure checking */ value.Value.cbData = 0; for (i = 0; i < ARRAY_SIZE(unicodeErrors); i++) @@ -1881,10 +1881,10 @@ static void test_encodeUnicodeNameValue(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == unicodeErrors[i].error, - "Value type %d: expected %08x, got %08x\n", value.dwValueType, + "Value type %ld: expected %08lx, got %08lx\n", value.dwValueType, unicodeErrors[i].error, GetLastError()); ok(size == unicodeErrors[i].errorIndex, - "Expected error index %d, got %d\n", unicodeErrors[i].errorIndex, + "Expected error index %ld, got %ld\n", unicodeErrors[i].errorIndex, size); } /* cbData can be zero if the string is NULL-terminated */ @@ -1896,14 +1896,14 @@ static void test_encodeUnicodeNameValue(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == unicodeResults[i].encoded.cbData, - "Value type %d: expected size %d, got %d\n", + "Value type %ld: expected size %ld, got %ld\n", value.dwValueType, unicodeResults[i].encoded.cbData, size); ok(!memcmp(unicodeResults[i].encoded.pbData, buf, size), - "Value type %d: unexpected value\n", value.dwValueType); + "Value type %ld: unexpected value\n", value.dwValueType); LocalFree(buf); } } @@ -1917,14 +1917,14 @@ static void test_encodeUnicodeNameValue(DWORD dwEncoding) value.dwValueType = unicodeWeirdness[i].valueType; ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == unicodeWeirdness[i].encoded.cbData, - "Value type %d: expected size %d, got %d\n", + "Value type %ld: expected size %ld, got %ld\n", value.dwValueType, unicodeWeirdness[i].encoded.cbData, size); ok(!memcmp(unicodeWeirdness[i].encoded.pbData, buf, size), - "Value type %d: unexpected value\n", value.dwValueType); + "Value type %ld: unexpected value\n", value.dwValueType); LocalFree(buf); } } @@ -1944,17 +1944,17 @@ static void test_decodeUnicodeNameValue(DWORD dwEncoding) unicodeResults[i].encoded.pbData, unicodeResults[i].encoded.cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == CRYPT_E_NOT_CHAR_STRING /* Win9x */), - "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret && buf) { PCERT_NAME_VALUE value = (PCERT_NAME_VALUE)buf;
ok(value->dwValueType == unicodeResults[i].valueType, - "Expected value type %d, got %d\n", unicodeResults[i].valueType, + "Expected value type %ld, got %ld\n", unicodeResults[i].valueType, value->dwValueType); ok(!wcsncmp((LPWSTR)value->Value.pbData, unicodeResults[i].str, value->Value.cbData / sizeof(WCHAR)), - "Unexpected decoded value for index %d (value type %d)\n", i, + "Unexpected decoded value for index %ld (value type %ld)\n", i, unicodeResults[i].valueType); LocalFree(buf); } @@ -2002,15 +2002,15 @@ static void test_encodeOctets(DWORD dwEncoding) blob.pbData = (BYTE*)tests[i].decoded; ret = pCryptEncodeObjectEx(dwEncoding, X509_OCTET_STRING, &blob, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %ld\n", GetLastError()); if (ret) { - ok(bufSize == tests[i].encoded_size, "[%u] buf size %u expected %u\n", + ok(bufSize == tests[i].encoded_size, "[%lu] buf size %lu expected %u\n", i, bufSize, tests[i].encoded_size); ok(buf[0] == 4, "Got unexpected type %d for octet string (expected 4)\n", buf[0]); - ok(buf[1] == tests[i].decoded_size, "[%u] Got length %d, expected %d\n", + ok(buf[1] == tests[i].decoded_size, "[%lu] Got length %d, expected %d\n", i, buf[1], tests[i].decoded_size); - ok(!memcmp(buf, tests[i].encoded, tests[i].encoded_size), "[%u] Got unexpected value\n", i); + ok(!memcmp(buf, tests[i].encoded, tests[i].encoded_size), "[%lu] Got unexpected value\n", i); LocalFree(buf); } } @@ -2078,19 +2078,19 @@ static void test_decodeOctets(DWORD dwEncoding) if (tests[i].error) { ok(!ret && GetLastError() == tests[i].error, - "[%u] CryptDecodeObjectEx returned %x(%x)\n", i, ret, GetLastError()); + "[%lu] CryptDecodeObjectEx returned %x(%lx)\n", i, ret, GetLastError()); continue; } - ok(ret, "[%u] CryptDecodeObjectEx failed: %08x\n", i, GetLastError()); + ok(ret, "[%lu] CryptDecodeObjectEx failed: %08lx\n", i, GetLastError()); ok(bufSize >= sizeof(CRYPT_DATA_BLOB) + tests[i].decoded_size, - "[%u] Expected size >= %d, got %d\n", i, + "[%lu] Expected size >= %d, got %ld\n", i, (int)sizeof(CRYPT_DATA_BLOB) + tests[i].decoded_size, bufSize); ok(buf != NULL, "Expected allocated buffer\n"); if (ret) { CRYPT_DATA_BLOB *blob = (CRYPT_DATA_BLOB *)buf;
- ok (blob->cbData == tests[i].decoded_size, "[%u] cbData = %u\n", i, blob->cbData); + ok (blob->cbData == tests[i].decoded_size, "[%lu] cbData = %lu\n", i, blob->cbData); if (blob->cbData) ok(!memcmp(blob->pbData, tests[i].decoded, blob->cbData), "Unexpected value\n"); @@ -2140,14 +2140,14 @@ static void test_encodeBits(DWORD dwEncoding) blob.cUnusedBits = bits[i].cUnusedBits; ret = pCryptEncodeObjectEx(dwEncoding, X509_BITS, &blob, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(bufSize == bits[i].encoded[1] + 2, - "%d: Got unexpected size %d, expected %d\n", i, bufSize, + "%ld: Got unexpected size %ld, expected %d\n", i, bufSize, bits[i].encoded[1] + 2); ok(!memcmp(buf, bits[i].encoded, bits[i].encoded[1] + 2), - "%d: Unexpected value\n", i); + "%ld: Unexpected value\n", i); LocalFree(buf); } } @@ -2168,16 +2168,16 @@ static void test_decodeBits(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_BITS, bits[i].encoded, bits[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRYPT_BIT_BLOB *blob;
ok(bufSize >= sizeof(CRYPT_BIT_BLOB) + bits[i].cbDecoded, - "Got unexpected size %d\n", bufSize); + "Got unexpected size %ld\n", bufSize); blob = (CRYPT_BIT_BLOB *)buf; ok(blob->cbData == bits[i].cbDecoded, - "Got unexpected length %d, expected %d\n", blob->cbData, + "Got unexpected length %ld, expected %ld\n", blob->cbData, bits[i].cbDecoded); if (blob->cbData && bits[i].cbDecoded) ok(!memcmp(blob->pbData, bits[i].decoded, bits[i].cbDecoded), @@ -2190,16 +2190,16 @@ static void test_decodeBits(DWORD dwEncoding) */ ret = pCryptDecodeObjectEx(dwEncoding, X509_BITS, ber, ber[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRYPT_BIT_BLOB *blob;
ok(bufSize >= sizeof(CRYPT_BIT_BLOB) + sizeof(berDecoded), - "Got unexpected size %d\n", bufSize); + "Got unexpected size %ld\n", bufSize); blob = (CRYPT_BIT_BLOB *)buf; ok(blob->cbData == sizeof(berDecoded), - "Got unexpected length %d\n", blob->cbData); + "Got unexpected length %ld\n", blob->cbData); if (blob->cbData) ok(*blob->pbData == berDecoded, "Unexpected value\n"); LocalFree(buf); @@ -2255,11 +2255,11 @@ static void test_encodeBasicConstraints(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS2, &constraints2[i].info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(bufSize == constraints2[i].encoded[1] + 2, - "Expected %d bytes, got %d\n", constraints2[i].encoded[1] + 2, + "Expected %d bytes, got %ld\n", constraints2[i].encoded[1] + 2, bufSize); ok(!memcmp(buf, constraints2[i].encoded, constraints2[i].encoded[1] + 2), "Unexpected value\n"); @@ -2273,10 +2273,10 @@ static void test_encodeBasicConstraints(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(bufSize == sizeof(emptyConstraint), "Wrong size %d\n", bufSize); + ok(bufSize == sizeof(emptyConstraint), "Wrong size %ld\n", bufSize); ok(!memcmp(buf, emptyConstraint, sizeof(emptyConstraint)), "Unexpected value\n"); LocalFree(buf); @@ -2289,10 +2289,10 @@ static void test_encodeBasicConstraints(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(bufSize == sizeof(constraintWithDomainName), "Wrong size %d\n", bufSize); + ok(bufSize == sizeof(constraintWithDomainName), "Wrong size %ld\n", bufSize); ok(!memcmp(buf, constraintWithDomainName, sizeof(constraintWithDomainName)), "Unexpected value\n"); LocalFree(buf); @@ -2318,7 +2318,7 @@ static void test_decodeBasicConstraints(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS2, constraints2[i].encoded, constraints2[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed for item %d: %08x\n", i, + ok(ret, "CryptDecodeObjectEx failed for item %ld: %08lx\n", i, GetLastError()); if (ret) { @@ -2326,7 +2326,7 @@ static void test_decodeBasicConstraints(DWORD dwEncoding) (CERT_BASIC_CONSTRAINTS2_INFO *)buf;
ok(!memcmp(info, &constraints2[i].info, sizeof(*info)), - "Unexpected value for item %d\n", i); + "Unexpected value for item %ld\n", i); LocalFree(buf); } } @@ -2337,14 +2337,14 @@ static void test_decodeBasicConstraints(DWORD dwEncoding) &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GetLastError()); ok(!buf, "Expected buf to be set to NULL\n"); /* Check with a non-DER bool */ ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS2, badBool.encoded, badBool.encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_BASIC_CONSTRAINTS2_INFO *info = @@ -2359,13 +2359,13 @@ static void test_decodeBasicConstraints(DWORD dwEncoding) CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GetLastError()); /* Now check with the more complex CERT_BASIC_CONSTRAINTS_INFO */ ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, emptyConstraint, sizeof(emptyConstraint), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_BASIC_CONSTRAINTS_INFO *info = (CERT_BASIC_CONSTRAINTS_INFO *)buf; @@ -2378,7 +2378,7 @@ static void test_decodeBasicConstraints(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, constraintWithDomainName, sizeof(constraintWithDomainName), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_BASIC_CONSTRAINTS_INFO *info = (CERT_BASIC_CONSTRAINTS_INFO *)buf; @@ -2389,7 +2389,7 @@ static void test_decodeBasicConstraints(DWORD dwEncoding) if (info->cSubtreesConstraint && info->rgSubtreesConstraint) { ok(info->rgSubtreesConstraint[0].cbData == - sizeof(encodedDomainName), "Wrong size %d\n", + sizeof(encodedDomainName), "Wrong size %ld\n", info->rgSubtreesConstraint[0].cbData); ok(!memcmp(info->rgSubtreesConstraint[0].pbData, encodedDomainName, sizeof(encodedDomainName)), "Unexpected value\n"); @@ -2446,7 +2446,7 @@ static void test_encodeRsaPublicKey(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Now with a bogus reserved field */ hdr->bType = PUBLICKEYBLOB; hdr->reserved = 1; @@ -2455,7 +2455,7 @@ static void test_encodeRsaPublicKey(DWORD dwEncoding) if (ret) { ok(bufSize == rsaPubKeys[0].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[0].encoded[1] + 2, bufSize); + "Expected size %d, got %ld\n", rsaPubKeys[0].encoded[1] + 2, bufSize); ok(!memcmp(buf, rsaPubKeys[0].encoded, bufSize), "Unexpected value\n"); LocalFree(buf); } @@ -2467,7 +2467,7 @@ static void test_encodeRsaPublicKey(DWORD dwEncoding) if (ret) { ok(bufSize == rsaPubKeys[0].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[0].encoded[1] + 2, bufSize); + "Expected size %d, got %ld\n", rsaPubKeys[0].encoded[1] + 2, bufSize); ok(!memcmp(buf, rsaPubKeys[0].encoded, bufSize), "Unexpected value\n"); LocalFree(buf); } @@ -2479,7 +2479,7 @@ static void test_encodeRsaPublicKey(DWORD dwEncoding) if (ret) { ok(bufSize == rsaPubKeys[0].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[0].encoded[1] + 2, bufSize); + "Expected size %d, got %ld\n", rsaPubKeys[0].encoded[1] + 2, bufSize); ok(!memcmp(buf, rsaPubKeys[0].encoded, bufSize), "Unexpected value\n"); LocalFree(buf); } @@ -2488,11 +2488,11 @@ static void test_encodeRsaPublicKey(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, szOID_RSA_RSA, toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = pCryptEncodeObjectEx(dwEncoding, szOID_RSA_SHA1RSA, toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); /* Finally, all valid */ hdr->aiKeyAlg = CALG_RSA_KEYX; for (i = 0; i < ARRAY_SIZE(rsaPubKeys); i++) @@ -2501,11 +2501,11 @@ static void test_encodeRsaPublicKey(DWORD dwEncoding) rsaPubKeys[i].modulus, rsaPubKeys[i].modulusLen); ret = pCryptEncodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(bufSize == rsaPubKeys[i].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[i].encoded[1] + 2, + "Expected size %d, got %ld\n", rsaPubKeys[i].encoded[1] + 2, bufSize); ok(!memcmp(buf, rsaPubKeys[i].encoded, bufSize), "Unexpected value\n"); @@ -2527,19 +2527,19 @@ static void test_decodeRsaPublicKey(DWORD dwEncoding) CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_MORE_INPUT /* Win9x/NT4 */), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", + "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08lx\n", GetLastError()); /* Try with a couple of RSA-related OIDs */ ret = pCryptDecodeObjectEx(dwEncoding, szOID_RSA_RSA, rsaPubKeys[0].encoded, rsaPubKeys[0].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, szOID_RSA_SHA1RSA, rsaPubKeys[0].encoded, rsaPubKeys[0].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); /* Now try success cases */ for (i = 0; i < ARRAY_SIZE(rsaPubKeys); i++) { @@ -2547,7 +2547,7 @@ static void test_decodeRsaPublicKey(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, rsaPubKeys[i].encoded, rsaPubKeys[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { BLOBHEADER *hdr = (BLOBHEADER *)buf; @@ -2555,7 +2555,7 @@ static void test_decodeRsaPublicKey(DWORD dwEncoding)
ok(bufSize >= sizeof(BLOBHEADER) + sizeof(RSAPUBKEY) + rsaPubKeys[i].decodedModulusLen, - "Wrong size %d\n", bufSize); + "Wrong size %ld\n", bufSize); ok(hdr->bType == PUBLICKEYBLOB, "Expected type PUBLICKEYBLOB (%d), got %d\n", PUBLICKEYBLOB, hdr->bType); @@ -2567,10 +2567,10 @@ static void test_decodeRsaPublicKey(DWORD dwEncoding) ok(hdr->aiKeyAlg == CALG_RSA_KEYX, "Expected CALG_RSA_KEYX, got %08x\n", hdr->aiKeyAlg); ok(rsaPubKey->magic == 0x31415352, - "Expected magic RSA1, got %08x\n", rsaPubKey->magic); + "Expected magic RSA1, got %08lx\n", rsaPubKey->magic); ok(rsaPubKey->bitlen == rsaPubKeys[i].decodedModulusLen * 8, - "Wrong bit len %d\n", rsaPubKey->bitlen); - ok(rsaPubKey->pubexp == 65537, "Expected pubexp 65537, got %d\n", + "Wrong bit len %ld\n", rsaPubKey->bitlen); + ok(rsaPubKey->pubexp == 65537, "Expected pubexp 65537, got %ld\n", rsaPubKey->pubexp); ok(!memcmp(buf + sizeof(BLOBHEADER) + sizeof(RSAPUBKEY), rsaPubKeys[i].modulus, rsaPubKeys[i].decodedModulusLen), @@ -2606,7 +2606,7 @@ static void test_encodeRsaPublicKey_Bcrypt(DWORD dwEncoding)
ret = pCryptEncodeObjectEx(dwEncoding, CNG_RSA_PUBLIC_KEY_BLOB, toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
/* Finally, all valid */ hdr->Magic = BCRYPT_RSAPUBLIC_MAGIC; @@ -2620,11 +2620,11 @@ static void test_encodeRsaPublicKey_Bcrypt(DWORD dwEncoding)
ret = pCryptEncodeObjectEx(dwEncoding, CNG_RSA_PUBLIC_KEY_BLOB, toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(bufSize == rsaPubKeys[i].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[i].encoded[1] + 2, + "Expected size %d, got %ld\n", rsaPubKeys[i].encoded[1] + 2, bufSize); ok(!memcmp(buf, rsaPubKeys[i].encoded, bufSize), "Unexpected value\n"); @@ -2647,7 +2647,7 @@ static void test_decodeRsaPublicKey_Bcrypt(DWORD dwEncoding) CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_MORE_INPUT /* Win9x/NT4 */), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", + "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08lx\n", GetLastError()); /* Now try success cases */ for (i = 0; i < ARRAY_SIZE(rsaPubKeys); i++) @@ -2656,7 +2656,7 @@ static void test_decodeRsaPublicKey_Bcrypt(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, CNG_RSA_PUBLIC_KEY_BLOB, rsaPubKeys[i].encoded, rsaPubKeys[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { BCRYPT_RSAKEY_BLOB *hdr = (BCRYPT_RSAKEY_BLOB *)buf; @@ -2667,20 +2667,20 @@ static void test_decodeRsaPublicKey_Bcrypt(DWORD dwEncoding) CRYPT_CopyReversed((BYTE *)&pubexp, buf + sizeof(BCRYPT_RSAKEY_BLOB), hdr->cbPublicExp); ok(bufSize >= sizeof(BCRYPT_RSAKEY_BLOB) + rsaPubKeys[i].decodedModulusLen, - "Wrong size %d\n", bufSize); + "Wrong size %ld\n", bufSize); ok(hdr->Magic == BCRYPT_RSAPUBLIC_MAGIC, - "Expected magic BCRYPT_RSAPUBLIC_MAGIC (%d), got %d\n", BCRYPT_RSAPUBLIC_MAGIC, + "Expected magic BCRYPT_RSAPUBLIC_MAGIC (%d), got %ld\n", BCRYPT_RSAPUBLIC_MAGIC, hdr->Magic); ok(hdr->BitLength == rsaPubKeys[i].decodedModulusLen * 8, - "Wrong bit len %d\n", hdr->BitLength); + "Wrong bit len %ld\n", hdr->BitLength); /* Windows decodes the exponent to 3 bytes, since it will fit. * Our implementation currently unconditionally decodes to a DWORD (4 bytes) */ - todo_wine ok(hdr->cbPublicExp == 3, "Expected cbPublicExp 3, got %d\n", hdr->cbPublicExp); + todo_wine ok(hdr->cbPublicExp == 3, "Expected cbPublicExp 3, got %ld\n", hdr->cbPublicExp); ok(hdr->cbModulus == rsaPubKeys[i].decodedModulusLen, - "Wrong modulus len %d\n", hdr->cbModulus); - ok(hdr->cbPrime1 == 0,"Wrong cbPrime1 %d\n", hdr->cbPrime1); - ok(hdr->cbPrime2 == 0,"Wrong cbPrime2 %d\n", hdr->cbPrime2); + "Wrong modulus len %ld\n", hdr->cbModulus); + ok(hdr->cbPrime1 == 0,"Wrong cbPrime1 %ld\n", hdr->cbPrime1); + ok(hdr->cbPrime2 == 0,"Wrong cbPrime2 %ld\n", hdr->cbPrime2); ok(!memcmp(pubexp, pubexp_expected, sizeof(pubexp_expected)), "Wrong exponent\n"); todo_wine ok(pubexp[3] == 0xff, "Got %02x\n", pubexp[3]);
@@ -2729,10 +2729,10 @@ static void test_encodeSequenceOfAny(DWORD dwEncoding)
ret = pCryptEncodeObjectEx(dwEncoding, X509_SEQUENCE_OF_ANY, &seq, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(bufSize == sizeof(intSequence), "Wrong size %d\n", bufSize); + ok(bufSize == sizeof(intSequence), "Wrong size %ld\n", bufSize); ok(!memcmp(buf, intSequence, intSequence[1] + 2), "Unexpected value\n"); LocalFree(buf); } @@ -2743,10 +2743,10 @@ static void test_encodeSequenceOfAny(DWORD dwEncoding) blobs[0].pbData = (BYTE *)times[0].encodedTime; ret = pCryptEncodeObjectEx(dwEncoding, X509_SEQUENCE_OF_ANY, &seq, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(bufSize == sizeof(mixedSequence), "Wrong size %d\n", bufSize); + ok(bufSize == sizeof(mixedSequence), "Wrong size %ld\n", bufSize); ok(!memcmp(buf, mixedSequence, mixedSequence[1] + 2), "Unexpected value\n"); LocalFree(buf); @@ -2761,17 +2761,17 @@ static void test_decodeSequenceOfAny(DWORD dwEncoding)
ret = pCryptDecodeObjectEx(dwEncoding, X509_SEQUENCE_OF_ANY, intSequence, intSequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRYPT_SEQUENCE_OF_ANY *seq = (CRYPT_SEQUENCE_OF_ANY *)buf; DWORD i;
- ok(seq->cValue == ARRAY_SIZE(ints), "Wrong elements %d\n", seq->cValue); + ok(seq->cValue == ARRAY_SIZE(ints), "Wrong elements %ld\n", seq->cValue); for (i = 0; i < min(seq->cValue, ARRAY_SIZE(ints)); i++) { ok(seq->rgValue[i].cbData == ints[i].encoded[1] + 2, - "Expected %d bytes, got %d\n", ints[i].encoded[1] + 2, + "Expected %d bytes, got %ld\n", ints[i].encoded[1] + 2, seq->rgValue[i].cbData); ok(!memcmp(seq->rgValue[i].pbData, ints[i].encoded, ints[i].encoded[1] + 2), "Unexpected value\n"); @@ -2781,15 +2781,15 @@ static void test_decodeSequenceOfAny(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_SEQUENCE_OF_ANY, mixedSequence, mixedSequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRYPT_SEQUENCE_OF_ANY *seq = (CRYPT_SEQUENCE_OF_ANY *)buf;
- ok(seq->cValue == ARRAY_SIZE(ints), "Wrong elements %d\n", seq->cValue); + ok(seq->cValue == ARRAY_SIZE(ints), "Wrong elements %ld\n", seq->cValue); /* Just check the first element since it's all that changed */ ok(seq->rgValue[0].cbData == times[0].encodedTime[1] + 2, - "Expected %d bytes, got %d\n", times[0].encodedTime[1] + 2, + "Expected %d bytes, got %ld\n", times[0].encodedTime[1] + 2, seq->rgValue[0].cbData); ok(!memcmp(seq->rgValue[0].pbData, times[0].encodedTime, times[0].encodedTime[1] + 2), "Unexpected value\n"); @@ -2840,11 +2840,11 @@ static void test_encodeExtensions(DWORD dwEncoding)
ret = pCryptEncodeObjectEx(dwEncoding, X509_EXTENSIONS, &exts[i].exts, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(bufSize == exts[i].encoded[1] + 2, - "Expected %d bytes, got %d\n", exts[i].encoded[1] + 2, bufSize); + "Expected %d bytes, got %ld\n", exts[i].encoded[1] + 2, bufSize); ok(!memcmp(buf, exts[i].encoded, exts[i].encoded[1] + 2), "Unexpected value\n"); LocalFree(buf); @@ -2865,14 +2865,14 @@ static void test_decodeExtensions(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_EXTENSIONS, exts[i].encoded, exts[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_EXTENSIONS *ext = (CERT_EXTENSIONS *)buf; DWORD j;
ok(ext->cExtension == exts[i].exts.cExtension, - "Expected %d extensions, see %d\n", exts[i].exts.cExtension, + "Expected %ld extensions, see %ld\n", exts[i].exts.cExtension, ext->cExtension); for (j = 0; j < min(ext->cExtension, exts[i].exts.cExtension); j++) { @@ -2890,13 +2890,13 @@ static void test_decodeExtensions(DWORD dwEncoding) } ret = pCryptDecodeObjectEx(dwEncoding, X509_EXTENSIONS, exts[i].encoded, exts[i].encoded[1] + 2, 0, NULL, NULL, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bufSize); if (buf) { ret = pCryptDecodeObjectEx(dwEncoding, X509_EXTENSIONS, exts[i].encoded, exts[i].encoded[1] + 2, 0, NULL, buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, buf); } } @@ -2980,11 +2980,11 @@ static void test_encodePublicKeyInfo(DWORD dwEncoding) &pubKeys[i].info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(bufSize == pubKeys[i].encoded[1] + 2, - "Expected %d bytes, got %d\n", pubKeys[i].encoded[1] + 2, bufSize); + "Expected %d bytes, got %ld\n", pubKeys[i].encoded[1] + 2, bufSize); if (bufSize == pubKeys[i].encoded[1] + 2) ok(!memcmp(buf, pubKeys[i].encoded, pubKeys[i].encoded[1] + 2), "Unexpected value\n"); @@ -3001,14 +3001,14 @@ static void comparePublicKeyInfo(const CERT_PUBLIC_KEY_INFO *expected, got->Algorithm.pszObjId); ok(expected->Algorithm.Parameters.cbData == got->Algorithm.Parameters.cbData, - "Expected parameters of %d bytes, got %d\n", + "Expected parameters of %ld bytes, got %ld\n", expected->Algorithm.Parameters.cbData, got->Algorithm.Parameters.cbData); if (expected->Algorithm.Parameters.cbData) ok(!memcmp(expected->Algorithm.Parameters.pbData, got->Algorithm.Parameters.pbData, got->Algorithm.Parameters.cbData), "Unexpected algorithm parameters\n"); ok(expected->PublicKey.cbData == got->PublicKey.cbData, - "Expected public key of %d bytes, got %d\n", + "Expected public key of %ld bytes, got %ld\n", expected->PublicKey.cbData, got->PublicKey.cbData); if (expected->PublicKey.cbData) ok(!memcmp(expected->PublicKey.pbData, got->PublicKey.pbData, @@ -3032,7 +3032,7 @@ static void test_decodePublicKeyInfo(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_PUBLIC_KEY_INFO, pubKeys[i].encoded, pubKeys[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { comparePublicKeyInfo(&pubKeys[i].decoded, @@ -3043,7 +3043,7 @@ static void test_decodePublicKeyInfo(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_PUBLIC_KEY_INFO, pubKeys[i].encodedNoNull, pubKeys[i].encodedNoNull[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { comparePublicKeyInfo(&pubKeys[i].info, (CERT_PUBLIC_KEY_INFO *)buf); @@ -3056,7 +3056,7 @@ static void test_decodePublicKeyInfo(DWORD dwEncoding) NULL, &buf, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GetLastError()); }
@@ -3185,16 +3185,16 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, NULL, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* Test with a V1 cert */ ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == v1Cert[1] + 2, "Expected size %d, got %d\n", + ok(size == v1Cert[1] + 2, "Expected size %d, got %ld\n", v1Cert[1] + 2, size); ok(!memcmp(buf, v1Cert, size), "Got unexpected value\n"); LocalFree(buf); @@ -3204,10 +3204,10 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v2Cert), "Wrong size %d\n", size); + ok(size == sizeof(v2Cert), "Wrong size %ld\n", size); ok(!memcmp(buf, v2Cert, size), "Got unexpected value\n"); LocalFree(buf); } @@ -3216,10 +3216,10 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v3Cert), "Wrong size %d\n", size); + ok(size == sizeof(v3Cert), "Wrong size %ld\n", size); ok(!memcmp(buf, v3Cert, size), "Got unexpected value\n"); LocalFree(buf); } @@ -3229,7 +3229,7 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(v4Cert), "Wrong size %d\n", size); + ok(size == sizeof(v4Cert), "Wrong size %ld\n", size); ok(!memcmp(buf, v4Cert, size), "Unexpected value\n"); LocalFree(buf); } @@ -3242,10 +3242,10 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v1CertWithConstraints), "Wrong size %d\n", size); + ok(size == sizeof(v1CertWithConstraints), "Wrong size %ld\n", size); ok(!memcmp(buf, v1CertWithConstraints, size), "Got unexpected value\n"); LocalFree(buf); } @@ -3256,7 +3256,7 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(v1CertWithSerial), "Wrong size %d\n", size); + ok(size == sizeof(v1CertWithSerial), "Wrong size %ld\n", size); ok(!memcmp(buf, v1CertWithSerial, size), "Got unexpected value\n"); LocalFree(buf); } @@ -3268,10 +3268,10 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == OSS_BAD_PTR /* Win98 */), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v1CertWithIssuerUniqueId), "Wrong size %d\n", size); + ok(size == sizeof(v1CertWithIssuerUniqueId), "Wrong size %ld\n", size); ok(!memcmp(buf, v1CertWithIssuerUniqueId, size), "Got unexpected value\n"); LocalFree(buf); @@ -3289,7 +3289,7 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(bigCert), "Wrong size %d\n", size); + ok(size == sizeof(bigCert), "Wrong size %ld\n", size); ok(!memcmp(buf, bigCert, size), "Got unexpected value\n"); LocalFree(buf); } @@ -3302,7 +3302,7 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) if (ret) { ok(size == sizeof(v1CertWithPubKey) || - size == sizeof(v1CertWithPubKeyNoNull), "Wrong size %d\n", size); + size == sizeof(v1CertWithPubKeyNoNull), "Wrong size %ld\n", size); if (size == sizeof(v1CertWithPubKey)) ok(!memcmp(buf, v1CertWithPubKey, size), "Got unexpected value\n"); else if (size == sizeof(v1CertWithPubKeyNoNull)) @@ -3315,12 +3315,12 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) info.IssuerUniqueId.pbData = (BYTE *)serialNum; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueId) || size == sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueIdNoNull), - "Wrong size %d\n", size); + "Wrong size %ld\n", size); if (size == sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueId)) ok(!memcmp(buf, v1CertWithSubjectIssuerSerialAndIssuerUniqueId, size), "unexpected value\n"); @@ -3347,7 +3347,7 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(v1CertWithSubjectKeyId), "Wrong size %d\n", size); + ok(size == sizeof(v1CertWithSubjectKeyId), "Wrong size %ld\n", size); ok(!memcmp(buf, v1CertWithSubjectKeyId, size), "Unexpected value\n"); LocalFree(buf); } @@ -3366,14 +3366,14 @@ static void test_decodeCertToBeSigned(DWORD dwEncoding) CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG /* Win9x */), - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08lx\n", GetLastError()); if (0) { /* Crashes on win9x */ ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, NULL, 1, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* The following certs all fail with CRYPT_E_ASN1_CORRUPT or * CRYPT_E_ASN1_BADTAG, because at a minimum a cert must have a non-zero @@ -3392,15 +3392,15 @@ static void test_decodeCertToBeSigned(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, v1CertWithSubjectKeyId, sizeof(v1CertWithSubjectKeyId), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_INFO *info = (CERT_INFO *)buf;
- ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); - ok(info->dwVersion == CERT_V1, "expected CERT_V1, got %d\n", + ok(size >= sizeof(CERT_INFO), "Wrong size %ld\n", size); + ok(info->dwVersion == CERT_V1, "expected CERT_V1, got %ld\n", info->dwVersion); - ok(info->cExtension == 1, "expected 1 extension, got %d\n", + ok(info->cExtension == 1, "expected 1 extension, got %ld\n", info->cExtension); LocalFree(buf); } @@ -3411,16 +3411,16 @@ static void test_decodeCertToBeSigned(DWORD dwEncoding) v1CertWithSubjectIssuerSerialAndIssuerUniqueId, sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueId), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_INFO *info = (CERT_INFO *)buf;
- ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); - ok(info->dwVersion == CERT_V1, "expected CERT_V1, got %d\n", + ok(size >= sizeof(CERT_INFO), "Wrong size %ld\n", size); + ok(info->dwVersion == CERT_V1, "expected CERT_V1, got %ld\n", info->dwVersion); ok(info->IssuerUniqueId.cbData == sizeof(serialNum), - "unexpected issuer unique id size %d\n", info->IssuerUniqueId.cbData); + "unexpected issuer unique id size %ld\n", info->IssuerUniqueId.cbData); ok(!memcmp(info->IssuerUniqueId.pbData, serialNum, sizeof(serialNum)), "unexpected issuer unique id value\n"); LocalFree(buf); @@ -3428,23 +3428,23 @@ static void test_decodeCertToBeSigned(DWORD dwEncoding) /* Now check with serial number, subject and issuer specified */ ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, bigCert, sizeof(bigCert), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_INFO *info = (CERT_INFO *)buf;
- ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); + ok(size >= sizeof(CERT_INFO), "Wrong size %ld\n", size); ok(info->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", info->SerialNumber.cbData); + "Expected serial number size 1, got %ld\n", info->SerialNumber.cbData); ok(*info->SerialNumber.pbData == *serialNum, "Expected serial number %d, got %d\n", *serialNum, *info->SerialNumber.pbData); ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Issuer.cbData); + "Wrong size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), "Unexpected issuer\n"); ok(info->Subject.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Subject.cbData); + "Wrong size %ld\n", info->Subject.cbData); ok(!memcmp(info->Subject.pbData, encodedCommonName, info->Subject.cbData), "Unexpected subject\n"); LocalFree(buf); @@ -3453,30 +3453,30 @@ static void test_decodeCertToBeSigned(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, v1CertWithPubKey, sizeof(v1CertWithPubKey), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_INFO *info = (CERT_INFO *)buf;
- ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); + ok(size >= sizeof(CERT_INFO), "Wrong size %ld\n", size); ok(info->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", info->SerialNumber.cbData); + "Expected serial number size 1, got %ld\n", info->SerialNumber.cbData); ok(*info->SerialNumber.pbData == *serialNum, "Expected serial number %d, got %d\n", *serialNum, *info->SerialNumber.pbData); ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Issuer.cbData); + "Wrong size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), "Unexpected issuer\n"); ok(info->Subject.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Subject.cbData); + "Wrong size %ld\n", info->Subject.cbData); ok(!memcmp(info->Subject.pbData, encodedCommonName, info->Subject.cbData), "Unexpected subject\n"); ok(!strcmp(info->SubjectPublicKeyInfo.Algorithm.pszObjId, szOID_RSA_RSA), "Expected szOID_RSA_RSA, got %s\n", info->SubjectPublicKeyInfo.Algorithm.pszObjId); ok(info->SubjectPublicKeyInfo.PublicKey.cbData == sizeof(aKey), - "Wrong size %d\n", info->SubjectPublicKeyInfo.PublicKey.cbData); + "Wrong size %ld\n", info->SubjectPublicKeyInfo.PublicKey.cbData); ok(!memcmp(info->SubjectPublicKeyInfo.PublicKey.pbData, aKey, sizeof(aKey)), "Unexpected public key\n"); LocalFree(buf); @@ -3572,10 +3572,10 @@ static void test_encodeCert(DWORD dwEncoding)
ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(bufSize == sizeof(signedBigCert), "Wrong size %d\n", bufSize); + ok(bufSize == sizeof(signedBigCert), "Wrong size %ld\n", bufSize); ok(!memcmp(buf, signedBigCert, bufSize), "Unexpected cert\n"); LocalFree(buf); } @@ -3589,17 +3589,17 @@ static void test_decodeCert(DWORD dwEncoding)
ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT, signedBigCert, sizeof(signedBigCert), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_SIGNED_CONTENT_INFO *info = (CERT_SIGNED_CONTENT_INFO *)buf;
ok(info->ToBeSigned.cbData == sizeof(bigCert), - "Wrong cert size %d\n", info->ToBeSigned.cbData); + "Wrong cert size %ld\n", info->ToBeSigned.cbData); ok(!memcmp(info->ToBeSigned.pbData, bigCert, info->ToBeSigned.cbData), "Unexpected cert\n"); ok(info->Signature.cbData == sizeof(hash), - "Wrong signature size %d\n", info->Signature.cbData); + "Wrong signature size %ld\n", info->Signature.cbData); ok(!memcmp(info->Signature.pbData, hash, info->Signature.cbData), "Unexpected signature\n"); LocalFree(buf); @@ -3607,46 +3607,46 @@ static void test_decodeCert(DWORD dwEncoding) /* A signed cert decodes as a CERT_INFO too */ ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, signedBigCert, sizeof(signedBigCert), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_INFO *info = (CERT_INFO *)buf;
- ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); + ok(size >= sizeof(CERT_INFO), "Wrong size %ld\n", size); ok(info->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", info->SerialNumber.cbData); + "Expected serial number size 1, got %ld\n", info->SerialNumber.cbData); ok(*info->SerialNumber.pbData == *serialNum, "Expected serial number %d, got %d\n", *serialNum, *info->SerialNumber.pbData); ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Issuer.cbData); + "Wrong size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), "Unexpected issuer\n"); ok(info->Subject.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Subject.cbData); + "Wrong size %ld\n", info->Subject.cbData); ok(!memcmp(info->Subject.pbData, encodedCommonName, info->Subject.cbData), "Unexpected subject\n"); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, signedBigCertWithIndefiniteSeq, sizeof(signedBigCertWithIndefiniteSeq), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_INFO *info = (CERT_INFO *)buf;
- ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); + ok(size >= sizeof(CERT_INFO), "Wrong size %ld\n", size); ok(info->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", info->SerialNumber.cbData); + "Expected serial number size 1, got %ld\n", info->SerialNumber.cbData); ok(*info->SerialNumber.pbData == *serialNum, "Expected serial number %d, got %d\n", *serialNum, *info->SerialNumber.pbData); ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Issuer.cbData); + "Wrong size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), "Unexpected issuer\n"); ok(info->Subject.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Subject.cbData); + "Wrong size %ld\n", info->Subject.cbData); ok(!memcmp(info->Subject.pbData, encodedCommonName, info->Subject.cbData), "Unexpected subject\n"); LocalFree(buf); @@ -3683,16 +3683,16 @@ static void test_encodeCRLDistPoints(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Test with one empty dist point */ info.cDistPoint = 1; info.rgDistPoint = &point; ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptyDistPoint), "Wrong size %d\n", size); + ok(size == sizeof(emptyDistPoint), "Wrong size %ld\n", size); ok(!memcmp(buf, emptyDistPoint, size), "Unexpected value\n"); LocalFree(buf); } @@ -3705,19 +3705,19 @@ static void test_encodeCRLDistPoints(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_IA5_STRING, - "Expected CRYPT_E_INVALID_IA5_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_IA5_STRING, got %08lx\n", GetLastError()); /* The first invalid character is at index 7 */ ok(GET_CERT_ALT_NAME_VALUE_ERR_INDEX(size) == 7, - "Expected invalid char at index 7, got %d\n", + "Expected invalid char at index 7, got %ld\n", GET_CERT_ALT_NAME_VALUE_ERR_INDEX(size)); /* A dist point with (just) a valid name */ U(entry).pwszURL = (LPWSTR)url; ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(distPointWithUrl), "Wrong size %d\n", size); + ok(size == sizeof(distPointWithUrl), "Wrong size %ld\n", size); ok(!memcmp(buf, distPointWithUrl, size), "Unexpected value\n"); LocalFree(buf); } @@ -3727,10 +3727,10 @@ static void test_encodeCRLDistPoints(DWORD dwEncoding) point.ReasonFlags.pbData = (LPBYTE)&crlReason; ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(distPointWithReason), "Wrong size %d\n", size); + ok(size == sizeof(distPointWithReason), "Wrong size %ld\n", size); ok(!memcmp(buf, distPointWithReason, size), "Unexpected value\n"); LocalFree(buf); } @@ -3740,10 +3740,10 @@ static void test_encodeCRLDistPoints(DWORD dwEncoding) point.CRLIssuer.rgAltEntry = &entry; ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(distPointWithIssuer), "Wrong size %d\n", size); + ok(size == sizeof(distPointWithIssuer), "Wrong size %ld\n", size); ok(!memcmp(buf, distPointWithIssuer, size), "Unexpected value\n"); LocalFree(buf); } @@ -3751,11 +3751,11 @@ static void test_encodeCRLDistPoints(DWORD dwEncoding) point.DistPointName.dwDistPointNameChoice = CRL_DIST_POINT_FULL_NAME; ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(distPointWithUrlAndIssuer), - "Wrong size %d\n", size); + "Wrong size %ld\n", size); ok(!memcmp(buf, distPointWithUrlAndIssuer, size), "Unexpected value\n"); LocalFree(buf); } @@ -3773,17 +3773,17 @@ static void test_decodeCRLDistPoints(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, emptyDistPoint, emptyDistPoint[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (PCRL_DIST_POINTS_INFO)buf; ok(size >= sizeof(CRL_DIST_POINTS_INFO) + sizeof(CRL_DIST_POINT), - "Wrong size %d\n", size); - ok(info->cDistPoint == 1, "Expected 1 dist points, got %d\n", + "Wrong size %ld\n", size); + ok(info->cDistPoint == 1, "Expected 1 dist points, got %ld\n", info->cDistPoint); point = info->rgDistPoint; ok(point->DistPointName.dwDistPointNameChoice == CRL_DIST_POINT_NO_NAME, - "Expected CRL_DIST_POINT_NO_NAME, got %d\n", + "Expected CRL_DIST_POINT_NO_NAME, got %ld\n", point->DistPointName.dwDistPointNameChoice); ok(point->ReasonFlags.cbData == 0, "Expected no reason\n"); ok(point->CRLIssuer.cAltEntry == 0, "Expected no issuer\n"); @@ -3792,25 +3792,25 @@ static void test_decodeCRLDistPoints(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, distPointWithUrl, distPointWithUrl[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (PCRL_DIST_POINTS_INFO)buf; ok(size >= sizeof(CRL_DIST_POINTS_INFO) + sizeof(CRL_DIST_POINT), - "Wrong size %d\n", size); - ok(info->cDistPoint == 1, "Expected 1 dist points, got %d\n", + "Wrong size %ld\n", size); + ok(info->cDistPoint == 1, "Expected 1 dist points, got %ld\n", info->cDistPoint); point = info->rgDistPoint; ok(point->DistPointName.dwDistPointNameChoice == CRL_DIST_POINT_FULL_NAME, - "Expected CRL_DIST_POINT_FULL_NAME, got %d\n", + "Expected CRL_DIST_POINT_FULL_NAME, got %ld\n", point->DistPointName.dwDistPointNameChoice); ok(U(point->DistPointName).FullName.cAltEntry == 1, - "Expected 1 name entry, got %d\n", + "Expected 1 name entry, got %ld\n", U(point->DistPointName).FullName.cAltEntry); entry = U(point->DistPointName).FullName.rgAltEntry; ok(entry->dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", entry->dwAltNameChoice); + "Expected CERT_ALT_NAME_URL, got %ld\n", entry->dwAltNameChoice); ok(!lstrcmpW(U(*entry).pwszURL, url), "Unexpected name\n"); ok(point->ReasonFlags.cbData == 0, "Expected no reason\n"); ok(point->CRLIssuer.cAltEntry == 0, "Expected no issuer\n"); @@ -3819,18 +3819,18 @@ static void test_decodeCRLDistPoints(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, distPointWithReason, distPointWithReason[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (PCRL_DIST_POINTS_INFO)buf; ok(size >= sizeof(CRL_DIST_POINTS_INFO) + sizeof(CRL_DIST_POINT), - "Wrong size %d\n", size); - ok(info->cDistPoint == 1, "Expected 1 dist points, got %d\n", + "Wrong size %ld\n", size); + ok(info->cDistPoint == 1, "Expected 1 dist points, got %ld\n", info->cDistPoint); point = info->rgDistPoint; ok(point->DistPointName.dwDistPointNameChoice == CRL_DIST_POINT_NO_NAME, - "Expected CRL_DIST_POINT_NO_NAME, got %d\n", + "Expected CRL_DIST_POINT_NO_NAME, got %ld\n", point->DistPointName.dwDistPointNameChoice); ok(point->ReasonFlags.cbData == sizeof(crlReason), "Expected reason length\n"); @@ -3842,46 +3842,46 @@ static void test_decodeCRLDistPoints(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, distPointWithUrlAndIssuer, distPointWithUrlAndIssuer[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { info = (PCRL_DIST_POINTS_INFO)buf; ok(size >= sizeof(CRL_DIST_POINTS_INFO) + sizeof(CRL_DIST_POINT), - "Wrong size %d\n", size); - ok(info->cDistPoint == 1, "Expected 1 dist points, got %d\n", + "Wrong size %ld\n", size); + ok(info->cDistPoint == 1, "Expected 1 dist points, got %ld\n", info->cDistPoint); point = info->rgDistPoint; ok(point->DistPointName.dwDistPointNameChoice == CRL_DIST_POINT_FULL_NAME, - "Expected CRL_DIST_POINT_FULL_NAME, got %d\n", + "Expected CRL_DIST_POINT_FULL_NAME, got %ld\n", point->DistPointName.dwDistPointNameChoice); ok(U(point->DistPointName).FullName.cAltEntry == 1, - "Expected 1 name entry, got %d\n", + "Expected 1 name entry, got %ld\n", U(point->DistPointName).FullName.cAltEntry); entry = U(point->DistPointName).FullName.rgAltEntry; ok(entry->dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", entry->dwAltNameChoice); + "Expected CERT_ALT_NAME_URL, got %ld\n", entry->dwAltNameChoice); ok(!lstrcmpW(U(*entry).pwszURL, url), "Unexpected name\n"); ok(point->ReasonFlags.cbData == 0, "Expected no reason\n"); ok(point->CRLIssuer.cAltEntry == 1, - "Expected 1 issuer entry, got %d\n", point->CRLIssuer.cAltEntry); + "Expected 1 issuer entry, got %ld\n", point->CRLIssuer.cAltEntry); entry = point->CRLIssuer.rgAltEntry; ok(entry->dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", entry->dwAltNameChoice); + "Expected CERT_ALT_NAME_URL, got %ld\n", entry->dwAltNameChoice); ok(!lstrcmpW(U(*entry).pwszURL, url), "Unexpected name\n"); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, distPointWithUrlAndIssuer, distPointWithUrlAndIssuer[1] + 2, 0, NULL, NULL, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if (buf) { ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, distPointWithUrlAndIssuer, distPointWithUrlAndIssuer[1] + 2, 0, NULL, buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, buf); } } @@ -3908,13 +3908,13 @@ static void test_encodeCRLIssuingDistPoint(DWORD dwEncoding) return; } ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptySequence), "Unexpected size %d\n", size); + ok(size == sizeof(emptySequence), "Unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); LocalFree(buf); } @@ -3923,10 +3923,10 @@ static void test_encodeCRLIssuingDistPoint(DWORD dwEncoding) point.fOnlyContainsCACerts = TRUE; ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(badFlagsIDP), "Unexpected size %d\n", size); + ok(size == sizeof(badFlagsIDP), "Unexpected size %ld\n", size); ok(!memcmp(buf, badFlagsIDP, size), "Unexpected value\n"); LocalFree(buf); } @@ -3936,16 +3936,16 @@ static void test_encodeCRLIssuingDistPoint(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* empty name */ point.DistPointName.dwDistPointNameChoice = CRL_DIST_POINT_FULL_NAME; U(point.DistPointName).FullName.cAltEntry = 0; ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptyNameIDP), "Unexpected size %d\n", size); + ok(size == sizeof(emptyNameIDP), "Unexpected size %ld\n", size); ok(!memcmp(buf, emptyNameIDP, size), "Unexpected value\n"); LocalFree(buf); } @@ -3956,10 +3956,10 @@ static void test_encodeCRLIssuingDistPoint(DWORD dwEncoding) U(point.DistPointName).FullName.rgAltEntry = &entry; ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(urlIDP), "Unexpected size %d\n", size); + ok(size == sizeof(urlIDP), "Unexpected size %ld\n", size); ok(!memcmp(buf, urlIDP, size), "Unexpected value\n"); LocalFree(buf); } @@ -3969,7 +3969,7 @@ static void compareAltNameEntry(const CERT_ALT_NAME_ENTRY *expected, const CERT_ALT_NAME_ENTRY *got) { ok(expected->dwAltNameChoice == got->dwAltNameChoice, - "Expected name choice %d, got %d\n", expected->dwAltNameChoice, + "Expected name choice %ld, got %ld\n", expected->dwAltNameChoice, got->dwAltNameChoice); if (expected->dwAltNameChoice == got->dwAltNameChoice) { @@ -3990,7 +3990,7 @@ static void compareAltNameEntry(const CERT_ALT_NAME_ENTRY *expected, case CERT_ALT_NAME_DIRECTORY_NAME: case CERT_ALT_NAME_IP_ADDRESS: ok(U(*got).IPAddress.cbData == U(*expected).IPAddress.cbData, - "Unexpected IP address length %d\n", U(*got).IPAddress.cbData); + "Unexpected IP address length %ld\n", U(*got).IPAddress.cbData); ok(!memcmp(U(*got).IPAddress.pbData, U(*expected).IPAddress.pbData, U(*got).IPAddress.cbData), "Unexpected value\n"); break; @@ -4003,7 +4003,7 @@ static void compareAltNameInfo(const CERT_ALT_NAME_INFO *expected, { DWORD i;
- ok(expected->cAltEntry == got->cAltEntry, "Expected %d entries, got %d\n", + ok(expected->cAltEntry == got->cAltEntry, "Expected %ld entries, got %ld\n", expected->cAltEntry, got->cAltEntry); for (i = 0; i < min(expected->cAltEntry, got->cAltEntry); i++) compareAltNameEntry(&expected->rgAltEntry[i], &got->rgAltEntry[i]); @@ -4013,7 +4013,7 @@ static void compareDistPointName(const CRL_DIST_POINT_NAME *expected, const CRL_DIST_POINT_NAME *got) { ok(got->dwDistPointNameChoice == expected->dwDistPointNameChoice, - "Unexpected name choice %d\n", got->dwDistPointNameChoice); + "Unexpected name choice %ld\n", got->dwDistPointNameChoice); if (got->dwDistPointNameChoice == CRL_DIST_POINT_FULL_NAME) compareAltNameInfo(&(U(*expected).FullName), &(U(*got).FullName)); } @@ -4047,7 +4047,7 @@ static void test_decodeCRLIssuingDistPoint(DWORD dwEncoding) skip("no X509_ISSUING_DIST_POINT decode support\n"); return; } - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCRLIssuingDistPoints(&point, (PCRL_ISSUING_DIST_POINT)buf); @@ -4056,7 +4056,7 @@ static void test_decodeCRLIssuingDistPoint(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, badFlagsIDP, badFlagsIDP[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { point.fOnlyContainsUserCerts = point.fOnlyContainsCACerts = TRUE; @@ -4066,7 +4066,7 @@ static void test_decodeCRLIssuingDistPoint(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, emptyNameIDP, emptyNameIDP[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { point.fOnlyContainsCACerts = point.fOnlyContainsUserCerts = FALSE; @@ -4077,7 +4077,7 @@ static void test_decodeCRLIssuingDistPoint(DWORD dwEncoding) } ret = pCryptDecodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, urlIDP, urlIDP[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_ALT_NAME_ENTRY entry; @@ -4148,10 +4148,10 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v1CRL), "Wrong size %d\n", size); + ok(size == sizeof(v1CRL), "Wrong size %ld\n", size); ok(!memcmp(buf, v1CRL, size), "Got unexpected value\n"); LocalFree(buf); } @@ -4160,10 +4160,10 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == v2CRL[1] + 2, "Expected size %d, got %d\n", + ok(size == v2CRL[1] + 2, "Expected size %d, got %ld\n", v2CRL[1] + 2, size); ok(!memcmp(buf, v2CRL, size), "Got unexpected value\n"); LocalFree(buf); @@ -4174,10 +4174,10 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) info.Issuer.pbData = (BYTE *)encodedCommonName; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v1CRLWithIssuer), "Wrong size %d\n", size); + ok(size == sizeof(v1CRLWithIssuer), "Wrong size %ld\n", size); ok(!memcmp(buf, v1CRLWithIssuer, size), "Got unexpected value\n"); LocalFree(buf); } @@ -4188,7 +4188,7 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); } /* now set an empty entry */ info.cCRLEntry = 1; @@ -4198,7 +4198,7 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) if (ret) { ok(size == sizeof(v1CRLWithIssuerAndEmptyEntry), - "Wrong size %d\n", size); + "Wrong size %ld\n", size); ok(!memcmp(buf, v1CRLWithIssuerAndEmptyEntry, size), "Got unexpected value\n"); LocalFree(buf); @@ -4211,7 +4211,7 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) if (ret) { ok(size == sizeof(v1CRLWithIssuerAndEntry), - "Wrong size %d\n", size); + "Wrong size %ld\n", size); ok(!memcmp(buf, v1CRLWithIssuerAndEntry, size), "Got unexpected value\n"); LocalFree(buf); @@ -4221,10 +4221,10 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) entry.rgExtension = &criticalExt; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v1CRLWithEntryExt), "Wrong size %d\n", size); + ok(size == sizeof(v1CRLWithEntryExt), "Wrong size %ld\n", size); ok(!memcmp(buf, v1CRLWithEntryExt, size), "Got unexpected value\n"); LocalFree(buf); } @@ -4234,10 +4234,10 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) info.rgExtension = &criticalExt; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v1CRLWithExt), "Wrong size %d\n", size); + ok(size == sizeof(v1CRLWithExt), "Wrong size %ld\n", size); ok(!memcmp(buf, v1CRLWithExt, size), "Got unexpected value\n"); LocalFree(buf); } @@ -4246,10 +4246,10 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) info.rgExtension = &nonCriticalExt; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(v2CRLWithExt), "Wrong size %d\n", size); + ok(size == sizeof(v2CRLWithExt), "Wrong size %ld\n", size); ok(!memcmp(buf, v2CRLWithExt, size), "Got unexpected value\n"); LocalFree(buf); } @@ -4814,23 +4814,23 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding) &buf, &size); ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GetLastError()); } /* at a minimum, a CRL must contain an issuer: */ ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, v1CRLWithIssuer, v1CRLWithIssuer[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRL_INFO *info = (CRL_INFO *)buf;
- ok(size >= sizeof(CRL_INFO), "Wrong size %d\n", size); - ok(info->cCRLEntry == 0, "Expected 0 CRL entries, got %d\n", + ok(size >= sizeof(CRL_INFO), "Wrong size %ld\n", size); + ok(info->cCRLEntry == 0, "Expected 0 CRL entries, got %ld\n", info->cCRLEntry); ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong issuer size %d\n", info->Issuer.cbData); + "Wrong issuer size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), "Unexpected issuer\n"); LocalFree(buf); @@ -4842,31 +4842,31 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding) ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR /* Win9x */ || GetLastError() == CRYPT_E_BAD_ENCODE /* Win8 */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GetLastError()); /* with a real CRL entry */ ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, v1CRLWithIssuerAndEntry, v1CRLWithIssuerAndEntry[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRL_INFO *info = (CRL_INFO *)buf; CRL_ENTRY *entry;
- ok(size >= sizeof(CRL_INFO), "Wrong size %d\n", size); - ok(info->cCRLEntry == 1, "Expected 1 CRL entries, got %d\n", + ok(size >= sizeof(CRL_INFO), "Wrong size %ld\n", size); + ok(info->cCRLEntry == 1, "Expected 1 CRL entries, got %ld\n", info->cCRLEntry); ok(info->rgCRLEntry != NULL, "Expected a valid CRL entry array\n"); entry = info->rgCRLEntry; ok(entry->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", + "Expected serial number size 1, got %ld\n", entry->SerialNumber.cbData); ok(*entry->SerialNumber.pbData == *serialNum, "Expected serial number %d, got %d\n", *serialNum, *entry->SerialNumber.pbData); ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong issuer size %d\n", info->Issuer.cbData); + "Wrong issuer size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), "Unexpected issuer\n"); LocalFree(buf); @@ -4875,16 +4875,16 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, verisignCRL, sizeof(verisignCRL), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRL_INFO *info = (CRL_INFO *)buf;
- ok(size >= sizeof(CRL_INFO), "Wrong size %d\n", size); - ok(info->cCRLEntry == 3, "Expected 3 CRL entries, got %d\n", + ok(size >= sizeof(CRL_INFO), "Wrong size %ld\n", size); + ok(info->cCRLEntry == 3, "Expected 3 CRL entries, got %ld\n", info->cCRLEntry); ok(info->rgCRLEntry != NULL, "Expected a valid CRL entry array\n"); - ok(info->cExtension == 2, "Expected 2 extensions, got %d\n", + ok(info->cExtension == 2, "Expected 2 extensions, got %ld\n", info->cExtension); LocalFree(buf); } @@ -4892,15 +4892,15 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, verisignCRLWithLotsOfEntries, sizeof(verisignCRLWithLotsOfEntries), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRL_INFO *info = (CRL_INFO *)buf;
- ok(size >= sizeof(CRL_INFO), "Got size %d\n", size); - ok(info->cCRLEntry == 209, "Expected 209 CRL entries, got %d\n", + ok(size >= sizeof(CRL_INFO), "Got size %ld\n", size); + ok(info->cCRLEntry == 209, "Expected 209 CRL entries, got %ld\n", info->cCRLEntry); - ok(info->cExtension == 0, "Expected 0 extensions, got %d\n", + ok(info->cExtension == 0, "Expected 0 extensions, got %ld\n", info->cExtension); LocalFree(buf); } @@ -4908,40 +4908,40 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, v1CRLWithExt, sizeof(v1CRLWithExt), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRL_INFO *info = (CRL_INFO *)buf; CRL_ENTRY *entry;
- ok(size >= sizeof(CRL_INFO), "Wrong size %d\n", size); - ok(info->cCRLEntry == 1, "Expected 1 CRL entries, got %d\n", + ok(size >= sizeof(CRL_INFO), "Wrong size %ld\n", size); + ok(info->cCRLEntry == 1, "Expected 1 CRL entries, got %ld\n", info->cCRLEntry); ok(info->rgCRLEntry != NULL, "Expected a valid CRL entry array\n"); entry = info->rgCRLEntry; ok(entry->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", + "Expected serial number size 1, got %ld\n", entry->SerialNumber.cbData); ok(*entry->SerialNumber.pbData == *serialNum, "Expected serial number %d, got %d\n", *serialNum, *entry->SerialNumber.pbData); ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong issuer size %d\n", info->Issuer.cbData); + "Wrong issuer size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), "Unexpected issuer\n"); - ok(info->cExtension == 1, "Expected 1 extensions, got %d\n", + ok(info->cExtension == 1, "Expected 1 extensions, got %ld\n", info->cExtension); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, v2CRLWithExt, sizeof(v2CRLWithExt), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CRL_INFO *info = (CRL_INFO *)buf;
- ok(info->cExtension == 1, "Expected 1 extensions, got %d\n", + ok(info->cExtension == 1, "Expected 1 extensions, got %ld\n", info->cExtension); LocalFree(buf); } @@ -4965,10 +4965,10 @@ static void test_encodeEnhancedKeyUsage(DWORD dwEncoding) usage.cUsageIdentifier = 0; ret = pCryptEncodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, &usage, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptySequence), "Wrong size %d\n", size); + ok(size == sizeof(emptySequence), "Wrong size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "Got unexpected value\n"); LocalFree(buf); } @@ -4977,10 +4977,10 @@ static void test_encodeEnhancedKeyUsage(DWORD dwEncoding) usage.rgpszUsageIdentifier = (LPSTR *)keyUsages; ret = pCryptEncodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, &usage, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(encodedUsage), "Wrong size %d\n", size); + ok(size == sizeof(encodedUsage), "Wrong size %ld\n", size); ok(!memcmp(buf, encodedUsage, size), "Got unexpected value\n"); LocalFree(buf); } @@ -4995,30 +4995,30 @@ static void test_decodeEnhancedKeyUsage(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_ENHKEY_USAGE *usage = (CERT_ENHKEY_USAGE *)buf;
ok(size >= sizeof(CERT_ENHKEY_USAGE), - "Wrong size %d\n", size); - ok(usage->cUsageIdentifier == 0, "Expected 0 CRL entries, got %d\n", + "Wrong size %ld\n", size); + ok(usage->cUsageIdentifier == 0, "Expected 0 CRL entries, got %ld\n", usage->cUsageIdentifier); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, encodedUsage, sizeof(encodedUsage), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_ENHKEY_USAGE *usage = (CERT_ENHKEY_USAGE *)buf; DWORD i;
ok(size >= sizeof(CERT_ENHKEY_USAGE), - "Wrong size %d\n", size); + "Wrong size %ld\n", size); ok(usage->cUsageIdentifier == ARRAY_SIZE(keyUsages), - "Wrong CRL entries count %d\n", usage->cUsageIdentifier); + "Wrong CRL entries count %ld\n", usage->cUsageIdentifier); for (i = 0; i < usage->cUsageIdentifier; i++) ok(!strcmp(usage->rgpszUsageIdentifier[i], keyUsages[i]), "Expected OID %s, got %s\n", keyUsages[i], @@ -5027,13 +5027,13 @@ static void test_decodeEnhancedKeyUsage(DWORD dwEncoding) } ret = pCryptDecodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, encodedUsage, sizeof(encodedUsage), 0, NULL, NULL, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if (buf) { ret = pCryptDecodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, encodedUsage, sizeof(encodedUsage), 0, NULL, buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, buf); } } @@ -5056,10 +5056,10 @@ static void test_encodeAuthorityKeyId(DWORD dwEncoding) /* Test with empty id */ ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptySequence), "Unexpected size %d\n", size); + ok(size == sizeof(emptySequence), "Unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); LocalFree(buf); } @@ -5068,10 +5068,10 @@ static void test_encodeAuthorityKeyId(DWORD dwEncoding) info.KeyId.pbData = keyId; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(authorityKeyIdWithId), "Unexpected size %d\n", size); + ok(size == sizeof(authorityKeyIdWithId), "Unexpected size %ld\n", size); ok(!memcmp(buf, authorityKeyIdWithId, size), "Unexpected value\n"); LocalFree(buf); } @@ -5081,10 +5081,10 @@ static void test_encodeAuthorityKeyId(DWORD dwEncoding) info.CertIssuer.pbData = (BYTE *)encodedCommonName; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(authorityKeyIdWithIssuer), "Unexpected size %d\n", + ok(size == sizeof(authorityKeyIdWithIssuer), "Unexpected size %ld\n", size); ok(!memcmp(buf, authorityKeyIdWithIssuer, size), "Unexpected value\n"); LocalFree(buf); @@ -5095,10 +5095,10 @@ static void test_encodeAuthorityKeyId(DWORD dwEncoding) info.CertSerialNumber.pbData = (BYTE *)serialNum; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(authorityKeyIdWithSerial), "Unexpected size %d\n", + ok(size == sizeof(authorityKeyIdWithSerial), "Unexpected size %ld\n", size); ok(!memcmp(buf, authorityKeyIdWithSerial, size), "Unexpected value\n"); LocalFree(buf); @@ -5114,12 +5114,12 @@ static void test_decodeAuthorityKeyId(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_KEY_ID_INFO *info = (CERT_AUTHORITY_KEY_ID_INFO *)buf;
- ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %d\n", + ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %ld\n", size); ok(info->KeyId.cbData == 0, "Expected no key id\n"); ok(info->CertIssuer.cbData == 0, "Expected no issuer name\n"); @@ -5129,12 +5129,12 @@ static void test_decodeAuthorityKeyId(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, authorityKeyIdWithId, sizeof(authorityKeyIdWithId), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_KEY_ID_INFO *info = (CERT_AUTHORITY_KEY_ID_INFO *)buf;
- ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %d\n", + ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %ld\n", size); ok(info->KeyId.cbData == sizeof(keyId), "Unexpected key id len\n"); ok(!memcmp(info->KeyId.pbData, keyId, sizeof(keyId)), @@ -5146,12 +5146,12 @@ static void test_decodeAuthorityKeyId(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, authorityKeyIdWithIssuer, sizeof(authorityKeyIdWithIssuer), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_KEY_ID_INFO *info = (CERT_AUTHORITY_KEY_ID_INFO *)buf;
- ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %d\n", + ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %ld\n", size); ok(info->KeyId.cbData == 0, "Expected no key id\n"); ok(info->CertIssuer.cbData == sizeof(encodedCommonName), @@ -5164,12 +5164,12 @@ static void test_decodeAuthorityKeyId(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, authorityKeyIdWithSerial, sizeof(authorityKeyIdWithSerial), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_KEY_ID_INFO *info = (CERT_AUTHORITY_KEY_ID_INFO *)buf;
- ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %d\n", + ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %ld\n", size); ok(info->KeyId.cbData == 0, "Expected no key id\n"); ok(info->CertIssuer.cbData == 0, "Expected no issuer name\n"); @@ -5196,10 +5196,10 @@ static void test_encodeAuthorityKeyId2(DWORD dwEncoding) /* Test with empty id */ ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptySequence), "Unexpected size %d\n", size); + ok(size == sizeof(emptySequence), "Unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); LocalFree(buf); } @@ -5208,10 +5208,10 @@ static void test_encodeAuthorityKeyId2(DWORD dwEncoding) info.KeyId.pbData = keyId; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(authorityKeyIdWithId), "Unexpected size %d\n", + ok(size == sizeof(authorityKeyIdWithId), "Unexpected size %ld\n", size); ok(!memcmp(buf, authorityKeyIdWithId, size), "Unexpected value\n"); LocalFree(buf); @@ -5223,16 +5223,16 @@ static void test_encodeAuthorityKeyId2(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* With an issuer name */ entry.dwAltNameChoice = CERT_ALT_NAME_URL; U(entry).pwszURL = (LPWSTR)url; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(authorityKeyIdWithIssuerUrl), "Unexpected size %d\n", + ok(size == sizeof(authorityKeyIdWithIssuerUrl), "Unexpected size %ld\n", size); ok(!memcmp(buf, authorityKeyIdWithIssuerUrl, size), "Unexpected value\n"); @@ -5244,10 +5244,10 @@ static void test_encodeAuthorityKeyId2(DWORD dwEncoding) info.AuthorityCertSerialNumber.pbData = (BYTE *)serialNum; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(authorityKeyIdWithSerial), "Unexpected size %d\n", + ok(size == sizeof(authorityKeyIdWithSerial), "Unexpected size %ld\n", size); ok(!memcmp(buf, authorityKeyIdWithSerial, size), "Unexpected value\n"); LocalFree(buf); @@ -5263,12 +5263,12 @@ static void test_decodeAuthorityKeyId2(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_KEY_ID2_INFO *info = (CERT_AUTHORITY_KEY_ID2_INFO *)buf;
- ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %d\n", + ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %ld\n", size); ok(info->KeyId.cbData == 0, "Expected no key id\n"); ok(info->AuthorityCertIssuer.cAltEntry == 0, @@ -5280,12 +5280,12 @@ static void test_decodeAuthorityKeyId2(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, authorityKeyIdWithId, sizeof(authorityKeyIdWithId), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_KEY_ID2_INFO *info = (CERT_AUTHORITY_KEY_ID2_INFO *)buf;
- ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %d\n", + ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %ld\n", size); ok(info->KeyId.cbData == sizeof(keyId), "Unexpected key id len\n"); ok(!memcmp(info->KeyId.pbData, keyId, sizeof(keyId)), @@ -5299,19 +5299,19 @@ static void test_decodeAuthorityKeyId2(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, authorityKeyIdWithIssuerUrl, sizeof(authorityKeyIdWithIssuerUrl), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_KEY_ID2_INFO *info = (CERT_AUTHORITY_KEY_ID2_INFO *)buf;
- ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %d\n", + ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %ld\n", size); ok(info->KeyId.cbData == 0, "Expected no key id\n"); ok(info->AuthorityCertIssuer.cAltEntry == 1, - "Expected 1 issuer entry, got %d\n", + "Expected 1 issuer entry, got %ld\n", info->AuthorityCertIssuer.cAltEntry); ok(info->AuthorityCertIssuer.rgAltEntry[0].dwAltNameChoice == - CERT_ALT_NAME_URL, "Expected CERT_ALT_NAME_URL, got %d\n", + CERT_ALT_NAME_URL, "Expected CERT_ALT_NAME_URL, got %ld\n", info->AuthorityCertIssuer.rgAltEntry[0].dwAltNameChoice); ok(!lstrcmpW(U(info->AuthorityCertIssuer.rgAltEntry[0]).pwszURL, url), "Unexpected URL\n"); @@ -5322,12 +5322,12 @@ static void test_decodeAuthorityKeyId2(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, authorityKeyIdWithSerial, sizeof(authorityKeyIdWithSerial), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_KEY_ID2_INFO *info = (CERT_AUTHORITY_KEY_ID2_INFO *)buf;
- ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %d\n", + ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %ld\n", size); ok(info->KeyId.cbData == 0, "Expected no key id\n"); ok(info->AuthorityCertIssuer.cAltEntry == 0, @@ -5364,10 +5364,10 @@ static void test_encodeAuthorityInfoAccess(DWORD dwEncoding) /* Having no access descriptions is allowed */ ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptySequence), "unexpected size %d\n", size); + ok(size == sizeof(emptySequence), "unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5379,22 +5379,22 @@ static void test_encodeAuthorityInfoAccess(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x */), - "expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); + "expected E_INVALIDARG or OSS_LIMITED, got %08lx\n", GetLastError()); /* It can't have an empty location */ accessDescription[0].pszAccessMethod = oid1; SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); accessDescription[0].AccessLocation.dwAltNameChoice = CERT_ALT_NAME_URL; U(accessDescription[0].AccessLocation).pwszURL = (LPWSTR)url; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(authorityInfoAccessWithUrl), "unexpected size %d\n", + ok(size == sizeof(authorityInfoAccessWithUrl), "unexpected size %ld\n", size); ok(!memcmp(buf, authorityInfoAccessWithUrl, size), "unexpected value\n"); @@ -5411,11 +5411,11 @@ static void test_encodeAuthorityInfoAccess(DWORD dwEncoding) aia.cAccDescr = 2; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(authorityInfoAccessWithUrlAndIPAddr), - "unexpected size %d\n", size); + "unexpected size %ld\n", size); ok(!memcmp(buf, authorityInfoAccessWithUrlAndIPAddr, size), "unexpected value\n"); LocalFree(buf); @@ -5430,12 +5430,12 @@ static void compareAuthorityInfoAccess(LPCSTR header, DWORD i;
ok(expected->cAccDescr == got->cAccDescr, - "%s: expected %d access descriptions, got %d\n", header, + "%s: expected %ld access descriptions, got %ld\n", header, expected->cAccDescr, got->cAccDescr); for (i = 0; i < expected->cAccDescr; i++) { ok(!strcmp(expected->rgAccDescr[i].pszAccessMethod, - got->rgAccDescr[i].pszAccessMethod), "%s[%d]: expected %s, got %s\n", + got->rgAccDescr[i].pszAccessMethod), "%s[%ld]: expected %s, got %s\n", header, i, expected->rgAccDescr[i].pszAccessMethod, got->rgAccDescr[i].pszAccessMethod); compareAltNameEntry(&expected->rgAccDescr[i].AccessLocation, @@ -5454,7 +5454,7 @@ static void test_decodeAuthorityInfoAccess(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { CERT_AUTHORITY_INFO_ACCESS aia = { 0, NULL }; @@ -5467,7 +5467,7 @@ static void test_decodeAuthorityInfoAccess(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, authorityInfoAccessWithUrl, sizeof(authorityInfoAccessWithUrl), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { CERT_ACCESS_DESCRIPTION accessDescription; @@ -5487,7 +5487,7 @@ static void test_decodeAuthorityInfoAccess(DWORD dwEncoding) authorityInfoAccessWithUrlAndIPAddr, sizeof(authorityInfoAccessWithUrlAndIPAddr), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { CERT_ACCESS_DESCRIPTION accessDescription[2]; @@ -5513,14 +5513,14 @@ static void test_decodeAuthorityInfoAccess(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, authorityInfoAccessWithUrlAndIPAddr, sizeof(authorityInfoAccessWithUrlAndIPAddr), 0, NULL, NULL, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if (buf) { ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, authorityInfoAccessWithUrlAndIPAddr, sizeof(authorityInfoAccessWithUrlAndIPAddr), 0, NULL, buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, buf); } } @@ -5582,10 +5582,10 @@ static void test_encodeCTL(DWORD dwEncoding) memset(&info, 0, sizeof(info)); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptyCTL), "unexpected size %d\n", size); + ok(size == sizeof(emptyCTL), "unexpected size %ld\n", size); ok(!memcmp(buf, emptyCTL, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5593,10 +5593,10 @@ static void test_encodeCTL(DWORD dwEncoding) info.dwVersion = 1; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptyCTLWithVersion1), "unexpected size %d\n", size); + ok(size == sizeof(emptyCTLWithVersion1), "unexpected size %ld\n", size); ok(!memcmp(buf, emptyCTLWithVersion1, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5606,10 +5606,10 @@ static void test_encodeCTL(DWORD dwEncoding) info.SubjectUsage.rgpszUsageIdentifier = &pOid1; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithUsageIdentifier), "unexpected size %d\n", + ok(size == sizeof(ctlWithUsageIdentifier), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithUsageIdentifier, size), "unexpected value\n"); LocalFree(buf); @@ -5620,10 +5620,10 @@ static void test_encodeCTL(DWORD dwEncoding) info.ListIdentifier.pbData = (LPBYTE)serialNum; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithListIdentifier), "unexpected size %d\n", size); + ok(size == sizeof(ctlWithListIdentifier), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithListIdentifier, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5633,10 +5633,10 @@ static void test_encodeCTL(DWORD dwEncoding) info.SequenceNumber.pbData = (LPBYTE)serialNum; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithSequenceNumber), "unexpected size %d\n", + ok(size == sizeof(ctlWithSequenceNumber), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithSequenceNumber, size), "unexpected value\n"); LocalFree(buf); @@ -5646,10 +5646,10 @@ static void test_encodeCTL(DWORD dwEncoding) SystemTimeToFileTime(&thisUpdate, &info.ThisUpdate); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithThisUpdate), "unexpected size %d\n", size); + ok(size == sizeof(ctlWithThisUpdate), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithThisUpdate, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5657,10 +5657,10 @@ static void test_encodeCTL(DWORD dwEncoding) SystemTimeToFileTime(&thisUpdate, &info.NextUpdate); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithThisAndNextUpdate), "unexpected size %d\n", + ok(size == sizeof(ctlWithThisAndNextUpdate), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithThisAndNextUpdate, size), "unexpected value\n"); LocalFree(buf); @@ -5671,10 +5671,10 @@ static void test_encodeCTL(DWORD dwEncoding) info.SubjectAlgorithm.pszObjId = oid2; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithAlgId), "unexpected size %d\n", size); + ok(size == sizeof(ctlWithAlgId), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithAlgId, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5696,10 +5696,10 @@ static void test_encodeCTL(DWORD dwEncoding) info.rgCTLEntry = ctlEntry; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithBogusEntry), "unexpected size %d\n", size); + ok(size == sizeof(ctlWithBogusEntry), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithBogusEntry, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5708,10 +5708,10 @@ static void test_encodeCTL(DWORD dwEncoding) value1.pbData = (LPBYTE)emptySequence; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithOneEntry), "unexpected size %d\n", size); + ok(size == sizeof(ctlWithOneEntry), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithOneEntry, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5728,10 +5728,10 @@ static void test_encodeCTL(DWORD dwEncoding) info.cCTLEntry = 2; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(ctlWithTwoEntries), "unexpected size %d\n", size); + ok(size == sizeof(ctlWithTwoEntries), "unexpected size %ld\n", size); ok(!memcmp(buf, ctlWithTwoEntries, size), "unexpected value\n"); LocalFree(buf); buf = NULL; @@ -5744,39 +5744,39 @@ static void compareCTLInfo(LPCSTR header, const CTL_INFO *expected, DWORD i, j, k;
ok(expected->dwVersion == got->dwVersion, - "%s: expected version %d, got %d\n", header, expected->dwVersion, + "%s: expected version %ld, got %ld\n", header, expected->dwVersion, got->dwVersion); ok(expected->SubjectUsage.cUsageIdentifier == got->SubjectUsage.cUsageIdentifier, - "%s: expected %d usage identifiers, got %d\n", header, + "%s: expected %ld usage identifiers, got %ld\n", header, expected->SubjectUsage.cUsageIdentifier, got->SubjectUsage.cUsageIdentifier); for (i = 0; i < expected->SubjectUsage.cUsageIdentifier; i++) ok(!strcmp(expected->SubjectUsage.rgpszUsageIdentifier[i], got->SubjectUsage.rgpszUsageIdentifier[i]), - "%s[%d]: expected %s, got %s\n", header, i, + "%s[%ld]: expected %s, got %s\n", header, i, expected->SubjectUsage.rgpszUsageIdentifier[i], got->SubjectUsage.rgpszUsageIdentifier[i]); ok(expected->ListIdentifier.cbData == got->ListIdentifier.cbData, - "%s: expected list identifier of %d bytes, got %d\n", header, + "%s: expected list identifier of %ld bytes, got %ld\n", header, expected->ListIdentifier.cbData, got->ListIdentifier.cbData); if (expected->ListIdentifier.cbData) ok(!memcmp(expected->ListIdentifier.pbData, got->ListIdentifier.pbData, expected->ListIdentifier.cbData), "%s: unexpected list identifier value\n", header); ok(expected->SequenceNumber.cbData == got->SequenceNumber.cbData, - "%s: expected sequence number of %d bytes, got %d\n", header, + "%s: expected sequence number of %ld bytes, got %ld\n", header, expected->SequenceNumber.cbData, got->SequenceNumber.cbData); if (expected->SequenceNumber.cbData) ok(!memcmp(expected->SequenceNumber.pbData, got->SequenceNumber.pbData, expected->SequenceNumber.cbData), "%s: unexpected sequence number value\n", header); ok(!memcmp(&expected->ThisUpdate, &got->ThisUpdate, sizeof(FILETIME)), - "%s: expected this update = (%d, %d), got (%d, %d)\n", header, + "%s: expected this update = (%ld, %ld), got (%ld, %ld)\n", header, expected->ThisUpdate.dwLowDateTime, expected->ThisUpdate.dwHighDateTime, got->ThisUpdate.dwLowDateTime, got->ThisUpdate.dwHighDateTime); ok(!memcmp(&expected->NextUpdate, &got->NextUpdate, sizeof(FILETIME)), - "%s: expected next update = (%d, %d), got (%d, %d)\n", header, + "%s: expected next update = (%ld, %ld), got (%ld, %ld)\n", header, expected->NextUpdate.dwLowDateTime, expected->NextUpdate.dwHighDateTime, got->NextUpdate.dwLowDateTime, got->NextUpdate.dwHighDateTime); if (expected->SubjectAlgorithm.pszObjId && @@ -5790,7 +5790,7 @@ static void compareCTLInfo(LPCSTR header, const CTL_INFO *expected, expected->SubjectAlgorithm.pszObjId, got->SubjectAlgorithm.pszObjId); ok(expected->SubjectAlgorithm.Parameters.cbData == got->SubjectAlgorithm.Parameters.cbData, - "%s: expected subject algorithm parameters of %d bytes, got %d\n", header, + "%s: expected subject algorithm parameters of %ld bytes, got %ld\n", header, expected->SubjectAlgorithm.Parameters.cbData, got->SubjectAlgorithm.Parameters.cbData); if (expected->SubjectAlgorithm.Parameters.cbData) @@ -5799,33 +5799,33 @@ static void compareCTLInfo(LPCSTR header, const CTL_INFO *expected, expected->SubjectAlgorithm.Parameters.cbData), "%s: unexpected subject algorithm parameter value\n", header); ok(expected->cCTLEntry == got->cCTLEntry, - "%s: expected %d CTL entries, got %d\n", header, expected->cCTLEntry, + "%s: expected %ld CTL entries, got %ld\n", header, expected->cCTLEntry, got->cCTLEntry); for (i = 0; i < expected->cCTLEntry; i++) { ok(expected->rgCTLEntry[i].SubjectIdentifier.cbData == got->rgCTLEntry[i].SubjectIdentifier.cbData, - "%s[%d]: expected subject identifier of %d bytes, got %d\n", + "%s[%ld]: expected subject identifier of %ld bytes, got %ld\n", header, i, expected->rgCTLEntry[i].SubjectIdentifier.cbData, got->rgCTLEntry[i].SubjectIdentifier.cbData); if (expected->rgCTLEntry[i].SubjectIdentifier.cbData) ok(!memcmp(expected->rgCTLEntry[i].SubjectIdentifier.pbData, got->rgCTLEntry[i].SubjectIdentifier.pbData, expected->rgCTLEntry[i].SubjectIdentifier.cbData), - "%s[%d]: unexpected subject identifier value\n", + "%s[%ld]: unexpected subject identifier value\n", header, i); for (j = 0; j < expected->rgCTLEntry[i].cAttribute; j++) { ok(!strcmp(expected->rgCTLEntry[i].rgAttribute[j].pszObjId, got->rgCTLEntry[i].rgAttribute[j].pszObjId), - "%s[%d][%d]: expected attribute OID %s, got %s\n", header, i, j, + "%s[%ld][%ld]: expected attribute OID %s, got %s\n", header, i, j, expected->rgCTLEntry[i].rgAttribute[j].pszObjId, got->rgCTLEntry[i].rgAttribute[j].pszObjId); for (k = 0; k < expected->rgCTLEntry[i].rgAttribute[j].cValue; k++) { ok(expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData == got->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData, - "%s[%d][%d][%d]: expected value of %d bytes, got %d\n", + "%s[%ld][%ld][%ld]: expected value of %ld bytes, got %ld\n", header, i, j, k, expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData, got->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData); @@ -5834,33 +5834,33 @@ static void compareCTLInfo(LPCSTR header, const CTL_INFO *expected, expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].pbData, got->rgCTLEntry[i].rgAttribute[j].rgValue[k].pbData, expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData), - "%s[%d][%d][%d]: unexpected value\n", + "%s[%ld][%ld][%ld]: unexpected value\n", header, i, j, k); } } } ok(expected->cExtension == got->cExtension, - "%s: expected %d extensions, got %d\n", header, expected->cExtension, + "%s: expected %ld extensions, got %ld\n", header, expected->cExtension, got->cExtension); for (i = 0; i < expected->cExtension; i++) { ok(!strcmp(expected->rgExtension[i].pszObjId, - got->rgExtension[i].pszObjId), "%s[%d]: expected %s, got %s\n", + got->rgExtension[i].pszObjId), "%s[%ld]: expected %s, got %s\n", header, i, expected->rgExtension[i].pszObjId, got->rgExtension[i].pszObjId); ok(expected->rgExtension[i].fCritical == got->rgExtension[i].fCritical, - "%s[%d]: expected fCritical = %d, got %d\n", header, i, + "%s[%ld]: expected fCritical = %d, got %d\n", header, i, expected->rgExtension[i].fCritical, got->rgExtension[i].fCritical); ok(expected->rgExtension[i].Value.cbData == got->rgExtension[i].Value.cbData, - "%s[%d]: expected extension value to have %d bytes, got %d\n", + "%s[%ld]: expected extension value to have %ld bytes, got %ld\n", header, i, expected->rgExtension[i].Value.cbData, got->rgExtension[i].Value.cbData); if (expected->rgExtension[i].Value.cbData) ok(!memcmp(expected->rgExtension[i].Value.pbData, got->rgExtension[i].Value.pbData, expected->rgExtension[i].Value.cbData), - "%s[%d]: unexpected extension value\n", header, i); + "%s[%ld]: unexpected extension value\n", header, i); } }
@@ -5918,7 +5918,7 @@ static void test_decodeCTL(DWORD dwEncoding) memset(&info, 0, sizeof(info)); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, emptyCTL, sizeof(emptyCTL), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("empty CTL", &info, (CTL_INFO *)buf); @@ -5929,7 +5929,7 @@ static void test_decodeCTL(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, emptyCTLWithVersion1, sizeof(emptyCTLWithVersion1), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("v1 CTL", &info, (CTL_INFO *)buf); @@ -5942,7 +5942,7 @@ static void test_decodeCTL(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithUsageIdentifier, sizeof(ctlWithUsageIdentifier), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("CTL with usage identifier", &info, (CTL_INFO *)buf); @@ -5954,7 +5954,7 @@ static void test_decodeCTL(DWORD dwEncoding) info.ListIdentifier.pbData = (LPBYTE)serialNum; ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithListIdentifier, sizeof(ctlWithListIdentifier), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("CTL with list identifier", &info, (CTL_INFO *)buf); @@ -5966,7 +5966,7 @@ static void test_decodeCTL(DWORD dwEncoding) info.SequenceNumber.pbData = (LPBYTE)serialNum; ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithSequenceNumber, sizeof(ctlWithSequenceNumber), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("CTL with sequence number", &info, (CTL_INFO *)buf); @@ -5977,7 +5977,7 @@ static void test_decodeCTL(DWORD dwEncoding) SystemTimeToFileTime(&thisUpdate, &info.ThisUpdate); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithThisUpdate, sizeof(ctlWithThisUpdate), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("CTL with this update", &info, (CTL_INFO *)buf); @@ -5988,7 +5988,7 @@ static void test_decodeCTL(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithThisAndNextUpdate, sizeof(ctlWithThisAndNextUpdate), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("CTL with this and next update", &info, (CTL_INFO *)buf); @@ -6002,7 +6002,7 @@ static void test_decodeCTL(DWORD dwEncoding) info.SubjectAlgorithm.Parameters.pbData = nullData; ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithAlgId, sizeof(ctlWithAlgId), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("CTL with algorithm identifier", &info, (CTL_INFO *)buf); @@ -6016,7 +6016,7 @@ static void test_decodeCTL(DWORD dwEncoding) (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_MORE_INPUT), /* Win9x */ - "expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %08x\n", + "expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %08lx\n", GetLastError()); info.SubjectAlgorithm.Parameters.cbData = 0; info.ThisUpdate.dwLowDateTime = info.ThisUpdate.dwHighDateTime = 0; @@ -6036,7 +6036,7 @@ static void test_decodeCTL(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithOneEntry, sizeof(ctlWithOneEntry), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("CTL with one entry", &info, (CTL_INFO *)buf); @@ -6055,7 +6055,7 @@ static void test_decodeCTL(DWORD dwEncoding) info.cCTLEntry = 2; ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithTwoEntries, sizeof(ctlWithTwoEntries), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { compareCTLInfo("CTL with two entries", &info, (CTL_INFO *)buf); @@ -6068,7 +6068,7 @@ static void test_decodeCTL(DWORD dwEncoding) sizeof(signedCTL), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", + "expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, @@ -6076,7 +6076,7 @@ static void test_decodeCTL(DWORD dwEncoding) CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", + "expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08lx\n", GetLastError()); }
@@ -6104,21 +6104,21 @@ static void test_encodePKCSContentInfo(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, NULL, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %lx\n", GetLastError()); } SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); + "Expected E_INVALIDARG or OSS_LIMITED, got %lx\n", GetLastError()); info.pszObjId = oid1; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptyPKCSContentInfo), "Unexpected size %d\n", size); + ok(size == sizeof(emptyPKCSContentInfo), "Unexpected size %ld\n", size); ok(!memcmp(buf, emptyPKCSContentInfo, size), "Unexpected value\n"); LocalFree(buf); } @@ -6126,10 +6126,10 @@ static void test_encodePKCSContentInfo(DWORD dwEncoding) info.Content.cbData = sizeof(bogusDER); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed; %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed; %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(bogusPKCSContentInfo), "Unexpected size %d\n", size); + ok(size == sizeof(bogusPKCSContentInfo), "Unexpected size %ld\n", size); ok(!memcmp(buf, bogusPKCSContentInfo, size), "Unexpected value\n"); LocalFree(buf); } @@ -6139,7 +6139,7 @@ static void test_encodePKCSContentInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(intPKCSContentInfo), "Unexpected size %d\n", size); + ok(size == sizeof(intPKCSContentInfo), "Unexpected size %ld\n", size); ok(!memcmp(buf, intPKCSContentInfo, size), "Unexpected value\n"); LocalFree(buf); } @@ -6232,19 +6232,19 @@ static void test_decodePKCSContentInfo(DWORD dwEncoding) { ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, tests[i].encoded, tests[i].encoded_size, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "[%u] CryptDecodeObjectEx failed: %x\n", i, GetLastError()); + ok(ret, "[%lu] CryptDecodeObjectEx failed: %lx\n", i, GetLastError()); if (!ret) continue;
info = (CRYPT_CONTENT_INFO *)buf;
- ok(!strcmp(info->pszObjId, tests[i].obj_id), "[%u] Expected %s, got %s\n", + ok(!strcmp(info->pszObjId, tests[i].obj_id), "[%lu] Expected %s, got %s\n", i, tests[i].obj_id, info->pszObjId); ok(info->Content.cbData == tests[i].content_size, - "[%u] Unexpected size %d expected %d\n", i, info->Content.cbData, + "[%lu] Unexpected size %ld expected %d\n", i, info->Content.cbData, tests[i].content_size); if (tests[i].content) ok(!memcmp(info->Content.pbData, tests[i].content, tests[i].content_size), - "[%u] Unexpected value\n", i); + "[%lu] Unexpected value\n", i); LocalFree(buf); }
@@ -6256,7 +6256,7 @@ static void test_decodePKCSContentInfo(DWORD dwEncoding) */ ok((!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == CRYPT_E_ASN1_CORRUPT)) || broken(ret), - "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %x\n", + "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %lx\n", GetLastError()); }
@@ -6283,21 +6283,21 @@ static void test_encodePKCSAttribute(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, NULL, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %lx\n", GetLastError()); } SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); + "Expected E_INVALIDARG or OSS_LIMITED, got %lx\n", GetLastError()); attr.pszObjId = oid; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptyPKCSAttr), "Unexpected size %d\n", size); + ok(size == sizeof(emptyPKCSAttr), "Unexpected size %ld\n", size); ok(!memcmp(buf, emptyPKCSAttr, size), "Unexpected value\n"); LocalFree(buf); } @@ -6307,10 +6307,10 @@ static void test_encodePKCSAttribute(DWORD dwEncoding) attr.rgValue = &blob; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(bogusPKCSAttr), "Unexpected size %d\n", size); + ok(size == sizeof(bogusPKCSAttr), "Unexpected size %ld\n", size); ok(!memcmp(buf, bogusPKCSAttr, size), "Unexpected value\n"); LocalFree(buf); } @@ -6320,7 +6320,7 @@ static void test_encodePKCSAttribute(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(intPKCSAttr), "Unexpected size %d\n", size); + ok(size == sizeof(intPKCSAttr), "Unexpected size %ld\n", size); ok(!memcmp(buf, intPKCSAttr, size), "Unexpected value\n"); LocalFree(buf); } @@ -6336,14 +6336,14 @@ static void test_decodePKCSAttribute(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, emptyPKCSAttr, sizeof(emptyPKCSAttr), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { attr = (CRYPT_ATTRIBUTE *)buf;
ok(!strcmp(attr->pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", attr->pszObjId); - ok(attr->cValue == 0, "Expected no value, got %d\n", attr->cValue); + ok(attr->cValue == 0, "Expected no value, got %ld\n", attr->cValue); LocalFree(buf); } SetLastError(0xdeadbeef); @@ -6356,21 +6356,21 @@ static void test_decodePKCSAttribute(DWORD dwEncoding) ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_MORE_INPUT /* Win9x */), - "Expected CRYPT_E_ASN1_EOD, CRYPT_E_ASN1_CORRUPT, or OSS_MORE_INPUT, got %x\n", + "Expected CRYPT_E_ASN1_EOD, CRYPT_E_ASN1_CORRUPT, or OSS_MORE_INPUT, got %lx\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, intPKCSAttr, sizeof(intPKCSAttr), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { attr = (CRYPT_ATTRIBUTE *)buf;
ok(!strcmp(attr->pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", attr->pszObjId); - ok(attr->cValue == 1, "Expected 1 value, got %d\n", attr->cValue); + ok(attr->cValue == 1, "Expected 1 value, got %ld\n", attr->cValue); ok(attr->rgValue[0].cbData == ints[0].encoded[1] + 2, - "Unexpected size %d\n", attr->rgValue[0].cbData); + "Unexpected size %ld\n", attr->rgValue[0].cbData); ok(!memcmp(attr->rgValue[0].pbData, ints[0].encoded, attr->rgValue[0].cbData), "Unexpected value\n"); LocalFree(buf); @@ -6395,10 +6395,10 @@ static void test_encodePKCSAttributes(DWORD dwEncoding)
ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptyPKCSAttributes), "Unexpected size %d\n", size); + ok(size == sizeof(emptyPKCSAttributes), "Unexpected size %ld\n", size); ok(!memcmp(buf, emptyPKCSAttributes, size), "Unexpected value\n"); LocalFree(buf); } @@ -6409,13 +6409,13 @@ static void test_encodePKCSAttributes(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); + "Expected E_INVALIDARG or OSS_LIMITED, got %08lx\n", GetLastError()); attr[0].pszObjId = oid1; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (ret) { - ok(size == sizeof(singlePKCSAttributes), "Unexpected size %d\n", size); + ok(size == sizeof(singlePKCSAttributes), "Unexpected size %ld\n", size); ok(!memcmp(buf, singlePKCSAttributes, size), "Unexpected value\n"); LocalFree(buf); } @@ -6427,10 +6427,10 @@ static void test_encodePKCSAttributes(DWORD dwEncoding) attributes.cAttr = 2; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(doublePKCSAttributes), "Unexpected size %d\n", size); + ok(size == sizeof(doublePKCSAttributes), "Unexpected size %ld\n", size); ok(!memcmp(buf, doublePKCSAttributes, size), "Unexpected value\n"); LocalFree(buf); } @@ -6446,61 +6446,61 @@ static void test_decodePKCSAttributes(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, emptyPKCSAttributes, sizeof(emptyPKCSAttributes), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { attributes = (CRYPT_ATTRIBUTES *)buf; - ok(attributes->cAttr == 0, "Expected no attributes, got %d\n", + ok(attributes->cAttr == 0, "Expected no attributes, got %ld\n", attributes->cAttr); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, singlePKCSAttributes, sizeof(singlePKCSAttributes), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { attributes = (CRYPT_ATTRIBUTES *)buf; - ok(attributes->cAttr == 1, "Expected 1 attribute, got %d\n", + ok(attributes->cAttr == 1, "Expected 1 attribute, got %ld\n", attributes->cAttr); ok(!strcmp(attributes->rgAttr[0].pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", attributes->rgAttr[0].pszObjId); ok(attributes->rgAttr[0].cValue == 0, - "Expected no attributes, got %d\n", attributes->rgAttr[0].cValue); + "Expected no attributes, got %ld\n", attributes->rgAttr[0].cValue); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, doublePKCSAttributes, sizeof(doublePKCSAttributes), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { attributes = (CRYPT_ATTRIBUTES *)buf; - ok(attributes->cAttr == 2, "Expected 2 attributes, got %d\n", + ok(attributes->cAttr == 2, "Expected 2 attributes, got %ld\n", attributes->cAttr); ok(!strcmp(attributes->rgAttr[0].pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", attributes->rgAttr[0].pszObjId); ok(attributes->rgAttr[0].cValue == 0, - "Expected no attributes, got %d\n", attributes->rgAttr[0].cValue); + "Expected no attributes, got %ld\n", attributes->rgAttr[0].cValue); ok(!strcmp(attributes->rgAttr[1].pszObjId, "1.5.6"), "Expected 1.5.6, got %s\n", attributes->rgAttr[1].pszObjId); ok(attributes->rgAttr[1].cValue == 1, - "Expected 1 attribute, got %d\n", attributes->rgAttr[1].cValue); + "Expected 1 attribute, got %ld\n", attributes->rgAttr[1].cValue); ok(attributes->rgAttr[1].rgValue[0].cbData == ints[0].encoded[1] + 2, - "Unexpected size %d\n", attributes->rgAttr[1].rgValue[0].cbData); + "Unexpected size %ld\n", attributes->rgAttr[1].rgValue[0].cbData); ok(!memcmp(attributes->rgAttr[1].rgValue[0].pbData, ints[0].encoded, attributes->rgAttr[1].rgValue[0].cbData), "Unexpected value\n"); LocalFree(buf); } ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, doublePKCSAttributes, sizeof(doublePKCSAttributes), 0, NULL, NULL, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if (buf) { ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, doublePKCSAttributes, sizeof(doublePKCSAttributes), 0, NULL, buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, buf); } } @@ -6525,10 +6525,10 @@ static void test_encodePKCSSMimeCapabilities(DWORD dwEncoding) capabilities.cCapability = 0; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(emptySequence), "unexpected size %d\n", size); + ok(size == sizeof(emptySequence), "unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "unexpected value\n"); LocalFree(buf); } @@ -6544,14 +6544,14 @@ static void test_encodePKCSSMimeCapabilities(DWORD dwEncoding) &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); + "Expected E_INVALIDARG or OSS_LIMITED, got %08lx\n", GetLastError()); capability[0].pszObjId = oid1; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(singleCapability), "unexpected size %d\n", size); + ok(size == sizeof(singleCapability), "unexpected size %ld\n", size); ok(!memcmp(buf, singleCapability, size), "unexpected value\n"); LocalFree(buf); } @@ -6560,10 +6560,10 @@ static void test_encodePKCSSMimeCapabilities(DWORD dwEncoding) capabilities.cCapability = 2; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(twoCapabilities), "unexpected size %d\n", size); + ok(size == sizeof(twoCapabilities), "unexpected size %ld\n", size); ok(!memcmp(buf, twoCapabilities, size), "unexpected value\n"); LocalFree(buf); } @@ -6575,24 +6575,24 @@ static void compareSMimeCapabilities(LPCSTR header, DWORD i;
ok(got->cCapability == expected->cCapability, - "%s: expected %d capabilities, got %d\n", header, expected->cCapability, + "%s: expected %ld capabilities, got %ld\n", header, expected->cCapability, got->cCapability); for (i = 0; i < expected->cCapability; i++) { ok(!strcmp(expected->rgCapability[i].pszObjId, - got->rgCapability[i].pszObjId), "%s[%d]: expected %s, got %s\n", + got->rgCapability[i].pszObjId), "%s[%ld]: expected %s, got %s\n", header, i, expected->rgCapability[i].pszObjId, got->rgCapability[i].pszObjId); ok(expected->rgCapability[i].Parameters.cbData == got->rgCapability[i].Parameters.cbData, - "%s[%d]: expected %d bytes, got %d\n", header, i, + "%s[%ld]: expected %ld bytes, got %ld\n", header, i, expected->rgCapability[i].Parameters.cbData, got->rgCapability[i].Parameters.cbData); if (expected->rgCapability[i].Parameters.cbData) ok(!memcmp(expected->rgCapability[i].Parameters.pbData, got->rgCapability[i].Parameters.pbData, expected->rgCapability[i].Parameters.cbData), - "%s[%d]: unexpected value\n", header, i); + "%s[%ld]: unexpected value\n", header, i); } }
@@ -6608,7 +6608,7 @@ static void test_decodePKCSSMimeCapabilities(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { capabilities.cCapability = 0; @@ -6619,7 +6619,7 @@ static void test_decodePKCSSMimeCapabilities(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, singleCapability, sizeof(singleCapability), CRYPT_DECODE_ALLOC_FLAG, NULL, &ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { capability[0].pszObjId = oid1; @@ -6633,7 +6633,7 @@ static void test_decodePKCSSMimeCapabilities(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, singleCapabilitywithNULL, sizeof(singleCapabilitywithNULL), CRYPT_DECODE_ALLOC_FLAG, NULL, &ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { BYTE NULLparam[] = {0x05, 0x00}; @@ -6650,7 +6650,7 @@ static void test_decodePKCSSMimeCapabilities(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, twoCapabilities, sizeof(twoCapabilities), CRYPT_DECODE_ALLOC_FLAG, NULL, &ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { capability[0].Parameters.cbData = 0; @@ -6663,14 +6663,14 @@ static void test_decodePKCSSMimeCapabilities(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, twoCapabilities, sizeof(twoCapabilities), 0, NULL, NULL, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if (ptr) { SetLastError(0xdeadbeef); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, twoCapabilities, sizeof(twoCapabilities), 0, NULL, ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, ptr); } } @@ -6734,7 +6734,7 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) } ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); + "Expected E_INVALIDARG or OSS_LIMITED, got %08lx\n", GetLastError()); /* To be encoded, a signer must have an issuer at least, and the encoding * must include PKCS_7_ASN_ENCODING. (That isn't enough to be decoded, * see decoding tests.) @@ -6746,14 +6746,14 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptEncodeObjectEx failed: %x\n", GetLastError()); + "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(minimalPKCSSigner), "Unexpected size %d\n", size); + ok(size == sizeof(minimalPKCSSigner), "Unexpected size %ld\n", size); if (size == sizeof(minimalPKCSSigner)) ok(!memcmp(buf, minimalPKCSSigner, size), "Unexpected value\n"); else @@ -6768,14 +6768,14 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptEncodeObjectEx failed: %x\n", GetLastError()); + "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(PKCSSignerWithSerial), "Unexpected size %d\n", + ok(size == sizeof(PKCSSignerWithSerial), "Unexpected size %ld\n", size); if (size == sizeof(PKCSSignerWithSerial)) ok(!memcmp(buf, PKCSSignerWithSerial, size), @@ -6791,14 +6791,14 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptEncodeObjectEx failed: %x\n", GetLastError()); + "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(PKCSSignerWithHashAlgo), "Unexpected size %d\n", + ok(size == sizeof(PKCSSignerWithHashAlgo), "Unexpected size %ld\n", size); if (size == sizeof(PKCSSignerWithHashAlgo)) ok(!memcmp(buf, PKCSSignerWithHashAlgo, size), @@ -6814,14 +6814,14 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { ok(size == sizeof(PKCSSignerWithHashAndEncryptionAlgo), - "Unexpected size %d\n", size); + "Unexpected size %ld\n", size); if (size == sizeof(PKCSSignerWithHashAndEncryptionAlgo)) ok(!memcmp(buf, PKCSSignerWithHashAndEncryptionAlgo, size), "Unexpected value\n"); @@ -6837,13 +6837,13 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(PKCSSignerWithHash), "Unexpected size %d\n", + ok(size == sizeof(PKCSSignerWithHash), "Unexpected size %ld\n", size); if (size == sizeof(PKCSSignerWithHash)) ok(!memcmp(buf, PKCSSignerWithHash, size), @@ -6860,13 +6860,13 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(PKCSSignerWithAuthAttr), "Unexpected size %d\n", + ok(size == sizeof(PKCSSignerWithAuthAttr), "Unexpected size %ld\n", size); if (size == sizeof(PKCSSignerWithAuthAttr)) ok(!memcmp(buf, PKCSSignerWithAuthAttr, size), @@ -6892,24 +6892,24 @@ static void test_decodePKCSSignerInfo(DWORD dwEncoding) CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %x\n", + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %lx\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, PKCSSignerWithSerial, sizeof(PKCSSignerWithSerial), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == OSS_DATA_ERROR), - "CryptDecodeObjectEx failed: %x\n", GetLastError()); + "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { info = (CMSG_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->Issuer.cbData == sizeof(encodedCommonNameNoNull), - "Unexpected size %d\n", info->Issuer.cbData); + "Unexpected size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonNameNoNull, info->Issuer.cbData), "Unexpected value\n"); ok(info->SerialNumber.cbData == sizeof(serialNum), - "Unexpected size %d\n", info->SerialNumber.cbData); + "Unexpected size %ld\n", info->SerialNumber.cbData); ok(!memcmp(info->SerialNumber.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); LocalFree(buf); @@ -6920,14 +6920,14 @@ static void test_decodePKCSSignerInfo(DWORD dwEncoding) if (ret) { info = (CMSG_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->Issuer.cbData == sizeof(encodedCommonNameNoNull), - "Unexpected size %d\n", info->Issuer.cbData); + "Unexpected size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonNameNoNull, info->Issuer.cbData), "Unexpected value\n"); ok(info->SerialNumber.cbData == sizeof(serialNum), - "Unexpected size %d\n", info->SerialNumber.cbData); + "Unexpected size %ld\n", info->SerialNumber.cbData); ok(!memcmp(info->SerialNumber.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); ok(!strcmp(info->HashAlgorithm.pszObjId, "1.2.3"), @@ -6941,14 +6941,14 @@ static void test_decodePKCSSignerInfo(DWORD dwEncoding) if (ret) { info = (CMSG_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->Issuer.cbData == sizeof(encodedCommonNameNoNull), - "Unexpected size %d\n", info->Issuer.cbData); + "Unexpected size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonNameNoNull, info->Issuer.cbData), "Unexpected value\n"); ok(info->SerialNumber.cbData == sizeof(serialNum), - "Unexpected size %d\n", info->SerialNumber.cbData); + "Unexpected size %ld\n", info->SerialNumber.cbData); ok(!memcmp(info->SerialNumber.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); ok(!strcmp(info->HashAlgorithm.pszObjId, "1.2.3"), @@ -6963,21 +6963,21 @@ static void test_decodePKCSSignerInfo(DWORD dwEncoding) if (ret) { info = (CMSG_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->Issuer.cbData == sizeof(encodedCommonNameNoNull), - "Unexpected size %d\n", info->Issuer.cbData); + "Unexpected size %ld\n", info->Issuer.cbData); ok(!memcmp(info->Issuer.pbData, encodedCommonNameNoNull, info->Issuer.cbData), "Unexpected value\n"); ok(info->SerialNumber.cbData == sizeof(serialNum), - "Unexpected size %d\n", info->SerialNumber.cbData); + "Unexpected size %ld\n", info->SerialNumber.cbData); ok(!memcmp(info->SerialNumber.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); ok(!strcmp(info->HashAlgorithm.pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", info->HashAlgorithm.pszObjId); ok(!strcmp(info->HashEncryptionAlgorithm.pszObjId, "1.5.6"), "Expected 1.5.6, got %s\n", info->HashEncryptionAlgorithm.pszObjId); - ok(info->EncryptedHash.cbData == sizeof(hash), "Unexpected size %d\n", + ok(info->EncryptedHash.cbData == sizeof(hash), "Unexpected size %ld\n", info->EncryptedHash.cbData); ok(!memcmp(info->EncryptedHash.pbData, hash, sizeof(hash)), "Unexpected value\n"); @@ -6989,15 +6989,15 @@ static void test_decodePKCSSignerInfo(DWORD dwEncoding) if (ret) { info = (CMSG_SIGNER_INFO *)buf; - ok(info->AuthAttrs.cAttr == 1, "Expected 1 attribute, got %d\n", + ok(info->AuthAttrs.cAttr == 1, "Expected 1 attribute, got %ld\n", info->AuthAttrs.cAttr); ok(!strcmp(info->AuthAttrs.rgAttr[0].pszObjId, szOID_COMMON_NAME), "Expected %s, got %s\n", szOID_COMMON_NAME, info->AuthAttrs.rgAttr[0].pszObjId); - ok(info->AuthAttrs.rgAttr[0].cValue == 1, "Expected 1 value, got %d\n", + ok(info->AuthAttrs.rgAttr[0].cValue == 1, "Expected 1 value, got %ld\n", info->AuthAttrs.rgAttr[0].cValue); ok(info->AuthAttrs.rgAttr[0].rgValue[0].cbData == - sizeof(encodedCommonName), "Unexpected size %d\n", + sizeof(encodedCommonName), "Unexpected size %ld\n", info->AuthAttrs.rgAttr[0].rgValue[0].cbData); ok(!memcmp(info->AuthAttrs.rgAttr[0].rgValue[0].pbData, encodedCommonName, sizeof(encodedCommonName)), "Unexpected value\n"); @@ -7027,7 +7027,7 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) return; } ok(GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); info.SignerId.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, @@ -7039,7 +7039,7 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) return; } ok(GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* To be encoded, a signer must have a valid cert ID, where a valid ID may * be a key id or an issuer serial number with at least the issuer set, and * the encoding must include PKCS_7_ASN_ENCODING. @@ -7053,13 +7053,13 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(minimalPKCSSigner), "Unexpected size %d\n", size); + ok(size == sizeof(minimalPKCSSigner), "Unexpected size %ld\n", size); ok(!memcmp(buf, minimalPKCSSigner, size), "Unexpected value\n"); LocalFree(buf); } @@ -7071,13 +7071,13 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(PKCSSignerWithSerial), "Unexpected size %d\n", + ok(size == sizeof(PKCSSignerWithSerial), "Unexpected size %ld\n", size); ok(!memcmp(buf, PKCSSignerWithSerial, size), "Unexpected value\n"); LocalFree(buf); @@ -7091,13 +7091,13 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(CMSSignerWithKeyId), "Unexpected size %d\n", + ok(size == sizeof(CMSSignerWithKeyId), "Unexpected size %ld\n", size); ok(!memcmp(buf, CMSSignerWithKeyId, size), "Unexpected value\n"); LocalFree(buf); @@ -7114,7 +7114,7 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Now with a hash algo */ info.SignerId.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; U(info.SignerId).IssuerSerialNumber.Issuer.cbData = @@ -7126,13 +7126,13 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(PKCSSignerWithHashAlgo), "Unexpected size %d\n", + ok(size == sizeof(PKCSSignerWithHashAlgo), "Unexpected size %ld\n", size); ok(!memcmp(buf, PKCSSignerWithHashAlgo, size), "Unexpected value\n"); @@ -7145,14 +7145,14 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { ok(size == sizeof(PKCSSignerWithHashAndEncryptionAlgo), - "Unexpected size %d\n", size); + "Unexpected size %ld\n", size); ok(!memcmp(buf, PKCSSignerWithHashAndEncryptionAlgo, size), "Unexpected value\n"); LocalFree(buf); @@ -7165,13 +7165,13 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); if (!(dwEncoding & PKCS_7_ASN_ENCODING)) ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %lx\n", GetLastError()); if (ret) { - ok(size == sizeof(PKCSSignerWithHash), "Unexpected size %d\n", + ok(size == sizeof(PKCSSignerWithHash), "Unexpected size %ld\n", size); ok(!memcmp(buf, PKCSSignerWithHash, size), "Unexpected value\n"); LocalFree(buf); @@ -7199,28 +7199,28 @@ static void test_decodeCMSSignerInfo(DWORD dwEncoding) return; } ok(GetLastError() == CRYPT_E_ASN1_CORRUPT, - "Expected CRYPT_E_ASN1_CORRUPT, got %x\n", GetLastError()); + "Expected CRYPT_E_ASN1_CORRUPT, got %lx\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, PKCSSignerWithSerial, sizeof(PKCSSignerWithSerial), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER, - "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %d\n", + "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %ld\n", info->SignerId.dwIdChoice); ok(U(info->SignerId).IssuerSerialNumber.Issuer.cbData == - sizeof(encodedCommonNameNoNull), "Unexpected size %d\n", + sizeof(encodedCommonNameNoNull), "Unexpected size %ld\n", U(info->SignerId).IssuerSerialNumber.Issuer.cbData); ok(!memcmp(U(info->SignerId).IssuerSerialNumber.Issuer.pbData, encodedCommonNameNoNull, U(info->SignerId).IssuerSerialNumber.Issuer.cbData), "Unexpected value\n"); ok(U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData == - sizeof(serialNum), "Unexpected size %d\n", + sizeof(serialNum), "Unexpected size %ld\n", U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData); ok(!memcmp(U(info->SignerId).IssuerSerialNumber.SerialNumber.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); @@ -7229,24 +7229,24 @@ static void test_decodeCMSSignerInfo(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, PKCSSignerWithHashAlgo, sizeof(PKCSSignerWithHashAlgo), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER, - "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %d\n", + "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %ld\n", info->SignerId.dwIdChoice); ok(U(info->SignerId).IssuerSerialNumber.Issuer.cbData == - sizeof(encodedCommonNameNoNull), "Unexpected size %d\n", + sizeof(encodedCommonNameNoNull), "Unexpected size %ld\n", U(info->SignerId).IssuerSerialNumber.Issuer.cbData); ok(!memcmp(U(info->SignerId).IssuerSerialNumber.Issuer.pbData, encodedCommonNameNoNull, U(info->SignerId).IssuerSerialNumber.Issuer.cbData), "Unexpected value\n"); ok(U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData == - sizeof(serialNum), "Unexpected size %d\n", + sizeof(serialNum), "Unexpected size %ld\n", U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData); ok(!memcmp(U(info->SignerId).IssuerSerialNumber.SerialNumber.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); @@ -7258,24 +7258,24 @@ static void test_decodeCMSSignerInfo(DWORD dwEncoding) PKCSSignerWithHashAndEncryptionAlgo, sizeof(PKCSSignerWithHashAndEncryptionAlgo), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER, - "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %d\n", + "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %ld\n", info->SignerId.dwIdChoice); ok(U(info->SignerId).IssuerSerialNumber.Issuer.cbData == - sizeof(encodedCommonNameNoNull), "Unexpected size %d\n", + sizeof(encodedCommonNameNoNull), "Unexpected size %ld\n", U(info->SignerId).IssuerSerialNumber.Issuer.cbData); ok(!memcmp(U(info->SignerId).IssuerSerialNumber.Issuer.pbData, encodedCommonNameNoNull, U(info->SignerId).IssuerSerialNumber.Issuer.cbData), "Unexpected value\n"); ok(U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData == - sizeof(serialNum), "Unexpected size %d\n", + sizeof(serialNum), "Unexpected size %ld\n", U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData); ok(!memcmp(U(info->SignerId).IssuerSerialNumber.SerialNumber.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); @@ -7288,24 +7288,24 @@ static void test_decodeCMSSignerInfo(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, PKCSSignerWithHash, sizeof(PKCSSignerWithHash), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER, - "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %d\n", + "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %ld\n", info->SignerId.dwIdChoice); ok(U(info->SignerId).IssuerSerialNumber.Issuer.cbData == - sizeof(encodedCommonNameNoNull), "Unexpected size %d\n", + sizeof(encodedCommonNameNoNull), "Unexpected size %ld\n", U(info->SignerId).IssuerSerialNumber.Issuer.cbData); ok(!memcmp(U(info->SignerId).IssuerSerialNumber.Issuer.pbData, encodedCommonNameNoNull, U(info->SignerId).IssuerSerialNumber.Issuer.cbData), "Unexpected value\n"); ok(U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData == - sizeof(serialNum), "Unexpected size %d\n", + sizeof(serialNum), "Unexpected size %ld\n", U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData); ok(!memcmp(U(info->SignerId).IssuerSerialNumber.SerialNumber.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); @@ -7313,7 +7313,7 @@ static void test_decodeCMSSignerInfo(DWORD dwEncoding) "Expected %s, got %s\n", oid1, info->HashAlgorithm.pszObjId); ok(!strcmp(info->HashEncryptionAlgorithm.pszObjId, oid2), "Expected %s, got %s\n", oid2, info->HashEncryptionAlgorithm.pszObjId); - ok(info->EncryptedHash.cbData == sizeof(hash), "Unexpected size %d\n", + ok(info->EncryptedHash.cbData == sizeof(hash), "Unexpected size %ld\n", info->EncryptedHash.cbData); ok(!memcmp(info->EncryptedHash.pbData, hash, sizeof(hash)), "Unexpected value\n"); @@ -7322,17 +7322,17 @@ static void test_decodeCMSSignerInfo(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, CMSSignerWithKeyId, sizeof(CMSSignerWithKeyId), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %lx\n", GetLastError()); if (ret) { info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", + ok(info->dwVersion == 0, "Expected version 0, got %ld\n", info->dwVersion); ok(info->SignerId.dwIdChoice == CERT_ID_KEY_IDENTIFIER, - "Expected CERT_ID_KEY_IDENTIFIER, got %d\n", + "Expected CERT_ID_KEY_IDENTIFIER, got %ld\n", info->SignerId.dwIdChoice); ok(U(info->SignerId).KeyId.cbData == sizeof(serialNum), - "Unexpected size %d\n", U(info->SignerId).KeyId.cbData); + "Unexpected size %ld\n", U(info->SignerId).KeyId.cbData); ok(!memcmp(U(info->SignerId).KeyId.pbData, serialNum, sizeof(serialNum)), "Unexpected value\n"); LocalFree(buf); @@ -7375,7 +7375,7 @@ static void test_encodeNameConstraints(DWORD dwEncoding) skip("no X509_NAME_CONSTRAINTS encode support\n"); return; } - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(emptySequence), "Unexpected size\n"); @@ -7388,11 +7388,11 @@ static void test_encodeNameConstraints(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); permitted.Base.dwAltNameChoice = CERT_ALT_NAME_DNS_NAME; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(emptyDNSPermittedConstraints), "Unexpected size\n"); @@ -7406,7 +7406,7 @@ static void test_encodeNameConstraints(DWORD dwEncoding) excluded.Base.dwAltNameChoice = CERT_ALT_NAME_DNS_NAME; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(emptyDNSExcludedConstraints), "Unexpected size\n"); @@ -7417,7 +7417,7 @@ static void test_encodeNameConstraints(DWORD dwEncoding) U(excluded.Base).pwszURL = (LPWSTR)url; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(DNSExcludedConstraints), "Unexpected size\n"); @@ -7431,7 +7431,7 @@ static void test_encodeNameConstraints(DWORD dwEncoding) constraints.cPermittedSubtree = 1; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(permittedAndExcludedConstraints), @@ -7443,7 +7443,7 @@ static void test_encodeNameConstraints(DWORD dwEncoding) permitted.dwMinimum = 5; ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(permittedAndExcludedWithMinConstraints), @@ -7457,7 +7457,7 @@ static void test_encodeNameConstraints(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(permittedAndExcludedWithMinMaxConstraints), @@ -7529,14 +7529,14 @@ static void test_decodeNameConstraints(DWORD dwEncoding) skip("no X509_NAME_CONSTRAINTS decode support\n"); return; } - ok(ret, "%d: CryptDecodeObjectEx failed: %08x\n", i, GetLastError()); + ok(ret, "%ld: CryptDecodeObjectEx failed: %08lx\n", i, GetLastError()); if (ret) { DWORD j;
if (constraints->cPermittedSubtree != encodedNameConstraints[i].constraints.cPermittedSubtree) - fprintf(stderr, "%d: expected %u permitted, got %u\n", i, + fprintf(stderr, "%ld: expected %lu permitted, got %lu\n", i, encodedNameConstraints[i].constraints.cPermittedSubtree, constraints->cPermittedSubtree); if (constraints->cPermittedSubtree == @@ -7550,7 +7550,7 @@ static void test_decodeNameConstraints(DWORD dwEncoding) } if (constraints->cExcludedSubtree != encodedNameConstraints[i].constraints.cExcludedSubtree) - fprintf(stderr, "%d: expected %u excluded, got %u\n", i, + fprintf(stderr, "%ld: expected %lu excluded, got %lu\n", i, encodedNameConstraints[i].constraints.cExcludedSubtree, constraints->cExcludedSubtree); if (constraints->cExcludedSubtree == @@ -7600,10 +7600,10 @@ static void test_encodePolicyQualifierUserNotice(DWORD dwEncoding) skip("no X509_PKIX_POLICY_QUALIFIER_USERNOTICE encode support\n"); return; } - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(sizeof(emptySequence) == size, "unexpected size %d\n", size); + ok(sizeof(emptySequence) == size, "unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "unexpected value\n"); LocalFree(buf); } @@ -7611,10 +7611,10 @@ static void test_encodePolicyQualifierUserNotice(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_PKIX_POLICY_QUALIFIER_USERNOTICE, ¬ice, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(sizeof(noticeWithDisplayText) == size, "unexpected size %d\n", size); + ok(sizeof(noticeWithDisplayText) == size, "unexpected size %ld\n", size); ok(!memcmp(buf, noticeWithDisplayText, size), "unexpected value\n"); LocalFree(buf); } @@ -7625,10 +7625,10 @@ static void test_encodePolicyQualifierUserNotice(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_PKIX_POLICY_QUALIFIER_USERNOTICE, ¬ice, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(sizeof(noticeWithReference) == size, "unexpected size %d\n", size); + ok(sizeof(noticeWithReference) == size, "unexpected size %ld\n", size); ok(!memcmp(buf, noticeWithReference, size), "unexpected value\n"); LocalFree(buf); } @@ -7649,7 +7649,7 @@ static void test_decodePolicyQualifierUserNotice(DWORD dwEncoding) skip("no X509_PKIX_POLICY_QUALIFIER_USERNOTICE decode support\n"); return; } - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(notice->pszDisplayText == NULL, "unexpected display text\n"); @@ -7660,7 +7660,7 @@ static void test_decodePolicyQualifierUserNotice(DWORD dwEncoding) X509_PKIX_POLICY_QUALIFIER_USERNOTICE, noticeWithDisplayText, sizeof(noticeWithDisplayText), CRYPT_DECODE_ALLOC_FLAG, NULL, ¬ice, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(!lstrcmpW(notice->pszDisplayText, noticeText), @@ -7672,7 +7672,7 @@ static void test_decodePolicyQualifierUserNotice(DWORD dwEncoding) X509_PKIX_POLICY_QUALIFIER_USERNOTICE, noticeWithReference, sizeof(noticeWithReference), CRYPT_DECODE_ALLOC_FLAG, NULL, ¬ice, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(!lstrcmpW(notice->pszDisplayText, noticeText), @@ -7684,7 +7684,7 @@ static void test_decodePolicyQualifierUserNotice(DWORD dwEncoding) "unexpected organization %s\n", notice->pNoticeReference->pszOrganization); ok(notice->pNoticeReference->cNoticeNumbers == 2, - "expected 2 notice numbers, got %d\n", + "expected 2 notice numbers, got %ld\n", notice->pNoticeReference->cNoticeNumbers); ok(notice->pNoticeReference->rgNoticeNumbers[0] == noticeNumbers[0], "unexpected notice number %d\n", @@ -7724,10 +7724,10 @@ static void test_encodeCertPolicies(DWORD dwEncoding) memset(&info, 0, sizeof(info)); ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_POLICIES, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(sizeof(emptySequence) == size, "unexpected size %d\n", size); + ok(sizeof(emptySequence) == size, "unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, size), "unexpected value\n"); LocalFree(buf); } @@ -7738,14 +7738,14 @@ static void test_encodeCertPolicies(DWORD dwEncoding) CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x/NT4 */), - "expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); + "expected E_INVALIDARG or OSS_LIMITED, got %08lx\n", GetLastError()); policy[0].pszPolicyIdentifier = oid_any_policy; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_POLICIES, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(sizeof(policiesWithAnyPolicy) == size, "unexpected size %d\n", size); + ok(sizeof(policiesWithAnyPolicy) == size, "unexpected size %ld\n", size); ok(!memcmp(buf, policiesWithAnyPolicy, size), "unexpected value\n"); LocalFree(buf); } @@ -7759,10 +7759,10 @@ static void test_encodeCertPolicies(DWORD dwEncoding) info.cPolicyInfo = 2; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_POLICIES, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(sizeof(twoPolicies) == size, "unexpected size %d\n", size); + ok(sizeof(twoPolicies) == size, "unexpected size %ld\n", size); ok(!memcmp(buf, twoPolicies, size), "unexpected value\n"); LocalFree(buf); } @@ -7777,55 +7777,55 @@ static void test_decodeCertPolicies(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_POLICIES, emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(info->cPolicyInfo == 0, "unexpected policy info %d\n", + ok(info->cPolicyInfo == 0, "unexpected policy info %ld\n", info->cPolicyInfo); LocalFree(info); } ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_POLICIES, policiesWithAnyPolicy, sizeof(policiesWithAnyPolicy), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(info->cPolicyInfo == 1, "unexpected policy info %d\n", + ok(info->cPolicyInfo == 1, "unexpected policy info %ld\n", info->cPolicyInfo); ok(!strcmp(info->rgPolicyInfo[0].pszPolicyIdentifier, oid_any_policy), "unexpected policy id %s\n", info->rgPolicyInfo[0].pszPolicyIdentifier); ok(info->rgPolicyInfo[0].cPolicyQualifier == 0, - "unexpected policy qualifier count %d\n", + "unexpected policy qualifier count %ld\n", info->rgPolicyInfo[0].cPolicyQualifier); LocalFree(info); } ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_POLICIES, twoPolicies, sizeof(twoPolicies), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(info->cPolicyInfo == 2, "unexpected policy info %d\n", + ok(info->cPolicyInfo == 2, "unexpected policy info %ld\n", info->cPolicyInfo); ok(!strcmp(info->rgPolicyInfo[0].pszPolicyIdentifier, oid_any_policy), "unexpected policy id %s\n", info->rgPolicyInfo[0].pszPolicyIdentifier); ok(info->rgPolicyInfo[0].cPolicyQualifier == 0, - "unexpected policy qualifier count %d\n", + "unexpected policy qualifier count %ld\n", info->rgPolicyInfo[0].cPolicyQualifier); ok(!strcmp(info->rgPolicyInfo[1].pszPolicyIdentifier, oid1), "unexpected policy id %s\n", info->rgPolicyInfo[1].pszPolicyIdentifier); ok(info->rgPolicyInfo[1].cPolicyQualifier == 1, - "unexpected policy qualifier count %d\n", + "unexpected policy qualifier count %ld\n", info->rgPolicyInfo[1].cPolicyQualifier); ok(!strcmp( info->rgPolicyInfo[1].rgPolicyQualifier[0].pszPolicyQualifierId, oid_user_notice), "unexpected policy qualifier id %s\n", info->rgPolicyInfo[1].rgPolicyQualifier[0].pszPolicyQualifierId); ok(info->rgPolicyInfo[1].rgPolicyQualifier[0].Qualifier.cbData == - sizeof(noticeWithReference), "unexpected qualifier size %d\n", + sizeof(noticeWithReference), "unexpected qualifier size %ld\n", info->rgPolicyInfo[1].rgPolicyQualifier[0].Qualifier.cbData); ok(!memcmp( info->rgPolicyInfo[1].rgPolicyQualifier[0].Qualifier.pbData, @@ -7835,13 +7835,13 @@ static void test_decodeCertPolicies(DWORD dwEncoding) } ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_POLICIES, twoPolicies, sizeof(twoPolicies), 0, NULL, NULL, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if (info) { ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_POLICIES, twoPolicies, sizeof(twoPolicies), 0, NULL, info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, info); } } @@ -7872,7 +7872,7 @@ static void test_encodeCertPolicyMappings(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, mappingOids[i], &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) { win_skip("no policy mappings support\n"); @@ -7880,7 +7880,7 @@ static void test_encodeCertPolicyMappings(DWORD dwEncoding) } if (ret) { - ok(size == sizeof(emptySequence), "unexpected size %d\n", size); + ok(size == sizeof(emptySequence), "unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, sizeof(emptySequence)), "unexpected value\n"); LocalFree(buf); @@ -7893,16 +7893,16 @@ static void test_encodeCertPolicyMappings(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, mappingOids[i], &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); mapping[0].pszIssuerDomainPolicy = oid1; mapping[0].pszSubjectDomainPolicy = oid2; ret = pCryptEncodeObjectEx(dwEncoding, mappingOids[i], &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(policyMappingWithOneMapping), - "unexpected size %d\n", size); + "unexpected size %ld\n", size); ok(!memcmp(buf, policyMappingWithOneMapping, size), "unexpected value\n"); LocalFree(buf); @@ -7912,11 +7912,11 @@ static void test_encodeCertPolicyMappings(DWORD dwEncoding) info.cPolicyMapping = 2; ret = pCryptEncodeObjectEx(dwEncoding, mappingOids[i], &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(policyMappingWithTwoMappings), - "unexpected size %d\n", size); + "unexpected size %ld\n", size); ok(!memcmp(buf, policyMappingWithTwoMappings, size), "unexpected value\n"); LocalFree(buf); @@ -7937,7 +7937,7 @@ static void test_decodeCertPolicyMappings(DWORD dwEncoding) emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND), - "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) { win_skip("no policy mappings support\n"); @@ -7946,17 +7946,17 @@ static void test_decodeCertPolicyMappings(DWORD dwEncoding) if (ret) { ok(info->cPolicyMapping == 0, - "expected 0 policy mappings, got %d\n", info->cPolicyMapping); + "expected 0 policy mappings, got %ld\n", info->cPolicyMapping); LocalFree(info); } ret = pCryptDecodeObjectEx(dwEncoding, mappingOids[i], policyMappingWithOneMapping, sizeof(policyMappingWithOneMapping), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(info->cPolicyMapping == 1, - "expected 1 policy mappings, got %d\n", info->cPolicyMapping); + "expected 1 policy mappings, got %ld\n", info->cPolicyMapping); ok(!strcmp(info->rgPolicyMapping[0].pszIssuerDomainPolicy, "1.2.3"), "unexpected issuer policy %s\n", info->rgPolicyMapping[0].pszIssuerDomainPolicy); @@ -7968,11 +7968,11 @@ static void test_decodeCertPolicyMappings(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, mappingOids[i], policyMappingWithTwoMappings, sizeof(policyMappingWithTwoMappings), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(info->cPolicyMapping == 2, - "expected 2 policy mappings, got %d\n", info->cPolicyMapping); + "expected 2 policy mappings, got %ld\n", info->cPolicyMapping); ok(!strcmp(info->rgPolicyMapping[0].pszIssuerDomainPolicy, "1.2.3"), "unexpected issuer policy %s\n", info->rgPolicyMapping[0].pszIssuerDomainPolicy); @@ -7990,14 +7990,14 @@ static void test_decodeCertPolicyMappings(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, mappingOids[i], policyMappingWithTwoMappings, sizeof(policyMappingWithTwoMappings), 0, NULL, NULL, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if (info) { ret = pCryptDecodeObjectEx(dwEncoding, mappingOids[i], policyMappingWithTwoMappings, sizeof(policyMappingWithTwoMappings), 0, NULL, info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, info); } } @@ -8023,7 +8023,7 @@ static void test_encodeCertPolicyConstraints(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) { win_skip("no policy constraints support\n"); @@ -8031,7 +8031,7 @@ static void test_encodeCertPolicyConstraints(DWORD dwEncoding) } if (ret) { - ok(size == sizeof(emptySequence), "unexpected size %d\n", size); + ok(size == sizeof(emptySequence), "unexpected size %ld\n", size); ok(!memcmp(buf, emptySequence, sizeof(emptySequence)), "unexpected value\n"); LocalFree(buf); @@ -8042,11 +8042,11 @@ static void test_encodeCertPolicyConstraints(DWORD dwEncoding) info.fRequireExplicitPolicy = TRUE; ret = pCryptEncodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(policyConstraintsWithRequireExplicit), - "unexpected size %d\n", size); + "unexpected size %ld\n", size); ok(!memcmp(buf, policyConstraintsWithRequireExplicit, sizeof(policyConstraintsWithRequireExplicit)), "unexpected value\n"); LocalFree(buf); @@ -8058,11 +8058,11 @@ static void test_encodeCertPolicyConstraints(DWORD dwEncoding) info.dwInhibitPolicyMappingSkipCerts = 1; ret = pCryptEncodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(policyConstraintsWithInhibitMapping), - "unexpected size %d\n", size); + "unexpected size %ld\n", size); ok(!memcmp(buf, policyConstraintsWithInhibitMapping, sizeof(policyConstraintsWithInhibitMapping)), "unexpected value\n"); LocalFree(buf); @@ -8072,10 +8072,10 @@ static void test_encodeCertPolicyConstraints(DWORD dwEncoding) info.dwRequireExplicitPolicySkipCerts = 1; ret = pCryptEncodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { - ok(size == sizeof(policyConstraintsWithBoth), "unexpected size %d\n", + ok(size == sizeof(policyConstraintsWithBoth), "unexpected size %ld\n", size); ok(!memcmp(buf, policyConstraintsWithBoth, sizeof(policyConstraintsWithBoth)), "unexpected value\n"); @@ -8096,7 +8096,7 @@ static void test_decodeCertPolicyConstraints(DWORD dwEncoding) emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND), - "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) { win_skip("no policy mappings support\n"); @@ -8114,12 +8114,12 @@ static void test_decodeCertPolicyConstraints(DWORD dwEncoding) policyConstraintsWithRequireExplicit, sizeof(policyConstraintsWithRequireExplicit), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(info->fRequireExplicitPolicy, "expected require explicit = TRUE\n"); - ok(info->dwRequireExplicitPolicySkipCerts == 0, "expected 0, got %d\n", + ok(info->dwRequireExplicitPolicySkipCerts == 0, "expected 0, got %ld\n", info->dwRequireExplicitPolicySkipCerts); ok(!info->fInhibitPolicyMapping, "expected implicit mapping = FALSE\n"); @@ -8129,30 +8129,30 @@ static void test_decodeCertPolicyConstraints(DWORD dwEncoding) policyConstraintsWithInhibitMapping, sizeof(policyConstraintsWithInhibitMapping), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(!info->fRequireExplicitPolicy, "expected require explicit = FALSE\n"); ok(info->fInhibitPolicyMapping, "expected implicit mapping = TRUE\n"); - ok(info->dwInhibitPolicyMappingSkipCerts == 1, "expected 1, got %d\n", + ok(info->dwInhibitPolicyMappingSkipCerts == 1, "expected 1, got %ld\n", info->dwInhibitPolicyMappingSkipCerts); LocalFree(info); } ret = pCryptDecodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, policyConstraintsWithBoth, sizeof(policyConstraintsWithBoth), CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError()); if (ret) { ok(info->fRequireExplicitPolicy, "expected require explicit = TRUE\n"); - ok(info->dwRequireExplicitPolicySkipCerts == 1, "expected 1, got %d\n", + ok(info->dwRequireExplicitPolicySkipCerts == 1, "expected 1, got %ld\n", info->dwRequireExplicitPolicySkipCerts); ok(info->fInhibitPolicyMapping, "expected implicit mapping = TRUE\n"); - ok(info->dwInhibitPolicyMappingSkipCerts == 1, "expected 1, got %d\n", + ok(info->dwInhibitPolicyMappingSkipCerts == 1, "expected 1, got %ld\n", info->dwInhibitPolicyMappingSkipCerts); LocalFree(info); } @@ -8376,7 +8376,7 @@ static void test_decodeRsaPrivateKey(DWORD dwEncoding) rsaPrivKeyDer, sizeof(rsaPrivKeyDer)-10, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD), - "Expected CRYPT_E_ASN1_EOD, got %08x\n", + "Expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError());
buf = NULL; @@ -8384,7 +8384,7 @@ static void test_decodeRsaPrivateKey(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS_RSA_PRIVATE_KEY, rsaPrivKeyDer, sizeof(rsaPrivKeyDer), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret) { @@ -8401,7 +8401,7 @@ static void test_decodeRsaPrivateKey(DWORD dwEncoding)
ok(bufSize >= sizeof(BLOBHEADER) + sizeof(RSAPUBKEY) + (bitlen * 9 / 16), - "Wrong size %d\n", bufSize); + "Wrong size %ld\n", bufSize);
ok(hdr->bType == PRIVATEKEYBLOB, "Expected type PRIVATEKEYBLOB (%d), got %d\n", PRIVATEKEYBLOB, @@ -8415,11 +8415,11 @@ static void test_decodeRsaPrivateKey(DWORD dwEncoding) "Expected CALG_RSA_KEYX, got %08x\n", hdr->aiKeyAlg);
ok(rsaPubKey->magic == 0x32415352, - "Expected magic 0x32415352, got 0x%x\n", rsaPubKey->magic); + "Expected magic 0x32415352, got 0x%lx\n", rsaPubKey->magic); ok(rsaPubKey->bitlen == bitlen, - "Expected bitlen %d, got %d\n", bitlen, rsaPubKey->bitlen); + "Expected bitlen %d, got %ld\n", bitlen, rsaPubKey->bitlen); ok(rsaPubKey->pubexp == 65537, - "Expected pubexp 65537, got %d\n", rsaPubKey->pubexp); + "Expected pubexp 65537, got %ld\n", rsaPubKey->pubexp);
ok(!memcmp(modulus, rsaPrivKeyModulus, bitlen/8), "unexpected modulus\n"); @@ -8452,37 +8452,37 @@ static void testExportPublicKey(HCRYPTPROV csp, PCERT_PUBLIC_KEY_INFO *pInfo) */ ret = CryptExportPublicKeyInfoEx(0, 0, 0, NULL, 0, NULL, NULL, &size); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); ret = CryptExportPublicKeyInfoEx(0, AT_SIGNATURE, 0, NULL, 0, NULL, NULL, &size); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); ret = CryptExportPublicKeyInfoEx(0, 0, X509_ASN_ENCODING, NULL, 0, NULL, NULL, &size); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); ret = CryptExportPublicKeyInfoEx(0, AT_SIGNATURE, X509_ASN_ENCODING, NULL, 0, NULL, NULL, &size); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); /* Test with no key */ ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, NULL, 0, NULL, NULL, &size); - ok(!ret && GetLastError() == NTE_NO_KEY, "Expected NTE_NO_KEY, got %08x\n", + ok(!ret && GetLastError() == NTE_NO_KEY, "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key); - ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); + ok(ret, "CryptGenKey failed: %08lx\n", GetLastError()); if (ret) { ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, NULL, 0, NULL, NULL, &size); - ok(ret, "CryptExportPublicKeyInfoEx failed: %08x\n", GetLastError()); + ok(ret, "CryptExportPublicKeyInfoEx failed: %08lx\n", GetLastError()); *pInfo = HeapAlloc(GetProcessHeap(), 0, size); if (*pInfo) { ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, NULL, 0, NULL, *pInfo, &size); - ok(ret, "CryptExportPublicKeyInfoEx failed: %08x\n", + ok(ret, "CryptExportPublicKeyInfoEx failed: %08lx\n", GetLastError()); if (ret) { @@ -8542,26 +8542,26 @@ static void testImportPublicKey(HCRYPTPROV csp, PCERT_PUBLIC_KEY_INFO info) */ ret = CryptImportPublicKeyInfoEx(0, 0, info, 0, 0, NULL, &key); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = CryptImportPublicKeyInfoEx(csp, 0, info, 0, 0, NULL, &key); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = CryptImportPublicKeyInfoEx(0, X509_ASN_ENCODING, info, 0, 0, NULL, &key); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError());
/* Export key with standard algorithm (CALG_RSA_KEYX) */ ret = CryptImportPublicKeyInfoEx(csp, X509_ASN_ENCODING, info, 0, 0, NULL, &key); - ok(ret, "CryptImportPublicKeyInfoEx failed: %08x\n", GetLastError()); + ok(ret, "CryptImportPublicKeyInfoEx failed: %08lx\n", GetLastError());
dwSize = sizeof(ai); ret = CryptGetKeyParam(key, KP_ALGID, (LPVOID)&ai, &dwSize, 0); - ok(ret, "CryptGetKeyParam failed: %08x\n", GetLastError()); + ok(ret, "CryptGetKeyParam failed: %08lx\n", GetLastError()); if(ret) { - ok(dwSize == sizeof(ai), "CryptGetKeyParam returned size %d\n",dwSize); + ok(dwSize == sizeof(ai), "CryptGetKeyParam returned size %ld\n",dwSize); ok(ai == CALG_RSA_KEYX, "Default ALG_ID is %04x (expected CALG_RSA_KEYX)\n", ai); }
@@ -8570,14 +8570,14 @@ static void testImportPublicKey(HCRYPTPROV csp, PCERT_PUBLIC_KEY_INFO info) /* Repeat with forced algorithm */ ret = CryptImportPublicKeyInfoEx(csp, X509_ASN_ENCODING, info, CALG_RSA_SIGN, 0, NULL, &key); - ok(ret, "CryptImportPublicKeyInfoEx failed: %08x\n", GetLastError()); + ok(ret, "CryptImportPublicKeyInfoEx failed: %08lx\n", GetLastError());
dwSize = sizeof(ai); ret = CryptGetKeyParam(key, KP_ALGID, (LPVOID)&ai, &dwSize, 0); - ok(ret, "CryptGetKeyParam failed: %08x\n", GetLastError()); + ok(ret, "CryptGetKeyParam failed: %08lx\n", GetLastError()); if(ret) { - ok(dwSize == sizeof(ai), "CryptGetKeyParam returned size %d\n",dwSize); + ok(dwSize == sizeof(ai), "CryptGetKeyParam returned size %ld\n",dwSize); ok(ai == CALG_RSA_SIGN, "ALG_ID is %04x (expected CALG_RSA_SIGN)\n", ai); }
@@ -8586,7 +8586,7 @@ static void testImportPublicKey(HCRYPTPROV csp, PCERT_PUBLIC_KEY_INFO info) /* Test importing a public key from a certificate context */ context = CertCreateCertificateContext(X509_ASN_ENCODING, expiredCert, sizeof(expiredCert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(context != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); if (context) { @@ -8596,12 +8596,12 @@ static void testImportPublicKey(HCRYPTPROV csp, PCERT_PUBLIC_KEY_INFO info) context->pCertInfo->SubjectPublicKeyInfo.Algorithm.pszObjId); ret = CryptImportPublicKeyInfoEx(csp, X509_ASN_ENCODING, &context->pCertInfo->SubjectPublicKeyInfo, 0, 0, NULL, &key); - ok(ret, "CryptImportPublicKeyInfoEx failed: %08x\n", GetLastError()); + ok(ret, "CryptImportPublicKeyInfoEx failed: %08lx\n", GetLastError()); CryptDestroyKey(key);
ret = CryptImportPublicKeyInfoEx2(X509_ASN_ENCODING, &context->pCertInfo->SubjectPublicKeyInfo, 0, NULL, &key2); - ok(ret, "CryptImportPublicKeyInfoEx2 failed: %08x\n", GetLastError()); + ok(ret, "CryptImportPublicKeyInfoEx2 failed: %08lx\n", GetLastError()); BCryptDestroyKey(key2);
CertFreeCertificateContext(context); diff --git a/dlls/crypt32/tests/main.c b/dlls/crypt32/tests/main.c index b594256fb39..640a50399e5 100644 --- a/dlls/crypt32/tests/main.c +++ b/dlls/crypt32/tests/main.c @@ -42,7 +42,7 @@ static void test_findAttribute(void) SetLastError(0xdeadbeef); ret = CertFindAttribute(NULL, 0, NULL); ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", + ok(GetLastError() == 0xdeadbeef, "Last error was set to %08lx\n", GetLastError()); if (0) { @@ -54,25 +54,25 @@ static void test_findAttribute(void) SetLastError(0xdeadbeef); ret = CertFindAttribute(NULL, 1, &attr); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(), + "Expected ERROR_INVALID_PARAMETER, got %ld (%08lx)\n", GetLastError(), GetLastError()); } /* returns NULL, last error not set */ SetLastError(0xdeadbeef); ret = CertFindAttribute("bogus", 1, &attr); ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", + ok(GetLastError() == 0xdeadbeef, "Last error was set to %08lx\n", GetLastError()); /* returns NULL, last error not set */ SetLastError(0xdeadbeef); ret = CertFindAttribute("1.2.4", 1, &attr); ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", + ok(GetLastError() == 0xdeadbeef, "Last error was set to %08lx\n", GetLastError()); /* succeeds, last error not set */ SetLastError(0xdeadbeef); ret = CertFindAttribute("1.2.3", 1, &attr); - ok(ret != NULL, "CertFindAttribute failed: %08x\n", GetLastError()); + ok(ret != NULL, "CertFindAttribute failed: %08lx\n", GetLastError()); }
static void test_findExtension(void) @@ -86,7 +86,7 @@ static void test_findExtension(void) SetLastError(0xdeadbeef); ret = CertFindExtension(NULL, 0, NULL); ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", + ok(GetLastError() == 0xdeadbeef, "Last error was set to %08lx\n", GetLastError()); if (0) { @@ -99,25 +99,25 @@ static void test_findExtension(void) SetLastError(0xdeadbeef); ret = CertFindExtension(NULL, 1, &ext); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(), + "Expected ERROR_INVALID_PARAMETER, got %ld (%08lx)\n", GetLastError(), GetLastError()); } /* returns NULL, last error not set */ SetLastError(0xdeadbeef); ret = CertFindExtension("bogus", 1, &ext); ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", + ok(GetLastError() == 0xdeadbeef, "Last error was set to %08lx\n", GetLastError()); /* returns NULL, last error not set */ SetLastError(0xdeadbeef); ret = CertFindExtension("1.2.4", 1, &ext); ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", + ok(GetLastError() == 0xdeadbeef, "Last error was set to %08lx\n", GetLastError()); /* succeeds, last error not set */ SetLastError(0xdeadbeef); ret = CertFindExtension("1.2.3", 1, &ext); - ok(ret != NULL, "CertFindExtension failed: %08x\n", GetLastError()); + ok(ret != NULL, "CertFindExtension failed: %08lx\n", GetLastError()); }
static void test_findRDNAttr(void) @@ -142,25 +142,25 @@ static void test_findRDNAttr(void) SetLastError(0xdeadbeef); ret = CertFindRDNAttr(NULL, &nameInfo); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(), + "Expected ERROR_INVALID_PARAMETER, got %ld (%08lx)\n", GetLastError(), GetLastError()); } /* returns NULL, last error not set */ SetLastError(0xdeadbeef); ret = CertFindRDNAttr("bogus", &nameInfo); ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", + ok(GetLastError() == 0xdeadbeef, "Last error was set to %08lx\n", GetLastError()); /* returns NULL, last error not set */ SetLastError(0xdeadbeef); ret = CertFindRDNAttr("1.2.4", &nameInfo); ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", + ok(GetLastError() == 0xdeadbeef, "Last error was set to %08lx\n", GetLastError()); /* succeeds, last error not set */ SetLastError(0xdeadbeef); ret = CertFindRDNAttr("1.2.3", &nameInfo); - ok(ret != NULL, "CertFindRDNAttr failed: %08x\n", GetLastError()); + ok(ret != NULL, "CertFindRDNAttr failed: %08lx\n", GetLastError()); }
static void test_verifyTimeValidity(void) @@ -178,16 +178,16 @@ static void test_verifyTimeValidity(void) */ /* Check with 0 NotBefore and NotAfter */ ret = CertVerifyTimeValidity(&fileTime, &info); - ok(ret == 1, "Expected 1, got %d\n", ret); + ok(ret == 1, "Expected 1, got %ld\n", ret); info.NotAfter = fileTime; /* Check with NotAfter equal to comparison time */ ret = CertVerifyTimeValidity(&fileTime, &info); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); /* Check with NotBefore after comparison time */ info.NotBefore = fileTime; info.NotBefore.dwLowDateTime += 5000; ret = CertVerifyTimeValidity(&fileTime, &info); - ok(ret == -1, "Expected -1, got %d\n", ret); + ok(ret == -1, "Expected -1, got %ld\n", ret); }
static void test_cryptAllocate(void) @@ -195,12 +195,12 @@ static void test_cryptAllocate(void) LPVOID buf;
buf = CryptMemAlloc(0); - ok(buf != NULL, "CryptMemAlloc failed: %08x\n", GetLastError()); + ok(buf != NULL, "CryptMemAlloc failed: %08lx\n", GetLastError()); CryptMemFree(buf); /* CryptMemRealloc(NULL, 0) fails pre-Vista */ buf = CryptMemAlloc(0); buf = CryptMemRealloc(buf, 1); - ok(buf != NULL, "CryptMemRealloc failed: %08x\n", GetLastError()); + ok(buf != NULL, "CryptMemRealloc failed: %08lx\n", GetLastError()); CryptMemFree(buf); }
@@ -223,7 +223,7 @@ static void test_cryptTls(void)
/* One normal pass */ index = pI_CryptAllocTls(); - ok(index, "I_CryptAllocTls failed: %08x\n", GetLastError()); + ok(index, "I_CryptAllocTls failed: %08lx\n", GetLastError()); if (index) { LPVOID ptr; @@ -231,22 +231,22 @@ static void test_cryptTls(void) ptr = pI_CryptGetTls(index); ok(!ptr, "Expected NULL\n"); ret = pI_CryptSetTls(index, (LPVOID)0xdeadbeef); - ok(ret, "I_CryptSetTls failed: %08x\n", GetLastError()); + ok(ret, "I_CryptSetTls failed: %08lx\n", GetLastError()); ptr = pI_CryptGetTls(index); ok(ptr == (LPVOID)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", ptr); /* This crashes ret = pI_CryptFreeTls(index, 1); */ ret = pI_CryptFreeTls(index, 0); - ok(ret, "I_CryptFreeTls failed: %08x\n", GetLastError()); + ok(ret, "I_CryptFreeTls failed: %08lx\n", GetLastError()); ret = pI_CryptFreeTls(index, 0); ok(!ret, "I_CryptFreeTls succeeded\n"); ok(GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } /* Similar pass, check I_CryptDetachTls */ index = pI_CryptAllocTls(); - ok(index, "I_CryptAllocTls failed: %08x\n", GetLastError()); + ok(index, "I_CryptAllocTls failed: %08lx\n", GetLastError()); if (index) { LPVOID ptr; @@ -254,7 +254,7 @@ static void test_cryptTls(void) ptr = pI_CryptGetTls(index); ok(!ptr, "Expected NULL\n"); ret = pI_CryptSetTls(index, (LPVOID)0xdeadbeef); - ok(ret, "I_CryptSetTls failed: %08x\n", GetLastError()); + ok(ret, "I_CryptSetTls failed: %08lx\n", GetLastError()); ptr = pI_CryptGetTls(index); ok(ptr == (LPVOID)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", ptr); ptr = pI_CryptDetachTls(index); @@ -299,7 +299,7 @@ static void test_readTrustedPublisherDWORD(void) ret = pReadDWORD(authenticodeFlags, &returnedFlags); ok(ret == exists, "Unexpected return value\n"); ok(readFlags == returnedFlags, - "Expected flags %08x, got %08x\n", readFlags, returnedFlags); + "Expected flags %08lx, got %08lx\n", readFlags, returnedFlags); } }
@@ -337,28 +337,28 @@ static void test_getDefaultCryptProv(void)
prov = pI_CryptGetDefaultCryptProv(0xdeadbeef); ok(prov == 0 && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); prov = pI_CryptGetDefaultCryptProv(PROV_RSA_FULL); ok(prov == 0 && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); prov = pI_CryptGetDefaultCryptProv(1); ok(prov == 0 && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); prov = pI_CryptGetDefaultCryptProv(0); - ok(prov != 0, "I_CryptGetDefaultCryptProv failed: %08x\n", GetLastError()); + ok(prov != 0, "I_CryptGetDefaultCryptProv failed: %08lx\n", GetLastError()); CryptReleaseContext(prov, 0);
for (i = 0; i < ARRAY_SIZE(test_prov); i++) { if (winetest_debug > 1) - trace("%u: algid %#x (%s): class %u, type %u, sid %u\n", i, test_prov[i].algid, test_prov[i].name, + trace("%lu: algid %#x (%s): class %u, type %u, sid %u\n", i, test_prov[i].algid, test_prov[i].name, GET_ALG_CLASS(test_prov[i].algid) >> 13, GET_ALG_TYPE(test_prov[i].algid) >> 9, GET_ALG_SID(test_prov[i].algid));
prov = pI_CryptGetDefaultCryptProv(test_prov[i].algid); if (!prov) { todo_wine_if(test_prov[i].algid == CALG_DSS_SIGN || test_prov[i].algid == CALG_NO_SIGN) - ok(test_prov[i].optional, "%u: I_CryptGetDefaultCryptProv(%#x) failed\n", i, test_prov[i].algid); + ok(test_prov[i].optional, "%lu: I_CryptGetDefaultCryptProv(%#x) failed\n", i, test_prov[i].algid); continue; }
@@ -367,9 +367,9 @@ static void test_getDefaultCryptProv(void) { name = CryptMemAlloc(size); ret = CryptGetProvParam(prov, PP_NAME, (BYTE *)name, &size, 0); - ok(ret, "%u: CryptGetProvParam failed %#x\n", i, GetLastError()); + ok(ret, "%lu: CryptGetProvParam failed %#lx\n", i, GetLastError()); if (winetest_debug > 1) - trace("%u: algid %#x, name %s\n", i, test_prov[i].algid, name); + trace("%lu: algid %#x, name %s\n", i, test_prov[i].algid, name); CryptMemFree(name); }
@@ -417,7 +417,7 @@ static void test_format_object(void) SetLastError(0xdeadbeef); ret = CryptFormatObject(0, 0, 0, NULL, NULL, NULL, 0, NULL, &size); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
/* When called with the default encoding type for any undefined struct type * (including none), it succeeds: the default encoding is a hex string @@ -425,38 +425,38 @@ static void test_format_object(void) */ SetLastError(0xdeadbeef); ret = CryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, NULL, &size); - ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); - ok(size == sizeof(WCHAR) || broken(!size) /* Win10 1709+ */, "wrong size %d\n", size); + ok(ret, "CryptFormatObject failed: %ld\n", GetLastError()); + ok(size == sizeof(WCHAR) || broken(!size) /* Win10 1709+ */, "wrong size %ld\n", size);
SetLastError(0xdeadbeef); size = 0; ret = CryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, str, &size); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_MORE_DATA, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_MORE_DATA, "wrong error %lu\n", GetLastError());
size = sizeof(WCHAR); ret = CryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, str, &size); - ok(ret, "CryptFormatObject failed, error %u\n", GetLastError()); + ok(ret, "CryptFormatObject failed, error %lu\n", GetLastError()); ok(!str[0], "expected empty string\n");
ret = CryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, encodedInt, sizeof(encodedInt), NULL, &size); - ok(ret, "CryptFormatObject failed, error %u\n", GetLastError()); - ok(size >= sizeof(L"02 01 01"), "wrong size %u\n", size); + ok(ret, "CryptFormatObject failed, error %lu\n", GetLastError()); + ok(size >= sizeof(L"02 01 01"), "wrong size %lu\n", size);
ret = CryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, encodedInt, sizeof(encodedInt), str, &size); - ok(ret, "CryptFormatObject failed, error %u\n", GetLastError()); + ok(ret, "CryptFormatObject failed, error %lu\n", GetLastError()); ok(!wcscmp(str, L"02 01 01"), "wrong string %s\n", wine_dbgstr_w(str));
ret = CryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, encodedBigInt, sizeof(encodedBigInt), NULL, &size); - ok(ret, "CryptFormatObject failed, error %u\n", GetLastError()); - ok(size >= sizeof(encodedBigIntStr), "wrong size %u\n", size); + ok(ret, "CryptFormatObject failed, error %lu\n", GetLastError()); + ok(size >= sizeof(encodedBigIntStr), "wrong size %lu\n", size);
ret = CryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, encodedBigInt, sizeof(encodedBigInt), str, &size); - ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); + ok(ret, "CryptFormatObject failed: %ld\n", GetLastError()); ok(!wcsicmp(str, encodedBigIntStr), "wrong string %s\n", wine_dbgstr_w(str));
/* When called with the default encoding type for any undefined struct @@ -469,7 +469,7 @@ static void test_format_object(void) ok(!ret, "CryptFormatObject succeeded\n"); ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == 0xdeadbeef, /* Vista, W2K8 */ - "wrong error %u\n", GetLastError()); + "wrong error %lu\n", GetLastError());
/* When called to format an AUTHORITY_KEY_ID2_INFO, it fails when no * data are given. @@ -478,7 +478,7 @@ static void test_format_object(void) ret = CryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, szOID_AUTHORITY_KEY_IDENTIFIER2, NULL, 0, NULL, &size); ok(!ret, "expected failure\n"); - ok(GetLastError() == E_INVALIDARG, "wrong error %u\n", GetLastError()); + ok(GetLastError() == E_INVALIDARG, "wrong error %lu\n", GetLastError()); }
START_TEST(main) diff --git a/dlls/crypt32/tests/message.c b/dlls/crypt32/tests/message.c index c031718d1cc..6958c15ee36 100644 --- a/dlls/crypt32/tests/message.c +++ b/dlls/crypt32/tests/message.c @@ -53,40 +53,40 @@ static void test_msg_get_signer_count(void)
SetLastError(0xdeadbeef); count = CryptGetMessageSignerCount(0, NULL, 0); - ok(count == -1, "Expected -1, got %d\n", count); - ok(GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", + ok(count == -1, "Expected -1, got %ld\n", count); + ok(GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, NULL, 0); - ok(count == -1, "Expected -1, got %d\n", count); + ok(count == -1, "Expected -1, got %ld\n", count); ok(GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG, /* win9x */ - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, dataEmptyBareContent, sizeof(dataEmptyBareContent)); - ok(count == -1, "Expected -1, got %d\n", count); + ok(count == -1, "Expected -1, got %ld\n", count); ok(GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH, /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, dataEmptyContent, sizeof(dataEmptyContent)); - ok(count == -1, "Expected -1, got %d\n", count); + ok(count == -1, "Expected -1, got %ld\n", count); ok(GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, signedEmptyBareContent, sizeof(signedEmptyBareContent)); - ok(count == -1, "Expected -1, got %d\n", count); + ok(count == -1, "Expected -1, got %ld\n", count); ok(GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR, /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, signedEmptyContent, sizeof(signedEmptyContent)); ok(count == 1 || broken(count == -1), /* win9x */ - "Expected 1, got %d\n", count); + "Expected 1, got %ld\n", count); }
static BYTE detachedHashContent[] = { @@ -115,13 +115,13 @@ static void test_verify_detached_message_hash(void) ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); para.cbSize = sizeof(para); SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); para.dwMsgEncodingType = PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, @@ -129,13 +129,13 @@ static void test_verify_detached_message_hash(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG), /* win9x */ - "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError()); para.dwMsgEncodingType = X509_ASN_ENCODING; SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); para.dwMsgEncodingType = X509_ASN_ENCODING | PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, @@ -143,18 +143,18 @@ static void test_verify_detached_message_hash(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG), /* win9x */ - "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError()); /* Curiously, passing no data to hash succeeds.. */ ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, sizeof(detachedHashContent), 0, NULL, NULL, NULL, NULL); todo_wine - ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError()); + ok(ret, "CryptVerifyDetachedMessageHash failed: %08lx\n", GetLastError()); /* as does passing the actual content of the message to hash.. */ size = sizeof(msgData); pMsgData = msgData; ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, NULL); - ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError()); + ok(ret, "CryptVerifyDetachedMessageHash failed: %08lx\n", GetLastError()); /* while passing data to hash that isn't the content of the message fails. */ size = sizeof(detachedHashContent); @@ -163,7 +163,7 @@ static void test_verify_detached_message_hash(void) ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_HASH_VALUE, - "expected CRYPT_E_HASH_VALUE, got %08x\n", GetLastError()); + "expected CRYPT_E_HASH_VALUE, got %08lx\n", GetLastError()); /* Getting the size of the hash while passing no hash data causes the * hash to be checked (and fail.) */ @@ -171,23 +171,23 @@ static void test_verify_detached_message_hash(void) ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, sizeof(detachedHashContent), 0, NULL, NULL, NULL, &hashSize); ok(!ret && GetLastError() == CRYPT_E_HASH_VALUE, - "expected CRYPT_E_HASH_VALUE, got %08x\n", GetLastError()); + "expected CRYPT_E_HASH_VALUE, got %08lx\n", GetLastError()); size = sizeof(msgData); pMsgData = msgData; ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, &hashSize); - ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError()); - ok(hashSize == sizeof(hash), "unexpected size %d\n", hashSize); + ok(ret, "CryptVerifyDetachedMessageHash failed: %08lx\n", GetLastError()); + ok(hashSize == sizeof(hash), "unexpected size %ld\n", hashSize); hashSize = 1; SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, sizeof(detachedHashContent), 1, &pMsgData, &size, hash, &hashSize); ok(!ret && GetLastError() == ERROR_MORE_DATA, - "expected ERROR_MORE_DATA, got %08x\n", GetLastError()); + "expected ERROR_MORE_DATA, got %08lx\n", GetLastError()); hashSize = sizeof(hash); ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, sizeof(detachedHashContent), 1, &pMsgData, &size, hash, &hashSize); - ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError()); + ok(ret, "CryptVerifyDetachedMessageHash failed: %08lx\n", GetLastError()); }
static BYTE hashContent[] = { @@ -211,31 +211,31 @@ static void test_verify_message_hash(void) SetLastError(0xdeadbeef); ret = CryptVerifyMessageHash(¶, NULL, 0, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); para.cbSize = sizeof(para); SetLastError(0xdeadbeef); ret = CryptVerifyMessageHash(¶, NULL, 0, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); para.dwMsgEncodingType = PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); ret = CryptVerifyMessageHash(¶, NULL, 0, NULL, NULL, NULL, NULL); ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG, /* win98 */ - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08lx\n", GetLastError()); /* Verifying the hash of a detached message succeeds? */ ret = CryptVerifyMessageHash(¶, detachedHashContent, sizeof(detachedHashContent), NULL, NULL, NULL, NULL); todo_wine - ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError()); + ok(ret, "CryptVerifyMessageHash failed: %08lx\n", GetLastError()); /* As does verifying the hash of a regular message. */ ret = CryptVerifyMessageHash(¶, hashContent, sizeof(hashContent), NULL, NULL, NULL, NULL); - ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError()); + ok(ret, "CryptVerifyMessageHash failed: %08lx\n", GetLastError()); ret = CryptVerifyMessageHash(¶, hashContent, sizeof(hashContent), NULL, &size, NULL, NULL); - ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError()); + ok(ret, "CryptVerifyMessageHash failed: %08lx\n", GetLastError()); if (ret) buf = CryptMemAlloc(size); if (buf) @@ -244,11 +244,11 @@ static void test_verify_message_hash(void) ret = CryptVerifyMessageHash(¶, hashContent, sizeof(hashContent), buf, &size, NULL, NULL); ok(!ret && GetLastError() == ERROR_MORE_DATA, - "expected ERROR_MORE_DATA, got %08x\n", GetLastError()); + "expected ERROR_MORE_DATA, got %08lx\n", GetLastError()); ret = CryptVerifyMessageHash(¶, hashContent, sizeof(hashContent), buf, &size, NULL, NULL); - ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError()); - ok(size == sizeof(msgData), "unexpected size %d\n", size); + ok(ret, "CryptVerifyMessageHash failed: %08lx\n", GetLastError()); + ok(size == sizeof(msgData), "unexpected size %ld\n", size); ok(!memcmp(buf, msgData, size), "unexpected value\n"); CryptMemFree(buf); } @@ -338,24 +338,24 @@ static void test_verify_detached_message_signature(void) ret = CryptVerifyDetachedMessageSignature(NULL, 0, NULL, 0, 0, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageSignature(¶, 0, NULL, 0, 0, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); para.cbSize = sizeof(para); SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageSignature(¶, 0, NULL, 0, 0, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); para.dwMsgAndCertEncodingType = X509_ASN_ENCODING; SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageSignature(¶, 0, NULL, 0, 0, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); para.dwMsgAndCertEncodingType = PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageSignature(¶, 0, NULL, 0, 0, NULL, @@ -363,7 +363,7 @@ static void test_verify_detached_message_signature(void) ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG, /* win98 */ - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08lx\n", GetLastError()); /* None of these messages contains a cert in the message itself, so the * default callback isn't able to verify their signature. */ @@ -374,21 +374,21 @@ static void test_verify_detached_message_signature(void) todo_wine ok(GetLastError() == CRYPT_E_NOT_FOUND || GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageSignature(¶, 0, signedContent, sizeof(signedContent), 0, NULL, NULL, NULL); ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == CRYPT_E_NOT_FOUND || GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptVerifyDetachedMessageSignature(¶, 0, detachedSignedContent, sizeof(detachedSignedContent), 0, NULL, NULL, NULL); ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == CRYPT_E_NOT_FOUND || GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); pContent = msgData; cbContent = sizeof(msgData); @@ -397,14 +397,14 @@ static void test_verify_detached_message_signature(void) ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == CRYPT_E_NOT_FOUND || GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08lx\n", GetLastError()); /* Passing the correct callback results in success */ para.pfnGetSignerCertificate = msg_get_signer_callback; ret = CryptVerifyDetachedMessageSignature(¶, 0, detachedSignedContent, sizeof(detachedSignedContent), 1, &pContent, &cbContent, NULL); ok(ret || broken(!ret), /* win98 */ - "CryptVerifyDetachedMessageSignature failed: %08x\n", + "CryptVerifyDetachedMessageSignature failed: %08lx\n", GetLastError()); /* Not passing the correct data to be signed results in the signature not * matching. @@ -415,7 +415,7 @@ static void test_verify_detached_message_signature(void) ok(!ret, "Expected 0, got %d\n", ret); ok(GetLastError() == NTE_BAD_SIGNATURE || GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected NTE_BAD_SIGNATURE or OSS_DATA_ERROR, got %08x\n", GetLastError()); + "Expected NTE_BAD_SIGNATURE or OSS_DATA_ERROR, got %08lx\n", GetLastError()); }
static const BYTE signedWithCertEmptyContent[] = { @@ -493,42 +493,42 @@ static void test_verify_message_signature(void) SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(NULL, 0, NULL, 0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Is cbDecoded set when invalid parameters are passed? */ cbDecoded = 0xdeadbeef; ret = CryptVerifyMessageSignature(NULL, 0, NULL, 0, NULL, &cbDecoded, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ok(cbDecoded == 0, "expected 0, got %08x\n", cbDecoded); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); + ok(cbDecoded == 0, "expected 0, got %08lx\n", cbDecoded); SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); para.cbSize = sizeof(para); SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); para.cbSize = 0; para.dwMsgAndCertEncodingType = PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); para.cbSize = sizeof(para); SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, NULL); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG), /* win9x */ - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError()); /* Check whether cert is set on error */ cert = (PCCERT_CONTEXT)0xdeadbeef; ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, &cert); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG /* NT40 */), - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError()); ok(cert == NULL, "Expected NULL cert\n"); /* Check whether cbDecoded is set on error */ cbDecoded = 0xdeadbeef; @@ -536,43 +536,43 @@ static void test_verify_message_signature(void) NULL); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_BAD_ARG /* NT40 */), - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD, got %08lx\n", GetLastError()); ok(!cbDecoded, "Expected 0\n"); SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, dataEmptyBareContent, sizeof(dataEmptyBareContent), NULL, 0, NULL); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* NT40 */), - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); ok(GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH, /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, dataEmptyContent, sizeof(dataEmptyContent), NULL, 0, NULL); ok(!ret && GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE, - "Expected CRYPT_E_UNEXPECTED_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_UNEXPECTED_MSG_TYPE, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, signedEmptyBareContent, sizeof(signedEmptyBareContent), NULL, 0, NULL); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, signedEmptyContent, sizeof(signedEmptyContent), NULL, 0, NULL); ok(!ret && (GetLastError() == CRYPT_E_NOT_FOUND || GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptVerifyMessageSignature(¶, 0, signedContent, sizeof(signedContent), NULL, 0, NULL); ok(!ret && (GetLastError() == CRYPT_E_NOT_FOUND || GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* FIXME: Windows fails with CRYPT_E_NOT_FOUND for these messages, but * their signer certs have invalid public keys that fail to decode. In * Wine therefore the failure is an ASN error. Need some messages with @@ -599,22 +599,22 @@ static void test_verify_message_signature(void) ret = CryptVerifyMessageSignature(¶, 0, signedWithCertWithValidPubKeyContent, sizeof(signedWithCertWithValidPubKeyContent), NULL, &cbDecoded, NULL); - ok(ret, "CryptVerifyMessageSignature failed: %08x\n", GetLastError()); - ok(cbDecoded == sizeof(msgData), "expected 4, got %d\n", cbDecoded); + ok(ret, "CryptVerifyMessageSignature failed: %08lx\n", GetLastError()); + ok(cbDecoded == sizeof(msgData), "expected 4, got %ld\n", cbDecoded); cbDecoded = 0; ret = CryptVerifyMessageSignature(¶, 0, signedWithCertWithValidPubKeyContent, sizeof(signedWithCertWithValidPubKeyContent), NULL, &cbDecoded, NULL); /* Setting cbDecoded to 0 succeeds when a NULL buffer is provided */ - ok(ret, "CryptVerifyMessageSignature failed: %08x\n", GetLastError()); - ok(cbDecoded == sizeof(msgData), "expected 4, got %d\n", cbDecoded); + ok(ret, "CryptVerifyMessageSignature failed: %08lx\n", GetLastError()); + ok(cbDecoded == sizeof(msgData), "expected 4, got %ld\n", cbDecoded); cbDecoded = 0; ret = CryptVerifyMessageSignature(¶, 0, signedWithCertWithValidPubKeyContent, sizeof(signedWithCertWithValidPubKeyContent), decoded, &cbDecoded, NULL); /* When a non-NULL buffer is provided, cbDecoded must not be too small */ ok(!ret && GetLastError() == ERROR_MORE_DATA, - "expected ERROR_MORE_DATA, got %d (%08x)\n", GetLastError(), + "expected ERROR_MORE_DATA, got %ld (%08lx)\n", GetLastError(), GetLastError()); }
@@ -653,38 +653,38 @@ static void test_hash_message(void) SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got 0x%08x\n", GetLastError()); + "expected E_INVALIDARG, got 0x%08lx\n", GetLastError()); para.cbSize = sizeof(para); /* Not quite sure what "success" means in this case, but it does succeed */ SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); /* With a bogus encoding type it "succeeds" */ para.dwMsgEncodingType = 0xdeadbeef; SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); /* According to MSDN, the third parameter (cToBeHashed) must be 1 if the * second parameter (fDetached) is FALSE, but again it "succeeds." */ SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, FALSE, 2, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); /* Even passing parameters to hash results in "success." */ SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); /* Try again with a valid encoding type */ para.dwMsgEncodingType = PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, FALSE, 2, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); /* And with valid data to hash */ SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); /* But requesting the size of the hashed blob and indicating there's data * to hash results in a crash */ @@ -702,7 +702,7 @@ static void test_hash_message(void) ok(!ret && (GetLastError() == CRYPT_E_UNKNOWN_ALGO || GetLastError() == CRYPT_E_OID_FORMAT), /* Vista */ - "expected CRYPT_E_UNKNOWN_ALGO or CRYPT_E_OID_FORMAT, got 0x%08x (%d)\n", + "expected CRYPT_E_UNKNOWN_ALGO or CRYPT_E_OID_FORMAT, got 0x%08lx (%ld)\n", GetLastError(), GetLastError()); para.HashAlgorithm.pszObjId = oid_rsa_md5; /* With a valid hash algorithm, this succeeds, even though fDetached is @@ -712,7 +712,7 @@ static void test_hash_message(void) ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, NULL, &hashedBlobSize, NULL, NULL); todo_wine - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); if (ret) { /* Actually attempting to get the hashed data fails, perhaps because @@ -723,7 +723,7 @@ static void test_hash_message(void) ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, hashedBlob, &hashedBlobSize, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got 0x%08x (%d)\n", GetLastError(), + "expected CRYPT_E_MSG_ERROR, got 0x%08lx (%ld)\n", GetLastError(), GetLastError()); HeapFree(GetProcessHeap(), 0, hashedBlob); } @@ -731,16 +731,16 @@ static void test_hash_message(void) SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, TRUE, 2, toHash, hashSize, NULL, &hashedBlobSize, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); if (ret) { hashedBlob = HeapAlloc(GetProcessHeap(), 0, hashedBlobSize); SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, TRUE, 2, toHash, hashSize, hashedBlob, &hashedBlobSize, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); ok(hashedBlobSize == sizeof(detachedHashBlob), - "unexpected size of detached blob %d\n", hashedBlobSize); + "unexpected size of detached blob %ld\n", hashedBlobSize); ok(!memcmp(hashedBlob, detachedHashBlob, hashedBlobSize), "unexpected detached blob value\n"); HeapFree(GetProcessHeap(), 0, hashedBlob); @@ -749,15 +749,15 @@ static void test_hash_message(void) SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, FALSE, 1, toHash, hashSize, NULL, &hashedBlobSize, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); if (ret) { hashedBlob = HeapAlloc(GetProcessHeap(), 0, hashedBlobSize); ret = CryptHashMessage(¶, FALSE, 1, toHash, hashSize, hashedBlob, &hashedBlobSize, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); ok(hashedBlobSize == sizeof(hashBlob), - "unexpected size of detached blob %d\n", hashedBlobSize); + "unexpected size of detached blob %ld\n", hashedBlobSize); ok(!memcmp(hashedBlob, hashBlob, hashedBlobSize), "unexpected detached blob value\n"); HeapFree(GetProcessHeap(), 0, hashedBlob); @@ -768,8 +768,8 @@ static void test_hash_message(void) computedHashSize = 0xdeadbeef; ret = CryptHashMessage(¶, TRUE, 2, toHash, hashSize, NULL, &hashedBlobSize, NULL, &computedHashSize); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - ok(computedHashSize == 16, "expected hash size of 16, got %d\n", + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); + ok(computedHashSize == 16, "expected hash size of 16, got %ld\n", computedHashSize); if (ret) { @@ -777,9 +777,9 @@ static void test_hash_message(void) SetLastError(0xdeadbeef); ret = CryptHashMessage(¶, TRUE, 2, toHash, hashSize, NULL, &hashedBlobSize, computedHash, &computedHashSize); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); + ok(ret, "CryptHashMessage failed: 0x%08lx\n", GetLastError()); ok(computedHashSize == sizeof(hashVal), - "unexpected size of hash value %d\n", computedHashSize); + "unexpected size of hash value %ld\n", computedHashSize); ok(!memcmp(computedHash, hashVal, computedHashSize), "unexpected value\n"); HeapFree(GetProcessHeap(), 0, computedHash); @@ -996,7 +996,7 @@ static void test_sign_message(void) ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == ERROR_ARITHMETIC_OVERFLOW), /* Win7 */ - "expected E_INVALIDARG or ERROR_ARITHMETIC_OVERFLOW, got %08x\n", + "expected E_INVALIDARG or ERROR_ARITHMETIC_OVERFLOW, got %08lx\n", GetLastError()); para.cbSize = sizeof(para); para.dwMsgEncodingType = X509_ASN_ENCODING; @@ -1004,20 +1004,20 @@ static void test_sign_message(void) signedBlobSize = 255; ret = CryptSignMessage(¶, FALSE, 0, NULL, NULL, NULL, &signedBlobSize); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - ok(!signedBlobSize, "unexpected size %d\n", signedBlobSize); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); + ok(!signedBlobSize, "unexpected size %ld\n", signedBlobSize); para.dwMsgEncodingType = PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); signedBlobSize = 0; ret = CryptSignMessage(¶, FALSE, 0, NULL, NULL, NULL, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); todo_wine ok(signedBlobSize, "bad size\n");
SetLastError(0xdeadbeef); ret = CryptAcquireContextA(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContextA failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptImportKey(hCryptProv, publicPrivateKeyPair, sizeof(publicPrivateKeyPair), 0, 0, &hKey); @@ -1028,13 +1028,13 @@ static void test_sign_message(void) CryptReleaseContext(hCryptProv, 0); return; } - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptImportKey failed: %08lx\n", GetLastError());
para.dwMsgEncodingType = X509_ASN_ENCODING | PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); para.pSigningCert = CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, cert1, sizeof(cert1)); - ok(para.pSigningCert != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(para.pSigningCert != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); para.HashAlgorithm.pszObjId = oid_rsa_md5;
@@ -1045,21 +1045,21 @@ static void test_sign_message(void) SetLastError(0xdeadbeef); ret = CertSetCertificateContextProperty(para.pSigningCert, CERT_KEY_CONTEXT_PROP_ID, 0, &keyContext); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError());
SetLastError(0xdeadbeef); signedBlobSize = 0; ret = CryptSignMessage(¶, TRUE, 0, NULL, NULL, NULL, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); signedBlob = CryptMemAlloc(signedBlobSize); if (signedBlob) { SetLastError(0xdeadbeef); ret = CryptSignMessage(¶, TRUE, 0, NULL, NULL, signedBlob, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); ok(signedBlobSize == sizeof(signedHashForEmptyMessage), - "unexpected size %d\n", signedBlobSize); + "unexpected size %ld\n", signedBlobSize); ok(!memcmp(signedBlob, signedHashForEmptyMessage, signedBlobSize), "unexpected value\n"); CryptMemFree(signedBlob); @@ -1068,15 +1068,15 @@ static void test_sign_message(void) SetLastError(0xdeadbeef); signedBlobSize = 0; ret = CryptSignMessage(¶, FALSE, 0, NULL, NULL, NULL, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); signedBlob = CryptMemAlloc(signedBlobSize); if (signedBlob) { SetLastError(0xdeadbeef); ret = CryptSignMessage(¶, FALSE, 0, NULL, NULL, signedBlob, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); - ok(signedBlobSize == sizeof(signedEmptyMessage), "unexpected size %d\n", + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); + ok(signedBlobSize == sizeof(signedEmptyMessage), "unexpected size %ld\n", signedBlobSize); ok(!memcmp(signedBlob, signedEmptyMessage, signedBlobSize), "unexpected value\n"); @@ -1087,16 +1087,16 @@ static void test_sign_message(void) signedBlobSize = 0; ret = CryptSignMessage(¶, TRUE, 2, toSign, signSize, NULL, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); signedBlob = CryptMemAlloc(signedBlobSize); if (signedBlob) { SetLastError(0xdeadbeef); ret = CryptSignMessage(¶, TRUE, 2, toSign, signSize, signedBlob, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); ok(signedBlobSize == sizeof(signedHash), - "unexpected size of signed blob %d\n", signedBlobSize); + "unexpected size of signed blob %ld\n", signedBlobSize); ok(!memcmp(signedBlob, signedHash, signedBlobSize), "unexpected value\n"); CryptMemFree(signedBlob); @@ -1109,16 +1109,16 @@ static void test_sign_message(void) signedBlobSize = 0; ret = CryptSignMessage(¶, TRUE, 2, toSign, signSize, NULL, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); signedBlob = CryptMemAlloc(signedBlobSize); if (signedBlob) { SetLastError(0xdeadbeef); ret = CryptSignMessage(¶, TRUE, 2, toSign, signSize, signedBlob, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); ok(signedBlobSize == sizeof(signedHashWithCert), - "unexpected size of signed blob %d\n", signedBlobSize); + "unexpected size of signed blob %ld\n", signedBlobSize); ok(!memcmp(signedBlob, signedHashWithCert, signedBlobSize), "unexpected value\n"); CryptMemFree(signedBlob); @@ -1130,7 +1130,7 @@ static void test_sign_message(void) SetLastError(0xdeadbeef); crlContext = CertCreateCRLContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, crl, sizeof(crl)); - ok(crlContext != NULL, "CertCreateCRLContext failed: %08x\n", + ok(crlContext != NULL, "CertCreateCRLContext failed: %08lx\n", GetLastError()); para.rgpMsgCrl = &crlContext;
@@ -1138,16 +1138,16 @@ static void test_sign_message(void) signedBlobSize = 0; ret = CryptSignMessage(¶, TRUE, 2, toSign, signSize, NULL, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); signedBlob = CryptMemAlloc(signedBlobSize); if (signedBlob) { SetLastError(0xdeadbeef); ret = CryptSignMessage(¶, TRUE, 2, toSign, signSize, signedBlob, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); ok(signedBlobSize == sizeof(signedHashWithCRL), - "unexpected size of signed blob %d\n", signedBlobSize); + "unexpected size of signed blob %ld\n", signedBlobSize); ok(!memcmp(signedBlob, signedHashWithCRL, signedBlobSize), "unexpected value\n"); CryptMemFree(signedBlob); @@ -1161,16 +1161,16 @@ static void test_sign_message(void) signedBlobSize = 0; ret = CryptSignMessage(¶, FALSE, 1, toSign, signSize, NULL, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); signedBlob = CryptMemAlloc(signedBlobSize); if (signedBlob) { SetLastError(0xdeadbeef); ret = CryptSignMessage(¶, FALSE, 1, toSign, signSize, signedBlob, &signedBlobSize); - ok(ret, "CryptSignMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptSignMessage failed: %08lx\n", GetLastError()); ok(signedBlobSize == sizeof(signedData), - "unexpected size of signed blob %d\n", signedBlobSize); + "unexpected size of signed blob %ld\n", signedBlobSize); ok(!memcmp(signedBlob, signedData, signedBlobSize), "unexpected value\n"); CryptMemFree(signedBlob); @@ -1204,17 +1204,17 @@ static void test_encrypt_message(void) SetLastError(0xdeadbeef); ret = CryptAcquireContextA(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContextA failed: %08lx\n", GetLastError());
SetLastError(0xdeadbeef); certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, cert1, sizeof(cert1)); - ok(certs[0] != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(certs[0] != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); certs[1] = CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, cert2, sizeof(cert2)); - ok(certs[1] != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(certs[1] != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError());
memset(¶, 0, sizeof(para)); @@ -1223,8 +1223,8 @@ static void test_encrypt_message(void) ret = CryptEncryptMessage(¶, 0, NULL, NULL, 0, NULL, &encryptedBlobSize); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - ok(!encryptedBlobSize, "unexpected size %d\n", encryptedBlobSize); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); + ok(!encryptedBlobSize, "unexpected size %ld\n", encryptedBlobSize); para.cbSize = sizeof(para); para.dwMsgEncodingType = X509_ASN_ENCODING; SetLastError(0xdeadbeef); @@ -1232,8 +1232,8 @@ static void test_encrypt_message(void) ret = CryptEncryptMessage(¶, 0, NULL, NULL, 0, NULL, &encryptedBlobSize); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - ok(!encryptedBlobSize, "unexpected size %d\n", encryptedBlobSize); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); + ok(!encryptedBlobSize, "unexpected size %ld\n", encryptedBlobSize); para.dwMsgEncodingType = PKCS_7_ASN_ENCODING; SetLastError(0xdeadbeef); encryptedBlobSize = 255; @@ -1242,9 +1242,9 @@ static void test_encrypt_message(void) ok(!ret && (GetLastError() == CRYPT_E_UNKNOWN_ALGO || GetLastError() == E_INVALIDARG), /* Win9x */ - "expected CRYPT_E_UNKNOWN_ALGO or E_INVALIDARG, got %08x\n", + "expected CRYPT_E_UNKNOWN_ALGO or E_INVALIDARG, got %08lx\n", GetLastError()); - ok(!encryptedBlobSize, "unexpected size %d\n", encryptedBlobSize); + ok(!encryptedBlobSize, "unexpected size %ld\n", encryptedBlobSize);
para.hCryptProv = hCryptProv; para.ContentEncryptionAlgorithm.pszObjId = oid_rsa_rc4; @@ -1255,7 +1255,7 @@ static void test_encrypt_message(void) &encryptedBlobSize); ok(ret || broken(!ret) /* Win9x */, - "CryptEncryptMessage failed: %08x\n", GetLastError()); + "CryptEncryptMessage failed: %08lx\n", GetLastError()); if (ret) { encryptedBlob = CryptMemAlloc(encryptedBlobSize); @@ -1264,9 +1264,9 @@ static void test_encrypt_message(void) SetLastError(0xdeadbeef); ret = CryptEncryptMessage(¶, 0, NULL, NULL, 0, encryptedBlob, &encryptedBlobSize); - ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptEncryptMessage failed: %08lx\n", GetLastError()); ok(encryptedBlobSize == sizeof(encryptedMessage), - "unexpected size of encrypted blob %d\n", encryptedBlobSize); + "unexpected size of encrypted blob %ld\n", encryptedBlobSize); ok(!memcmp(encryptedBlob, encryptedMessage, encryptedBlobSize), "unexpected value\n"); CryptMemFree(encryptedBlob); @@ -1277,7 +1277,7 @@ static void test_encrypt_message(void) encryptedBlobSize = 0; ret = CryptEncryptMessage(¶, 2, certs, NULL, 0, NULL, &encryptedBlobSize); - ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptEncryptMessage failed: %08lx\n", GetLastError()); if (ret) { encryptedBlob = CryptMemAlloc(encryptedBlobSize); @@ -1286,7 +1286,7 @@ static void test_encrypt_message(void) SetLastError(0xdeadbeef); ret = CryptEncryptMessage(¶, 2, certs, NULL, 0, encryptedBlob, &encryptedBlobSize); - ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptEncryptMessage failed: %08lx\n", GetLastError()); CryptMemFree(encryptedBlob); } } @@ -1297,7 +1297,7 @@ static void test_encrypt_message(void) &encryptedBlobSize); ok(ret || broken(!ret) /* Win9x */, - "CryptEncryptMessage failed: %08x\n", GetLastError()); + "CryptEncryptMessage failed: %08lx\n", GetLastError()); if (ret) { encryptedBlob = CryptMemAlloc(encryptedBlobSize); @@ -1308,11 +1308,11 @@ static void test_encrypt_message(void) encryptedBlob, &encryptedBlobSize); ok(ret || broken(!ret && GetLastError() == NTE_PERM), /* some NT4 */ - "CryptEncryptMessage failed: %08x\n", GetLastError()); + "CryptEncryptMessage failed: %08lx\n", GetLastError()); if (ret) { ok(encryptedBlobSize == 55, - "unexpected size of encrypted blob %d\n", encryptedBlobSize); + "unexpected size of encrypted blob %ld\n", encryptedBlobSize); } CryptMemFree(encryptedBlob); } @@ -1322,7 +1322,7 @@ static void test_encrypt_message(void) encryptedBlobSize = 0; ret = CryptEncryptMessage(¶, 2, certs, blob, sizeof(blob), NULL, &encryptedBlobSize); - ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError()); + ok(ret, "CryptEncryptMessage failed: %08lx\n", GetLastError()); if (ret) { encryptedBlob = CryptMemAlloc(encryptedBlobSize); @@ -1333,7 +1333,7 @@ static void test_encrypt_message(void) encryptedBlob, &encryptedBlobSize); ok(ret || broken(!ret), /* some Win95 and some NT4 */ - "CryptEncryptMessage failed: %08x\n", GetLastError()); + "CryptEncryptMessage failed: %08lx\n", GetLastError()); CryptMemFree(encryptedBlob); } } diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index 39cb74b751b..d66a972da05 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -49,32 +49,32 @@ static void test_msg_open_to_encode(void) SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(0, 0, 0, NULL, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError());
/* Bad message types */ SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, 0, NULL, NULL, NULL); ok(!msg && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0, 0, NULL, NULL, NULL); ok(!msg && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED_AND_ENVELOPED, NULL, NULL, NULL); ok(!msg && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENCRYPTED, NULL, NULL, NULL); ok(!msg && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); }
static void test_msg_open_to_decode(void) @@ -85,50 +85,50 @@ static void test_msg_open_to_decode(void) SetLastError(0xdeadbeef); msg = CryptMsgOpenToDecode(0, 0, 0, 0, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError());
/* Bad encodings */ SetLastError(0xdeadbeef); msg = CryptMsgOpenToDecode(X509_ASN_ENCODING, 0, 0, 0, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); msg = CryptMsgOpenToDecode(X509_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError());
/* The message type can be explicit... */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED_AND_ENVELOPED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg); /* or implicit.. */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg); /* or even invalid. */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENCRYPTED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 1000, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg);
/* And even though the stream info parameter "must be set to NULL" for @@ -136,7 +136,7 @@ static void test_msg_open_to_decode(void) */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, &streamInfo); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -154,95 +154,95 @@ static void test_msg_get_param(void)
/* Decoded messages */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); /* For decoded messages, the type is always available */ size = 0; ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); /* For this (empty) message, the type isn't set */ - ok(value == 0, "Expected type 0, got %d\n", value); + ok(value == 0, "Expected type 0, got %ld\n", value); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); /* For explicitly typed messages, the type is known. */ size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_DATA, "Expected CMSG_DATA, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); + ok(value == CMSG_DATA, "Expected CMSG_DATA, got %ld\n", value); for (i = CMSG_CONTENT_PARAM; !old_crypt32 && (i <= CMSG_CMS_SIGNER_INFO_PARAM); i++) { size = 0; ret = CryptMsgGetParam(msg, i, 0, NULL, &size); - ok(!ret, "Parameter %d: expected failure\n", i); + ok(!ret, "Parameter %ld: expected failure\n", i); } CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_ENVELOPED, "Expected CMSG_ENVELOPED, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); + ok(value == CMSG_ENVELOPED, "Expected CMSG_ENVELOPED, got %ld\n", value); for (i = CMSG_CONTENT_PARAM; !old_crypt32 && (i <= CMSG_CMS_SIGNER_INFO_PARAM); i++) { size = 0; ret = CryptMsgGetParam(msg, i, 0, NULL, &size); - ok(!ret, "Parameter %d: expected failure\n", i); + ok(!ret, "Parameter %ld: expected failure\n", i); } CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_HASHED, "Expected CMSG_HASHED, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); + ok(value == CMSG_HASHED, "Expected CMSG_HASHED, got %ld\n", value); for (i = CMSG_CONTENT_PARAM; !old_crypt32 && (i <= CMSG_CMS_SIGNER_INFO_PARAM); i++) { size = 0; ret = CryptMsgGetParam(msg, i, 0, NULL, &size); - ok(!ret, "Parameter %d: expected failure\n", i); + ok(!ret, "Parameter %ld: expected failure\n", i); } CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_SIGNED, "Expected CMSG_SIGNED, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); + ok(value == CMSG_SIGNED, "Expected CMSG_SIGNED, got %ld\n", value); for (i = CMSG_CONTENT_PARAM; !old_crypt32 && (i <= CMSG_CMS_SIGNER_INFO_PARAM); i++) { size = 0; ret = CryptMsgGetParam(msg, i, 0, NULL, &size); - ok(!ret, "Parameter %d: expected failure\n", i); + ok(!ret, "Parameter %ld: expected failure\n", i); } CryptMsgClose(msg);
/* Explicitly typed messages get their types set, even if they're invalid */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENCRYPTED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_ENCRYPTED, "Expected CMSG_ENCRYPTED, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); + ok(value == CMSG_ENCRYPTED, "Expected CMSG_ENCRYPTED, got %ld\n", value); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 1000, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToDecode failed: %lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == 1000, "Expected 1000, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); + ok(value == 1000, "Expected 1000, got %ld\n", value); CryptMsgClose(msg); }
@@ -253,15 +253,15 @@ static void test_msg_close(void)
/* NULL succeeds.. */ ret = CryptMsgClose(NULL); - ok(ret, "CryptMsgClose failed: %x\n", GetLastError()); + ok(ret, "CryptMsgClose failed: %lx\n", GetLastError()); /* but an arbitrary pointer crashes. */ if (0) ret = CryptMsgClose((HCRYPTMSG)1); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); ret = CryptMsgClose(msg); - ok(ret, "CryptMsgClose failed: %x\n", GetLastError()); + ok(ret, "CryptMsgClose failed: %lx\n", GetLastError()); }
static void check_param(LPCSTR test, HCRYPTMSG msg, DWORD param, @@ -275,16 +275,16 @@ static void check_param(LPCSTR test, HCRYPTMSG msg, DWORD param, ret = CryptMsgGetParam(msg, param, 0, NULL, &size); ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */ || GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x, for some params */), - "%s: CryptMsgGetParam failed: %08x\n", test, GetLastError()); + "%s: CryptMsgGetParam failed: %08lx\n", test, GetLastError()); if (!ret) { - win_skip("parameter %d not supported, skipping tests\n", param); + win_skip("parameter %ld not supported, skipping tests\n", param); return; } buf = HeapAlloc(GetProcessHeap(), 0, size); ret = CryptMsgGetParam(msg, param, 0, buf, &size); - ok(ret, "%s: CryptMsgGetParam failed: %08x\n", test, GetLastError()); - ok(size == expectedSize, "%s: expected size %d, got %d\n", test, + ok(ret, "%s: CryptMsgGetParam failed: %08lx\n", test, GetLastError()); + ok(size == expectedSize, "%s: expected size %ld, got %ld\n", test, expectedSize, size); if (size == expectedSize && size) ok(!memcmp(buf, expected, size), "%s: unexpected data\n", test); @@ -303,34 +303,34 @@ static void test_data_msg_open(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, &hashInfo, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError()); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg);
/* An empty stream info is allowed. */ msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, &streamInfo); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg);
/* Passing a bogus inner OID succeeds for a non-streamed message.. */ msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, oid, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg); /* and still succeeds when CMSG_DETACHED_FLAG is passed.. */ msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, CMSG_DATA, NULL, oid, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg); /* and when a stream info is given, even though you're not supposed to be * able to use anything but szOID_RSA_data when streaming is being used. */ msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, CMSG_DATA, NULL, oid, &streamInfo); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -356,28 +356,28 @@ static void test_data_msg_update(void) SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, FALSE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); /* Updating it with final = TRUE succeeds */ ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* Any subsequent update will fail, as the last was final */ SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, NULL); /* Starting with Vista, can update a message with no data. */ ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret || broken(!ret), "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret || broken(!ret), "CryptMsgUpdate failed: %08lx\n", GetLastError()); if (ret) { DWORD size;
ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) { LPBYTE buf = CryptMemAlloc(size); @@ -386,11 +386,11 @@ static void test_data_msg_update(void) { ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, buf, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) { ok(size == sizeof(dataEmptyBareContent), - "unexpected size %d\n", size); + "unexpected size %ld\n", size); ok(!memcmp(buf, dataEmptyBareContent, size), "unexpected value\n"); } @@ -408,16 +408,16 @@ static void test_data_msg_update(void) ok(!ret && (GetLastError() == E_INVALIDARG || broken(GetLastError() == ERROR_SUCCESS)), /* Older NT4 */ - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); ok(!ret && (GetLastError() == E_INVALIDARG || broken(GetLastError() == ERROR_SUCCESS)), /* Older NT4 */ - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError());
ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg);
if (!old_crypt32) @@ -432,7 +432,7 @@ static void test_data_msg_update(void) ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), - "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", + "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %lx\n", GetLastError()); CryptMsgClose(msg); } @@ -443,9 +443,9 @@ static void test_data_msg_update(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, &streamInfo); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -462,10 +462,10 @@ static void test_data_msg_get_param(void) /* Content and bare content are always gettable when not streaming */ size = 0; ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); size = 0; ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); /* But for this type of message, the signer and hash aren't applicable, * and the type isn't available. */ @@ -473,14 +473,14 @@ static void test_data_msg_get_param(void) SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); CryptMsgClose(msg);
/* Can't get content or bare content when streaming */ @@ -489,11 +489,11 @@ static void test_data_msg_get_param(void) SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); ok((!ret && GetLastError() == E_INVALIDARG) || broken(ret /* Win9x */), - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); ok((!ret && GetLastError() == E_INVALIDARG) || broken(ret /* Win9x */), - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -577,18 +577,18 @@ static void check_updates(LPCSTR header, const struct update_accum *expected, DWORD i;
ok(expected->cUpdates == got->cUpdates, - "%s: expected %d updates, got %d\n", header, expected->cUpdates, + "%s: expected %ld updates, got %ld\n", header, expected->cUpdates, got->cUpdates); if (expected->cUpdates == got->cUpdates) for (i = 0; i < min(expected->cUpdates, got->cUpdates); i++) { ok(expected->updates[i].cbData == got->updates[i].cbData, - "%s, update %d: expected %d bytes, got %d\n", header, i, + "%s, update %ld: expected %ld bytes, got %ld\n", header, i, expected->updates[i].cbData, got->updates[i].cbData); if (expected->updates[i].cbData && expected->updates[i].cbData == got->updates[i].cbData) ok(!memcmp(expected->updates[i].pbData, got->updates[i].pbData, - got->updates[i].cbData), "%s, update %d: unexpected value\n", + got->updates[i].cbData), "%s, update %ld: unexpected value\n", header, i); } } @@ -620,7 +620,7 @@ static void test_data_msg_encoding(void) check_param("data empty content", msg, CMSG_CONTENT_PARAM, dataEmptyContent, sizeof(dataEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("data bare content", msg, CMSG_BARE_CONTENT_PARAM, dataBareContent, sizeof(dataBareContent)); check_param("data content", msg, CMSG_CONTENT_PARAM, dataContent, @@ -634,7 +634,7 @@ static void test_data_msg_encoding(void) check_param("data empty content", msg, CMSG_CONTENT_PARAM, dataEmptyContent, sizeof(dataEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("data bare content", msg, CMSG_BARE_CONTENT_PARAM, dataBareContent, sizeof(dataBareContent)); check_param("data content", msg, CMSG_CONTENT_PARAM, dataContent, @@ -648,7 +648,7 @@ static void test_data_msg_encoding(void) check_param("data bogus oid content", msg, CMSG_CONTENT_PARAM, dataEmptyContent, sizeof(dataEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("data bare content", msg, CMSG_BARE_CONTENT_PARAM, dataBareContent, sizeof(dataBareContent)); check_param("data content", msg, CMSG_CONTENT_PARAM, dataContent, @@ -702,25 +702,25 @@ static void test_hash_msg_open(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError()); hashInfo.cbSize = sizeof(hashInfo); SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, NULL, NULL); ok(!msg && GetLastError() == CRYPT_E_UNKNOWN_ALGO, - "Expected CRYPT_E_UNKNOWN_ALGO, got %x\n", GetLastError()); + "Expected CRYPT_E_UNKNOWN_ALGO, got %lx\n", GetLastError()); hashInfo.HashAlgorithm.pszObjId = oid_rsa_md5; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, CMSG_HASHED, &hashInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, CMSG_HASHED, &hashInfo, NULL, &streamInfo); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -738,22 +738,22 @@ static void test_hash_msg_update(void) * updates.. */ ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* including non-final updates with no data.. */ ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* and final updates with no data. */ ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* But no updates are allowed after the final update. */ SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, FALSE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg); /* Non-detached messages, in contrast, don't allow non-final updates in * non-streaming mode. @@ -763,16 +763,16 @@ static void test_hash_msg_update(void) SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); /* Final updates (including empty ones) are allowed. */ ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg); /* And, of course, streaming mode allows non-final updates */ msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, NULL, &streamInfo); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg); /* Setting pfnStreamOutput to NULL results in no error. (In what appears * to be a bug, it isn't actually used - see encoding tests.) @@ -781,7 +781,7 @@ static void test_hash_msg_update(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, NULL, &streamInfo); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -805,26 +805,26 @@ static void test_hash_msg_get_param(void) size = 0; ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); + "CryptMsgGetParam failed: %08lx\n", GetLastError()); size = 0; ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); + "CryptMsgGetParam failed: %08lx\n", GetLastError()); /* For an encoded hash message, the hash data aren't available */ SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_HASH_DATA_PARAM, 0, NULL, &size); ok(!ret && (GetLastError() == CRYPT_E_INVALID_MSG_TYPE || GetLastError() == OSS_LIMITED /* Win9x */), - "Expected CRYPT_E_INVALID_MSG_TYPE or OSS_LIMITED, got %08x\n", + "Expected CRYPT_E_INVALID_MSG_TYPE or OSS_LIMITED, got %08lx\n", GetLastError()); /* The hash is also available. */ size = 0; ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(size == sizeof(buf), "Unexpected size %d\n", size); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(size == sizeof(buf), "Unexpected size %ld\n", size); ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, buf, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(size == sizeof(buf), "Unexpected size %d\n", size); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(size == sizeof(buf), "Unexpected size %ld\n", size); if (size == sizeof(buf)) ok(!memcmp(buf, emptyHashParam, size), "Unexpected value\n"); /* By getting the hash, further updates are not allowed */ @@ -835,24 +835,24 @@ static void test_hash_msg_get_param(void) GetLastError() == NTE_BAD_ALGID /* 9x */ || GetLastError() == CRYPT_E_MSG_ERROR /* Vista */ || broken(GetLastError() == ERROR_SUCCESS) /* Some Win9x */), - "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, got 0x%x\n", GetLastError()); + "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, got 0x%lx\n", GetLastError());
/* Even after a final update, the hash data aren't available */ SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_HASH_DATA_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); /* The version is also available, and should be zero for this message. */ size = 0; ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, NULL, &size); ok(ret || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); + "CryptMsgGetParam failed: %08lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, &value, &size); ok(ret || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); + "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) - ok(value == 0, "Expected version 0, got %d\n", value); + ok(value == 0, "Expected version 0, got %ld\n", value); /* As usual, the type isn't available. */ ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); ok(!ret, "Expected failure\n"); @@ -865,19 +865,19 @@ static void test_hash_msg_get_param(void) ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); + "Expected E_INVALIDARG or OSS_LIMITED, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); + "Expected E_INVALIDARG or OSS_LIMITED, got %lx\n", GetLastError()); /* The hash is still available. */ size = 0; ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(size == sizeof(buf), "Unexpected size %d\n", size); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(size == sizeof(buf), "Unexpected size %ld\n", size); ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, buf, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (size == sizeof(buf)) ok(!memcmp(buf, emptyHashParam, size), "Unexpected value\n"); /* After updating the hash, further updates aren't allowed on streamed @@ -890,7 +890,7 @@ static void test_hash_msg_get_param(void) GetLastError() == NTE_BAD_ALGID /* 9x */ || GetLastError() == CRYPT_E_MSG_ERROR /* Vista */ || broken(GetLastError() == ERROR_SUCCESS) /* Some Win9x */), - "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, got 0x%x\n", GetLastError()); + "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, got 0x%lx\n", GetLastError());
CryptMsgClose(msg); } @@ -951,7 +951,7 @@ static void test_hash_msg_encoding(void) check_param("hash empty content", msg, CMSG_CONTENT_PARAM, hashEmptyContent, sizeof(hashEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("hash bare content", msg, CMSG_BARE_CONTENT_PARAM, hashBareContent, sizeof(hashBareContent)); check_param("hash content", msg, CMSG_CONTENT_PARAM, @@ -965,7 +965,7 @@ static void test_hash_msg_encoding(void) check_param("hash empty content", msg, CMSG_CONTENT_PARAM, hashEmptyContent, sizeof(hashEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("hash bare content", msg, CMSG_BARE_CONTENT_PARAM, hashBareContent, sizeof(hashBareContent)); check_param("hash content", msg, CMSG_CONTENT_PARAM, @@ -980,14 +980,14 @@ static void test_hash_msg_encoding(void) check_param("detached hash empty content", msg, CMSG_CONTENT_PARAM, hashEmptyContent, sizeof(hashEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("detached hash not final bare content", msg, CMSG_BARE_CONTENT_PARAM, detachedHashNonFinalBareContent, sizeof(detachedHashNonFinalBareContent)); check_param("detached hash not final content", msg, CMSG_CONTENT_PARAM, detachedHashNonFinalContent, sizeof(detachedHashNonFinalContent)); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); check_param("detached hash bare content", msg, CMSG_BARE_CONTENT_PARAM, detachedHashBareContent, sizeof(detachedHashBareContent)); check_param("detached hash content", msg, CMSG_CONTENT_PARAM, @@ -1003,9 +1003,9 @@ static void test_hash_msg_encoding(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, NULL, &streamInfo); ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg); check_updates("empty hash message", &empty_accum, &accum); free_updates(&accum); @@ -1014,7 +1014,7 @@ static void test_hash_msg_encoding(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, NULL, &streamInfo); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg); check_updates("hash message", &empty_accum, &accum); free_updates(&accum); @@ -1023,7 +1023,7 @@ static void test_hash_msg_encoding(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, CMSG_HASHED, &hashInfo, NULL, &streamInfo); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg); check_updates("detached hash message", &empty_accum, &accum); free_updates(&accum); @@ -1055,11 +1055,11 @@ static void test_signed_msg_open(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + "Expected E_INVALIDARG, got %lx\n", GetLastError()); signInfo.cbSize = sizeof(signInfo); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg);
signInfo.cSigners = 1; @@ -1075,7 +1075,7 @@ static void test_signed_msg_open(void) /* NT: E_INVALIDARG, 9x: unchanged or CRYPT_E_UNKNOWN_ALGO */ ok(!msg && (GetLastError() == E_INVALIDARG || GetLastError() == 0xdeadbeef || GetLastError() == CRYPT_E_UNKNOWN_ALGO), - "Expected E_INVALIDARG or 0xdeadbeef or CRYPT_E_UNKNOWN_ALGO, got 0x%x\n", + "Expected E_INVALIDARG or 0xdeadbeef or CRYPT_E_UNKNOWN_ALGO, got 0x%lx\n", GetLastError());
certInfo.SerialNumber.cbData = sizeof(serialNum); @@ -1086,7 +1086,7 @@ static void test_signed_msg_open(void) /* NT: E_INVALIDARG, 9x: unchanged or CRYPT_E_UNKNOWN_ALGO */ ok(!msg && (GetLastError() == E_INVALIDARG || GetLastError() == 0xdeadbeef || GetLastError() == CRYPT_E_UNKNOWN_ALGO), - "Expected E_INVALIDARG or 0xdeadbeef or CRYPT_E_UNKNOWN_ALGO, got 0x%x\n", + "Expected E_INVALIDARG or 0xdeadbeef or CRYPT_E_UNKNOWN_ALGO, got 0x%lx\n", GetLastError());
certInfo.Issuer.cbData = sizeof(encodedCommonName); @@ -1096,7 +1096,7 @@ static void test_signed_msg_open(void) NULL, NULL); ok(!msg && (GetLastError() == E_INVALIDARG || GetLastError() == CRYPT_E_UNKNOWN_ALGO), - "Expected E_INVALIDARG or CRYPT_E_UNKNOWN_ALGO, got %x\n", GetLastError()); + "Expected E_INVALIDARG or CRYPT_E_UNKNOWN_ALGO, got %lx\n", GetLastError());
/* The signer's hCryptProv must be set to something. Whether it's usable * or not will be checked after the hash algorithm is checked (see next @@ -1107,7 +1107,7 @@ static void test_signed_msg_open(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); ok(!msg && GetLastError() == CRYPT_E_UNKNOWN_ALGO, - "Expected CRYPT_E_UNKNOWN_ALGO, got %x\n", GetLastError()); + "Expected CRYPT_E_UNKNOWN_ALGO, got %lx\n", GetLastError()); /* The signer's hash algorithm must also be set. */ signer.HashAlgorithm.pszObjId = oid_rsa_md5; SetLastError(0xdeadbeef); @@ -1116,7 +1116,7 @@ static void test_signed_msg_open(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); ok(!msg && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError()); } /* The signer's hCryptProv must also be valid. */ ret = CryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, @@ -1125,12 +1125,12 @@ static void test_signed_msg_open(void) ret = CryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, PROV_RSA_FULL, 0); } - ok(ret, "CryptAcquireContext failed: 0x%x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: 0x%lx\n", GetLastError());
if (ret) { msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -1148,7 +1148,7 @@ static void test_signed_msg_open(void) U(signer.SignerId).IssuerSerialNumber.SerialNumber.pbData = serialNum; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); CryptMsgClose(msg);
CryptReleaseContext(signer.hCryptProv, 0); @@ -1212,7 +1212,7 @@ static void test_signed_msg_update(void) ret = CryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, PROV_RSA_FULL, 0); } - ok(ret, "CryptAcquireContext failed: 0x%x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: 0x%lx\n", GetLastError());
if (!ret) { skip("No context for tests\n"); @@ -1221,13 +1221,13 @@ static void test_signed_msg_update(void)
msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); /* Detached CMSG_SIGNED allows non-final updates. */ ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* Detached CMSG_SIGNED also allows non-final updates with no data. */ ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* The final update requires a private key in the hCryptProv, in order to * generate the signature. */ @@ -1237,62 +1237,62 @@ static void test_signed_msg_update(void) (GetLastError() == NTE_BAD_KEYSET || GetLastError() == NTE_NO_KEY || broken(GetLastError() == ERROR_SUCCESS)), /* Some Win9x */ - "Expected NTE_BAD_KEYSET or NTE_NO_KEY, got %x\n", GetLastError()); + "Expected NTE_BAD_KEYSET or NTE_NO_KEY, got %lx\n", GetLastError()); ret = CryptImportKey(signer.hCryptProv, privKey, sizeof(privKey), 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptImportKey failed: %08lx\n", GetLastError()); /* The final update should be able to succeed now that a key exists, but * the previous (invalid) final update prevents it. */ SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); /* Detached CMSG_SIGNED allows non-final updates. */ ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* Detached CMSG_SIGNED also allows non-final updates with no data. */ ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* Now that the private key exists, the final update can succeed (even * with no data.) */ ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* But no updates are allowed after the final update. */ SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, FALSE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); /* Non-detached messages don't allow non-final updates.. */ SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); /* but they do allow final ones. */ ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); /* They also allow final updates with no data. */ ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
CryptDestroyKey(key); @@ -1650,7 +1650,7 @@ static void test_signed_msg_encoding(void) ret = CryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, PROV_RSA_FULL, 0); } - ok(ret, "CryptAcquireContext failed: 0x%x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: 0x%lx\n", GetLastError());
if (!ret) { skip("No context for tests\n"); @@ -1659,11 +1659,11 @@ static void test_signed_msg_encoding(void)
ret = CryptImportKey(signer.hCryptProv, privKey, sizeof(privKey), 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptImportKey failed: %08lx\n", GetLastError());
msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError());
check_param("detached signed empty bare content", msg, CMSG_BARE_CONTENT_PARAM, signedEmptyBareContent, @@ -1671,7 +1671,7 @@ static void test_signed_msg_encoding(void) check_param("detached signed empty content", msg, CMSG_CONTENT_PARAM, signedEmptyContent, sizeof(signedEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("detached signed hash", msg, CMSG_COMPUTED_HASH_PARAM, signedHash, sizeof(signedHash)); check_param("detached signed bare content", msg, CMSG_BARE_CONTENT_PARAM, @@ -1682,7 +1682,7 @@ static void test_signed_msg_encoding(void) ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 1, NULL, &size); ok(!ret && (GetLastError() == CRYPT_E_INVALID_INDEX || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x */)), - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_INDEX, got %lx\n", GetLastError()); check_param("detached signed encoded signer", msg, CMSG_ENCODED_SIGNER, signedEncodedSigner, sizeof(signedEncodedSigner));
@@ -1695,7 +1695,7 @@ static void test_signed_msg_encoding(void) U(signer.SignerId).KeyId.pbData = serialNum; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); check_param("signed key id empty content", msg, CMSG_CONTENT_PARAM, signedKeyIdEmptyContent, sizeof(signedKeyIdEmptyContent)); CryptMsgClose(msg); @@ -1707,14 +1707,14 @@ static void test_signed_msg_encoding(void) signer.SignerId.dwIdChoice = 0; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError());
check_param("signed empty bare content", msg, CMSG_BARE_CONTENT_PARAM, signedEmptyBareContent, sizeof(signedEmptyBareContent)); check_param("signed empty content", msg, CMSG_CONTENT_PARAM, signedEmptyContent, sizeof(signedEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("signed bare content", msg, CMSG_BARE_CONTENT_PARAM, signedBareContent, sizeof(signedBareContent)); check_param("signed content", msg, CMSG_CONTENT_PARAM, @@ -1726,7 +1726,7 @@ static void test_signed_msg_encoding(void) signer.rgAuthAttr = &attr; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError());
CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); check_param("signed with auth attrs bare content", msg, @@ -1740,13 +1740,13 @@ static void test_signed_msg_encoding(void) signInfo.cCertEncoded = 1; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError());
check_param("signed with cert empty bare content", msg, CMSG_BARE_CONTENT_PARAM, signedWithCertEmptyBareContent, sizeof(signedWithCertEmptyBareContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("signed with cert bare content", msg, CMSG_BARE_CONTENT_PARAM, signedWithCertBareContent, sizeof(signedWithCertBareContent));
@@ -1757,13 +1757,13 @@ static void test_signed_msg_encoding(void) signInfo.cCrlEncoded = 1; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError());
check_param("signed with crl empty bare content", msg, CMSG_BARE_CONTENT_PARAM, signedWithCrlEmptyBareContent, sizeof(signedWithCrlEmptyBareContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("signed with crl bare content", msg, CMSG_BARE_CONTENT_PARAM, signedWithCrlBareContent, sizeof(signedWithCrlBareContent));
@@ -1772,13 +1772,13 @@ static void test_signed_msg_encoding(void) signInfo.cCertEncoded = 1; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError());
check_param("signed with cert and crl empty bare content", msg, CMSG_BARE_CONTENT_PARAM, signedWithCertAndCrlEmptyBareContent, sizeof(signedWithCertAndCrlEmptyBareContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); check_param("signed with cert and crl bare content", msg, CMSG_BARE_CONTENT_PARAM, signedWithCertAndCrlBareContent, sizeof(signedWithCertAndCrlBareContent)); @@ -1791,7 +1791,7 @@ static void test_signed_msg_encoding(void) encodedCert.pbData = v1CertWithPubKey; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); check_param("signedWithCertWithPubKeyBareContent", msg, CMSG_BARE_CONTENT_PARAM, signedWithCertWithPubKeyBareContent, sizeof(signedWithCertWithPubKeyBareContent)); @@ -1801,12 +1801,12 @@ static void test_signed_msg_encoding(void) encodedCert.pbData = v1CertWithValidPubKey; msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); check_param("signedWithCertWithValidPubKeyEmptyContent", msg, CMSG_CONTENT_PARAM, signedWithCertWithValidPubKeyEmptyContent, sizeof(signedWithCertWithValidPubKeyEmptyContent)); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); check_param("signedWithCertWithValidPubKeyContent", msg, CMSG_CONTENT_PARAM, signedWithCertWithValidPubKeyContent, sizeof(signedWithCertWithValidPubKeyContent)); @@ -1829,12 +1829,12 @@ static void test_signed_msg_get_param(void)
msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError());
/* Content and bare content are always gettable */ size = 0; ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); - ok(ret || broken(!ret /* Win9x */), "CryptMsgGetParam failed: %08x\n", + ok(ret || broken(!ret /* Win9x */), "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (!ret) { @@ -1843,15 +1843,15 @@ static void test_signed_msg_get_param(void) } size = 0; ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); /* For "signed" messages, so is the version. */ size = 0; ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == CMSG_SIGNED_DATA_V1, "Expected version 1, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(value == CMSG_SIGNED_DATA_V1, "Expected version 1, got %ld\n", value); /* But for this message, with no signers, the hash and signer aren't * available. */ @@ -1859,15 +1859,15 @@ static void test_signed_msg_get_param(void) SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_INDEX, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_INDEX, got %lx\n", GetLastError()); /* As usual, the type isn't available. */ ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError());
CryptMsgClose(msg);
@@ -1886,7 +1886,7 @@ static void test_signed_msg_get_param(void) ret = CryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, PROV_RSA_FULL, 0); } - ok(ret, "CryptAcquireContext failed: 0x%x\n", GetLastError()); + ok(ret, "CryptAcquireContext failed: 0x%lx\n", GetLastError());
if (!ret) { skip("No context for tests\n"); @@ -1895,29 +1895,29 @@ static void test_signed_msg_get_param(void)
msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError());
/* This message, with one signer, has the hash and signer for index 0 * available, but not for other indexes. */ size = 0; ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %lx\n", GetLastError()); size = 0; SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 1, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_INDEX, got %lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 1, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_INDEX, got %lx\n", GetLastError()); /* As usual, the type isn't available. */ ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError());
CryptMsgClose(msg);
@@ -1936,35 +1936,35 @@ static void test_signed_msg_get_param(void) if (!ret && GetLastError() == NTE_EXISTS) ret = CryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, PROV_RSA_FULL, 0); - ok(ret, "CryptAcquireContextA failed: %x\n", GetLastError()); + ok(ret, "CryptAcquireContextA failed: %lx\n", GetLastError()); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_CRYPT_RELEASE_CONTEXT_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); /* still results in the version being 1 when the issuer and serial number * are used and no additional CMS fields are used. */ size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, &value, &size); ok(ret || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE), - "CryptMsgGetParam failed: %08x\n", GetLastError()); + "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) - ok(value == CMSG_SIGNED_DATA_V1, "expected version 1, got %d\n", value); + ok(value == CMSG_SIGNED_DATA_V1, "expected version 1, got %ld\n", value); /* Apparently the encoded signer can be retrieved.. */ ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); /* but the signer info, CMS signer info, and cert ID can't be. */ SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_SIGNER_CERT_ID_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); CryptMsgClose(msg);
/* Using the KeyId field of the SignerId results in the version becoming @@ -1978,31 +1978,31 @@ static void test_signed_msg_get_param(void) if (!ret && GetLastError() == NTE_EXISTS) ret = CryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, PROV_RSA_FULL, 0); - ok(ret, "CryptAcquireContextA failed: %x\n", GetLastError()); + ok(ret, "CryptAcquireContextA failed: %lx\n", GetLastError()); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_CRYPT_RELEASE_CONTEXT_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) - ok(value == CMSG_SIGNED_DATA_V3, "expected version 3, got %d\n", value); + ok(value == CMSG_SIGNED_DATA_V3, "expected version 3, got %ld\n", value); /* Even for a CMS message, the signer can be retrieved.. */ ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); /* but the signer info, CMS signer info, and cert ID can't be. */ SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_SIGNER_CERT_ID_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); CryptMsgClose(msg);
CryptReleaseContext(signer.hCryptProv, 0); @@ -2031,7 +2031,7 @@ static void test_enveloped_msg_open(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, &envelopedInfo, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError());
envelopedInfo.cbSize = sizeof(envelopedInfo); SetLastError(0xdeadbeef); @@ -2040,7 +2040,7 @@ static void test_enveloped_msg_open(void) ok(!msg && (GetLastError() == CRYPT_E_UNKNOWN_ALGO || GetLastError() == E_INVALIDARG), /* Win9x */ - "expected CRYPT_E_UNKNOWN_ALGO or E_INVALIDARG, got %08x\n", GetLastError()); + "expected CRYPT_E_UNKNOWN_ALGO or E_INVALIDARG, got %08lx\n", GetLastError());
envelopedInfo.ContentEncryptionAlgorithm.pszObjId = oid_rsa_rc4; SetLastError(0xdeadbeef); @@ -2048,7 +2048,7 @@ static void test_enveloped_msg_open(void) &envelopedInfo, NULL, NULL); ok(msg != NULL || broken(!msg), /* Win9x */ - "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
envelopedInfo.cRecipients = 1; @@ -2058,7 +2058,7 @@ static void test_enveloped_msg_open(void) msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, &envelopedInfo, NULL, NULL); ok(!msg && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); }
context = CertCreateCertificateContext(X509_ASN_ENCODING, @@ -2069,16 +2069,16 @@ static void test_enveloped_msg_open(void) SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, &envelopedInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); CryptMsgClose(msg); SetLastError(0xdeadbeef); ret = CryptAcquireContextA(&envelopedInfo.hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContextA failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, &envelopedInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + ok(msg != NULL, "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); CryptMsgClose(msg); CryptReleaseContext(envelopedInfo.hCryptProv, 0); CertFreeCertificateContext(context); @@ -2100,20 +2100,20 @@ static void test_enveloped_msg_update(void) &envelopedInfo, NULL, NULL); ok(msg != NULL || broken(!msg), /* Win9x */ - "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); if (msg) { SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, FALSE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); + "expected CRYPT_E_MSG_ERROR, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); + "expected CRYPT_E_MSG_ERROR, got %08lx\n", GetLastError()); CryptMsgClose(msg); } SetLastError(0xdeadbeef); @@ -2121,22 +2121,22 @@ static void test_enveloped_msg_update(void) &envelopedInfo, NULL, NULL); ok(msg != NULL || broken(!msg), /* Win9x */ - "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); if (msg) { SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); + "expected CRYPT_E_MSG_ERROR, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); ok(ret || broken(!ret && GetLastError() == NTE_PERM), /* some NT4 */ - "CryptMsgUpdate failed: %08x\n", GetLastError()); + "CryptMsgUpdate failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); + "expected CRYPT_E_MSG_ERROR, got %08lx\n", GetLastError()); CryptMsgClose(msg); } SetLastError(0xdeadbeef); @@ -2144,16 +2144,16 @@ static void test_enveloped_msg_update(void) CMSG_ENVELOPED, &envelopedInfo, NULL, NULL); ok(msg != NULL || broken(!msg), /* Win9x */ - "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); if (msg) { SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, FALSE); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); } SetLastError(0xdeadbeef); @@ -2161,18 +2161,18 @@ static void test_enveloped_msg_update(void) CMSG_ENVELOPED, &envelopedInfo, NULL, NULL); ok(msg != NULL || broken(!msg), /* Win9x */ - "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); if (msg) { SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); ok(ret || broken(!ret && GetLastError() == NTE_PERM), /* some NT4 */ - "CryptMsgUpdate failed: %08x\n", GetLastError()); + "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); } SetLastError(0xdeadbeef); @@ -2180,15 +2180,15 @@ static void test_enveloped_msg_update(void) &envelopedInfo, NULL, &streamInfo); ok(msg != NULL || broken(!msg), /* Win9x */ - "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); if (msg) { SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); } SetLastError(0xdeadbeef); @@ -2196,17 +2196,17 @@ static void test_enveloped_msg_update(void) &envelopedInfo, NULL, &streamInfo); ok(msg != NULL || broken(!msg), /* Win9x */ - "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); if (msg) { SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); ok(ret || broken(!ret && GetLastError() == NTE_PERM), /* some NT4 */ - "CryptMsgUpdate failed: %08x\n", GetLastError()); + "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); } } @@ -2232,7 +2232,7 @@ static void test_enveloped_msg_encoding(void) &envelopedInfo, NULL, NULL); ok(msg != NULL || broken(!msg), /* Win9x */ - "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); + "CryptMsgOpenToEncode failed: %08lx\n", GetLastError()); if (msg) { check_param("enveloped empty bare content", msg, @@ -2291,12 +2291,12 @@ static void test_decode_msg_update(void) msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); /* Update with a full message in a final update */ ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* Can't update after a final update */ SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); @@ -2305,10 +2305,10 @@ static void test_decode_msg_update(void) ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), FALSE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); + "Expected CRYPT_E_MSG_ERROR, got %lx\n", GetLastError()); /* A subsequent final update succeeds */ ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg);
if (!old_crypt32) @@ -2322,7 +2322,7 @@ static void test_decode_msg_update(void) todo_wine ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), - "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", + "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %lx\n", GetLastError()); /* Changing the callback pointer after the fact yields the same error (so * the message must copy the stream info, not just store a pointer to it) @@ -2334,7 +2334,7 @@ static void test_decode_msg_update(void) todo_wine ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), - "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", + "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %lx\n", GetLastError()); CryptMsgClose(msg); } @@ -2342,13 +2342,13 @@ static void test_decode_msg_update(void) /* Empty non-final updates are allowed when streaming.. */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, &streamInfo); ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); /* but final updates aren't when not enough data has been received. */ SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); todo_wine ok(!ret && GetLastError() == CRYPT_E_STREAM_INSUFFICIENT_DATA, - "Expected CRYPT_E_STREAM_INSUFFICIENT_DATA, got %x\n", GetLastError()); + "Expected CRYPT_E_STREAM_INSUFFICIENT_DATA, got %lx\n", GetLastError()); CryptMsgClose(msg);
/* Updating the message byte by byte is legal */ @@ -2357,9 +2357,9 @@ static void test_decode_msg_update(void) msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, &streamInfo); for (i = 0, ret = TRUE; ret && i < sizeof(dataEmptyContent); i++) ret = CryptMsgUpdate(msg, &dataEmptyContent[i], 1, FALSE); - ok(ret, "CryptMsgUpdate failed on byte %d: %x\n", i, GetLastError()); + ok(ret, "CryptMsgUpdate failed on byte %ld: %lx\n", i, GetLastError()); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed on byte %d: %x\n", i, GetLastError()); + ok(ret, "CryptMsgUpdate failed on byte %ld: %lx\n", i, GetLastError()); CryptMsgClose(msg); todo_wine check_updates("byte-by-byte empty content", &a4, &accum); @@ -2371,7 +2371,7 @@ static void test_decode_msg_update(void) ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %lx\n", GetLastError()); CryptMsgClose(msg); /* and as the final update in streaming mode.. */ @@ -2381,7 +2381,7 @@ static void test_decode_msg_update(void) ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %lx\n", GetLastError()); CryptMsgClose(msg); /* and even as a non-final update in streaming mode. */ @@ -2392,7 +2392,7 @@ static void test_decode_msg_update(void) todo_wine ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %lx\n", GetLastError()); CryptMsgClose(msg);
@@ -2400,7 +2400,7 @@ static void test_decode_msg_update(void) msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg); /* but decoding it as an explicitly typed message fails. */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, @@ -2410,7 +2410,7 @@ static void test_decode_msg_update(void) TRUE); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %lx\n", GetLastError()); CryptMsgClose(msg); /* On the other hand, decoding the bare content of an empty message fails @@ -2422,7 +2422,7 @@ static void test_decode_msg_update(void) sizeof(dataEmptyBareContent), TRUE); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %lx\n", GetLastError()); CryptMsgClose(msg); /* but succeeds with explicit type. */ @@ -2430,7 +2430,7 @@ static void test_decode_msg_update(void) NULL); ret = CryptMsgUpdate(msg, dataEmptyBareContent, sizeof(dataEmptyBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg);
/* Decoding valid content with an unsupported OID fails */ @@ -2438,7 +2438,7 @@ static void test_decode_msg_update(void) SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, bogusOIDContent, sizeof(bogusOIDContent), TRUE); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); CryptMsgClose(msg);
/* Similarly, opening an empty hash with unspecified type succeeds.. */ @@ -2446,7 +2446,7 @@ static void test_decode_msg_update(void) SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, hashEmptyContent, sizeof(hashEmptyContent), TRUE); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgUpdate failed: %08x\n", GetLastError()); + "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); /* while with specified type it fails. */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, @@ -2456,7 +2456,7 @@ static void test_decode_msg_update(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* some Win9x */ || GetLastError() == OSS_DATA_ERROR /* some Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg); /* On the other hand, decoding the bare content of an empty hash message @@ -2469,7 +2469,7 @@ static void test_decode_msg_update(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* some Win9x */ || GetLastError() == OSS_DATA_ERROR /* some Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg); /* but succeeds with explicit type. */ @@ -2478,7 +2478,7 @@ static void test_decode_msg_update(void) ret = CryptMsgUpdate(msg, hashEmptyBareContent, sizeof(hashEmptyBareContent), TRUE); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win9x */), - "CryptMsgUpdate failed: %x\n", GetLastError()); + "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg);
/* And again, opening a (non-empty) hash message with unspecified type @@ -2487,7 +2487,7 @@ static void test_decode_msg_update(void) msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, hashContent, sizeof(hashContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); /* while with specified type it fails.. */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, @@ -2497,7 +2497,7 @@ static void test_decode_msg_update(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* some Win9x */ || GetLastError() == OSS_DATA_ERROR /* some Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg); /* and decoding the bare content of a non-empty hash message fails with @@ -2509,14 +2509,14 @@ static void test_decode_msg_update(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_PDU_MISMATCH /* some Win9x */ || GetLastError() == OSS_DATA_ERROR /* some Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %lx\n", GetLastError()); CryptMsgClose(msg); /* but succeeds with explicit type. */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, NULL); ret = CryptMsgUpdate(msg, hashBareContent, sizeof(hashBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %lx\n", GetLastError()); CryptMsgClose(msg);
/* Opening a (non-empty) hash message with unspecified type and a bogus @@ -2525,12 +2525,12 @@ static void test_decode_msg_update(void) msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, bogusHashContent, sizeof(bogusHashContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); ret = CryptMsgUpdate(msg, signedContent, sizeof(signedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); SetLastError(0xdeadbeef); @@ -2538,14 +2538,14 @@ static void test_decode_msg_update(void) sizeof(signedWithCertAndCrlBareContent), TRUE); ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08lx\n", GetLastError()); CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, NULL); ret = CryptMsgUpdate(msg, signedWithCertAndCrlBareContent, sizeof(signedWithCertAndCrlBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, @@ -2553,31 +2553,31 @@ static void test_decode_msg_update(void) /* The first update succeeds.. */ ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); /* as does a second (probably to update the detached portion).. */ ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); /* while a third fails. */ ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); + "expected CRYPT_E_MSG_ERROR, got %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, NULL, &streamInfo); ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError());
ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), TRUE); ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); + "expected CRYPT_E_MSG_ERROR, got %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, @@ -2585,7 +2585,7 @@ static void test_decode_msg_update(void) SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, envelopedEmptyBareContent, sizeof(envelopedEmptyBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, @@ -2596,7 +2596,7 @@ static void test_decode_msg_update(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR), /* Win9x */ - "expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); @@ -2606,14 +2606,14 @@ static void test_decode_msg_update(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR), /* Win9x */ - "expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, envelopedEmptyContent, sizeof(envelopedEmptyContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, @@ -2621,7 +2621,7 @@ static void test_decode_msg_update(void) SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, envelopedBareContentWithoutData, sizeof(envelopedBareContentWithoutData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -2631,15 +2631,15 @@ static const BYTE hashParam[] = { 0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1, static void compare_signer_info(const CMSG_SIGNER_INFO *got, const CMSG_SIGNER_INFO *expected) { - ok(got->dwVersion == expected->dwVersion, "Expected version %d, got %d\n", + ok(got->dwVersion == expected->dwVersion, "Expected version %ld, got %ld\n", expected->dwVersion, got->dwVersion); ok(got->Issuer.cbData == expected->Issuer.cbData, - "Expected issuer size %d, got %d\n", expected->Issuer.cbData, + "Expected issuer size %ld, got %ld\n", expected->Issuer.cbData, got->Issuer.cbData); ok(!memcmp(got->Issuer.pbData, expected->Issuer.pbData, got->Issuer.cbData), "Unexpected issuer\n"); ok(got->SerialNumber.cbData == expected->SerialNumber.cbData, - "Expected serial number size %d, got %d\n", expected->SerialNumber.cbData, + "Expected serial number size %ld, got %ld\n", expected->SerialNumber.cbData, got->SerialNumber.cbData); ok(!memcmp(got->SerialNumber.pbData, expected->SerialNumber.pbData, got->SerialNumber.cbData), "Unexpected serial number\n"); @@ -2649,10 +2649,10 @@ static void compare_signer_info(const CMSG_SIGNER_INFO *got, static void compare_cms_signer_info(const CMSG_CMS_SIGNER_INFO *got, const CMSG_CMS_SIGNER_INFO *expected) { - ok(got->dwVersion == expected->dwVersion, "Expected version %d, got %d\n", + ok(got->dwVersion == expected->dwVersion, "Expected version %ld, got %ld\n", expected->dwVersion, got->dwVersion); ok(got->SignerId.dwIdChoice == expected->SignerId.dwIdChoice, - "Expected id choice %d, got %d\n", expected->SignerId.dwIdChoice, + "Expected id choice %ld, got %ld\n", expected->SignerId.dwIdChoice, got->SignerId.dwIdChoice); if (got->SignerId.dwIdChoice == expected->SignerId.dwIdChoice) { @@ -2660,7 +2660,7 @@ static void compare_cms_signer_info(const CMSG_CMS_SIGNER_INFO *got, { ok(U(got->SignerId).IssuerSerialNumber.Issuer.cbData == U(expected->SignerId).IssuerSerialNumber.Issuer.cbData, - "Expected issuer size %d, got %d\n", + "Expected issuer size %ld, got %ld\n", U(expected->SignerId).IssuerSerialNumber.Issuer.cbData, U(got->SignerId).IssuerSerialNumber.Issuer.cbData); ok(!memcmp(U(got->SignerId).IssuerSerialNumber.Issuer.pbData, @@ -2669,7 +2669,7 @@ static void compare_cms_signer_info(const CMSG_CMS_SIGNER_INFO *got, "Unexpected issuer\n"); ok(U(got->SignerId).IssuerSerialNumber.SerialNumber.cbData == U(expected->SignerId).IssuerSerialNumber.SerialNumber.cbData, - "Expected serial number size %d, got %d\n", + "Expected serial number size %ld, got %ld\n", U(expected->SignerId).IssuerSerialNumber.SerialNumber.cbData, U(got->SignerId).IssuerSerialNumber.SerialNumber.cbData); ok(!memcmp(U(got->SignerId).IssuerSerialNumber.SerialNumber.pbData, @@ -2680,7 +2680,7 @@ static void compare_cms_signer_info(const CMSG_CMS_SIGNER_INFO *got, else { ok(U(got->SignerId).KeyId.cbData == U(expected->SignerId).KeyId.cbData, - "expected key id size %d, got %d\n", + "expected key id size %ld, got %ld\n", U(expected->SignerId).KeyId.cbData, U(got->SignerId).KeyId.cbData); ok(!memcmp(U(expected->SignerId).KeyId.pbData, U(got->SignerId).KeyId.pbData, U(got->SignerId).KeyId.cbData), @@ -2835,9 +2835,9 @@ static void test_decode_msg_get_param(void) SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %lx\n", GetLastError()); ret = CryptMsgUpdate(msg, dataContent, sizeof(dataContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); check_param("data content", msg, CMSG_CONTENT_PARAM, msgData, sizeof(msgData)); CryptMsgClose(msg); @@ -2855,7 +2855,7 @@ static void test_decode_msg_get_param(void) CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); ret = CryptMsgUpdate(msg, hashContent, sizeof(hashContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); check_param("hash content", msg, CMSG_CONTENT_PARAM, msgData, sizeof(msgData)); check_param("hash hash data", msg, CMSG_HASH_DATA_PARAM, hashParam, @@ -2867,7 +2867,7 @@ static void test_decode_msg_get_param(void) */ ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 1, NULL, &size); ok(ret || GetLastError() == OSS_DATA_ERROR /* Win9x */, - "CryptMsgGetParam failed: %08x\n", GetLastError()); + "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) buf = CryptMemAlloc(size); else @@ -2875,8 +2875,8 @@ static void test_decode_msg_get_param(void) if (buf) { ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 1, buf, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(size == sizeof(hashParam), "Unexpected size %d\n", size); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(size == sizeof(hashParam), "Unexpected size %ld\n", size); ok(!memcmp(buf, hashParam, size), "Unexpected value\n"); CryptMemFree(buf); } @@ -2889,7 +2889,7 @@ static void test_decode_msg_get_param(void)
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); ret = CryptMsgUpdate(msg, signedContent, sizeof(signedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); check_param("signed content", msg, CMSG_CONTENT_PARAM, msgData, sizeof(msgData)); check_param("inner content", msg, CMSG_INNER_CONTENT_TYPE_PARAM, @@ -2897,12 +2897,12 @@ static void test_decode_msg_get_param(void) size = sizeof(value); value = 2112; ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 signer, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(value == 1, "Expected 1 signer, got %ld\n", value); size = 0; ret = CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &size); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); + "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) buf = CryptMemAlloc(size); else @@ -2920,7 +2920,7 @@ static void test_decode_msg_get_param(void) req_size = size; size += 10; CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, buf, &size); - ok(size == req_size, "size = %u, expected %u\n", size, req_size); + ok(size == req_size, "size = %lu, expected %lu\n", size, req_size); compare_signer_info((CMSG_SIGNER_INFO *)buf, &signer); CryptMemFree(buf); } @@ -2928,7 +2928,7 @@ static void test_decode_msg_get_param(void) size = 0; ret = CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, NULL, &size); ok(ret || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); + "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) buf = CryptMemAlloc(size); else @@ -2953,27 +2953,27 @@ static void test_decode_msg_get_param(void) /* index is ignored when getting signer count */ size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 1, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 signer, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(value == 1, "Expected 1 signer, got %ld\n", value); ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 0, "Expected 0 certs, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(value == 0, "Expected 0 certs, got %ld\n", value); ret = CryptMsgGetParam(msg, CMSG_CRL_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 0, "Expected 0 CRLs, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(value == 0, "Expected 0 CRLs, got %ld\n", value); CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, NULL); ret = CryptMsgUpdate(msg, signedWithCertAndCrlBareContent, sizeof(signedWithCertAndCrlBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 cert, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(value == 1, "Expected 1 cert, got %ld\n", value); check_param("cert", msg, CMSG_CERT_PARAM, cert, sizeof(cert)); ret = CryptMsgGetParam(msg, CMSG_CRL_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 CRL, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(value == 1, "Expected 1 CRL, got %ld\n", value); check_param("crl", msg, CMSG_CRL_PARAM, crl, sizeof(crl)); check_param("signed with cert and CRL computed hash", msg, CMSG_COMPUTED_HASH_PARAM, signedWithCertAndCrlComputedHash, @@ -2989,17 +2989,17 @@ static void test_decode_msg_get_param(void) win_skip("Subsequent tests crash on some Win9x\n"); return; } - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); size = sizeof(value); ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 signer, got %d\n", value); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(value == 1, "Expected 1 signer, got %ld\n", value); /* Getting the regular (non-CMS) signer info from a CMS message is also * possible.. */ size = 0; ret = CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) buf = CryptMemAlloc(size); else @@ -3026,7 +3026,7 @@ static void test_decode_msg_get_param(void) } size = 0; ret = CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); if (ret) buf = CryptMemAlloc(size); else @@ -3067,7 +3067,7 @@ static void test_decode_msg_get_param(void) sizeof(publicPrivateKeyPair), 0, 0, &key); ok(ret || broken(!ret && GetLastError() == NTE_PERM), /* WinME and some NT4 */ - "CryptImportKey failed: %08x\n", GetLastError()); + "CryptImportKey failed: %08lx\n", GetLastError());
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); CryptMsgUpdate(msg, envelopedMessage, sizeof(envelopedMessage), TRUE); @@ -3078,12 +3078,12 @@ static void test_decode_msg_get_param(void) decryptPara.hCryptProv = hCryptProv; SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); - ok(ret, "CryptMsgControl failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgControl failed: %08lx\n", GetLastError()); decryptPara.hCryptProv = 0; SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == CRYPT_E_ALREADY_DECRYPTED, - "expected CRYPT_E_ALREADY_DECRYPTED, got %08x\n", GetLastError()); + "expected CRYPT_E_ALREADY_DECRYPTED, got %08lx\n", GetLastError()); check_param("enveloped message", msg, CMSG_CONTENT_PARAM, msgData, sizeof(msgData)); } @@ -3103,7 +3103,7 @@ static void test_decode_msg_get_param(void) decryptPara.hCryptProv = hCryptProv; SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); - ok(ret, "CryptMsgControl failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgControl failed: %08lx\n", GetLastError()); check_param("enveloped bare message", msg, CMSG_CONTENT_PARAM, msgData, sizeof(msgData)); } @@ -3125,12 +3125,12 @@ static void test_decode_msg_get_param(void) SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_RECIPIENT_INFO_PARAM, 3, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "expected CRYPT_E_INVALID_INDEX, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_INDEX, got %08lx\n", GetLastError()); size = 0; SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_RECIPIENT_INFO_PARAM, 2, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(size >= 142, "unexpected size: %u\n", size); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(size >= 142, "unexpected size: %lu\n", size); if (ret) buf = CryptMemAlloc(size); else @@ -3141,13 +3141,13 @@ static void test_decode_msg_get_param(void)
SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_RECIPIENT_INFO_PARAM, 2, buf, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); ok(certInfo->SerialNumber.cbData == sizeof(serialNumber), - "unexpected serial number size: %u\n", certInfo->SerialNumber.cbData); + "unexpected serial number size: %lu\n", certInfo->SerialNumber.cbData); ok(!memcmp(certInfo->SerialNumber.pbData, serialNumber, sizeof(serialNumber)), "unexpected serial number\n"); ok(certInfo->Issuer.cbData == sizeof(issuer), - "unexpected issuer size: %u\n", certInfo->Issuer.cbData); + "unexpected issuer size: %lu\n", certInfo->Issuer.cbData); ok(!memcmp(certInfo->Issuer.pbData, issuer, sizeof(issuer)), "unexpected issuer\n"); CryptMemFree(buf); @@ -3196,17 +3196,17 @@ static void test_msg_control(void) SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, i, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); /* or after an update. */ for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) { SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, i, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } CryptMsgClose(msg);
@@ -3221,17 +3221,17 @@ static void test_msg_control(void) SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, i, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); /* or after an update. */ for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) { SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, i, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } CryptMsgClose(msg);
@@ -3245,17 +3245,17 @@ static void test_msg_control(void) SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, i, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); /* or after an update. */ for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) { SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, i, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); } CryptMsgClose(msg);
@@ -3265,23 +3265,23 @@ static void test_msg_control(void) SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, 0, NULL); ok(!ret && GetLastError() == CRYPT_E_CONTROL_TYPE, - "Expected CRYPT_E_CONTROL_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_CONTROL_TYPE, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 1, 0, NULL); ok(!ret && GetLastError() == CRYPT_E_CONTROL_TYPE, - "Expected CRYPT_E_CONTROL_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_CONTROL_TYPE, got %08lx\n", GetLastError()); /* Can't verify the hash of an indeterminate-type message */ SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); /* Crashes ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, NULL); */ /* Can't decrypt an indeterminate-type message */ ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); CryptMsgClose(msg);
if (!old_crypt32) @@ -3294,14 +3294,14 @@ static void test_msg_control(void) ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); todo_wine ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", GetLastError()); /* Crashes ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, NULL); */ /* Can't verify the signature of a hash message */ ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); CryptMsgUpdate(msg, hashEmptyBareContent, sizeof(hashEmptyBareContent), TRUE); /* Oddly enough, this fails, crashes on some Win9x */ @@ -3313,12 +3313,12 @@ static void test_msg_control(void) NULL); CryptMsgUpdate(msg, hashBareContent, sizeof(hashBareContent), TRUE); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(ret, "CryptMsgControl failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgControl failed: %08lx\n", GetLastError()); /* Can't decrypt an indeterminate-type message */ SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, @@ -3327,17 +3327,17 @@ static void test_msg_control(void) SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); ret = CryptMsgUpdate(msg, detachedHashContent, sizeof(detachedHashContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); /* Still can't verify the hash of a detached message with the content * of the detached hash given.. */ SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); ok(!ret && GetLastError() == CRYPT_E_HASH_VALUE, - "Expected CRYPT_E_HASH_VALUE, got %08x\n", GetLastError()); + "Expected CRYPT_E_HASH_VALUE, got %08lx\n", GetLastError()); /* and giving the content of the message after attempting to verify the * hash fails. */ @@ -3349,7 +3349,7 @@ static void test_msg_control(void) GetLastError() == NTE_BAD_ALGID || /* Win9x */ GetLastError() == CRYPT_E_MSG_ERROR), /* Vista */ "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, " - "got %08x\n", GetLastError()); + "got %08lx\n", GetLastError()); CryptMsgClose(msg);
/* Finally, verifying the hash of a detached message in the correct order: @@ -3362,12 +3362,12 @@ static void test_msg_control(void) NULL, NULL); ret = CryptMsgUpdate(msg, detachedHashContent, sizeof(detachedHashContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(ret, "CryptMsgControl failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgControl failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, @@ -3376,12 +3376,12 @@ static void test_msg_control(void) SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); /* Can't decrypt a signed message */ SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); /* Crash ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, NULL); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); @@ -3395,7 +3395,7 @@ static void test_msg_control(void) ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); ok(!ret && (GetLastError() == CRYPT_E_SIGNER_NOT_FOUND || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_SIGNER_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_SIGNER_NOT_FOUND or OSS_DATA_ERROR, got %08lx\n", GetLastError()); /* The cert info is expected to have an issuer, serial number, and public * key info set. @@ -3408,7 +3408,7 @@ static void test_msg_control(void) ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_EOD or OSS_DATA_ERROR, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD or OSS_DATA_ERROR, got %08lx\n", GetLastError()); CryptMsgClose(msg); /* This cert has a public key, but it's not in a usable form */ msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, @@ -3424,7 +3424,7 @@ static void test_msg_control(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected CRYPT_E_ASN1_EOD or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_EOD or TRUST_E_NOSIGNATURE, got %08lx\n", GetLastError()); /* The public key is supposed to be in encoded form.. */ certInfo.SubjectPublicKeyInfo.Algorithm.pszObjId = oid_rsa_rsa; certInfo.SubjectPublicKeyInfo.PublicKey.cbData = sizeof(aKey); @@ -3434,7 +3434,7 @@ static void test_msg_control(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected CRYPT_E_ASN1_BADTAG or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG or TRUST_E_NOSIGNATURE, got %08lx\n", GetLastError()); /* but not as a X509_PUBLIC_KEY_INFO.. */ certInfo.SubjectPublicKeyInfo.Algorithm.pszObjId = NULL; certInfo.SubjectPublicKeyInfo.PublicKey.cbData = sizeof(encodedPubKey); @@ -3444,7 +3444,7 @@ static void test_msg_control(void) ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected CRYPT_E_ASN1_BADTAG or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG or TRUST_E_NOSIGNATURE, got %08lx\n", GetLastError()); /* This decodes successfully, but it doesn't match any key in the message */ certInfo.SubjectPublicKeyInfo.PublicKey.cbData = sizeof(mod_encoded); certInfo.SubjectPublicKeyInfo.PublicKey.pbData = mod_encoded; @@ -3458,7 +3458,7 @@ static void test_msg_control(void) ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected NTE_BAD_SIGNATURE or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); + "Expected NTE_BAD_SIGNATURE or TRUST_E_NOSIGNATURE, got %08lx\n", GetLastError()); } CryptMsgClose(msg); /* A message with no data doesn't have a valid signature */ @@ -3476,7 +3476,7 @@ static void test_msg_control(void) ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected NTE_BAD_SIGNATURE or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); + "Expected NTE_BAD_SIGNATURE or TRUST_E_NOSIGNATURE, got %08lx\n", GetLastError()); } CryptMsgClose(msg); /* Finally, this succeeds */ @@ -3485,7 +3485,7 @@ static void test_msg_control(void) sizeof(signedWithCertWithValidPubKeyContent), TRUE); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgControl failed: %08x\n", GetLastError()); + "CryptMsgControl failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
/* Test verifying signature of a detached signed message */ @@ -3493,13 +3493,13 @@ static void test_msg_control(void) NULL, NULL); ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); /* Can't verify the sig without having updated the data */ SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || GetLastError() == OSS_DATA_ERROR /* Win9x */), - "expected NTE_BAD_SIGNATURE or OSS_DATA_ERROR, got %08x\n", + "expected NTE_BAD_SIGNATURE or OSS_DATA_ERROR, got %08lx\n", GetLastError()); /* Now that the signature's been checked, can't do the final update */ SetLastError(0xdeadbeef); @@ -3511,7 +3511,7 @@ static void test_msg_control(void) GetLastError() == CRYPT_E_MSG_ERROR)) || /* Vista */ broken(ret), /* Win9x */ "expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, " - "got %08x\n", GetLastError()); + "got %08lx\n", GetLastError()); CryptMsgClose(msg); /* Updating with the detached portion of the message and the data of the * the message allows the sig to be verified. @@ -3520,12 +3520,12 @@ static void test_msg_control(void) NULL, NULL); ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgControl failed: %08x\n", GetLastError()); + "CryptMsgControl failed: %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, @@ -3534,23 +3534,23 @@ static void test_msg_control(void) SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); decryptPara.cbSize = sizeof(decryptPara); if (!old_crypt32) { SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); } SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, envelopedEmptyBareContent, sizeof(envelopedEmptyBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "expected CRYPT_E_INVALID_INDEX, got %08x\n", GetLastError()); + "expected CRYPT_E_INVALID_INDEX, got %08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, @@ -3558,11 +3558,11 @@ static void test_msg_control(void) SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, envelopedBareMessage, sizeof(envelopedBareMessage), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ok(ret, "CryptMsgUpdate failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError()); CryptMsgClose(msg); }
@@ -3586,21 +3586,21 @@ static void test_msg_get_and_verify_signer(void) SetLastError(0xdeadbeef); ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); + "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08lx\n", GetLastError()); /* The signer is cleared on error */ signer = (PCCERT_CONTEXT)0xdeadbeef; SetLastError(0xdeadbeef); ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, &signer, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); + "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08lx\n", GetLastError()); ok(!signer, "expected signer to be NULL\n"); /* The signer index is also cleared on error */ signerIndex = 0xdeadbeef; SetLastError(0xdeadbeef); ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, &signerIndex); ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); - ok(!signerIndex, "expected 0, got %d\n", signerIndex); + "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08lx\n", GetLastError()); + ok(!signerIndex, "expected 0, got %ld\n", signerIndex); /* An unsigned message (msgData isn't a signed message at all) * likewise has no signer. */ @@ -3608,7 +3608,7 @@ static void test_msg_get_and_verify_signer(void) SetLastError(0xdeadbeef); ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); + "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08lx\n", GetLastError()); CryptMsgClose(msg);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); @@ -3619,7 +3619,7 @@ static void test_msg_get_and_verify_signer(void) /* Crashes on most Win9x */ ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); + "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08lx\n", GetLastError()); } CryptMsgClose(msg);
@@ -3629,19 +3629,19 @@ static void test_msg_get_and_verify_signer(void) sizeof(signedWithCertWithValidPubKeyContent), TRUE); ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetAndVerifySigner failed: 0x%08x\n", GetLastError()); + "CryptMsgGetAndVerifySigner failed: 0x%08lx\n", GetLastError()); /* the signer index can be retrieved, .. */ signerIndex = 0xdeadbeef; ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, &signerIndex); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetAndVerifySigner failed: 0x%08x\n", GetLastError()); + "CryptMsgGetAndVerifySigner failed: 0x%08lx\n", GetLastError()); if (ret) - ok(signerIndex == 0, "expected 0, got %d\n", signerIndex); + ok(signerIndex == 0, "expected 0, got %ld\n", signerIndex); /* as can the signer cert. */ signer = (PCCERT_CONTEXT)0xdeadbeef; ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, &signer, NULL); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetAndVerifySigner failed: 0x%08x\n", GetLastError()); + "CryptMsgGetAndVerifySigner failed: 0x%08lx\n", GetLastError()); if (ret) ok(signer != NULL && signer != (PCCERT_CONTEXT)0xdeadbeef, "expected a valid signer\n"); @@ -3654,7 +3654,7 @@ static void test_msg_get_and_verify_signer(void) ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, CMSG_USE_SIGNER_INDEX_FLAG, NULL, &signerIndex); ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "expected CRYPT_E_INVALID_INDEX, got 0x%08x\n", GetLastError()); + "expected CRYPT_E_INVALID_INDEX, got 0x%08lx\n", GetLastError()); /* Specifying CMSG_TRUSTED_SIGNER_FLAG and no cert stores causes the * message signer not to be found. */ @@ -3663,7 +3663,7 @@ static void test_msg_get_and_verify_signer(void) NULL, NULL); ok(!ret && (GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */)), - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); + "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08lx\n", GetLastError()); /* Specifying CMSG_TRUSTED_SIGNER_FLAG and an empty cert store also causes * the message signer not to be found. */ @@ -3674,12 +3674,12 @@ static void test_msg_get_and_verify_signer(void) NULL, NULL); ok(!ret && (GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */)), - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); + "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08lx\n", GetLastError()); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey), CERT_STORE_ADD_ALWAYS, NULL); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win98 */), - "CertAddEncodedCertificateToStore failed: 0x%08x\n", GetLastError()); + "CertAddEncodedCertificateToStore failed: 0x%08lx\n", GetLastError()); /* Specifying CMSG_TRUSTED_SIGNER_FLAG with a cert store that contains * the signer succeeds. */ @@ -3687,7 +3687,7 @@ static void test_msg_get_and_verify_signer(void) ret = CryptMsgGetAndVerifySigner(msg, 1, &store, CMSG_TRUSTED_SIGNER_FLAG, NULL, NULL); ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetAndVerifySigner failed: 0x%08x\n", GetLastError()); + "CryptMsgGetAndVerifySigner failed: 0x%08lx\n", GetLastError()); CertCloseStore(store, 0); CryptMsgClose(msg); } diff --git a/dlls/crypt32/tests/object.c b/dlls/crypt32/tests/object.c index 211b5423e01..8e77709b970 100644 --- a/dlls/crypt32/tests/object.c +++ b/dlls/crypt32/tests/object.c @@ -134,12 +134,12 @@ static void test_query_object(void) ret = pCryptQueryObject(0, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Test with a simple cert */ blob.pbData = bigCert; blob.cbData = sizeof(bigCert); @@ -147,7 +147,7 @@ static void test_query_object(void) ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); + ok(ret, "CryptQueryObject failed: %08lx\n", GetLastError()); /* The same cert, base64-encoded */ blob.pbData = (BYTE *)bigCertBase64; blob.cbData = sizeof(bigCertBase64); @@ -155,19 +155,19 @@ static void test_query_object(void) ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); + ok(ret, "CryptQueryObject failed: %08lx\n", GetLastError()); /* The same base64-encoded cert, restricting the format types */ SetLastError(0xdeadbeef); ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); + ok(ret, "CryptQueryObject failed: %08lx\n", GetLastError()); /* The same cert, base64-encoded but as a wide character string */ blob.pbData = (BYTE *)bigCertBase64W; blob.cbData = sizeof(bigCertBase64W); @@ -176,7 +176,7 @@ static void test_query_object(void) CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); /* For brevity, not tested here, but tested on Windows: same failure * (CRYPT_E_NO_MATCH) when the wide character base64-encoded cert * is written to a file and queried. @@ -188,14 +188,14 @@ static void test_query_object(void) ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); + ok(ret, "CryptQueryObject failed: %08lx\n", GetLastError()); blob.pbData = (BYTE *)signedWithCertWithValidPubKeyContentBase64; blob.cbData = sizeof(signedWithCertWithValidPubKeyContentBase64); SetLastError(0xdeadbeef); ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); + ok(ret, "CryptQueryObject failed: %08lx\n", GetLastError()); /* A valid signed message, encoded as a wide character base64 string, can * be queried successfully. */ @@ -205,18 +205,18 @@ static void test_query_object(void) ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); + ok(ret, "CryptQueryObject failed: %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); + "expected CRYPT_E_NO_MATCH, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); + ok(ret, "CryptQueryObject failed: %08lx\n", GetLastError()); }
START_TEST(object) diff --git a/dlls/crypt32/tests/oid.c b/dlls/crypt32/tests/oid.c index 7e7c1310dd2..7ba68b6cceb 100644 --- a/dlls/crypt32/tests/oid.c +++ b/dlls/crypt32/tests/oid.c @@ -105,13 +105,13 @@ static void testOIDToAlgID(void)
/* Test with a bogus one */ alg = CertOIDToAlgId("1.2.3"); - ok(!alg, "Expected failure, got %d\n", alg); + ok(!alg, "Expected failure, got %ld\n", alg);
for (i = 0; i < ARRAY_SIZE(oidToAlgID); i++) { alg = CertOIDToAlgId(oidToAlgID[i].oid); ok(alg == oidToAlgID[i].algID || (oidToAlgID[i].altAlgID && alg == oidToAlgID[i].altAlgID), - "Expected %d, got %d\n", oidToAlgID[i].algID, alg); + "Expected %ld, got %ld\n", oidToAlgID[i].algID, alg); } }
@@ -124,7 +124,7 @@ static void testAlgIDToOID(void) SetLastError(0xdeadbeef); oid = CertAlgIdToOID(ALG_CLASS_SIGNATURE | ALG_TYPE_ANY | 80); ok(!oid && GetLastError() == 0xdeadbeef, - "Didn't expect last error (%08x) to be set\n", GetLastError()); + "Didn't expect last error (%08lx) to be set\n", GetLastError()); for (i = 0; i < ARRAY_SIZE(algIDToOID); i++) { oid = CertAlgIdToOID(algIDToOID[i].algID); @@ -166,7 +166,7 @@ static void test_oidFunctionSet(void)
/* The name doesn't mean much */ set1 = CryptInitOIDFunctionSet("funky", 0); - ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); + ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08lx\n", GetLastError()); if (set1) { /* These crash @@ -175,14 +175,14 @@ static void test_oidFunctionSet(void) */ size = 0; ret = CryptGetDefaultOIDDllList(set1, 0, NULL, &size); - ok(ret, "CryptGetDefaultOIDDllList failed: %08x\n", GetLastError()); + ok(ret, "CryptGetDefaultOIDDllList failed: %08lx\n", GetLastError()); if (ret) { buf = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); if (buf) { ret = CryptGetDefaultOIDDllList(set1, 0, buf, &size); - ok(ret, "CryptGetDefaultOIDDllList failed: %08x\n", + ok(ret, "CryptGetDefaultOIDDllList failed: %08lx\n", GetLastError()); ok(!*buf, "Expected empty DLL list\n"); HeapFree(GetProcessHeap(), 0, buf); @@ -192,9 +192,9 @@ static void test_oidFunctionSet(void)
/* MSDN says flags must be 0, but it's not checked */ set1 = CryptInitOIDFunctionSet("", 1); - ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); + ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08lx\n", GetLastError()); set2 = CryptInitOIDFunctionSet("", 0); - ok(set2 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); + ok(set2 != 0, "CryptInitOIDFunctionSet failed: %08lx\n", GetLastError()); /* There isn't a free function, so there must be only one set per name to * limit leaks. (I guess the sets are freed when crypt32 is unloaded.) */ @@ -208,7 +208,7 @@ static void test_oidFunctionSet(void)
/* There's no installed function for a built-in encoding. */ set1 = CryptInitOIDFunctionSet("CryptDllEncodeObject", 0); - ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); + ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08lx\n", GetLastError()); if (set1) { void *funcAddr; @@ -218,7 +218,7 @@ static void test_oidFunctionSet(void) &funcAddr, &hFuncAddr); ok((!ret && GetLastError() == ERROR_FILE_NOT_FOUND) || broken(ret) /* some Win98 */, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); } }
@@ -243,21 +243,21 @@ static void test_installOIDFunctionAddress(void) SetLastError(0xdeadbeef); ret = CryptInstallOIDFunctionAddress(NULL, 0, "CryptDllEncodeObject", 0, NULL, 0); - ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n", + ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08lx\n", GetLastError());
/* The function name doesn't much matter */ SetLastError(0xdeadbeef); ret = CryptInstallOIDFunctionAddress(NULL, 0, "OhSoFunky", 0, NULL, 0); - ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n", + ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); entry.pszOID = X509_CERT; ret = CryptInstallOIDFunctionAddress(NULL, 0, "OhSoFunky", 1, &entry, 0); - ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n", + ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08lx\n", GetLastError()); set = CryptInitOIDFunctionSet("OhSoFunky", 0); - ok(set != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); + ok(set != 0, "CryptInitOIDFunctionSet failed: %08lx\n", GetLastError()); if (set) { funcY funcAddr = NULL; @@ -271,15 +271,15 @@ static void test_installOIDFunctionAddress(void) (void **)&funcAddr, &hFuncAddr); ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == E_INVALIDARG /* some Win98 */), - "Expected ERROR_FILE_NOT_FOUND or E_INVALIDARG, got %d\n", + "Expected ERROR_FILE_NOT_FOUND or E_INVALIDARG, got %ld\n", GetLastError()); ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, X509_CERT, 0, (void **)&funcAddr, &hFuncAddr); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); ret = CryptGetOIDFunctionAddress(set, 0, X509_CERT, 0, (void **)&funcAddr, &hFuncAddr); - ok(ret, "CryptGetOIDFunctionAddress failed: %d\n", GetLastError()); + ok(ret, "CryptGetOIDFunctionAddress failed: %ld\n", GetLastError()); if (funcAddr) { int y = funcAddr(0xabadc0da); @@ -306,11 +306,11 @@ static void test_registerOIDFunction(void) ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "foo", NULL, bogusDll, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG: %d\n", GetLastError()); + "Expected E_INVALIDARG: %ld\n", GetLastError()); /* This has no effect, but "succeeds" on XP */ ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "foo", "1.2.3.4.5.6.7.8.9.10", NULL, NULL); - ok(ret, "Expected pseudo-success, got %d\n", GetLastError()); + ok(ret, "Expected pseudo-success, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject", "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); @@ -319,16 +319,16 @@ static void test_registerOIDFunction(void) skip("Need admin rights\n"); return; } - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptRegisterOIDFunction failed: %ld\n", GetLastError()); ret = CryptUnregisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject", "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptUnregisterOIDFunction failed: %ld\n", GetLastError()); ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "bogus", "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptRegisterOIDFunction failed: %ld\n", GetLastError()); ret = CryptUnregisterOIDFunction(X509_ASN_ENCODING, "bogus", "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptUnregisterOIDFunction failed: %ld\n", GetLastError()); /* Unwanted Cryptography\OID\EncodingType 1\bogus\ will still be there */ ok(!RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Cryptography\OID\EncodingType 1\bogus"), @@ -336,17 +336,17 @@ static void test_registerOIDFunction(void) /* Shouldn't have effect but registry keys are created */ ret = CryptRegisterOIDFunction(PKCS_7_ASN_ENCODING, "CryptDllEncodeObject", "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptRegisterOIDFunction failed: %ld\n", GetLastError()); ret = CryptUnregisterOIDFunction(PKCS_7_ASN_ENCODING, "CryptDllEncodeObject", "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptUnregisterOIDFunction failed: %ld\n", GetLastError()); /* Check with bogus encoding type. Registry keys are still created */ ret = CryptRegisterOIDFunction(0, "CryptDllEncodeObject", "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptRegisterOIDFunction failed: %ld\n", GetLastError()); ret = CryptUnregisterOIDFunction(0, "CryptDllEncodeObject", "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptUnregisterOIDFunction failed: %ld\n", GetLastError()); /* Unwanted Cryptography\OID\EncodingType 0\CryptDllEncodeObject\ * will still be there */ @@ -358,10 +358,10 @@ static void test_registerOIDFunction(void) */ ret = CryptRegisterOIDFunction(3, "CryptDllEncodeObject", "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptRegisterOIDFunction failed: %ld\n", GetLastError()); ret = CryptUnregisterOIDFunction(3, "CryptDllEncodeObject", "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); + ok(ret, "CryptUnregisterOIDFunction failed: %ld\n", GetLastError()); /* Unwanted Cryptography\OID\EncodingType 3\CryptDllEncodeObject * will still be there. */ @@ -385,7 +385,7 @@ static void test_registerDefaultOIDFunction(void)
ret = CryptRegisterDefaultOIDFunction(0, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* This succeeds on WinXP, although the bogus entry is unusable. ret = CryptRegisterDefaultOIDFunction(0, NULL, 0, bogusDll); */ @@ -398,24 +398,24 @@ static void test_registerDefaultOIDFunction(void) skip("Need admin rights\n"); return; } - ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError()); + ok(ret, "CryptRegisterDefaultOIDFunction failed: %08lx\n", GetLastError()); /* Reregistering should fail */ ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0, bogusDll); ok(!ret && GetLastError() == ERROR_FILE_EXISTS, - "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError()); + "Expected ERROR_FILE_EXISTS, got %08lx\n", GetLastError()); /* Registering the same one at index 1 should also fail */ ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 1, bogusDll); ok(!ret && GetLastError() == ERROR_FILE_EXISTS, - "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError()); + "Expected ERROR_FILE_EXISTS, got %08lx\n", GetLastError()); /* Registering a different one at index 1 succeeds */ ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 1, bogus2Dll); - ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError()); + ok(ret, "CryptRegisterDefaultOIDFunction failed: %08lx\n", GetLastError()); sprintf(buf, fmt, 0, func); rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, buf, &key); - ok(rc == 0, "Expected key to exist, RegOpenKeyA failed: %d\n", rc); + ok(rc == 0, "Expected key to exist, RegOpenKeyA failed: %ld\n", rc); if (rc == 0) { static const CHAR dllA[] = "Dll"; @@ -428,8 +428,8 @@ static void test_registerDefaultOIDFunction(void) size = ARRAY_SIZE(dllBuf); rc = RegQueryValueExA(key, dllA, NULL, &type, (LPBYTE)dllBuf, &size); ok(rc == 0, - "Expected Dll value to exist, RegQueryValueExA failed: %d\n", rc); - ok(type == REG_MULTI_SZ, "Expected type REG_MULTI_SZ, got %d\n", type); + "Expected Dll value to exist, RegQueryValueExA failed: %ld\n", rc); + ok(type == REG_MULTI_SZ, "Expected type REG_MULTI_SZ, got %ld\n", type); /* bogusDll was registered first, so that should be first */ ptr = dllBuf; ok(!lstrcmpiA(ptr, bogusDll_A), "Unexpected dll\n"); @@ -440,17 +440,17 @@ static void test_registerDefaultOIDFunction(void) /* Unregister both of them */ ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", bogusDll); - ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08x\n", + ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08lx\n", GetLastError()); ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", bogus2Dll); - ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08x\n", + ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08lx\n", GetLastError()); /* Now that they're both unregistered, unregistering should fail */ ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", bogusDll); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
/* Repeat a few tests on the normal encoding type */ ret = CryptRegisterDefaultOIDFunction(X509_ASN_ENCODING, @@ -462,7 +462,7 @@ static void test_registerDefaultOIDFunction(void) ret = CryptUnregisterDefaultOIDFunction(X509_ASN_ENCODING, "CertDllOpenStoreProv", bogusDll); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); }
static void test_getDefaultOIDFunctionAddress(void) @@ -480,20 +480,20 @@ static void test_getDefaultOIDFunctionAddress(void) &hFuncAddr); */ set = CryptInitOIDFunctionSet("CertDllOpenStoreProv", 0); - ok(set != 0, "CryptInitOIDFunctionSet failed: %d\n", GetLastError()); + ok(set != 0, "CryptInitOIDFunctionSet failed: %ld\n", GetLastError()); /* This crashes if hFuncAddr is not 0 to begin with */ hFuncAddr = 0; ret = CryptGetDefaultOIDFunctionAddress(set, 0, NULL, 0, &funcAddr, &hFuncAddr); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); /* This fails with the normal encoding too, so built-in functions aren't * returned. */ ret = CryptGetDefaultOIDFunctionAddress(set, X509_ASN_ENCODING, NULL, 0, &funcAddr, &hFuncAddr); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
/* Even with a registered dll, this fails (since the dll doesn't exist) */ SetLastError(0xdeadbeef); @@ -502,11 +502,11 @@ static void test_getDefaultOIDFunctionAddress(void) if (!ret && GetLastError() == ERROR_ACCESS_DENIED) skip("Need admin rights\n"); else - ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError()); + ok(ret, "CryptRegisterDefaultOIDFunction failed: %08lx\n", GetLastError()); ret = CryptGetDefaultOIDFunctionAddress(set, 0, NULL, 0, &funcAddr, &hFuncAddr); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", bogusDll); }
@@ -591,20 +591,20 @@ static void test_findOIDInfo(void) { DWORD *data;
- ok(info->cbSize == sizeof(*info), "Unexpected structure size %d.\n", info->cbSize); + ok(info->cbSize == sizeof(*info), "Unexpected structure size %ld.\n", info->cbSize); ok(!strcmp(info->pszOID, oid_ecdsa_sha256), "Expected %s, got %s\n", oid_ecdsa_sha256, info->pszOID); ok(!lstrcmpW(info->pwszName, sha256ECDSA), "Expected %s, got %s\n", wine_dbgstr_w(sha256ECDSA), wine_dbgstr_w(info->pwszName)); ok(info->dwGroupId == CRYPT_SIGN_ALG_OID_GROUP_ID, - "Expected CRYPT_SIGN_ALG_OID_GROUP_ID, got %u\n", info->dwGroupId); + "Expected CRYPT_SIGN_ALG_OID_GROUP_ID, got %lu\n", info->dwGroupId); ok(U(*info).Algid == CALG_OID_INFO_CNG_ONLY, "Expected CALG_OID_INFO_CNG_ONLY, got %d\n", U(*info).Algid);
data = (DWORD *)info->ExtraInfo.pbData; - ok(info->ExtraInfo.cbData == 8, "Expected 8, got %d\n", info->ExtraInfo.cbData); - ok(data[0] == CALG_OID_INFO_PARAMETERS, "Expected CALG_OID_INFO_PARAMETERS, got %x\n", data[0]); + ok(info->ExtraInfo.cbData == 8, "Expected 8, got %ld\n", info->ExtraInfo.cbData); + ok(data[0] == CALG_OID_INFO_PARAMETERS, "Expected CALG_OID_INFO_PARAMETERS, got %lx\n", data[0]); ok(data[1] == CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG, - "Expected CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG, got %x\n", data[1]); + "Expected CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG, got %lx\n", data[1]);
ok(!lstrcmpW(info->pwszCNGAlgid, BCRYPT_SHA256_ALGORITHM), "Expected %s, got %s\n", wine_dbgstr_w(BCRYPT_SHA256_ALGORITHM), wine_dbgstr_w(info->pwszCNGAlgid)); @@ -628,26 +628,26 @@ static void test_registerOIDInfo(void) SetLastError(0xdeadbeef); ret = CryptUnregisterOIDInfo(NULL); ok(!ret, "should fail\n"); - ok(GetLastError() == E_INVALIDARG, "got %#x\n", GetLastError()); + ok(GetLastError() == E_INVALIDARG, "got %#lx\n", GetLastError());
memset(&info1, 0, sizeof(info1)); SetLastError(0xdeadbeef); ret = CryptUnregisterOIDInfo(&info1); ok(!ret, "should fail\n"); - ok(GetLastError() == E_INVALIDARG, "got %#x\n", GetLastError()); + ok(GetLastError() == E_INVALIDARG, "got %#lx\n", GetLastError());
info1.cbSize = sizeof(info1); SetLastError(0xdeadbeef); ret = CryptUnregisterOIDInfo(&info1); ok(!ret, "should fail\n"); - ok(GetLastError() == E_INVALIDARG, "got %#x\n", GetLastError()); + ok(GetLastError() == E_INVALIDARG, "got %#lx\n", GetLastError());
info1.pszOID = test_oid; SetLastError(0xdeadbeef); ret = CryptUnregisterOIDInfo(&info1); ok(!ret, "should fail\n"); ok(GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_ACCESS_DENIED, "got %u\n", GetLastError()); + GetLastError() == ERROR_ACCESS_DENIED, "got %lu\n", GetLastError());
info2 = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, (void *)test_oid, 0); ok(!info2, "should fail\n"); @@ -657,10 +657,10 @@ static void test_registerOIDInfo(void) * registry on Windows because dwGroupId == 0. */ ret = CryptRegisterOIDInfo(&info1, 0); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\Microsoft\Cryptography\OID\EncodingType 0\CryptDllFindOIDInfo\1.2.3.4.5.6.7.8.9.10!1", &key); - ok(ret == ERROR_FILE_NOT_FOUND, "got %u\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "got %lu\n", ret);
info2 = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, (void *)test_oid, 0); ok(!info2, "should fail\n"); @@ -674,7 +674,7 @@ static void test_registerOIDInfo(void) skip("Need admin rights\n"); return; } - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError());
/* It looks like crypt32 reads the OID info from registry only on load, * and CryptFindOIDInfo will find the registered OID on next run @@ -683,28 +683,28 @@ static void test_registerOIDInfo(void) ok(!info2, "should fail\n");
ret = RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\Microsoft\Cryptography\OID\EncodingType 0\CryptDllFindOIDInfo\1.2.3.4.5.6.7.8.9.10!1", &key); - ok(!ret, "got %u\n", ret); + ok(!ret, "got %lu\n", ret);
memset(buf, 0, sizeof(buf)); size = sizeof(buf); ret = RegQueryValueExA(key, "Name", NULL, &type, (BYTE *)buf, &size); - ok(!ret, "got %u\n", ret); - ok(type == REG_SZ, "got %u\n", type); + ok(!ret, "got %lu\n", ret); + ok(type == REG_SZ, "got %lu\n", type); ok(!strcmp(buf, "winetest"), "got %s\n", buf);
value = 0xdeadbeef; size = sizeof(value); ret = RegQueryValueExA(key, "Flags", NULL, &type, (BYTE *)&value, &size); - ok(!ret, "got %u\n", ret); - ok(type == REG_DWORD, "got %u\n", type); - ok(value == 1, "got %u\n", value); + ok(!ret, "got %lu\n", ret); + ok(type == REG_DWORD, "got %lu\n", type); + ok(value == 1, "got %lu\n", value);
RegCloseKey(key);
CryptUnregisterOIDInfo(&info1);
ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\Microsoft\Cryptography\OID\EncodingType 0\CryptDllFindOIDInfo\1.2.3.4.5.6.7.8.9.10!1", &key); - ok(ret == ERROR_FILE_NOT_FOUND, "got %u\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "got %lu\n", ret); }
START_TEST(oid) diff --git a/dlls/crypt32/tests/protectdata.c b/dlls/crypt32/tests/protectdata.c index 70a8ba86b05..c4dfcd19a39 100644 --- a/dlls/crypt32/tests/protectdata.c +++ b/dlls/crypt32/tests/protectdata.c @@ -55,13 +55,13 @@ static void test_cryptprotectdata(void) protected = pCryptProtectData(NULL,desc,NULL,NULL,NULL,0,&cipher); ok(!protected, "Encrypting without plain data source.\n"); r = GetLastError(); - ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r); + ok(r == ERROR_INVALID_PARAMETER, "Wrong (%lu) GetLastError seen\n",r);
SetLastError(0xDEADBEEF); protected = pCryptProtectData(&plain,desc,NULL,NULL,NULL,0,NULL); ok(!protected, "Encrypting without cipher destination.\n"); r = GetLastError(); - ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r); + ok(r == ERROR_INVALID_PARAMETER, "Wrong (%lu) GetLastError seen\n",r);
cipher.pbData=NULL; cipher.cbData=0; @@ -77,7 +77,7 @@ static void test_cryptprotectdata(void) r = GetLastError(); ok(r == ERROR_SUCCESS || r == ERROR_IO_PENDING, /* win2k */ - "Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %d\n",r); + "Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %ld\n",r); }
cipher_entropy.pbData=NULL; @@ -102,7 +102,7 @@ static void test_cryptprotectdata(void) { /* fails in win2k */ ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } }
@@ -131,13 +131,13 @@ static void test_cryptunprotectdata(void) okay = pCryptUnprotectData(&cipher,NULL,NULL,NULL,NULL,0,NULL); ok(!okay,"Decrypting without destination\n"); r = GetLastError(); - ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r); + ok(r == ERROR_INVALID_PARAMETER, "Wrong (%lu) GetLastError seen\n",r);
SetLastError(0xDEADBEEF); okay = pCryptUnprotectData(NULL,NULL,NULL,NULL,NULL,0,&plain); ok(!okay,"Decrypting without source\n"); r = GetLastError(); - ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r); + ok(r == ERROR_INVALID_PARAMETER, "Wrong (%lu) GetLastError seen\n",r);
plain.pbData=NULL; plain.cbData=0; @@ -146,7 +146,7 @@ static void test_cryptunprotectdata(void) okay = pCryptUnprotectData(&cipher_entropy,NULL,NULL,NULL,NULL,0,&plain); ok(!okay,"Decrypting without needed entropy\n"); r = GetLastError(); - ok(r == ERROR_INVALID_DATA, "Wrong (%u) GetLastError seen\n", r); + ok(r == ERROR_INVALID_DATA, "Wrong (%lu) GetLastError seen\n", r);
plain.pbData=NULL; plain.cbData=0; @@ -175,7 +175,7 @@ static void test_cryptunprotectdata(void) okay = pCryptUnprotectData(&cipher_entropy,&data_desc,&cipher_entropy,NULL,NULL,0,&plain); ok(!okay,"Decrypting with wrong entropy\n"); r = GetLastError(); - ok(r == ERROR_INVALID_DATA, "Wrong (%u) GetLastError seen\n",r); + ok(r == ERROR_INVALID_DATA, "Wrong (%lu) GetLastError seen\n",r);
/* with entropy */ SetLastError(0xDEADBEEF); @@ -234,8 +234,8 @@ static void test_simpleroundtrip(const char *plaintext) }
res = pCryptUnprotectData(&encrypted, NULL, NULL, NULL, NULL, 0, &output); - ok(res != 0, "can't unprotect; last error %u\n", GetLastError()); - ok(output.cbData == strlen(plaintext), "output wrong length %d for input '%s', wanted %d\n", output.cbData, plaintext, lstrlenA(plaintext)); + ok(res != 0, "can't unprotect; last error %lu\n", GetLastError()); + ok(output.cbData == strlen(plaintext), "output wrong length %ld for input '%s', wanted %d\n", output.cbData, plaintext, lstrlenA(plaintext)); ok(!memcmp(plaintext, (char *)output.pbData, output.cbData), "output wrong contents for input '%s'\n", plaintext); LocalFree(output.pbData); LocalFree(encrypted.pbData); diff --git a/dlls/crypt32/tests/sip.c b/dlls/crypt32/tests/sip.c index d8d6a874450..5728065127b 100644 --- a/dlls/crypt32/tests/sip.c +++ b/dlls/crypt32/tests/sip.c @@ -49,7 +49,7 @@ static void test_AddRemoveProvider(void) ret = CryptSIPRemoveProvider(NULL); ok (!ret, "Expected CryptSIPRemoveProvider to fail.\n"); ok (GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d.\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld.\n", GetLastError());
/* nonexistent provider should result in a registry error */ SetLastError(0xdeadbeef); @@ -68,7 +68,7 @@ static void test_AddRemoveProvider(void) */ if (!ret) ok (GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld.\n", GetLastError()); }
/* Everything OK, pwszIsFunctionName and pwszIsFunctionNameFmt2 are left NULL @@ -90,7 +90,7 @@ static void test_AddRemoveProvider(void) skip("Need admin rights\n"); return; } - ok ( ret, "CryptSIPAddProvider should have succeeded, last error %d\n", GetLastError()); + ok ( ret, "CryptSIPAddProvider should have succeeded, last error %ld\n", GetLastError());
/* Dummy provider will be deleted, but the function still fails because * pwszIsFunctionName and pwszIsFunctionNameFmt2 are not present in the @@ -105,7 +105,7 @@ static void test_AddRemoveProvider(void) */ if (!ret) ok (GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld.\n", GetLastError());
/* Everything OK */ memset(&newprov, 0, sizeof(SIP_ADD_NEWPROVIDER)); @@ -124,12 +124,12 @@ static void test_AddRemoveProvider(void)
SetLastError(0xdeadbeef); ret = CryptSIPAddProvider(&newprov); - ok ( ret, "CryptSIPAddProvider should have succeeded, last error %d\n", GetLastError()); + ok ( ret, "CryptSIPAddProvider should have succeeded, last error %ld\n", GetLastError());
/* Dummy provider should be deleted */ SetLastError(0xdeadbeef); ret = CryptSIPRemoveProvider(&actionid); - ok ( ret, "CryptSIPRemoveProvider should have succeeded, last error %d\n", GetLastError()); + ok ( ret, "CryptSIPRemoveProvider should have succeeded, last error %ld\n", GetLastError()); }
static const BYTE cabFileData[] = { @@ -164,7 +164,7 @@ static void test_SIPRetrieveSubjectGUID(void) ret = CryptSIPRetrieveSubjectGuid(NULL, NULL, NULL); ok ( !ret, "Expected CryptSIPRetrieveSubjectGuid to fail\n"); ok (GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d.\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld.\n", GetLastError());
/* Test with a nonexistent file (hopefully) */ SetLastError(0xdeadbeef); @@ -174,7 +174,7 @@ static void test_SIPRetrieveSubjectGUID(void) ok ( !ret, "Expected CryptSIPRetrieveSubjectGuid to fail\n"); ok (GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_PATH_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, got %d.\n", + "Expected ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, got %ld.\n", GetLastError()); ok(IsEqualGUID(&subject, &nullSubject), "Expected a NULL GUID for c:\deadbeef.dbf, not %s\n", wine_dbgstr_guid(&subject)); @@ -184,7 +184,7 @@ static void test_SIPRetrieveSubjectGUID(void) * Use A-functions where possible as that should be available on all platforms */ ret = GetEnvironmentVariableA(windir, regeditPath, MAX_PATH); - ok (ret > 0, "expected GEVA(windir) to succeed, last error %d\n", GetLastError()); + ok (ret > 0, "expected GEVA(windir) to succeed, last error %ld\n", GetLastError()); strcat(regeditPath, "\"); strcat(regeditPath, regeditExe); MultiByteToWideChar(CP_ACP, 0, regeditPath, strlen(regeditPath)+1, regeditPathW, @@ -230,7 +230,7 @@ static void test_SIPRetrieveSubjectGUID(void) GetLastError() == ERROR_INVALID_PARAMETER /* Vista */ || GetLastError() == ERROR_SUCCESS /* most Win98 */ || GetLastError() == TRUST_E_SUBJECT_FORM_UNKNOWN /* some Win98 */, - "Expected ERROR_FILE_INVALID, ERROR_INVALID_PARAMETER, ERROR_SUCCESS or TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x\n", GetLastError()); + "Expected ERROR_FILE_INVALID, ERROR_INVALID_PARAMETER, ERROR_SUCCESS or TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08lx\n", GetLastError()); ok(IsEqualGUID(&subject, &nullSubject), "Expected a NULL GUID for empty file %s, not %s\n", tempfile, wine_dbgstr_guid(&subject));
@@ -246,7 +246,7 @@ static void test_SIPRetrieveSubjectGUID(void) ok ( GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_SUCCESS /* most Win98 */ || GetLastError() == TRUST_E_SUBJECT_FORM_UNKNOWN /* some Win98 */, - "Expected ERROR_INVALID_PARAMETER, ERROR_SUCCESS or TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, ERROR_SUCCESS or TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08lx\n", GetLastError()); ok(IsEqualGUID(&subject, &nullSubject), "Expected a NULL GUID for empty file %s, not %s\n", tempfile, wine_dbgstr_guid(&subject));
@@ -261,7 +261,7 @@ static void test_SIPRetrieveSubjectGUID(void) ok ( !ret, "Expected CryptSIPRetrieveSubjectGuid to fail\n"); ok ( GetLastError() == TRUST_E_SUBJECT_FORM_UNKNOWN || GetLastError() == ERROR_SUCCESS /* Win98 */, - "Expected TRUST_E_SUBJECT_FORM_UNKNOWN or ERROR_SUCCESS, got 0x%08x\n", GetLastError()); + "Expected TRUST_E_SUBJECT_FORM_UNKNOWN or ERROR_SUCCESS, got 0x%08lx\n", GetLastError()); ok(IsEqualGUID(&subject, &nullSubject), "Expected a NULL GUID for empty file %s, not %s\n", tempfile, wine_dbgstr_guid(&subject));
@@ -271,14 +271,14 @@ static void test_SIPRetrieveSubjectGUID(void) /* Create a file with just the .cab header 'MSCF' */ SetLastError(0xdeadbeef); file = CreateFileA(tempfile, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed with %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed with %lu\n", GetLastError()); WriteFile(file, cabFileData, 4, &written, NULL); CloseHandle(file);
SetLastError(0xdeadbeef); memset(&subject, 1, sizeof(GUID)); ret = CryptSIPRetrieveSubjectGuid(tempfileW, NULL, &subject); - ok( ret, "CryptSIPRetrieveSubjectGuid failed: %d (0x%08x)\n", + ok( ret, "CryptSIPRetrieveSubjectGuid failed: %ld (0x%08lx)\n", GetLastError(), GetLastError() ); ok(IsEqualGUID(&subject, &cabGUID), "Expected GUID %s for cabinet file, not %s\n", wine_dbgstr_guid(&cabGUID), wine_dbgstr_guid(&subject)); @@ -289,14 +289,14 @@ static void test_SIPRetrieveSubjectGUID(void) /* Create a .cab file */ SetLastError(0xdeadbeef); file = CreateFileA(tempfile, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed with %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed with %lu\n", GetLastError()); WriteFile(file, cabFileData, sizeof(cabFileData), &written, NULL); CloseHandle(file);
SetLastError(0xdeadbeef); memset(&subject, 1, sizeof(GUID)); ret = CryptSIPRetrieveSubjectGuid(tempfileW, NULL, &subject); - ok( ret, "CryptSIPRetrieveSubjectGuid failed: %d (0x%08x)\n", + ok( ret, "CryptSIPRetrieveSubjectGuid failed: %ld (0x%08lx)\n", GetLastError(), GetLastError() ); ok(IsEqualGUID(&subject, &cabGUID), "Expected GUID %s for cabinet file, not %s\n", wine_dbgstr_guid(&cabGUID), wine_dbgstr_guid(&subject)); @@ -322,14 +322,14 @@ static void test_SIPLoad(void) ret = CryptSIPLoad(NULL, 0, NULL); ok ( !ret, "Expected CryptSIPLoad to fail\n"); ok ( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got 0x%08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got 0x%08lx\n", GetLastError());
/* Only pSipDispatch NULL */ SetLastError(0xdeadbeef); ret = CryptSIPLoad(&subject, 0, NULL); ok ( !ret, "Expected CryptSIPLoad to fail\n"); ok ( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got 0x%08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got 0x%08lx\n", GetLastError());
/* No NULLs, but nonexistent pgSubject */ SetLastError(0xdeadbeef); @@ -339,7 +339,7 @@ static void test_SIPLoad(void) ret = CryptSIPLoad(&dummySubject, 0, &sdi); ok ( !ret, "Expected CryptSIPLoad to fail\n"); ok ( GetLastError() == TRUST_E_SUBJECT_FORM_UNKNOWN, - "Expected TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x\n", GetLastError()); + "Expected TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08lx\n", GetLastError()); ok( sdi.pfGet == (pCryptSIPGetSignedDataMsg)0xdeadbeef, "Expected no change to the function pointer\n");
hCrypt = GetModuleHandleA("crypt32.dll"); @@ -430,7 +430,7 @@ static void test_SIPLoad(void) ret = CryptSIPLoad(&unknown, 1, &sdi); ok ( !ret, "Expected CryptSIPLoad to fail\n"); ok ( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got 0x%08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got 0x%08lx\n", GetLastError()); ok( sdi.pfGet == (pCryptSIPGetSignedDataMsg)0xdeadbeef, "Expected no change to the function pointer\n"); }
diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 852cedaa1fe..d8669995d68 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -136,21 +136,21 @@ static void testMemStore(void) /* NULL provider */ store1 = CertOpenStore(0, 0, 0, 0, NULL); ok(!store1 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); /* weird flags */ store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_DELETE_FLAG, NULL); ok(!store1 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %d\n", GetLastError()); + "Expected ERROR_CALL_NOT_IMPLEMENTED, got %ld\n", GetLastError());
/* normal */ store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store1 != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store1 != NULL, "CertOpenStore failed: %ld\n", GetLastError()); /* open existing doesn't */ store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_OPEN_EXISTING_FLAG, NULL); - ok(store2 != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store2 != NULL, "CertOpenStore failed: %ld\n", GetLastError()); ok(store1 != store2, "Expected different stores\n");
/* add a bogus (empty) cert */ @@ -164,24 +164,24 @@ static void testMemStore(void) GLE = GetLastError(); ok(!ret && (GLE == CRYPT_E_ASN1_EOD || GLE == CRYPT_E_ASN1_CORRUPT || GLE == OSS_DATA_ERROR), - "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GLE); /* add a "signed" cert--the signature isn't a real signature, so this adds * without any check of the signature's validity */ ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, signedBigCert, sizeof(signedBigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ok(context != NULL, "Expected a valid cert context\n"); if (context) { ok(context->cbCertEncoded == sizeof(signedBigCert), - "Wrong cert size %d\n", context->cbCertEncoded); + "Wrong cert size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, signedBigCert, sizeof(signedBigCert)), "Unexpected encoded cert in context\n"); /* remove it, the rest of the tests will work on an unsigned cert */ ret = CertDeleteCertificateFromStore(context); - ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", + ok(ret, "CertDeleteCertificateFromStore failed: %08lx\n", GetLastError()); } /* try adding a "signed" CRL as a cert */ @@ -190,12 +190,12 @@ static void testMemStore(void) GLE = GetLastError(); ok(!ret && (GLE == CRYPT_E_ASN1_BADTAG || GLE == CRYPT_E_ASN1_CORRUPT || GLE == OSS_DATA_ERROR), - "Expected CRYPT_E_ASN1_BADTAG or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + "Expected CRYPT_E_ASN1_BADTAG or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08lx\n", GLE); /* add a cert to store1 */ ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ok(context != NULL, "Expected a valid cert context\n"); if (context) { @@ -203,7 +203,7 @@ static void testMemStore(void) BYTE *buf;
ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong cert size %d\n", context->cbCertEncoded); + "Wrong cert size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, sizeof(bigCert)), "Unexpected encoded cert in context\n"); ok(context->hCertStore == store1, "Unexpected store\n"); @@ -216,28 +216,28 @@ static void testMemStore(void) */ /* apparently flags are ignored */ ret = CertSerializeCertificateStoreElement(context, 1, NULL, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", + ok(ret, "CertSerializeCertificateStoreElement failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, size); if (buf) { ret = CertSerializeCertificateStoreElement(context, 0, buf, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", GetLastError()); - ok(size == sizeof(serializedCert), "Wrong size %d\n", size); + ok(ret, "CertSerializeCertificateStoreElement failed: %08lx\n", GetLastError()); + ok(size == sizeof(serializedCert), "Wrong size %ld\n", size); ok(!memcmp(serializedCert, buf, size), "Unexpected serialized cert\n"); HeapFree(GetProcessHeap(), 0, buf); }
ret = CertFreeCertificateContext(context); - ok(ret, "CertFreeCertificateContext failed: %08x\n", GetLastError()); + ok(ret, "CertFreeCertificateContext failed: %08lx\n", GetLastError()); } /* verify the cert's in store1 */ context = CertEnumCertificatesInStore(store1, NULL); ok(context != NULL, "Expected a valid context\n"); context = CertEnumCertificatesInStore(store1, context); ok(!context && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* verify store2 (the "open existing" mem store) is still empty */ context = CertEnumCertificatesInStore(store2, NULL); ok(!context, "Expected an empty store\n"); @@ -254,14 +254,14 @@ static void testMemStore(void) */ PCCERT_CONTEXT copy = CertDuplicateCertificateContext(context);
- ok(copy != NULL, "CertDuplicateCertificateContext failed: %08x\n", + ok(copy != NULL, "CertDuplicateCertificateContext failed: %08lx\n", GetLastError()); ret = CertDeleteCertificateFromStore(context); - ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", + ok(ret, "CertDeleteCertificateFromStore failed: %08lx\n", GetLastError()); /* try deleting a copy */ ret = CertDeleteCertificateFromStore(copy); - ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", + ok(ret, "CertDeleteCertificateFromStore failed: %08lx\n", GetLastError()); /* check that the store is empty */ context = CertEnumCertificatesInStore(store1, NULL); @@ -270,32 +270,32 @@ static void testMemStore(void)
/* close an empty store */ ret = CertCloseStore(NULL, 0); - ok(ret, "CertCloseStore failed: %d\n", GetLastError()); + ok(ret, "CertCloseStore failed: %ld\n", GetLastError()); ret = CertCloseStore(store1, 0); - ok(ret, "CertCloseStore failed: %d\n", GetLastError()); + ok(ret, "CertCloseStore failed: %ld\n", GetLastError()); ret = CertCloseStore(store2, 0); - ok(ret, "CertCloseStore failed: %d\n", GetLastError()); + ok(ret, "CertCloseStore failed: %ld\n", GetLastError());
/* This seems nonsensical, but you can open a read-only mem store, only * it isn't read-only */ store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_READONLY_FLAG, NULL); - ok(store1 != NULL, "CertOpenStore failed: %d\n", GetLastError()); + ok(store1 != NULL, "CertOpenStore failed: %ld\n", GetLastError()); /* yep, this succeeds */ ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ok(context != NULL, "Expected a valid cert context\n"); if (context) { ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong cert size %d\n", context->cbCertEncoded); + "Wrong cert size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, sizeof(bigCert)), "Unexpected encoded cert in context\n"); ok(context->hCertStore == store1, "Unexpected store\n"); ret = CertDeleteCertificateFromStore(context); - ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", + ok(ret, "CertDeleteCertificateFromStore failed: %08lx\n", GetLastError()); } CertCloseStore(store1, 0); @@ -309,16 +309,16 @@ static void compareStore(HCERTSTORE store, LPCSTR name, const BYTE *pb,
ret = CertSaveStore(store, X509_ASN_ENCODING, CERT_STORE_SAVE_AS_STORE, CERT_STORE_SAVE_TO_MEMORY, &blob, 0); - ok(ret, "CertSaveStore failed: %08x\n", GetLastError()); + ok(ret, "CertSaveStore failed: %08lx\n", GetLastError()); todo_wine_if (todo) - ok(blob.cbData == cb, "%s: expected size %d, got %d\n", name, cb, + ok(blob.cbData == cb, "%s: expected size %ld, got %ld\n", name, cb, blob.cbData); blob.pbData = HeapAlloc(GetProcessHeap(), 0, blob.cbData); if (blob.pbData) { ret = CertSaveStore(store, X509_ASN_ENCODING, CERT_STORE_SAVE_AS_STORE, CERT_STORE_SAVE_TO_MEMORY, &blob, 0); - ok(ret, "CertSaveStore failed: %08x\n", GetLastError()); + ok(ret, "CertSaveStore failed: %08lx\n", GetLastError()); todo_wine_if (todo) ok(!memcmp(pb, blob.pbData, cb), "%s: unexpected value\n", name); HeapFree(GetProcessHeap(), 0, blob.pbData); @@ -395,23 +395,23 @@ static void testRegStoreSavedCerts(void) err = GetLastError(); if (!store) { - ok (err == ERROR_ACCESS_DENIED, "Failed to create store at %d (%08x)\n", i, err); - skip("Insufficient privileges for the test %d\n", i); + ok (err == ERROR_ACCESS_DENIED, "Failed to create store at %ld (%08lx)\n", i, err); + skip("Insufficient privileges for the test %ld\n", i); continue; } - ok (store!=NULL, "Failed to open the store at %d, %x\n", i, GetLastError()); + ok (store!=NULL, "Failed to open the store at %ld, %lx\n", i, GetLastError()); cert1 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok (cert1 != NULL, "Create cert context failed at %d, %x\n", i, GetLastError()); + ok (cert1 != NULL, "Create cert context failed at %ld, %lx\n", i, GetLastError()); ret = CertAddCertificateContextToStore(store, cert1, CERT_STORE_ADD_REPLACE_EXISTING, NULL); /* Addittional skip per Win7, it allows opening HKLM store, but disallows adding certs */ err = GetLastError(); if (!ret) { - ok (err == ERROR_ACCESS_DENIED, "Failed to add certificate to store at %d (%08x)\n", i, err); - skip("Insufficient privileges for the test %d\n", i); + ok (err == ERROR_ACCESS_DENIED, "Failed to add certificate to store at %ld (%08lx)\n", i, err); + skip("Insufficient privileges for the test %ld\n", i); continue; } - ok (ret, "Adding to the store failed at %d, %x\n", i, err); + ok (ret, "Adding to the store failed at %ld, %lx\n", i, err); CertFreeCertificateContext(cert1); CertCloseStore(store, 0);
@@ -421,13 +421,13 @@ static void testRegStoreSavedCerts(void) if (!reg_store_saved_certs[i].appdata_file) { res = RegOpenKeyExW(reg_store_saved_certs[i].key, key_name, 0, KEY_ALL_ACCESS, &key); - ok (!res, "The cert hasn't been saved at %d, %x\n", i, GetLastError()); + ok (!res, "The cert hasn't been saved at %ld, %lx\n", i, GetLastError()); if (!res) RegCloseKey(key); } else { pathres = SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, 0, appdata_path); ok (pathres == S_OK, - "Failed to get app data path at %d (%x)\n", pathres, GetLastError()); + "Failed to get app data path at %ld (%lx)\n", pathres, GetLastError()); if (pathres == S_OK) { PathAppendW(appdata_path, ms_certs); @@ -438,7 +438,7 @@ static void testRegStoreSavedCerts(void) cert_file = CreateFileW(appdata_path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); todo_wine ok (cert_file != INVALID_HANDLE_VALUE, - "Cert was not saved in AppData at %d (%x)\n", i, GetLastError()); + "Cert was not saved in AppData at %ld (%lx)\n", i, GetLastError()); CloseHandle(cert_file); } } @@ -446,24 +446,24 @@ static void testRegStoreSavedCerts(void) /* deleting cert from store */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W,0,0, reg_store_saved_certs[i].cert_store, reg_store_saved_certs[i].store_name); - ok (store!=NULL, "Failed to open the store at %d, %x\n", i, GetLastError()); + ok (store!=NULL, "Failed to open the store at %ld, %lx\n", i, GetLastError());
cert1 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok (cert1 != NULL, "Create cert context failed at %d, %x\n", i, GetLastError()); + ok (cert1 != NULL, "Create cert context failed at %ld, %lx\n", i, GetLastError());
cert2 = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_EXISTING, cert1, NULL); - ok (cert2 != NULL, "Failed to find cert in the store at %d, %x\n", i, GetLastError()); + ok (cert2 != NULL, "Failed to find cert in the store at %ld, %lx\n", i, GetLastError());
ret = CertDeleteCertificateFromStore(cert2); - ok (ret, "Failed to delete certificate from store at %d, %x\n", i, GetLastError()); + ok (ret, "Failed to delete certificate from store at %ld, %lx\n", i, GetLastError());
CertFreeCertificateContext(cert1); CertFreeCertificateContext(cert2); CertCloseStore(store, 0);
res = RegOpenKeyExW(reg_store_saved_certs[i].key, key_name, 0, KEY_ALL_ACCESS, &key); - ok (res, "The cert's registry entry should be absent at %i, %x\n", i, GetLastError()); + ok (res, "The cert's registry entry should be absent at %li, %lx\n", i, GetLastError()); if (!res) RegCloseKey(key);
if (reg_store_saved_certs[i].appdata_file) @@ -471,7 +471,7 @@ static void testRegStoreSavedCerts(void) cert_file = CreateFileW(appdata_path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ok (cert_file == INVALID_HANDLE_VALUE, - "Cert should have been absent in AppData %d\n", i); + "Cert should have been absent in AppData %ld\n", i);
CloseHandle(cert_file); } @@ -493,30 +493,30 @@ static void testStoresInCollection(void)
collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(collection != NULL, "Failed to init collection store, last error %x\n", GetLastError()); + ok(collection != NULL, "Failed to init collection store, last error %lx\n", GetLastError()); /* Add read-only store to collection with very high priority*/ ro_store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, WineTestRO_W); - ok(ro_store != NULL, "Failed to init ro store %x\n", GetLastError()); + ok(ro_store != NULL, "Failed to init ro store %lx\n", GetLastError());
ret = CertAddStoreToCollection(collection, ro_store, 0, 1000); - ok (ret, "Failed to add read-only store to collection %x\n", GetLastError()); + ok (ret, "Failed to add read-only store to collection %lx\n", GetLastError());
cert1 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok (cert1 != NULL, "Create cert context failed %x\n", GetLastError()); + ok (cert1 != NULL, "Create cert context failed %lx\n", GetLastError()); ret = CertAddCertificateContextToStore(collection, cert1, CERT_STORE_ADD_ALWAYS, NULL); - ok (!ret, "Added cert to collection with single read-only store %x\n", GetLastError()); + ok (!ret, "Added cert to collection with single read-only store %lx\n", GetLastError());
/* Add read-write store to collection with the lowest priority*/ rw_store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, WineTestRW_W); - ok (rw_store != NULL, "Failed to open rw store %x\n", GetLastError()); + ok (rw_store != NULL, "Failed to open rw store %lx\n", GetLastError()); ret = CertAddStoreToCollection(collection, rw_store, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok (ret, "Failed to add rw store to collection %x\n", GetLastError()); + ok (ret, "Failed to add rw store to collection %lx\n", GetLastError()); /** Adding certificate to collection should fall into rw store, * even though prioirty of the ro_store is higher */ ret = CertAddCertificateContextToStore(collection, cert1, CERT_STORE_ADD_REPLACE_EXISTING, NULL); - ok (ret, "Failed to add cert to the collection %x\n", GetLastError()); + ok (ret, "Failed to add cert to the collection %lx\n", GetLastError());
tcert1 = CertEnumCertificatesInStore(ro_store, NULL); ok (!tcert1, "Read-only ro_store contains cert\n"); @@ -534,14 +534,14 @@ static void testStoresInCollection(void) /** adding one more rw store with higher priority*/ rw_store_2 = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, WineTestRW2_W); - ok (rw_store_2 != NULL, "Failed to init second rw store %x\n", GetLastError()); + ok (rw_store_2 != NULL, "Failed to init second rw store %lx\n", GetLastError()); ret = CertAddStoreToCollection(collection, rw_store_2, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 50); - ok (ret, "Failed to add rw_store_2 to collection %x\n",GetLastError()); + ok (ret, "Failed to add rw_store_2 to collection %lx\n",GetLastError());
cert2 = CertCreateCertificateContext(X509_ASN_ENCODING, signedBigCert, sizeof(signedBigCert)); - ok (cert2 != NULL, "Failed to create cert context %x\n", GetLastError()); + ok (cert2 != NULL, "Failed to create cert context %lx\n", GetLastError()); ret = CertAddCertificateContextToStore(collection, cert2, CERT_STORE_ADD_REPLACE_EXISTING, NULL); - ok (ret, "Failed to add cert2 to the store %x\n",GetLastError()); + ok (ret, "Failed to add cert2 to the store %lx\n",GetLastError());
/** checking certificates in the stores */ tcert1 = CertEnumCertificatesInStore(ro_store, 0); @@ -560,12 +560,12 @@ static void testStoresInCollection(void) /** checking certificates in the collection */ tcert1 = CertEnumCertificatesInStore(collection, NULL); ok (tcert1 && tcert1->cbCertEncoded == cert2->cbCertEncoded, - "cert2 expected in the collection got %p, %x\n",tcert1, GetLastError()); + "cert2 expected in the collection got %p, %lx\n",tcert1, GetLastError()); tcert1 = CertEnumCertificatesInStore(collection, tcert1); ok (tcert1 && tcert1->cbCertEncoded == cert1->cbCertEncoded, - "cert1 expected in the collection got %p, %x\n",tcert1, GetLastError()); + "cert1 expected in the collection got %p, %lx\n",tcert1, GetLastError()); tcert1 = CertEnumCertificatesInStore(collection, tcert1); - ok (tcert1==NULL,"Unexpected cert in the collection %p %x\n",tcert1, GetLastError()); + ok (tcert1==NULL,"Unexpected cert in the collection %p %lx\n",tcert1, GetLastError());
/* checking whether certs had been saved */ tstore = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W,0,0, @@ -636,17 +636,17 @@ static void testCollectionStore(void) ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); ok(!ret && GetLastError() == E_ACCESSDENIED, - "Expected E_ACCESSDENIED, got %08x\n", GetLastError()); + "Expected E_ACCESSDENIED, got %08lx\n", GetLastError());
/* Create and add a cert to a memory store */ store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); /* Add the memory store to the collection, without allowing adding */ ret = CertAddStoreToCollection(collection, store1, 0, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); + ok(ret, "CertAddStoreToCollection failed: %08lx\n", GetLastError()); /* Verify the cert is in the collection */ context = CertEnumCertificatesInStore(collection, NULL); ok(context != NULL, "Expected a valid context\n"); @@ -659,7 +659,7 @@ static void testCollectionStore(void) ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, bigCert2, sizeof(bigCert2), CERT_STORE_ADD_ALWAYS, NULL); ok(!ret && GetLastError() == E_ACCESSDENIED, - "Expected E_ACCESSDENIED, got %08x\n", GetLastError()); + "Expected E_ACCESSDENIED, got %08lx\n", GetLastError());
/* Create a new memory store */ store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, @@ -668,7 +668,7 @@ static void testCollectionStore(void) ret = CertAddStoreToCollection(store1, store2, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Try adding some bogus stores */ /* This crashes in Windows ret = pCertAddStoreToCollection(0, store2, @@ -677,7 +677,7 @@ static void testCollectionStore(void) /* This "succeeds"... */ ret = CertAddStoreToCollection(collection, 0, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); + ok(ret, "CertAddStoreToCollection failed: %08lx\n", GetLastError()); /* while this crashes. ret = pCertAddStoreToCollection(collection, 1, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); @@ -686,11 +686,11 @@ static void testCollectionStore(void) /* Add it to the collection, this time allowing adding */ ret = CertAddStoreToCollection(collection, store2, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); + ok(ret, "CertAddStoreToCollection failed: %08lx\n", GetLastError()); /* Check that adding to the collection is allowed */ ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, bigCert2, sizeof(bigCert2), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); /* Now check that it was actually added to store2 */ context = CertEnumCertificatesInStore(store2, NULL); ok(context != NULL, "Expected a valid context\n"); @@ -708,7 +708,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), "Unexpected cert\n"); context = CertEnumCertificatesInStore(collection, context); @@ -717,7 +717,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert2), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert2, context->cbCertEncoded), "Unexpected cert\n"); context = CertEnumCertificatesInStore(collection, context); @@ -732,7 +732,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), "Unexpected cert\n"); context = CertEnumCertificatesInStore(collection, context); @@ -741,7 +741,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert2), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert2, context->cbCertEncoded), "Unexpected cert\n"); context = CertEnumCertificatesInStore(collection, context); @@ -754,7 +754,7 @@ static void testCollectionStore(void) CERT_STORE_CREATE_NEW_FLAG, NULL); ret = CertAddStoreToCollection(collection2, collection, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); + ok(ret, "CertAddStoreToCollection failed: %08lx\n", GetLastError()); /* check the contents of collection2 */ context = CertEnumCertificatesInStore(collection2, NULL); ok(context != NULL, "Expected a valid context\n"); @@ -762,7 +762,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection2, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), "Unexpected cert\n"); context = CertEnumCertificatesInStore(collection2, context); @@ -771,7 +771,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection2, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert2), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert2, context->cbCertEncoded), "Unexpected cert\n"); context = CertEnumCertificatesInStore(collection2, context); @@ -797,25 +797,25 @@ static void testCollectionStore(void) /* Add the same cert to two memory stores, then put them in a collection */ store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store1 != 0, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store1 != 0, "CertOpenStore failed: %08lx\n", GetLastError()); store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store2 != 0, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store2 != 0, "CertOpenStore failed: %08lx\n", GetLastError());
ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ret = CertAddEncodedCertificateToStore(store2, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(collection != 0, "CertOpenStore failed: %08x\n", GetLastError()); + ok(collection != 0, "CertOpenStore failed: %08lx\n", GetLastError());
ret = CertAddStoreToCollection(collection, store1, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); + ok(ret, "CertAddStoreToCollection failed: %08lx\n", GetLastError()); ret = CertAddStoreToCollection(collection, store2, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); + ok(ret, "CertAddStoreToCollection failed: %08lx\n", GetLastError());
/* Check that the collection has two copies of the same cert */ context = CertEnumCertificatesInStore(collection, NULL); @@ -824,7 +824,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), "Unexpected cert\n"); context = CertEnumCertificatesInStore(collection, context); @@ -833,7 +833,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), "Unexpected cert\n"); context = CertEnumCertificatesInStore(collection, context); @@ -873,7 +873,7 @@ static void testCollectionStore(void) { ok(context->hCertStore == collection, "Unexpected store\n"); ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); + "Wrong size %ld\n", context->cbCertEncoded); ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), "Unexpected cert\n"); } @@ -891,13 +891,13 @@ static void testCollectionStore(void) SetLastError(0xdeadbeef); CertRemoveStoreFromCollection(store2, collection); ok(GetLastError() == 0xdeadbeef, - "Didn't expect an error to be set: %08x\n", GetLastError()); + "Didn't expect an error to be set: %08lx\n", GetLastError());
/* After removing store2, the collection should be empty */ SetLastError(0xdeadbeef); CertRemoveStoreFromCollection(collection, store2); ok(GetLastError() == 0xdeadbeef, - "Didn't expect an error to be set: %08x\n", GetLastError()); + "Didn't expect an error to be set: %08lx\n", GetLastError()); context = CertEnumCertificatesInStore(collection, NULL); ok(!context, "Unexpected cert\n");
@@ -913,14 +913,14 @@ static void testCollectionStore(void)
ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); CertDeleteCertificateFromStore(context);
CertAddStoreToCollection(collection, store1, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0);
ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); CertDeleteCertificateFromStore(context);
CertCloseStore(collection, 0); @@ -932,7 +932,7 @@ static void testCollectionStore(void)
SetLastError(0xdeadbeef); ret = CertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); + ok(ret, "CertControlStore failed: %08lx\n", GetLastError());
/* Adding a mem store that can't be committed prevents a successful commit. */ @@ -942,7 +942,7 @@ static void testCollectionStore(void) SetLastError(0xdeadbeef); ret = CertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "expected ERROR_CALL_NOT_IMPLEMENTED, got %d\n", GetLastError()); + "expected ERROR_CALL_NOT_IMPLEMENTED, got %ld\n", GetLastError()); CertRemoveStoreFromCollection(collection, store1); CertCloseStore(store1, 0);
@@ -960,14 +960,14 @@ static void testCollectionStore(void)
store1 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store1 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store1 != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); CloseHandle(file); CertAddStoreToCollection(collection, store1, CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); CertCloseStore(store1, 0);
ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); ret = CertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); ok(ret, "CertControlStore failed: %d\n", ret); @@ -1023,23 +1023,23 @@ static void testRegStore(void) store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, 0, NULL); GLE = GetLastError(); ok(!store && (GLE == ERROR_INVALID_HANDLE || GLE == ERROR_BADKEY), - "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", GLE); + "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld\n", GLE); store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, 0, key); GLE = GetLastError(); ok(!store && (GLE == ERROR_INVALID_HANDLE || GLE == ERROR_BADKEY), - "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", GLE); + "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld\n", GLE);
/* Opening up any old key works.. */ key = HKEY_CURRENT_USER; store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, 0, key); /* Not sure if this is a bug in DuplicateHandle, marking todo_wine for now */ - todo_wine ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); + todo_wine ok(store != 0, "CertOpenStore failed: %08lx\n", GetLastError()); CertCloseStore(store, 0);
rc = RegCreateKeyExA(HKEY_CURRENT_USER, tempKey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); + ok(!rc, "RegCreateKeyExA failed: %ld\n", rc); if (key) { BOOL ret; @@ -1051,29 +1051,29 @@ static void testRegStore(void) PCCERT_CONTEXT context;
store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, 0, key); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != 0, "CertOpenStore failed: %08lx\n", GetLastError()); /* Add a certificate. It isn't persisted right away, since it's only * added to the cache.. */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert2, sizeof(bigCert2), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); /* so flush the cache to force a commit.. */ ret = CertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); + ok(ret, "CertControlStore failed: %08lx\n", GetLastError()); /* and check that the expected subkey was written. */ size = sizeof(hash); ret = CryptHashCertificate(0, 0, 0, bigCert2, sizeof(bigCert2), hash, &size); - ok(ret, "CryptHashCertificate failed: %d\n", GetLastError()); + ok(ret, "CryptHashCertificate failed: %ld\n", GetLastError()); strcpy(subKeyName, certificates); for (i = 0, ptr = subKeyName + sizeof(certificates) - 1; i < size; i++, ptr += 2) sprintf(ptr, "%02X", hash[i]); rc = RegCreateKeyExA(key, subKeyName, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &subKey, NULL); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); + ok(!rc, "RegCreateKeyExA failed: %ld\n", rc); if (subKey) { LPBYTE buf; @@ -1084,7 +1084,7 @@ static void testRegStore(void) if (buf) { rc = RegQueryValueExA(subKey, "Blob", NULL, NULL, buf, &size); - ok(!rc, "RegQueryValueExA failed: %d\n", rc); + ok(!rc, "RegQueryValueExA failed: %ld\n", rc); if (!rc) { const struct CertPropIDHeader *hdr; @@ -1095,7 +1095,7 @@ static void testRegStore(void) if (hdr) { ok(hdr->cb == sizeof(bigCert2), - "Wrong size %d of cert property\n", hdr->cb); + "Wrong size %ld of cert property\n", hdr->cb); ok(!memcmp((const BYTE *)hdr + sizeof(*hdr), bigCert2, hdr->cb), "Unexpected cert in cert property\n"); } @@ -1104,7 +1104,7 @@ static void testRegStore(void) if (hdr) { ok(hdr->cb == sizeof(hash), - "Wrong size %d of hash property\n", hdr->cb); + "Wrong size %ld of hash property\n", hdr->cb); ok(!memcmp((const BYTE *)hdr + sizeof(*hdr), hash, hdr->cb), "Unexpected hash in cert property\n"); } @@ -1120,7 +1120,7 @@ static void testRegStore(void) if (context) CertDeleteCertificateFromStore(context); ret = CertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); + ok(ret, "CertControlStore failed: %08lx\n", GetLastError());
/* Add a serialized cert with a bogus hash directly to the registry */ memset(hash, 0, sizeof(hash)); @@ -1130,7 +1130,7 @@ static void testRegStore(void) sprintf(ptr, "%02X", hash[i]); rc = RegCreateKeyExA(key, subKeyName, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &subKey, NULL); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); + ok(!rc, "RegCreateKeyExA failed: %ld\n", rc); if (subKey) { BYTE buf[sizeof(struct CertPropIDHeader) * 2 + sizeof(hash) + @@ -1154,10 +1154,10 @@ static void testRegStore(void)
rc = RegSetValueExA(subKey, "Blob", 0, REG_BINARY, buf, sizeof(buf)); - ok(!rc, "RegSetValueExA failed: %d\n", rc); + ok(!rc, "RegSetValueExA failed: %ld\n", rc);
ret = CertControlStore(store, 0, CERT_STORE_CTRL_RESYNC, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); + ok(ret, "CertControlStore failed: %08lx\n", GetLastError());
/* Make sure the bogus hash cert gets loaded. */ certCount = 0; @@ -1167,7 +1167,7 @@ static void testRegStore(void) if (context) certCount++; } while (context != NULL); - ok(certCount == 1, "Expected 1 certificates, got %d\n", certCount); + ok(certCount == 1, "Expected 1 certificates, got %ld\n", certCount);
RegCloseKey(subKey); } @@ -1178,14 +1178,14 @@ static void testRegStore(void) size = sizeof(hash); ret = CryptHashCertificate(0, 0, 0, bigCert2, sizeof(bigCert2), hash, &size); - ok(ret, "CryptHashCertificate failed: %d\n", GetLastError()); + ok(ret, "CryptHashCertificate failed: %ld\n", GetLastError()); strcpy(subKeyName, certificates); for (i = 0, ptr = subKeyName + sizeof(certificates) - 1; i < sizeof(hash); i++, ptr += 2) sprintf(ptr, "%02X", hash[i]); rc = RegCreateKeyExA(key, subKeyName, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &subKey, NULL); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); + ok(!rc, "RegCreateKeyExA failed: %ld\n", rc); if (subKey) { BYTE buf[sizeof(struct CertPropIDHeader) * 2 + sizeof(hash) + @@ -1211,10 +1211,10 @@ static void testRegStore(void)
rc = RegSetValueExA(subKey, "Blob", 0, REG_BINARY, buf, sizeof(buf)); - ok(!rc, "RegSetValueExA failed: %d\n", rc); + ok(!rc, "RegSetValueExA failed: %ld\n", rc);
ret = CertControlStore(store, 0, CERT_STORE_CTRL_RESYNC, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); + ok(ret, "CertControlStore failed: %08lx\n", GetLastError());
/* and make sure just one cert still gets loaded. */ certCount = 0; @@ -1224,7 +1224,7 @@ static void testRegStore(void) if (context) certCount++; } while (context != NULL); - ok(certCount == 1, "Expected 1 certificate, got %d\n", certCount); + ok(certCount == 1, "Expected 1 certificate, got %ld\n", certCount);
/* Try again with the correct hash... */ ptr = buf + sizeof(*hdr); @@ -1232,10 +1232,10 @@ static void testRegStore(void)
rc = RegSetValueExA(subKey, "Blob", 0, REG_BINARY, buf, sizeof(buf)); - ok(!rc, "RegSetValueExA failed: %d\n", rc); + ok(!rc, "RegSetValueExA failed: %ld\n", rc);
ret = CertControlStore(store, 0, CERT_STORE_CTRL_RESYNC, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); + ok(ret, "CertControlStore failed: %08lx\n", GetLastError());
/* and make sure two certs get loaded. */ certCount = 0; @@ -1245,7 +1245,7 @@ static void testRegStore(void) if (context) certCount++; } while (context != NULL); - ok(certCount == 2, "Expected 2 certificates, got %d\n", certCount); + ok(certCount == 2, "Expected 2 certificates, got %ld\n", certCount);
RegCloseKey(subKey); } @@ -1254,7 +1254,7 @@ static void testRegStore(void) store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, CERT_STORE_DELETE_FLAG, key); ok(store == NULL, "Expected NULL return from CERT_STORE_DELETE_FLAG\n"); - ok(GetLastError() == 0, "CertOpenStore failed: %08x\n", + ok(GetLastError() == 0, "CertOpenStore failed: %08lx\n", GetLastError());
RegCloseKey(key); @@ -1264,9 +1264,9 @@ static void testRegStore(void) */ rc = RegCreateKeyExA(HKEY_CURRENT_USER, tempKey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, &disp); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); + ok(!rc, "RegCreateKeyExA failed: %ld\n", rc); ok(disp == REG_OPENED_EXISTING_KEY, - "Expected REG_OPENED_EXISTING_KEY, got %d\n", disp); + "Expected REG_OPENED_EXISTING_KEY, got %ld\n", disp); if (!rc) { RegCloseKey(key); @@ -1307,7 +1307,7 @@ static void testSystemRegStore(void) if (memStore) { BOOL ret = CertAddStoreToCollection(store, memStore, 0, 0); - ok(!ret && GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", GetLastError()); + ok(!ret && GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", GetLastError()); CertCloseStore(memStore, 0); } CertCloseStore(store, 0); @@ -1316,34 +1316,34 @@ static void testSystemRegStore(void) store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, BogusW); ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, BogusW); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != 0, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) CertCloseStore(store, 0); /* Now check whether deleting is allowed */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_DELETE_FLAG, BogusW); - ok(!store, "CertOpenStore failed: %08x\n", GetLastError()); + ok(!store, "CertOpenStore failed: %08lx\n", GetLastError()); RegDeleteKeyW(HKEY_CURRENT_USER, BogusPathW);
store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, 0, NULL); ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE | CERT_SYSTEM_STORE_CURRENT_USER, MyA); ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE | CERT_SYSTEM_STORE_CURRENT_USER, MyW); ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* The name is expected to be UNICODE, check with an ASCII name */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, MyA); ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); }
static void testSystemStore(void) @@ -1356,38 +1356,38 @@ static void testSystemStore(void)
store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, 0, NULL); ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE | CERT_SYSTEM_STORE_CURRENT_USER, MyA); ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE | CERT_SYSTEM_STORE_CURRENT_USER, MyW); ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); /* The name is expected to be UNICODE, first check with an ASCII name */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, MyA); ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); /* Create the expected key */ lstrcpyW(keyName, CERT_LOCAL_MACHINE_SYSTEM_STORE_REGPATH); lstrcatW(keyName, baskslashW); lstrcatW(keyName, MyW); rc = RegCreateKeyExW(HKEY_CURRENT_USER, keyName, 0, NULL, 0, KEY_READ, NULL, &key, NULL); - ok(!rc, "RegCreateKeyEx failed: %d\n", rc); + ok(!rc, "RegCreateKeyEx failed: %ld\n", rc); if (!rc) RegCloseKey(key); /* Check opening with a UNICODE name, specifying the create new flag */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_CREATE_NEW_FLAG, MyW); ok(!store && GetLastError() == ERROR_FILE_EXISTS, - "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError()); + "Expected ERROR_FILE_EXISTS, got %08lx\n", GetLastError()); /* Now check opening with a UNICODE name, this time opening existing */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, MyW); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != 0, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { HCERTSTORE memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, @@ -1397,7 +1397,7 @@ static void testSystemStore(void) if (memStore) { BOOL ret = CertAddStoreToCollection(store, memStore, 0, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); + ok(ret, "CertAddStoreToCollection failed: %08lx\n", GetLastError()); CertCloseStore(memStore, 0); } CertCloseStore(store, 0); @@ -1406,10 +1406,10 @@ static void testSystemStore(void) /* Check opening a bogus store */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, BogusW); - ok(!store, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + ok(!store, "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, BogusW); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != 0, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) CertCloseStore(store, 0); /* Now check whether deleting is allowed */ @@ -1449,7 +1449,7 @@ static void testFileStore(void)
store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, 0, NULL); ok(!store && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %08lx\n", GetLastError());
if (!GetTempFileNameW(szDot, szPrefix, 0, filename)) return; @@ -1463,16 +1463,16 @@ static void testFileStore(void) store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_STORE_DELETE_FLAG, file); ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG | CERT_STORE_READONLY_FLAG, file); ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError());
/* A "read-only" file store.. */ store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_STORE_OPEN_EXISTING_FLAG | CERT_STORE_READONLY_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { DWORD size; @@ -1484,22 +1484,22 @@ static void testFileStore(void) /* but not commits.. */ ret = CertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n", GetLastError()); + "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08lx\n", GetLastError()); /* It still has certs in memory.. */ cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", + ok(cert != NULL, "CertEnumCertificatesInStore failed: %08lx\n", GetLastError()); CertFreeCertificateContext(cert); /* but the file size is still 0. */ size = GetFileSize(file, NULL); - ok(size == 0, "Expected size 0, got %d\n", size); + ok(size == 0, "Expected size 0, got %ld\n", size); CertCloseStore(store, 0); }
/* The create new flag is allowed.. */ store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_STORE_CREATE_NEW_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { /* but without the commit enable flag, commits don't happen. */ @@ -1508,13 +1508,13 @@ static void testFileStore(void) ok(ret, "CertAddEncodedCertificateToStore failed: %d\n", ret); ret = CertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n", GetLastError()); + "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08lx\n", GetLastError()); CertCloseStore(store, 0); } /* as is the open existing flag. */ store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_STORE_OPEN_EXISTING_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { /* but without the commit enable flag, commits don't happen. */ @@ -1523,18 +1523,18 @@ static void testFileStore(void) ok(ret, "CertAddEncodedCertificateToStore failed: %d\n", ret); ret = CertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n", GetLastError()); + "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08lx\n", GetLastError()); CertCloseStore(store, 0); } store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { CloseHandle(file); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); /* with commits enabled, commit is allowed */ ret = CertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); @@ -1549,13 +1549,13 @@ static void testFileStore(void) return; store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { CloseHandle(file); ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError()); compareStore(store, "serialized store with cert and CRL", serializedStoreWithCertAndCRL, sizeof(serializedStoreWithCertAndCRL), FALSE); @@ -1656,7 +1656,7 @@ static void testFileNameStore(void) store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, 0, NULL); GLE = GetLastError(); ok(!store && (GLE == ERROR_PATH_NOT_FOUND || GLE == ERROR_INVALID_PARAMETER), - "Expected ERROR_PATH_NOT_FOUND or ERROR_INVALID_PARAMETER, got %08x\n", + "Expected ERROR_PATH_NOT_FOUND or ERROR_INVALID_PARAMETER, got %08lx\n", GLE);
if (!GetTempFileNameW(szDot, szPrefix, 0, filename)) @@ -1667,7 +1667,7 @@ static void testFileNameStore(void) store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG | CERT_STORE_READONLY_FLAG, filename); ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError());
/* In all of the following tests, the encoding type seems to be ignored */ if (initFileFromData(filename, bigCert, sizeof(bigCert))) @@ -1677,10 +1677,10 @@ static void testFileNameStore(void)
store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError());
cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", + ok(cert != NULL, "CertEnumCertificatesInStore failed: %08lx\n", GetLastError()); cert = CertEnumCertificatesInStore(store, cert); ok(!cert, "Expected only one cert\n"); @@ -1698,10 +1698,10 @@ static void testFileNameStore(void)
store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError());
cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", + ok(cert != NULL, "CertEnumCertificatesInStore failed: %08lx\n", GetLastError()); cert = CertEnumCertificatesInStore(store, cert); ok(!cert, "Expected only one cert\n"); @@ -1719,15 +1719,15 @@ static void testFileNameStore(void)
store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError());
cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", + ok(cert != NULL, "CertEnumCertificatesInStore failed: %08lx\n", GetLastError()); cert = CertEnumCertificatesInStore(store, cert); ok(!cert, "Expected only one cert\n"); crl = CertEnumCRLsInStore(store, NULL); - ok(crl != NULL, "CertEnumCRLsInStore failed: %08x\n", GetLastError()); + ok(crl != NULL, "CertEnumCRLsInStore failed: %08lx\n", GetLastError()); crl = CertEnumCRLsInStore(store, crl); ok(!crl, "Expected only one CRL\n");
@@ -1737,18 +1737,18 @@ static void testFileNameStore(void) /* Now that the file exists, we can open it read-only */ store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); CertCloseStore(store, 0); DeleteFileW(filename);
store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG | CERT_STORE_CREATE_NEW_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); compareStore(store, "serialized store with cert", serializedStoreWithCert, sizeof(serializedStoreWithCert), FALSE); @@ -1756,12 +1756,12 @@ static void testFileNameStore(void) } store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddEncodedCRLToStore failed: %08lx\n", GetLastError()); compareStore(store, "serialized store with cert and CRL", serializedStoreWithCertAndCRL, sizeof(serializedStoreWithCertAndCRL), FALSE); @@ -1780,10 +1780,10 @@ static void testFileNameStore(void)
store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError());
cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", + ok(cert != NULL, "CertEnumCertificatesInStore failed: %08lx\n", GetLastError()); cert = CertEnumCertificatesInStore(store, cert); ok(!cert, "Expected only one cert\n"); @@ -1801,10 +1801,10 @@ static void testFileNameStore(void)
store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError());
cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", + ok(cert != NULL, "CertEnumCertificatesInStore failed: %08lx\n", GetLastError()); cert = CertEnumCertificatesInStore(store, cert); ok(!cert, "Expected only one cert\n"); @@ -1882,10 +1882,10 @@ static void testMessageStore(void) SetLastError(0xdeadbeef); store = CertOpenStore(CERT_STORE_PROV_MSG, 0, 0, 0, msg); ok(!store && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); CryptMsgUpdate(msg, signedContent, sizeof(signedContent), TRUE); store = CertOpenStore(CERT_STORE_PROV_MSG, 0, 0, 0, msg); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { PCCERT_CONTEXT cert = NULL; @@ -1897,7 +1897,7 @@ static void testMessageStore(void) if (cert) count++; } while (cert); - ok(count == 0, "Expected 0 certificates, got %d\n", count); + ok(count == 0, "Expected 0 certificates, got %ld\n", count);
count = 0; do { @@ -1905,12 +1905,12 @@ static void testMessageStore(void) if (crl) count++; } while (crl); - ok(count == 0, "Expected 0 CRLs, got %d\n", count); + ok(count == 0, "Expected 0 CRLs, got %ld\n", count);
/* Can add certs to a message store */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); count = 0; do { @@ -1918,22 +1918,22 @@ static void testMessageStore(void) if (cert) count++; } while (cert); - ok(count == 1, "Expected 1 certificate, got %d\n", count); + ok(count == 1, "Expected 1 certificate, got %ld\n", count);
CertCloseStore(store, 0); } /* but the added certs weren't actually added to the message */ size = sizeof(count); ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &count, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(count == 0, "Expected 0 certificates, got %d\n", count); + ok(ret, "CryptMsgGetParam failed: %08lx\n", GetLastError()); + ok(count == 0, "Expected 0 certificates, got %ld\n", count); CryptMsgClose(msg);
/* Crashes store = CertOpenStore(CERT_STORE_PROV_PKCS7, 0, 0, 0, NULL); */ store = CertOpenStore(CERT_STORE_PROV_PKCS7, 0, 0, 0, &blob); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { DWORD count = 0; @@ -1945,7 +1945,7 @@ static void testMessageStore(void) if (cert) count++; } while (cert); - ok(count == 1, "Expected 1 certificate, got %d\n", count); + ok(count == 1, "Expected 1 certificate, got %ld\n", count);
count = 0; do { @@ -1953,14 +1953,14 @@ static void testMessageStore(void) if (crl) count++; } while (crl); - ok(count == 1, "Expected 1 CRL, got %d\n", count); + ok(count == 1, "Expected 1 CRL, got %ld\n", count);
CertCloseStore(store, 0); } /* Encoding appears to be ignored */ store = CertOpenStore(CERT_STORE_PROV_PKCS7, X509_ASN_ENCODING, 0, 0, &blob); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) CertCloseStore(store, 0); /* Messages other than signed messages aren't allowed */ @@ -1969,13 +1969,13 @@ static void testMessageStore(void) SetLastError(0xdeadbeef); store = CertOpenStore(CERT_STORE_PROV_PKCS7, 0, 0, 0, &blob); ok(!store && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_MSG_TYPE, got %08lx\n", GetLastError()); blob.cbData = sizeof(hashBareContent); blob.pbData = (LPBYTE)hashBareContent; SetLastError(0xdeadbeef); store = CertOpenStore(CERT_STORE_PROV_PKCS7, 0, 0, 0, &blob); ok(!store && GetLastError() == CRYPT_E_ASN1_BADTAG, - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + "Expected CRYPT_E_ASN1_BADTAG, got %08lx\n", GetLastError()); }
static void testSerializedStore(void) @@ -1995,16 +1995,16 @@ static void testSerializedStore(void) store = CertOpenStore(CERT_STORE_PROV_SERIALIZED, 0, 0, CERT_STORE_DELETE_FLAG, &blob); ok(!store && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n", GetLastError()); + "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08lx\n", GetLastError()); store = CertOpenStore(CERT_STORE_PROV_SERIALIZED, 0, 0, 0, &blob); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { PCCERT_CONTEXT cert; PCCRL_CONTEXT crl;
cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", + ok(cert != NULL, "CertEnumCertificatesInStore failed: %08lx\n", GetLastError()); cert = CertEnumCertificatesInStore(store, cert); ok(!cert, "Expected only one cert\n"); @@ -2016,19 +2016,19 @@ static void testSerializedStore(void) blob.cbData = sizeof(serializedStoreWithCertAndCRL); blob.pbData = (BYTE *)serializedStoreWithCertAndCRL; store = CertOpenStore(CERT_STORE_PROV_SERIALIZED, 0, 0, 0, &blob); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); if (store) { PCCERT_CONTEXT cert; PCCRL_CONTEXT crl;
cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", + ok(cert != NULL, "CertEnumCertificatesInStore failed: %08lx\n", GetLastError()); cert = CertEnumCertificatesInStore(store, cert); ok(!cert, "Expected only one cert\n"); crl = CertEnumCRLsInStore(store, NULL); - ok(crl != NULL, "CertEnumCRLsInStore failed: %08x\n", + ok(crl != NULL, "CertEnumCRLsInStore failed: %08lx\n", GetLastError()); crl = CertEnumCRLsInStore(store, crl); ok(!crl, "Expected only one CRL\n"); @@ -2043,12 +2043,12 @@ static void testCertOpenSystemStore(void)
store = CertOpenSystemStoreW(0, NULL); ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* This succeeds, and on WinXP at least, the Bogus key is created under * HKCU (but not under HKLM, even when run as an administrator.) */ store = CertOpenSystemStoreW(0, BogusW); - ok(store != 0, "CertOpenSystemStore failed: %08x\n", GetLastError()); + ok(store != 0, "CertOpenSystemStore failed: %08lx\n", GetLastError()); if (store) CertCloseStore(store, 0); /* Delete it so other tests succeed next time around */ @@ -2095,7 +2095,7 @@ static void testCertRegisterSystemStore(void) } todo_wine_if (reg_system_store_test_data[i].todo) ok (ret == reg_system_store_test_data[i].expected, - "Store registration (dwFlags=%08x) failed, last error %x\n", cur_flag, err); + "Store registration (dwFlags=%08x) failed, last error %lx\n", cur_flag, err); if (!ret) { skip("Nothing to test without registered store at %08x\n", cur_flag); @@ -2103,32 +2103,32 @@ static void testCertRegisterSystemStore(void) }
hstore = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, CERT_STORE_OPEN_EXISTING_FLAG | cur_flag, WineTestW); - ok (hstore != NULL, "Opening just registered store at %08x failed, last error %x\n", cur_flag, GetLastError()); + ok (hstore != NULL, "Opening just registered store at %08x failed, last error %lx\n", cur_flag, GetLastError());
cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - ok (cert != NULL, "Failed creating cert at %08x, last error: %x\n", cur_flag, GetLastError()); + ok (cert != NULL, "Failed creating cert at %08x, last error: %lx\n", cur_flag, GetLastError()); if (cert) { ret = CertAddCertificateContextToStore(hstore, cert, CERT_STORE_ADD_NEW, NULL); - ok (ret, "Failed to add cert at %08x, last error: %x\n", cur_flag, GetLastError()); + ok (ret, "Failed to add cert at %08x, last error: %lx\n", cur_flag, GetLastError());
cert2 = CertEnumCertificatesInStore(hstore, NULL); ok (cert2 != NULL && cert2->cbCertEncoded == cert->cbCertEncoded, - "Unexpected cert encoded size at %08x, last error: %x\n", cur_flag, GetLastError()); + "Unexpected cert encoded size at %08x, last error: %lx\n", cur_flag, GetLastError());
ret = CertDeleteCertificateFromStore(cert2); - ok (ret, "Failed to delete certificate from the new store at %08x, last error: %x\n", cur_flag, GetLastError()); + ok (ret, "Failed to delete certificate from the new store at %08x, last error: %lx\n", cur_flag, GetLastError());
CertFreeCertificateContext(cert); }
ret = CertCloseStore(hstore, 0); - ok (ret, "CertCloseStore failed at %08x, last error %x\n", cur_flag, GetLastError()); + ok (ret, "CertCloseStore failed at %08x, last error %lx\n", cur_flag, GetLastError());
ret = CertUnregisterSystemStore(WineTestW, cur_flag ); todo_wine_if (reg_system_store_test_data[i].todo) ok( ret == reg_system_store_test_data[i].expected, - "Unregistering failed at %08x, last error %d\n", cur_flag, GetLastError()); + "Unregistering failed at %08x, last error %ld\n", cur_flag, GetLastError()); }
} @@ -2156,7 +2156,7 @@ static void testCertEnumSystemStore(void) SetLastError(0xdeadbeef); ret = CertEnumSystemStore(0, NULL, NULL, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); /* Crashes ret = CertEnumSystemStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, NULL, NULL, NULL); @@ -2174,7 +2174,7 @@ static void testCertEnumSystemStore(void) info.storeCount = 0; ret = CertEnumSystemStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, NULL, &info, enumSystemStoreCB); - ok(ret, "CertEnumSystemStore failed: %08x\n", GetLastError()); + ok(ret, "CertEnumSystemStore failed: %08lx\n", GetLastError()); /* There should always be at least My, Root, and CA stores */ ok(info.storeCount == 0 || info.storeCount >= 3, "Expected at least 3 stores\n"); @@ -2199,11 +2199,11 @@ static void testStoreProperty(void) SetLastError(0xdeadbeef); ret = CertGetStoreProperty(store, 0, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* Contrary to MSDN, CERT_ACCESS_STATE_PROP_ID is supported for stores.. */ size = sizeof(state); ret = CertGetStoreProperty(store, CERT_ACCESS_STATE_PROP_ID, &state, &size); - ok(ret, "CertGetStoreProperty failed for CERT_ACCESS_STATE_PROP_ID: %08x\n", + ok(ret, "CertGetStoreProperty failed for CERT_ACCESS_STATE_PROP_ID: %08lx\n", GetLastError()); ok(!state, "Expected a non-persisted store\n"); /* and CERT_STORE_LOCALIZED_NAME_PROP_ID isn't supported by default. */ @@ -2211,37 +2211,37 @@ static void testStoreProperty(void) ret = CertGetStoreProperty(store, CERT_STORE_LOCALIZED_NAME_PROP_ID, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* Delete an arbitrary property on a store */ ret = CertSetStoreProperty(store, CERT_FIRST_USER_PROP_ID, 0, NULL); - ok(ret, "CertSetStoreProperty failed: %08x\n", GetLastError()); + ok(ret, "CertSetStoreProperty failed: %08lx\n", GetLastError()); /* Set an arbitrary property on a store */ blob.pbData = (LPBYTE)&state; blob.cbData = sizeof(state); ret = CertSetStoreProperty(store, CERT_FIRST_USER_PROP_ID, 0, &blob); - ok(ret, "CertSetStoreProperty failed: %08x\n", GetLastError()); + ok(ret, "CertSetStoreProperty failed: %08lx\n", GetLastError()); /* Get an arbitrary property that's been set */ ret = CertGetStoreProperty(store, CERT_FIRST_USER_PROP_ID, NULL, &size); - ok(ret, "CertGetStoreProperty failed: %08x\n", GetLastError()); - ok(size == sizeof(state), "Unexpected data size %d\n", size); + ok(ret, "CertGetStoreProperty failed: %08lx\n", GetLastError()); + ok(size == sizeof(state), "Unexpected data size %ld\n", size); ret = CertGetStoreProperty(store, CERT_FIRST_USER_PROP_ID, &propID, &size); - ok(ret, "CertGetStoreProperty failed: %08x\n", GetLastError()); + ok(ret, "CertGetStoreProperty failed: %08lx\n", GetLastError()); ok(propID == state, "CertGetStoreProperty got the wrong value\n"); /* Delete it again */ ret = CertSetStoreProperty(store, CERT_FIRST_USER_PROP_ID, 0, NULL); - ok(ret, "CertSetStoreProperty failed: %08x\n", GetLastError()); + ok(ret, "CertSetStoreProperty failed: %08lx\n", GetLastError()); /* And check that it's missing */ SetLastError(0xdeadbeef); ret = CertGetStoreProperty(store, CERT_FIRST_USER_PROP_ID, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); CertCloseStore(store, 0);
/* Recheck on the My store.. */ store = CertOpenSystemStoreW(0, MyW); size = sizeof(state); ret = CertGetStoreProperty(store, CERT_ACCESS_STATE_PROP_ID, &state, &size); - ok(ret, "CertGetStoreProperty failed for CERT_ACCESS_STATE_PROP_ID: %08x\n", + ok(ret, "CertGetStoreProperty failed for CERT_ACCESS_STATE_PROP_ID: %08lx\n", GetLastError()); ok(state, "Expected a persisted store\n"); SetLastError(0xdeadbeef); @@ -2249,7 +2249,7 @@ static void testStoreProperty(void) ret = CertGetStoreProperty(store, CERT_STORE_LOCALIZED_NAME_PROP_ID, NULL, &size); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); CertCloseStore(store, 0); }
@@ -2265,15 +2265,15 @@ static void testAddSerialized(void)
ret = CertAddSerializedElementToStore(0, NULL, 0, 0, 0, 0, NULL, NULL); ok(!ret && GetLastError() == ERROR_END_OF_MEDIA, - "Expected ERROR_END_OF_MEDIA, got %08x\n", GetLastError()); + "Expected ERROR_END_OF_MEDIA, got %08lx\n", GetLastError());
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store != 0, "CertOpenStore failed: %08lx\n", GetLastError());
ret = CertAddSerializedElementToStore(store, NULL, 0, 0, 0, 0, NULL, NULL); ok(!ret && GetLastError() == ERROR_END_OF_MEDIA, - "Expected ERROR_END_OF_MEDIA, got %08x\n", GetLastError()); + "Expected ERROR_END_OF_MEDIA, got %08lx\n", GetLastError());
/* Test with an empty property */ hdr = (struct CertPropIDHeader *)buf; @@ -2283,71 +2283,71 @@ static void testAddSerialized(void) ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Test with a bad size in property header */ hdr->cb = sizeof(bigCert) - 1; memcpy(buf + sizeof(struct CertPropIDHeader), bigCert, sizeof(bigCert)); ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, 0, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Kosher size in property header, but no context type */ hdr->cb = sizeof(bigCert); ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, 0, 0, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* With a bad context type */ ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, CERT_STORE_CRL_CONTEXT_FLAG, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, CERT_STORE_CRL_CONTEXT_FLAG, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, 0, CERT_STORE_CRL_CONTEXT_FLAG, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Bad unknown field, good type */ hdr->unknown1 = 2; ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND got %08lx\n", GetLastError()); ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND got %08lx\n", GetLastError()); ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND got %08lx\n", GetLastError()); /* Most everything okay, but bad add disposition */ hdr->unknown1 = 1; /* This crashes @@ -2361,13 +2361,13 @@ static void testAddSerialized(void) /* Everything okay, but buffer's too big */ ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), CERT_STORE_ADD_NEW, 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); - ok(ret, "CertAddSerializedElementToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddSerializedElementToStore failed: %08lx\n", GetLastError()); /* Everything okay, check it's not re-added */ ret = CertAddSerializedElementToStore(store, buf, sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_EXISTS, - "Expected CRYPT_E_EXISTS, got %08x\n", GetLastError()); + "Expected CRYPT_E_EXISTS, got %08lx\n", GetLastError());
context = CertEnumCertificatesInStore(store, NULL); ok(context != NULL, "Expected a cert\n"); @@ -2387,7 +2387,7 @@ static void testAddSerialized(void) ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), CERT_STORE_ADD_NEW, 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, (const void **)&context); - ok(ret, "CertAddSerializedElementToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddSerializedElementToStore failed: %08lx\n", GetLastError()); if (context) { BYTE hashVal[20], realHash[20]; @@ -2395,10 +2395,10 @@ static void testAddSerialized(void)
ret = CryptHashCertificate(0, 0, 0, bigCert, sizeof(bigCert), realHash, &size); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); + ok(ret, "CryptHashCertificate failed: %08lx\n", GetLastError()); ret = CertGetCertificateContextProperty(context, CERT_HASH_PROP_ID, hashVal, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); ok(!memcmp(hashVal, realHash, size), "Unexpected hash\n"); CertFreeCertificateContext(context); @@ -2504,16 +2504,16 @@ static void testAddCertificateLink(void) SetLastError(0xdeadbeef); ret = CertAddCertificateLinkToStore(store1, NULL, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); source = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); SetLastError(0xdeadbeef); ret = CertAddCertificateLinkToStore(store1, source, 0, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); ret = CertAddCertificateLinkToStore(store1, source, CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddCertificateLinkToStore failed: %08lx\n", GetLastError()); if (0) { /* Crashes, i.e. the source certificate is dereferenced without @@ -2528,23 +2528,23 @@ static void testAddCertificateLink(void) CERT_STORE_CREATE_NEW_FLAG, NULL); ret = CertAddCertificateLinkToStore(store1, source, CERT_STORE_ADD_ALWAYS, &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddCertificateLinkToStore failed: %08lx\n", GetLastError()); if (ret) { ok(linked->hCertStore == store1, "unexpected store\n"); ret = CertSerializeCertificateStoreElement(linked, 0, NULL, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", + ok(ret, "CertSerializeCertificateStoreElement failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, size); if (buf) { ret = CertSerializeCertificateStoreElement(linked, 0, buf, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", + ok(ret, "CertSerializeCertificateStoreElement failed: %08lx\n", GetLastError()); /* The serialized linked certificate is identical to the serialized * original certificate. */ - ok(size == sizeof(serializedCert), "Wrong size %d\n", size); + ok(size == sizeof(serializedCert), "Wrong size %ld\n", size); ok(!memcmp(serializedCert, buf, size), "Unexpected serialized cert\n"); HeapFree(GetProcessHeap(), 0, buf); @@ -2554,19 +2554,19 @@ static void testAddCertificateLink(void) blob.cbData = sizeof(WineTestW); ret = CertSetCertificateContextProperty(source, CERT_FRIENDLY_NAME_PROP_ID, 0, &blob); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError()); /* and the linked certificate has the same friendly name. */ ret = CertGetCertificateContextProperty(linked, CERT_FRIENDLY_NAME_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, size); if (buf) { ret = CertGetCertificateContextProperty(linked, CERT_FRIENDLY_NAME_PROP_ID, buf, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); ok(!lstrcmpW((LPCWSTR)buf, WineTestW), "unexpected friendly name\n"); @@ -2591,12 +2591,12 @@ static void testAddCertificateLink(void)
store1 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store1 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store1 != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); CloseHandle(file);
ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &source); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError());
/* Test adding a link to a memory store. */ @@ -2604,12 +2604,12 @@ static void testAddCertificateLink(void) CERT_STORE_CREATE_NEW_FLAG, NULL); ret = CertAddCertificateLinkToStore(store2, source, CERT_STORE_ADD_ALWAYS, &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddCertificateLinkToStore failed: %08lx\n", GetLastError()); if (ret) { ok(linked->hCertStore == store2, "unexpected store\n"); ret = CertSerializeCertificateStoreElement(linked, 0, NULL, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", + ok(ret, "CertSerializeCertificateStoreElement failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, size); if (buf) @@ -2618,8 +2618,8 @@ static void testAddCertificateLink(void) /* The serialized linked certificate is identical to the serialized * original certificate. */ - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", GetLastError()); - ok(size == sizeof(serializedCert), "Wrong size %d\n", size); + ok(ret, "CertSerializeCertificateStoreElement failed: %08lx\n", GetLastError()); + ok(size == sizeof(serializedCert), "Wrong size %ld\n", size); ok(!memcmp(serializedCert, buf, size), "Unexpected serialized cert\n"); HeapFree(GetProcessHeap(), 0, buf); @@ -2629,19 +2629,19 @@ static void testAddCertificateLink(void) blob.cbData = sizeof(WineTestW); ret = CertSetCertificateContextProperty(source, CERT_FRIENDLY_NAME_PROP_ID, 0, &blob); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError()); /* and the linked certificate has the same friendly name. */ ret = CertGetCertificateContextProperty(linked, CERT_FRIENDLY_NAME_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, size); if (buf) { ret = CertGetCertificateContextProperty(linked, CERT_FRIENDLY_NAME_PROP_ID, buf, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertGetCertificateContextProperty failed: %08lx\n", GetLastError()); ok(!lstrcmpW((LPCWSTR)buf, WineTestW), "unexpected friendly name\n"); HeapFree(GetProcessHeap(), 0, buf); @@ -2661,29 +2661,29 @@ static void testAddCertificateLink(void)
store2 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store2 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store2 != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); CloseHandle(file); /* Test adding a link to a file store. */ ret = CertAddCertificateLinkToStore(store2, source, CERT_STORE_ADD_ALWAYS, &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddCertificateLinkToStore failed: %08lx\n", GetLastError()); if (ret) { ok(linked->hCertStore == store2, "unexpected store\n"); ret = CertSerializeCertificateStoreElement(linked, 0, NULL, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", + ok(ret, "CertSerializeCertificateStoreElement failed: %08lx\n", GetLastError()); buf = HeapAlloc(GetProcessHeap(), 0, size); if (buf) { ret = CertSerializeCertificateStoreElement(linked, 0, buf, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", + ok(ret, "CertSerializeCertificateStoreElement failed: %08lx\n", GetLastError()); /* The serialized linked certificate now contains the friendly * name property. */ ok(size == sizeof(serializedCertWithFriendlyName), - "Wrong size %d\n", size); + "Wrong size %ld\n", size); ok(!memcmp(serializedCertWithFriendlyName, buf, size), "Unexpected serialized cert\n"); HeapFree(GetProcessHeap(), 0, buf); @@ -2709,7 +2709,7 @@ static void testAddCertificateLink(void) ret = CertAddCertificateLinkToStore(store1, source, CERT_STORE_ADD_ALWAYS, &linked); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); CertFreeCertificateContext(source);
/* Test adding a link to a file store, where the linked certificate is @@ -2717,7 +2717,7 @@ static void testAddCertificateLink(void) */ ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &source); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", GetLastError()); if (!GetTempFileNameW(szDot, szPrefix, 0, filename1)) return; @@ -2730,12 +2730,12 @@ static void testAddCertificateLink(void)
store2 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store2 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store2 != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); CloseHandle(file);
ret = CertAddCertificateLinkToStore(store2, source, CERT_STORE_ADD_ALWAYS, &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddCertificateLinkToStore failed: %08lx\n", GetLastError()); if (ret) { ok(linked->hCertStore == store2, "unexpected store\n"); @@ -2755,10 +2755,10 @@ static void testAddCertificateLink(void) */ store2 = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, WineTestW); - ok(store2 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + ok(store2 != NULL, "CertOpenStore failed: %08lx\n", GetLastError()); ret = CertAddCertificateLinkToStore(store2, source, CERT_STORE_ADD_ALWAYS, &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); + ok(ret, "CertAddCertificateLinkToStore failed: %08lx\n", GetLastError()); if (ret) { ok(linked->hCertStore == store2, "unexpected store\n"); @@ -2852,10 +2852,10 @@ static void testEmptyStore(void) CertFreeCertificateContext(cert3);
res = CertCloseStore(cert->hCertStore, CERT_CLOSE_STORE_CHECK_FLAG); - ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%x)\n", res, GetLastError()); + ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%lx)\n", res, GetLastError());
res = CertCloseStore(cert->hCertStore, 0); - ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%x)\n", res, GetLastError()); + ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%lx)\n", res, GetLastError());
CertFreeCertificateContext(cert2);
@@ -2938,7 +2938,7 @@ static void testCloseStore(void)
/* There is still a reference from CTL */ res = CertCloseStore(store, CERT_CLOSE_STORE_CHECK_FLAG); - ok(!res && GetLastError() == CRYPT_E_PENDING_CLOSE, "CertCloseStore returned: %x(%u)\n", res, GetLastError()); + ok(!res && GetLastError() == CRYPT_E_PENDING_CLOSE, "CertCloseStore returned: %x(%lu)\n", res, GetLastError());
res = CertFreeCTLContext(ctl); ok(res, "CertFreeCTLContext failed\n"); @@ -2993,46 +2993,46 @@ static void test_I_UpdateStore(void) ret = pI_CertUpdatestore(NULL, store2, 0, 0); */ ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); + ok(ret, "I_CertUpdateStore failed: %08lx\n", GetLastError());
CertAddEncodedCertificateToStore(store2, X509_ASN_ENCODING, bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &cert); /* I_CertUpdateStore adds the contexts from store2 to store1 */ ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); + ok(ret, "I_CertUpdateStore failed: %08lx\n", GetLastError()); certs = countCertsInStore(store1); - ok(certs == 1, "Expected 1 cert, got %d\n", certs); + ok(certs == 1, "Expected 1 cert, got %ld\n", certs); /* Calling it a second time has no effect */ ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); + ok(ret, "I_CertUpdateStore failed: %08lx\n", GetLastError()); certs = countCertsInStore(store1); - ok(certs == 1, "Expected 1 cert, got %d\n", certs); + ok(certs == 1, "Expected 1 cert, got %ld\n", certs);
/* The last parameters to I_CertUpdateStore appear to be ignored */ ret = pI_CertUpdatestore(store1, store2, 1, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); + ok(ret, "I_CertUpdateStore failed: %08lx\n", GetLastError()); ret = pI_CertUpdatestore(store1, store2, 0, 1); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); + ok(ret, "I_CertUpdateStore failed: %08lx\n", GetLastError());
CertAddEncodedCRLToStore(store2, X509_ASN_ENCODING, signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL);
/* I_CertUpdateStore also adds the CRLs from store2 to store1 */ ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); + ok(ret, "I_CertUpdateStore failed: %08lx\n", GetLastError()); certs = countCertsInStore(store1); - ok(certs == 1, "Expected 1 cert, got %d\n", certs); + ok(certs == 1, "Expected 1 cert, got %ld\n", certs); certs = countCRLsInStore(store1); - ok(certs == 1, "Expected 1 CRL, got %d\n", certs); + ok(certs == 1, "Expected 1 CRL, got %ld\n", certs);
CertDeleteCertificateFromStore(cert); /* If a context is deleted from store2, I_CertUpdateStore deletes it * from store1 */ ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); + ok(ret, "I_CertUpdateStore failed: %08lx\n", GetLastError()); certs = countCertsInStore(store1); - ok(certs == 0, "Expected 0 certs, got %d\n", certs); + ok(certs == 0, "Expected 0 certs, got %ld\n", certs);
CertCloseStore(store1, 0); CertCloseStore(store2, 0); @@ -3295,66 +3295,66 @@ static void test_PFXImportCertStore(void) SetLastError( 0xdeadbeef ); store = PFXImportCertStore( NULL, NULL, 0 ); ok( store == NULL, "got %p\n", store ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError() );
pfx.pbData = (BYTE *)pfxdata; pfx.cbData = sizeof(pfxdata); store = PFXImportCertStore( &pfx, NULL, CRYPT_EXPORTABLE|CRYPT_USER_KEYSET|PKCS12_NO_PERSIST_KEY ); - ok( store != NULL || broken(store == NULL) /* winxp */, "got %u\n", GetLastError() ); + ok( store != NULL || broken(store == NULL) /* winxp */, "got %lu\n", GetLastError() ); if (!store) return; count = countCertsInStore( store ); - ok( count == 1, "got %u\n", count ); + ok( count == 1, "got %lu\n", count );
cert = CertFindCertificateInStore( store, X509_ASN_ENCODING, 0, CERT_FIND_ANY, NULL, NULL ); - ok( cert != NULL, "got %u\n", GetLastError() ); - ok( cert->dwCertEncodingType == X509_ASN_ENCODING, "got %u\n", cert->dwCertEncodingType ); + ok( cert != NULL, "got %lu\n", GetLastError() ); + ok( cert->dwCertEncodingType == X509_ASN_ENCODING, "got %lu\n", cert->dwCertEncodingType ); ok( cert->pbCertEncoded != NULL, "pbCertEncoded not set\n" ); - ok( cert->cbCertEncoded == 1123, "got %u\n", cert->cbCertEncoded ); + ok( cert->cbCertEncoded == 1123, "got %lu\n", cert->cbCertEncoded ); ok( cert->pCertInfo != NULL, "pCertInfo not set\n" ); ok( cert->hCertStore == store, "got %p\n", cert->hCertStore );
info = cert->pCertInfo; - ok( info->dwVersion == CERT_V1, "got %u\n", info->dwVersion ); + ok( info->dwVersion == CERT_V1, "got %lu\n", info->dwVersion ); ok( !strcmp(info->SignatureAlgorithm.pszObjId, szOID_RSA_SHA256RSA), "got "%s"\n", info->SignatureAlgorithm.pszObjId );
size = sizeof(key); ret = CertGetCertificateContextProperty( cert, CERT_KEY_CONTEXT_PROP_ID, &key, &size ); - ok( ret, "got %08x\n", GetLastError() ); - ok( key.cbSize == sizeof(key), "got %u\n", key.cbSize ); + ok( ret, "got %08lx\n", GetLastError() ); + ok( key.cbSize == sizeof(key), "got %lu\n", key.cbSize ); ok( key.hCryptProv, "hCryptProv not set\n" ); - ok( key.dwKeySpec == AT_KEYEXCHANGE, "got %u\n", key.dwKeySpec ); + ok( key.dwKeySpec == AT_KEYEXCHANGE, "got %lu\n", key.dwKeySpec );
size = sizeof(buf); SetLastError( 0xdeadbeef ); ret = CertGetCertificateContextProperty( cert, CERT_KEY_PROV_INFO_PROP_ID, keyprov, &size ); - ok( !ret && GetLastError() == CRYPT_E_NOT_FOUND, "got %08x\n", GetLastError() ); + ok( !ret && GetLastError() == CRYPT_E_NOT_FOUND, "got %08lx\n", GetLastError() ); CertFreeCertificateContext( cert ); CertCloseStore( store, 0 );
/* without PKCS12_NO_PERSIST_KEY */ store = PFXImportCertStore( &pfx, NULL, CRYPT_EXPORTABLE|CRYPT_USER_KEYSET ); - ok( store != NULL, "got %u\n", GetLastError() ); + ok( store != NULL, "got %lu\n", GetLastError() );
cert = CertFindCertificateInStore( store, X509_ASN_ENCODING, 0, CERT_FIND_ANY, NULL, NULL ); - ok( cert != NULL, "got %08x\n", GetLastError() ); + ok( cert != NULL, "got %08lx\n", GetLastError() );
size = sizeof(key); ret = CertGetCertificateContextProperty( cert, CERT_KEY_CONTEXT_PROP_ID, &key, &size ); - ok( !ret && GetLastError() == CRYPT_E_NOT_FOUND, "got %08x\n", GetLastError() ); + ok( !ret && GetLastError() == CRYPT_E_NOT_FOUND, "got %08lx\n", GetLastError() );
size = sizeof(buf); ret = CertGetCertificateContextProperty( cert, CERT_KEY_PROV_INFO_PROP_ID, buf, &size ); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); CertFreeCertificateContext( cert ); CertCloseStore( store, 0 );
/* CRYPT_MACHINE_KEYSET */ store = PFXImportCertStore( &pfx, NULL, CRYPT_MACHINE_KEYSET ); - ok( store != NULL, "got %u\n", GetLastError() ); + ok( store != NULL, "got %lu\n", GetLastError() );
cert = CertFindCertificateInStore( store, X509_ASN_ENCODING, 0, CERT_FIND_ANY, NULL, NULL ); - ok( cert != NULL, "got %08x\n", GetLastError() ); + ok( cert != NULL, "got %08lx\n", GetLastError() );
CertFreeCertificateContext( cert ); CertCloseStore( store, 0 ); @@ -3373,7 +3373,7 @@ static void test_CryptQueryObject(void) ret = CryptQueryObject( CERT_QUERY_OBJECT_BLOB, NULL, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, NULL, NULL, NULL, NULL, NULL ); ok( !ret, "success\n" ); - ok( GetLastError() == E_INVALIDARG, "got %u\n", GetLastError() ); + ok( GetLastError() == E_INVALIDARG, "got %lu\n", GetLastError() );
pfx.pbData = (BYTE *)pfxdata; pfx.cbData = sizeof(pfxdata); @@ -3384,10 +3384,10 @@ static void test_CryptQueryObject(void) ret = CryptQueryObject( CERT_QUERY_OBJECT_BLOB, &pfx, CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BINARY, 0, &encoding_type, &content_type, &format_type, &store, &msg, &ctx ); - ok( ret, "got %u\n", GetLastError() ); - ok( encoding_type == X509_ASN_ENCODING, "got %08x\n", encoding_type ); - ok( content_type == CERT_QUERY_CONTENT_PFX, "got %08x\n", content_type ); - ok( format_type == CERT_QUERY_FORMAT_BINARY, "got %08x\n", format_type ); + ok( ret, "got %lu\n", GetLastError() ); + ok( encoding_type == X509_ASN_ENCODING, "got %08lx\n", encoding_type ); + ok( content_type == CERT_QUERY_CONTENT_PFX, "got %08lx\n", content_type ); + ok( format_type == CERT_QUERY_FORMAT_BINARY, "got %08lx\n", format_type ); ok( store == NULL, "got %p\n", store ); ok( msg == NULL, "got %p\n", msg ); ok( ctx == NULL, "got %p\n", ctx ); diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c index d382c0e6b09..c99b5e35a91 100644 --- a/dlls/crypt32/tests/str.c +++ b/dlls/crypt32/tests/str.c @@ -256,7 +256,7 @@ static void test_CertRDNValueToStrA(void) buffer, sizeof(buffer)); todo_wine_if (attrs[i].todo) { - ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got %d\n", + ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got %ld\n", lstrlenA(attrs[i].str) + 1, ret); ok(!strcmp(buffer, attrs[i].str), "Expected %s, got %s\n", attrs[i].str, buffer); @@ -267,7 +267,7 @@ static void test_CertRDNValueToStrA(void) ret = pCertRDNValueToStrA(CERT_RDN_UTF8_STRING, &blob, buffer, sizeof(buffer)); ok(ret == strlen(ePKI) + 1 || broken(ret != strlen(ePKI) + 1), - "Expected length %d, got %d\n", lstrlenA(ePKI), ret); + "Expected length %d, got %ld\n", lstrlenA(ePKI), ret); if (ret == strlen(ePKI) + 1) ok(!strcmp(buffer, ePKI), "Expected %s, got %s\n", ePKI, buffer); } @@ -351,7 +351,7 @@ static void test_CertRDNValueToStrW(void) todo_wine_if (attrs[i].todo) { ok(ret == lstrlenW(attrs[i].str) + 1, - "Expected length %d, got %d\n", lstrlenW(attrs[i].str) + 1, ret); + "Expected length %d, got %ld\n", lstrlenW(attrs[i].str) + 1, ret); ok(!lstrcmpW(buffer, attrs[i].str), "Expected %s, got %s\n", wine_dbgstr_w(attrs[i].str), wine_dbgstr_w(buffer)); } @@ -361,7 +361,7 @@ static void test_CertRDNValueToStrW(void) ret = pCertRDNValueToStrW(CERT_RDN_UTF8_STRING, &blob, buffer, sizeof(buffer)); ok(ret == lstrlenW(ePKIW) + 1 || broken(ret != lstrlenW(ePKIW) + 1), - "Expected length %d, got %d\n", lstrlenW(ePKIW), ret); + "Expected length %d, got %ld\n", lstrlenW(ePKIW), ret); if (ret == lstrlenW(ePKIW) + 1) ok(!lstrcmpW(buffer, ePKIW), "Expected %s, got %s\n", wine_dbgstr_w(ePKIW), wine_dbgstr_w(buffer)); @@ -375,12 +375,12 @@ static void test_NameToStrConversionA(PCERT_NAME_BLOB pName, DWORD dwStrType,
i = pCertNameToStrA(X509_ASN_ENCODING, pName, dwStrType, NULL, 0); todo_wine_if (todo) - ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n", + ok(i == strlen(expected) + 1, "Expected %d chars, got %ld\n", lstrlenA(expected) + 1, i); i = pCertNameToStrA(X509_ASN_ENCODING,pName, dwStrType, buffer, sizeof(buffer)); todo_wine_if (todo) - ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n", + ok(i == strlen(expected) + 1, "Expected %d chars, got %ld\n", lstrlenA(expected) + 1, i); todo_wine_if (todo) ok(!strcmp(buffer, expected), "Expected %s, got %s\n", expected, @@ -441,7 +441,7 @@ static void test_CertNameToStrA(void)
context = CertCreateCertificateContext(X509_ASN_ENCODING, cert, sizeof(cert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(context != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); if (context) { @@ -454,13 +454,13 @@ static void test_CertNameToStrA(void) SetLastError(0xdeadbeef); ret = pCertNameToStrA(0, &context->pCertInfo->Issuer, 0, NULL, 0); ok(ret == 1 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %d - %08x\n", + "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %ld - %08lx\n", ret, GetLastError()); SetLastError(0xdeadbeef); ret = pCertNameToStrA(X509_ASN_ENCODING, &context->pCertInfo->Issuer, 0, NULL, 0); ok(ret && GetLastError() == ERROR_SUCCESS, - "Expected positive return and ERROR_SUCCESS, got %d - %08x\n", + "Expected positive return and ERROR_SUCCESS, got %ld - %08lx\n", ret, GetLastError());
test_NameToStrConversionA(&context->pCertInfo->Issuer, @@ -546,11 +546,11 @@ static void test_NameToStrConversionW(PCERT_NAME_BLOB pName, DWORD dwStrType,
i = pCertNameToStrW(X509_ASN_ENCODING,pName, dwStrType, NULL, 0); todo_wine_if (todo) - ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n", + ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %ld\n", lstrlenW(expected) + 1, i); i = pCertNameToStrW(X509_ASN_ENCODING,pName, dwStrType, buffer, ARRAY_SIZE(buffer)); todo_wine_if (todo) - ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n", + ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %ld\n", lstrlenW(expected) + 1, i); todo_wine_if (todo) ok(!lstrcmpW(buffer, expected), "Expected %s, got %s\n", @@ -594,7 +594,7 @@ static void test_CertNameToStrW(void)
context = CertCreateCertificateContext(X509_ASN_ENCODING, cert, sizeof(cert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(context != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); if (context) { @@ -607,13 +607,13 @@ static void test_CertNameToStrW(void) SetLastError(0xdeadbeef); ret = pCertNameToStrW(0, &context->pCertInfo->Issuer, 0, NULL, 0); ok(ret == 1 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %d - %08x\n", + "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %ld - %08lx\n", ret, GetLastError()); SetLastError(0xdeadbeef); ret = pCertNameToStrW(X509_ASN_ENCODING, &context->pCertInfo->Issuer, 0, NULL, 0); ok(ret && GetLastError() == ERROR_SUCCESS, - "Expected positive return and ERROR_SUCCESS, got %d - %08x\n", + "Expected positive return and ERROR_SUCCESS, got %ld - %08lx\n", ret, GetLastError());
test_NameToStrConversionW(&context->pCertInfo->Issuer, @@ -746,61 +746,61 @@ static void test_CertStrToNameA(void) ok(!ret, "Expected failure\n"); ret = pCertStrToNameA(0, "bogus", 0, NULL, NULL, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameA(0, "foo=1", 0, NULL, NULL, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameA(0, "CN=1", 0, NULL, NULL, &size, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1", 0, NULL, NULL, &size, NULL); - ok(ret, "CertStrToNameA failed: %08x\n", GetLastError()); + ok(ret, "CertStrToNameA failed: %08lx\n", GetLastError()); size = sizeof(buf); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=""1""", 0, NULL, buf, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1+2", 0, NULL, buf, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1+2", CERT_NAME_STR_NO_PLUS_FLAG, NULL, buf, &size, NULL); ok(ret && GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1,2", CERT_NAME_STR_NO_QUOTING_FLAG, NULL, buf, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN="1,2;3,4"", CERT_NAME_STR_NO_QUOTING_FLAG, NULL, buf, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=abc", 0, NULL, buf, &size, NULL); ok(ret && GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=abc", CERT_NAME_STR_NO_QUOTING_FLAG, NULL, buf, &size, NULL); ok(ret && GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN="abc"", 0, NULL, buf, &size, NULL); ok(ret && GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError()); ret = pCertStrToNameA(X509_ASN_ENCODING, "CN="abc"", CERT_NAME_STR_NO_QUOTING_FLAG, NULL, buf, &size, NULL); ok(!ret && GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %08x\n", GetLastError()); + "Expected ERROR_MORE_DATA, got %08lx\n", GetLastError()); for (i = 0; i < ARRAY_SIZE(namesA); i++) { size = sizeof(buf); ret = pCertStrToNameA(X509_ASN_ENCODING, namesA[i].x500, 0, NULL, buf, &size, NULL); - ok(ret, "CertStrToNameA failed on string %s: %08x\n", namesA[i].x500, + ok(ret, "CertStrToNameA failed on string %s: %08lx\n", namesA[i].x500, GetLastError()); ok(size == namesA[i].encodedSize, - "Expected size %d, got %d\n", namesA[i].encodedSize, size); + "Expected size %ld, got %ld\n", namesA[i].encodedSize, size); if (ret) ok(!memcmp(buf, namesA[i].encoded, namesA[i].encodedSize), "Unexpected value for string %s\n", namesA[i].x500); @@ -866,38 +866,38 @@ static void test_CertStrToNameW(void) ok(!ret, "Expected failure\n"); ret = pCertStrToNameW(0, bogusW, 0, NULL, NULL, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameW(0, fooW, 0, NULL, NULL, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameW(0, simpleCN_W, 0, NULL, NULL, &size, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); ret = pCertStrToNameW(X509_ASN_ENCODING, simpleCN_W, 0, NULL, NULL, &size, NULL); - ok(ret, "CertStrToNameW failed: %08x\n", GetLastError()); + ok(ret, "CertStrToNameW failed: %08lx\n", GetLastError()); size = sizeof(buf); ret = pCertStrToNameW(X509_ASN_ENCODING, badlyQuotedCN_W, 0, NULL, buf, &size, NULL); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ret = pCertStrToNameW(X509_ASN_ENCODING, badlyQuotedCN_W, 0, NULL, buf, &size, &errorPtr); ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); + "Expected CRYPT_E_INVALID_X500_STRING, got %08lx\n", GetLastError()); ok(errorPtr && *errorPtr == '1', "Expected first error character was 1\n"); for (i = 0; i < ARRAY_SIZE(namesW); i++) { size = sizeof(buf); ret = pCertStrToNameW(X509_ASN_ENCODING, namesW[i].x500, 0, NULL, buf, &size, NULL); - ok(ret, "Index %d: CertStrToNameW failed: %08x\n", i, GetLastError()); + ok(ret, "Index %ld: CertStrToNameW failed: %08lx\n", i, GetLastError()); ok(size == namesW[i].encodedSize, - "Index %d: expected size %d, got %d\n", i, namesW[i].encodedSize, + "Index %ld: expected size %ld, got %ld\n", i, namesW[i].encodedSize, size); if (ret) ok(!memcmp(buf, namesW[i].encoded, size), - "Index %d: unexpected value for string %s\n", i, wine_dbgstr_w(namesW[i].x500)); + "Index %ld: unexpected value for string %s\n", i, wine_dbgstr_w(namesW[i].x500)); } }
@@ -913,7 +913,7 @@ static void test_CertGetNameStringA(void)
context = CertCreateCertificateContext(X509_ASN_ENCODING, cert, sizeof(cert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", + ok(context != NULL, "CertCreateCertificateContext failed: %08lx\n", GetLastError()); if (context) { @@ -924,16 +924,16 @@ static void test_CertGetNameStringA(void)
/* Bad string types/types missing from the cert */ len = pCertGetNameStringA(NULL, 0, 0, NULL, NULL, 0); - ok(len == 1, "expected 1, got %d\n", len); + ok(len == 1, "expected 1, got %ld\n", len); len = pCertGetNameStringA(context, 0, 0, NULL, NULL, 0); - ok(len == 1, "expected 1, got %d\n", len); + ok(len == 1, "expected 1, got %ld\n", len); len = pCertGetNameStringA(context, CERT_NAME_URL_TYPE, 0, NULL, NULL, 0); - ok(len == 1, "expected 1, got %d\n", len); + ok(len == 1, "expected 1, got %ld\n", len);
len = pCertGetNameStringA(context, CERT_NAME_EMAIL_TYPE, 0, NULL, NULL, 0); - ok(len == strlen(aric) + 1, "unexpected length %d\n", len); + ok(len == strlen(aric) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -945,7 +945,7 @@ static void test_CertGetNameStringA(void)
len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, NULL, NULL, 0); - ok(len == strlen(issuerStr) + 1, "unexpected length %d\n", len); + ok(len == strlen(issuerStr) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -957,7 +957,7 @@ static void test_CertGetNameStringA(void) type = 0; len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, &type, NULL, 0); - ok(len == strlen(issuerStr) + 1, "unexpected length %d\n", len); + ok(len == strlen(issuerStr) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -969,7 +969,7 @@ static void test_CertGetNameStringA(void) type = CERT_OID_NAME_STR; len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, &type, NULL, 0); - ok(len == strlen(subjectStr) + 1, "unexpected length %d\n", len); + ok(len == strlen(subjectStr) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -981,7 +981,7 @@ static void test_CertGetNameStringA(void)
len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0, NULL, NULL, 0); - ok(len == strlen(aric) + 1, "unexpected length %d\n", len); + ok(len == strlen(aric) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -992,7 +992,7 @@ static void test_CertGetNameStringA(void) } len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0, (void *)szOID_RSA_emailAddr, NULL, 0); - ok(len == strlen(aric) + 1, "unexpected length %d\n", len); + ok(len == strlen(aric) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -1003,7 +1003,7 @@ static void test_CertGetNameStringA(void) } len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0, (void *)szOID_COMMON_NAME, NULL, 0); - ok(len == strlen(localhost) + 1, "unexpected length %d\n", len); + ok(len == strlen(localhost) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -1015,7 +1015,7 @@ static void test_CertGetNameStringA(void)
len = pCertGetNameStringA(context, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, NULL, 0); - ok(len == strlen(localhost) + 1, "unexpected length %d\n", len); + ok(len == strlen(localhost) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -1027,7 +1027,7 @@ static void test_CertGetNameStringA(void)
len = pCertGetNameStringA(context, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, NULL, 0); - ok(len == strlen(localhost) + 1, "unexpected length %d\n", len); + ok(len == strlen(localhost) + 1, "unexpected length %ld\n", len); str = HeapAlloc(GetProcessHeap(), 0, len); if (str) { @@ -1040,7 +1040,7 @@ static void test_CertGetNameStringA(void) len = pCertGetNameStringA(context, CERT_NAME_DNS_TYPE, 0, NULL, NULL, 0); ok(len == strlen(localhost) + 1 || broken(len == 1) /* NT4 */, - "unexpected length %d\n", len); + "unexpected length %ld\n", len); if (len > 1) { str = HeapAlloc(GetProcessHeap(), 0, len);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109053
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 error: patch failed: dlls/credui/tests/Makefile.in:1 error: patch failed: dlls/credui/tests/credui.c:50 error: patch failed: dlls/crypt32/tests/Makefile.in:1 error: patch failed: dlls/crypt32/tests/base64.c:115 error: patch failed: dlls/crypt32/tests/cert.c:148 error: patch failed: dlls/crypt32/tests/chain.c:97 error: patch failed: dlls/crypt32/tests/crl.c:96 error: patch failed: dlls/crypt32/tests/ctl.c:114 error: patch failed: dlls/crypt32/tests/encode.c:110 error: patch failed: dlls/crypt32/tests/main.c:42 error: patch failed: dlls/crypt32/tests/message.c:53 error: patch failed: dlls/crypt32/tests/msg.c:49 error: patch failed: dlls/crypt32/tests/object.c:134 error: patch failed: dlls/crypt32/tests/oid.c:105 error: patch failed: dlls/crypt32/tests/protectdata.c:55 error: patch failed: dlls/crypt32/tests/sip.c:49 error: patch failed: dlls/crypt32/tests/store.c:136 error: patch failed: dlls/crypt32/tests/str.c:256 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 error: patch failed: dlls/credui/tests/Makefile.in:1 error: patch failed: dlls/credui/tests/credui.c:50 error: patch failed: dlls/crypt32/tests/Makefile.in:1 error: patch failed: dlls/crypt32/tests/base64.c:115 error: patch failed: dlls/crypt32/tests/cert.c:148 error: patch failed: dlls/crypt32/tests/chain.c:97 error: patch failed: dlls/crypt32/tests/crl.c:96 error: patch failed: dlls/crypt32/tests/ctl.c:114 error: patch failed: dlls/crypt32/tests/encode.c:110 error: patch failed: dlls/crypt32/tests/main.c:42 error: patch failed: dlls/crypt32/tests/message.c:53 error: patch failed: dlls/crypt32/tests/msg.c:49 error: patch failed: dlls/crypt32/tests/object.c:134 error: patch failed: dlls/crypt32/tests/oid.c:105 error: patch failed: dlls/crypt32/tests/protectdata.c:55 error: patch failed: dlls/crypt32/tests/sip.c:49 error: patch failed: dlls/crypt32/tests/store.c:136 error: patch failed: dlls/crypt32/tests/str.c:256 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/cryptnet/tests/Makefile.in | 1 dlls/cryptnet/tests/cryptnet.c | 228 ++++++++++++++++++++------------------- 2 files changed, 114 insertions(+), 115 deletions(-)
diff --git a/dlls/cryptnet/tests/Makefile.in b/dlls/cryptnet/tests/Makefile.in index c2e80bd5478..b2b27717678 100644 --- a/dlls/cryptnet/tests/Makefile.in +++ b/dlls/cryptnet/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = cryptnet.dll IMPORTS = cryptnet crypt32
diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c index b545cf880ee..7649f67c574 100644 --- a/dlls/cryptnet/tests/cryptnet.c +++ b/dlls/cryptnet/tests/cryptnet.c @@ -87,7 +87,7 @@ static const BYTE certWithAIAWithCAIssuers[] = { static void compareUrlArray(const CRYPT_URL_ARRAY *expected, const CRYPT_URL_ARRAY *got) { - ok(expected->cUrl == got->cUrl, "Expected %d URLs, got %d\n", + ok(expected->cUrl == got->cUrl, "Expected %ld URLs, got %ld\n", expected->cUrl, got->cUrl); if (expected->cUrl == got->cUrl) { @@ -95,7 +95,7 @@ static void compareUrlArray(const CRYPT_URL_ARRAY *expected,
for (i = 0; i < got->cUrl; i++) ok(!lstrcmpiW(expected->rgwszUrl[i], got->rgwszUrl[i]), - "%d: unexpected URL\n", i); + "%ld: unexpected URL\n", i); } }
@@ -110,7 +110,7 @@ static void test_getObjectUrl(void) SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); /* Crash ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, NULL, 0, NULL, NULL, NULL, NULL, NULL); @@ -126,7 +126,7 @@ static void test_getObjectUrl(void) ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); CertFreeCertificateContext(cert);
cert = CertCreateCertificateContext(X509_ASN_ENCODING, @@ -138,17 +138,17 @@ static void test_getObjectUrl(void) ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* It does have an issuing dist point extension, but that's not what * this is looking for (it wants a CRL dist points extension) */ @@ -156,19 +156,19 @@ static void test_getObjectUrl(void) ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, 0, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); CertFreeCertificateContext(cert); } cert = CertCreateCertificateContext(X509_ASN_ENCODING, @@ -182,38 +182,38 @@ static void test_getObjectUrl(void) ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); /* It does have a CRL dist points extension */ SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, 0, NULL, NULL, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, 0, NULL, NULL, NULL, &infoSize, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + "Expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Can get it without specifying the location: */ ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, 0, NULL, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); + ok(ret, "CryptGetObjectUrl failed: %08lx\n", GetLastError()); urlArray = HeapAlloc(GetProcessHeap(), 0, urlArraySize); if (urlArray) { ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, 0, urlArray, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); + ok(ret, "CryptGetObjectUrl failed: %08lx\n", GetLastError()); if (ret) { LPWSTR pUrl = url; @@ -227,14 +227,14 @@ static void test_getObjectUrl(void) ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, NULL, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); + ok(ret, "CryptGetObjectUrl failed: %08lx\n", GetLastError()); urlArray = HeapAlloc(GetProcessHeap(), 0, urlArraySize); if (urlArray) { ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, urlArray, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); + ok(ret, "CryptGetObjectUrl failed: %08lx\n", GetLastError()); if (ret) { LPWSTR pUrl = url; @@ -250,7 +250,7 @@ static void test_getObjectUrl(void) (void *)cert, CRYPT_GET_URL_FROM_PROPERTY, NULL, &urlArraySize, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "Expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); CertFreeCertificateContext(cert); } cert = CertCreateCertificateContext(X509_ASN_ENCODING, @@ -264,7 +264,7 @@ static void test_getObjectUrl(void) */ ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0, NULL, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); + ok(ret, "CryptGetObjectUrl failed: %08lx\n", GetLastError()); if (ret) { urlArray = HeapAlloc(GetProcessHeap(), 0, urlArraySize); @@ -273,7 +273,7 @@ static void test_getObjectUrl(void) ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, urlArray, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); + ok(ret, "CryptGetObjectUrl failed: %08lx\n", GetLastError()); if (ret) { LPWSTR pUrl = url; @@ -289,7 +289,7 @@ static void test_getObjectUrl(void) ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, 0, NULL, &urlArraySize, NULL, NULL, NULL); ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + "expected CRYPT_E_NOT_FOUND, got %08lx\n", GetLastError()); CertFreeCertificateContext(cert); } } @@ -327,7 +327,7 @@ static void test_retrieveObjectByUrl(void) ret = CryptRetrieveObjectByUrlA(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL); ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == E_INVALIDARG), - "got 0x%x/%u (expected ERROR_INVALID_PARAMETER or E_INVALIDARG)\n", + "got 0x%lx/%lu (expected ERROR_INVALID_PARAMETER or E_INVALIDARG)\n", GetLastError(), GetLastError());
make_tmp_file(tmpfile); @@ -342,21 +342,21 @@ static void test_retrieveObjectByUrl(void) win_skip("File URLs not supported\n"); return; } - ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError()); + ok(ret, "CryptRetrieveObjectByUrlA failed: %ld\n", GetLastError()); ok(pBlobArray && pBlobArray != (CRYPT_BLOB_ARRAY *)0xdeadbeef, "Expected a valid pointer\n"); if (pBlobArray && pBlobArray != (CRYPT_BLOB_ARRAY *)0xdeadbeef) { - ok(pBlobArray->cBlob == 1, "Expected 1 blob, got %d\n", + ok(pBlobArray->cBlob == 1, "Expected 1 blob, got %ld\n", pBlobArray->cBlob); ok(pBlobArray->rgBlob[0].cbData == sizeof(certWithCRLDistPoint), - "Unexpected size %d\n", pBlobArray->rgBlob[0].cbData); + "Unexpected size %ld\n", pBlobArray->rgBlob[0].cbData); CryptMemFree(pBlobArray); } cert = (PCCERT_CONTEXT)0xdeadbeef; ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, (void **)&cert, NULL, NULL, NULL, NULL); - ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError()); + ok(ret, "CryptRetrieveObjectByUrlA failed: %ld\n", GetLastError()); ok(cert && cert != (PCCERT_CONTEXT)0xdeadbeef, "Expected a cert\n"); if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef) CertFreeCertificateContext(cert); @@ -370,7 +370,7 @@ static void test_retrieveObjectByUrl(void) ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH || broken(GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR)), - "got 0x%x/%u (expected CRYPT_E_NO_MATCH)\n", GetLastError(), GetLastError()); + "got 0x%lx/%lu (expected CRYPT_E_NO_MATCH)\n", GetLastError(), GetLastError());
/* only newer versions of cryptnet do the cleanup */ if(!ret && GetLastError() != CRYPT_E_ASN1_BADTAG && @@ -383,7 +383,7 @@ static void test_retrieveObjectByUrl(void) store = (HCERTSTORE)0xdeadbeef; ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CAPI2_ANY, 0, 0, &store, NULL, NULL, NULL, NULL); - ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError()); + ok(ret, "CryptRetrieveObjectByUrlA failed: %ld\n", GetLastError()); if (store && store != (HCERTSTORE)0xdeadbeef) { DWORD certs = 0; @@ -394,14 +394,14 @@ static void test_retrieveObjectByUrl(void) if (cert) certs++; } while (cert); - ok(certs == 1, "Expected 1 cert, got %d\n", certs); + ok(certs == 1, "Expected 1 cert, got %ld\n", certs); CertCloseStore(store, 0); } /* Are file URLs cached? */ cert = (PCCERT_CONTEXT)0xdeadbeef; ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, CRYPT_CACHE_ONLY_RETRIEVAL, 0, (void **)&cert, NULL, NULL, NULL, NULL); - ok(ret, "CryptRetrieveObjectByUrlA failed: %08x\n", GetLastError()); + ok(ret, "CryptRetrieveObjectByUrlA failed: %08lx\n", GetLastError()); if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef) CertFreeCertificateContext(cert);
@@ -410,7 +410,7 @@ static void test_retrieveObjectByUrl(void) (void **)&cert, NULL, NULL, NULL, &aux); /* w2k: failure with E_INVALIDARG */ ok(ret || broken(GetLastError() == E_INVALIDARG), - "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n", + "got %u with 0x%lx/%lu (expected '!=0' or '0' with E_INVALIDARG)\n", ret, GetLastError(), GetLastError()); if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef) CertFreeCertificateContext(cert); @@ -421,7 +421,7 @@ static void test_retrieveObjectByUrl(void) (void **)&cert, NULL, NULL, NULL, &aux); /* w2k: failure with E_INVALIDARG */ ok(ret || broken(GetLastError() == E_INVALIDARG), - "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n", + "got %u with 0x%lx/%lu (expected '!=0' or '0' with E_INVALIDARG)\n", ret, GetLastError(), GetLastError()); if (!ret) { /* no more tests useful */ @@ -434,7 +434,7 @@ static void test_retrieveObjectByUrl(void) aux.pLastSyncTime = &ft; ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, (void **)&cert, NULL, NULL, NULL, &aux); - ok(ret, "CryptRetrieveObjectByUrlA failed: %08x\n", GetLastError()); + ok(ret, "CryptRetrieveObjectByUrlA failed: %08lx\n", GetLastError()); CertFreeCertificateContext(cert); ok(ft.dwLowDateTime || ft.dwHighDateTime, "Expected last sync time to be set\n"); @@ -445,7 +445,7 @@ static void test_retrieveObjectByUrl(void) CRYPT_CACHE_ONLY_RETRIEVAL, 0, (void **)&cert, NULL, NULL, NULL, NULL); ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_PATH_NOT_FOUND), - "Expected ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, got %d\n", + "Expected ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError()); }
@@ -612,30 +612,30 @@ static void test_verifyRevocation(void) status.cbSize = sizeof(status); ret = pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == E_INVALIDARG, "got error %#x\n", GetLastError()); - todo_wine ok(!status.dwIndex, "got index %u\n", status.dwIndex); - todo_wine ok(status.dwError == E_INVALIDARG, "got error %#x\n", status.dwError); - todo_wine ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == E_INVALIDARG, "got error %#lx\n", GetLastError()); + todo_wine ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + todo_wine ok(status.dwError == E_INVALIDARG, "got error %#lx\n", status.dwError); + todo_wine ok(!status.dwReason, "got reason %lu\n", status.dwReason);
SetLastError(0xdeadbeef); memset(&status, 0xcc, sizeof(status)); status.cbSize = sizeof(status); ret = pCertVerifyRevocation(X509_ASN_ENCODING, 0, 0, NULL, 0, NULL, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == E_INVALIDARG, "got error %#x\n", GetLastError()); - todo_wine ok(!status.dwIndex, "got index %u\n", status.dwIndex); - todo_wine ok(status.dwError == E_INVALIDARG, "got error %#x\n", status.dwError); - todo_wine ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == E_INVALIDARG, "got error %#lx\n", GetLastError()); + todo_wine ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + todo_wine ok(status.dwError == E_INVALIDARG, "got error %#lx\n", status.dwError); + todo_wine ok(!status.dwReason, "got reason %lu\n", status.dwReason);
SetLastError(0xdeadbeef); memset(&status, 0xcc, sizeof(status)); status.cbSize = sizeof(status); ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 0, NULL, 0, NULL, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == E_INVALIDARG, "got error %#x\n", GetLastError()); - todo_wine ok(!status.dwIndex, "got index %u\n", status.dwIndex); - todo_wine ok(status.dwError == E_INVALIDARG, "got error %#x\n", status.dwError); - todo_wine ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == E_INVALIDARG, "got error %#lx\n", GetLastError()); + todo_wine ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + todo_wine ok(status.dwError == E_INVALIDARG, "got error %#lx\n", status.dwError); + todo_wine ok(!status.dwReason, "got reason %lu\n", status.dwReason);
certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert));
@@ -644,10 +644,10 @@ static void test_verifyRevocation(void) status.cbSize = sizeof(status); ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)certs, 0, NULL, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
CertFreeCertificateContext(certs[0]);
@@ -660,10 +660,10 @@ static void test_verifyRevocation(void) status.cbSize = sizeof(status); ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[0], 0, NULL, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
/* Neither can the end cert */ SetLastError(0xdeadbeef); @@ -671,10 +671,10 @@ static void test_verifyRevocation(void) status.cbSize = sizeof(status); ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, NULL, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
/* Both certs together can't, either (they're not CRLs) */ SetLastError(0xdeadbeef); @@ -682,17 +682,17 @@ static void test_verifyRevocation(void) status.cbSize = sizeof(status); ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 2, (void **)certs, 0, NULL, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
/* Test with an invalid CRL */
params.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); ret = CertAddEncodedCRLToStore(params.hCrlStore, X509_ASN_ENCODING, rootSignedCRLWithBadAKI, sizeof(rootSignedCRLWithBadAKI), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "failed to add CRL, error %u\n", GetLastError()); + ok(ret, "failed to add CRL, error %lu\n", GetLastError());
SetLastError(0xdeadbeef); memset(&status, 0xcc, sizeof(status)); @@ -700,10 +700,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 2, (void **)certs, 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
/* Specifying CERT_VERIFY_REV_CHAIN_FLAG doesn't change things either */ SetLastError(0xdeadbeef); @@ -712,10 +712,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 2, (void **)certs, CERT_VERIFY_REV_CHAIN_FLAG, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
/* Again, specifying the issuer cert: no change */ params.pIssuerCert = certs[0]; @@ -725,10 +725,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
/* Specifying the time to check: still no change */ SystemTimeToFileTime(&oct2007, &time); @@ -740,10 +740,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
CertCloseStore(params.hCrlStore, 0);
@@ -755,7 +755,7 @@ static void test_verifyRevocation(void) params.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); ret = CertAddEncodedCRLToStore(params.hCrlStore, X509_ASN_ENCODING, rootSignedCRL, sizeof(rootSignedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "failed to add CRL, error %u\n", GetLastError()); + ok(ret, "failed to add CRL, error %lu\n", GetLastError());
params.pftTimeToUse = NULL;
@@ -765,10 +765,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_REVOKED, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_REVOKED, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_REVOKED, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_REVOKED, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
SystemTimeToFileTime(&oct2007, &time); params.pftTimeToUse = &time; @@ -778,10 +778,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_REVOKED, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_REVOKED, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_REVOKED, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_REVOKED, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
SystemTimeToFileTime(&may2007, &time); SetLastError(0xdeadbeef); @@ -790,10 +790,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_REVOCATION_OFFLINE, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_REVOCATION_OFFLINE, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_REVOCATION_OFFLINE, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_REVOCATION_OFFLINE, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
CertFreeCertificateContext(certs[1]);
@@ -809,10 +809,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_REVOCATION_OFFLINE, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_REVOCATION_OFFLINE, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_REVOCATION_OFFLINE, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_REVOCATION_OFFLINE, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
SystemTimeToFileTime(&oct2007, &time); params.pftTimeToUse = &time; @@ -822,10 +822,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_REVOCATION_OFFLINE, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_REVOCATION_OFFLINE, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_REVOCATION_OFFLINE, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_REVOCATION_OFFLINE, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
SystemTimeToFileTime(&may2007, &time); SetLastError(0xdeadbeef); @@ -834,10 +834,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_REVOCATION_OFFLINE, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_REVOCATION_OFFLINE, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_REVOCATION_OFFLINE, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_REVOCATION_OFFLINE, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
params.pftTimeToUse = NULL;
@@ -848,10 +848,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - todo_wine ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + todo_wine ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + todo_wine ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
/* Test with the wrong context type. */ SetLastError(0xdeadbeef); @@ -860,10 +860,10 @@ static void test_verifyRevocation(void) ret = pCertVerifyRevocation(X509_ASN_ENCODING, 0xdeadbeef, 1, (void **)&certs[1], 0, ¶ms, &status); ok(!ret, "expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", GetLastError()); - ok(!status.dwIndex, "got index %u\n", status.dwIndex); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#x\n", status.dwError); - ok(!status.dwReason, "got reason %u\n", status.dwReason); + ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", GetLastError()); + ok(!status.dwIndex, "got index %lu\n", status.dwIndex); + ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, "got error %#lx\n", status.dwError); + ok(!status.dwReason, "got reason %lu\n", status.dwReason);
CertCloseStore(params.hCrlStore, 0); CertFreeCertificateContext(certs[1]);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109054
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 error: patch failed: dlls/credui/tests/Makefile.in:1 error: patch failed: dlls/credui/tests/credui.c:50 error: patch failed: dlls/crypt32/tests/Makefile.in:1 error: patch failed: dlls/crypt32/tests/base64.c:115 error: patch failed: dlls/crypt32/tests/cert.c:148 error: patch failed: dlls/crypt32/tests/chain.c:97 error: patch failed: dlls/crypt32/tests/crl.c:96 error: patch failed: dlls/crypt32/tests/ctl.c:114 error: patch failed: dlls/crypt32/tests/encode.c:110 error: patch failed: dlls/crypt32/tests/main.c:42 error: patch failed: dlls/crypt32/tests/message.c:53 error: patch failed: dlls/crypt32/tests/msg.c:49 error: patch failed: dlls/crypt32/tests/object.c:134 error: patch failed: dlls/crypt32/tests/oid.c:105 error: patch failed: dlls/crypt32/tests/protectdata.c:55 error: patch failed: dlls/crypt32/tests/sip.c:49 error: patch failed: dlls/crypt32/tests/store.c:136 error: patch failed: dlls/crypt32/tests/str.c:256 error: patch failed: dlls/cryptnet/tests/Makefile.in:1 error: patch failed: dlls/cryptnet/tests/cryptnet.c:87 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 error: patch failed: dlls/credui/tests/Makefile.in:1 error: patch failed: dlls/credui/tests/credui.c:50 error: patch failed: dlls/crypt32/tests/Makefile.in:1 error: patch failed: dlls/crypt32/tests/base64.c:115 error: patch failed: dlls/crypt32/tests/cert.c:148 error: patch failed: dlls/crypt32/tests/chain.c:97 error: patch failed: dlls/crypt32/tests/crl.c:96 error: patch failed: dlls/crypt32/tests/ctl.c:114 error: patch failed: dlls/crypt32/tests/encode.c:110 error: patch failed: dlls/crypt32/tests/main.c:42 error: patch failed: dlls/crypt32/tests/message.c:53 error: patch failed: dlls/crypt32/tests/msg.c:49 error: patch failed: dlls/crypt32/tests/object.c:134 error: patch failed: dlls/crypt32/tests/oid.c:105 error: patch failed: dlls/crypt32/tests/protectdata.c:55 error: patch failed: dlls/crypt32/tests/sip.c:49 error: patch failed: dlls/crypt32/tests/store.c:136 error: patch failed: dlls/crypt32/tests/str.c:256 error: patch failed: dlls/cryptnet/tests/Makefile.in:1 error: patch failed: dlls/cryptnet/tests/cryptnet.c:87 Task: Patch failed to apply
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/cryptui/tests/Makefile.in | 1 - dlls/cryptui/tests/cryptui.c | 54 ++++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 28 deletions(-)
diff --git a/dlls/cryptui/tests/Makefile.in b/dlls/cryptui/tests/Makefile.in index 5fc63e0e4a5..27dbbd8b140 100644 --- a/dlls/cryptui/tests/Makefile.in +++ b/dlls/cryptui/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = cryptui.dll IMPORTS = cryptui crypt32 user32
diff --git a/dlls/cryptui/tests/cryptui.c b/dlls/cryptui/tests/cryptui.c index ea43f01962b..111115a16ce 100644 --- a/dlls/cryptui/tests/cryptui.c +++ b/dlls/cryptui/tests/cryptui.c @@ -349,27 +349,27 @@ static void test_crypt_ui_wiz_import(void) SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, NULL, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); memset(&info, 0, sizeof(info)); SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); info.dwSize = sizeof(info); SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); info.dwSubjectChoice = CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_CONTEXT; SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, 0, NULL, &info, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); /* Check allowed vs. given type mismatches */ info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey)); @@ -377,7 +377,7 @@ static void test_crypt_ui_wiz_import(void) ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, 0, NULL, &info, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); CertFreeCertificateContext(info.u.pCertContext); info.dwSubjectChoice = CRYPTUI_WIZ_IMPORT_SUBJECT_CRL_CONTEXT; info.u.pCRLContext = CertCreateCRLContext(X509_ASN_ENCODING, @@ -386,7 +386,7 @@ static void test_crypt_ui_wiz_import(void) ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, 0, NULL, &info, NULL); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); CertFreeCRLContext(info.u.pCRLContext); /* Imports the following cert--self-signed, with no basic constraints set-- * to the CA store. Puts up a dialog at the end if it succeeds or fails. @@ -395,7 +395,7 @@ static void test_crypt_ui_wiz_import(void) info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey)); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); if (ret) { HCERTSTORE ca = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, @@ -418,7 +418,7 @@ static void test_crypt_ui_wiz_import(void) info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, iTunesCert3, sizeof(iTunesCert3)); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); if (ret) { HCERTSTORE addressBook = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, @@ -442,7 +442,7 @@ static void test_crypt_ui_wiz_import(void) { ret = pCryptUIWizImport(CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); } store = CertOpenStore(CERT_STORE_PROV_MEMORY, X509_ASN_ENCODING, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); @@ -455,11 +455,11 @@ static void test_crypt_ui_wiz_import(void) { ret = pCryptUIWizImport(CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE, 0, NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); } ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE, 0, NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); ret = find_and_delete_cert_in_store(store, info.u.pCertContext); ok(ret || broken(!ret) /* Win9x/NT4 */, @@ -470,7 +470,7 @@ static void test_crypt_ui_wiz_import(void) info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, iTunesCert1, sizeof(iTunesCert1)); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); if (ret) { HCERTSTORE addressBook = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, @@ -491,7 +491,7 @@ static void test_crypt_ui_wiz_import(void) info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, iTunesCert2, sizeof(iTunesCert2)); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); if (ret) { HCERTSTORE ca = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, @@ -525,18 +525,18 @@ static void test_crypt_ui_wiz_import(void) ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, 0, NULL, &info, store); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, 0, NULL, &info, store); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE | CRYPTUI_WIZ_IMPORT_ALLOW_CERT | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, 0, NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); if (ret) { count = 0; @@ -546,7 +546,7 @@ static void test_crypt_ui_wiz_import(void) if (cert) count++; } while (cert); - ok(count == 1, "expected 1 cert, got %d\n", count); + ok(count == 1, "expected 1 cert, got %ld\n", count); count = 0; crl = NULL; do { @@ -554,7 +554,7 @@ static void test_crypt_ui_wiz_import(void) if (crl) count++; } while (crl); - ok(count == 1, "expected 1 CRL, got %d\n", count); + ok(count == 1, "expected 1 CRL, got %ld\n", count); } CertCloseStore(store, 0); CertCloseStore(info.u.hCertStore, 0); @@ -572,7 +572,7 @@ static void test_crypt_ui_wiz_import(void) SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, 0, NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); if (ret) { count = 0; @@ -582,7 +582,7 @@ static void test_crypt_ui_wiz_import(void) if (cert) count++; } while (cert); - ok(count == 1, "expected 1 cert, got %d\n", count); + ok(count == 1, "expected 1 cert, got %ld\n", count); count = 0; crl = NULL; do { @@ -590,13 +590,13 @@ static void test_crypt_ui_wiz_import(void) if (crl) count++; } while (crl); - ok(count == 0, "expected 0 CRLs, got %d\n", count); + ok(count == 0, "expected 0 CRLs, got %ld\n", count); } SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, 0, NULL, &info, store); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); CertCloseStore(store, 0); CertCloseStore(info.u.hCertStore, 0);
@@ -612,7 +612,7 @@ static void test_crypt_ui_wiz_import(void) SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, 0, NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); + ok(ret, "CryptUIWizImport failed: %08lx\n", GetLastError()); if (ret) { count = 0; @@ -622,7 +622,7 @@ static void test_crypt_ui_wiz_import(void) if (cert) count++; } while (cert); - ok(count == 0, "expected 0 certs, got %d\n", count); + ok(count == 0, "expected 0 certs, got %ld\n", count); count = 0; crl = NULL; do { @@ -630,13 +630,13 @@ static void test_crypt_ui_wiz_import(void) if (crl) count++; } while (crl); - ok(count == 1, "expected 1 CRL, got %d\n", count); + ok(count == 1, "expected 1 CRL, got %ld\n", count); } SetLastError(0xdeadbeef); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, 0, NULL, &info, store); ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + "expected E_INVALIDARG, got %08lx\n", GetLastError()); CertCloseStore(store, 0); CertCloseStore(info.u.hCertStore, 0);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109055
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 error: patch failed: dlls/credui/tests/Makefile.in:1 error: patch failed: dlls/credui/tests/credui.c:50 error: patch failed: dlls/crypt32/tests/Makefile.in:1 error: patch failed: dlls/crypt32/tests/base64.c:115 error: patch failed: dlls/crypt32/tests/cert.c:148 error: patch failed: dlls/crypt32/tests/chain.c:97 error: patch failed: dlls/crypt32/tests/crl.c:96 error: patch failed: dlls/crypt32/tests/ctl.c:114 error: patch failed: dlls/crypt32/tests/encode.c:110 error: patch failed: dlls/crypt32/tests/main.c:42 error: patch failed: dlls/crypt32/tests/message.c:53 error: patch failed: dlls/crypt32/tests/msg.c:49 error: patch failed: dlls/crypt32/tests/object.c:134 error: patch failed: dlls/crypt32/tests/oid.c:105 error: patch failed: dlls/crypt32/tests/protectdata.c:55 error: patch failed: dlls/crypt32/tests/sip.c:49 error: patch failed: dlls/crypt32/tests/store.c:136 error: patch failed: dlls/crypt32/tests/str.c:256 error: patch failed: dlls/cryptnet/tests/Makefile.in:1 error: patch failed: dlls/cryptnet/tests/cryptnet.c:87 error: patch failed: dlls/cryptui/tests/Makefile.in:1 error: patch failed: dlls/cryptui/tests/cryptui.c:349 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/oleacc/Makefile.in:1 error: patch failed: dlls/oleacc/client.c:129 error: patch failed: dlls/oleacc/main.c:84 error: patch failed: dlls/oleacc/propservice.c:57 error: patch failed: dlls/oleacc/window.c:70 error: patch failed: dlls/wsdapi/Makefile.in:1 error: patch failed: dlls/wsdapi/address.c:78 error: patch failed: dlls/wsdapi/discovery.c:69 error: patch failed: dlls/wsdapi/memory.c:82 error: patch failed: dlls/wsdapi/msgparams.c:58 error: patch failed: dlls/wsdapi/network.c:116 error: patch failed: dlls/wsdapi/xml.c:466 error: patch failed: dlls/wsock32/Makefile.in:1 error: patch failed: dlls/wsock32/service.c:36 error: patch failed: dlls/wsock32/socket.c:250 error: patch failed: dlls/wtsapi32/Makefile.in:1 error: patch failed: dlls/wtsapi32/wtsapi32.c:44 error: patch failed: dlls/winemapi/Makefile.in:1 error: patch failed: dlls/winemapi/main.c:64 error: patch failed: dlls/winemapi/sendmail.c:101 error: patch failed: dlls/activeds/tests/Makefile.in:1 error: patch failed: dlls/activeds/tests/activeds.c:41 error: patch failed: dlls/adsldp/tests/Makefile.in:1 error: patch failed: dlls/adsldp/tests/ldap.c:75 error: patch failed: dlls/adsldp/tests/sysinfo.c:48 error: patch failed: dlls/advapi32/tests/Makefile.in:1 error: patch failed: dlls/advapi32/tests/cred.c:51 error: patch failed: dlls/advapi32/tests/crypt.c:72 error: patch failed: dlls/advapi32/tests/eventlog.c:70 error: patch failed: dlls/advapi32/tests/lsa.c:52 error: patch failed: dlls/advapi32/tests/perf.c:64 error: patch failed: dlls/advapi32/tests/registry.c:134 error: patch failed: dlls/advapi32/tests/security.c:126 error: patch failed: dlls/advapi32/tests/service.c:77 error: patch failed: dlls/advpack/tests/Makefile.in:1 error: patch failed: dlls/advpack/tests/advpack.c:99 error: patch failed: dlls/advpack/tests/files.c:111 error: patch failed: dlls/advpack/tests/install.c:84 error: patch failed: dlls/amstream/tests/Makefile.in:1 error: patch failed: dlls/amstream/tests/amstream.c:263 error: patch failed: dlls/apphelp/tests/Makefile.in:1 error: patch failed: dlls/apphelp/tests/apphelp.c:64 error: patch failed: dlls/atl100/tests/Makefile.in:1 error: patch failed: dlls/atl100/tests/atl.c:143 error: patch failed: dlls/atl/tests/Makefile.in:1 error: patch failed: dlls/atl/tests/atl_ax.c:73 error: patch failed: dlls/atl/tests/module.c:70 error: patch failed: dlls/atl/tests/registrar.c:68 error: patch failed: dlls/avifil32/tests/Makefile.in:1 error: patch failed: dlls/avifil32/tests/api.c:186 error: patch failed: dlls/cabinet/tests/Makefile.in:1 error: patch failed: dlls/cabinet/tests/extract.c:379 error: patch failed: dlls/cabinet/tests/fdi.c:190 error: patch failed: dlls/comcat/tests/Makefile.in:1 error: patch failed: dlls/comcat/tests/comcat.c:29 error: patch failed: dlls/comdlg32/tests/Makefile.in:1 error: patch failed: dlls/comdlg32/tests/filedlg.c:50 error: patch failed: dlls/comdlg32/tests/finddlg.c:58 error: patch failed: dlls/comdlg32/tests/fontdlg.c:108 error: patch failed: dlls/comdlg32/tests/itemdlg.c:96 error: patch failed: dlls/comdlg32/tests/printdlg.c:65 error: patch failed: dlls/comsvcs/tests/Makefile.in:1 error: patch failed: dlls/comsvcs/tests/comsvcs.c:63 error: patch failed: dlls/comsvcs/tests/property.c:70 error: patch failed: dlls/credui/tests/Makefile.in:1 error: patch failed: dlls/credui/tests/credui.c:50 error: patch failed: dlls/crypt32/tests/Makefile.in:1 error: patch failed: dlls/crypt32/tests/base64.c:115 error: patch failed: dlls/crypt32/tests/cert.c:148 error: patch failed: dlls/crypt32/tests/chain.c:97 error: patch failed: dlls/crypt32/tests/crl.c:96 error: patch failed: dlls/crypt32/tests/ctl.c:114 error: patch failed: dlls/crypt32/tests/encode.c:110 error: patch failed: dlls/crypt32/tests/main.c:42 error: patch failed: dlls/crypt32/tests/message.c:53 error: patch failed: dlls/crypt32/tests/msg.c:49 error: patch failed: dlls/crypt32/tests/object.c:134 error: patch failed: dlls/crypt32/tests/oid.c:105 error: patch failed: dlls/crypt32/tests/protectdata.c:55 error: patch failed: dlls/crypt32/tests/sip.c:49 error: patch failed: dlls/crypt32/tests/store.c:136 error: patch failed: dlls/crypt32/tests/str.c:256 error: patch failed: dlls/cryptnet/tests/Makefile.in:1 error: patch failed: dlls/cryptnet/tests/cryptnet.c:87 error: patch failed: dlls/cryptui/tests/Makefile.in:1 error: patch failed: dlls/cryptui/tests/cryptui.c:349 Task: Patch failed to apply