Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2022
- 87 participants
- 926 discussions
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/ole32/Makefile.in | 2 +-
dlls/ole32/antimoniker.c | 11 +--
dlls/ole32/bindctx.c | 10 +--
dlls/ole32/classmoniker.c | 18 ++--
dlls/ole32/clipboard.c | 44 ++++-----
dlls/ole32/comcat.c | 6 +-
dlls/ole32/compobj.c | 8 +-
dlls/ole32/compositemoniker.c | 44 ++++-----
dlls/ole32/datacache.c | 25 +++---
dlls/ole32/defaulthandler.c | 37 ++++----
dlls/ole32/filelockbytes.c | 12 +--
dlls/ole32/filemoniker.c | 6 +-
dlls/ole32/git.c | 14 +--
dlls/ole32/itemmoniker.c | 18 ++--
dlls/ole32/memlockbytes.c | 6 +-
dlls/ole32/moniker.c | 28 +++---
dlls/ole32/ole2.c | 52 +++++------
dlls/ole32/ole2stubs.c | 4 +-
dlls/ole32/oleobj.c | 33 +++----
dlls/ole32/pointermoniker.c | 32 +++----
dlls/ole32/stg_prop.c | 104 +++++++++++-----------
dlls/ole32/stg_stream.c | 26 +++---
dlls/ole32/storage32.c | 162 ++++++++++++++++------------------
dlls/ole32/usrmarshal.c | 89 +++++++++----------
24 files changed, 375 insertions(+), 416 deletions(-)
diff --git a/dlls/ole32/Makefile.in b/dlls/ole32/Makefile.in
index e0e4bc74c1f..340ffdbded2 100644
--- a/dlls/ole32/Makefile.in
+++ b/dlls/ole32/Makefile.in
@@ -2,7 +2,7 @@ MODULE = ole32.dll
IMPORTLIB = ole32
IMPORTS = uuid advapi32 user32 gdi32 combase rpcrt4 kernelbase
DELAYIMPORTS = oleaut32
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_OLE32_
+EXTRADEFS = -D_OLE32_
C_SRCS = \
antimoniker.c \
diff --git a/dlls/ole32/antimoniker.c b/dlls/ole32/antimoniker.c
index 28c4dd91ac5..2a7be8e75cc 100644
--- a/dlls/ole32/antimoniker.c
+++ b/dlls/ole32/antimoniker.c
@@ -122,7 +122,7 @@ static ULONG WINAPI AntiMonikerImpl_AddRef(IMoniker *iface)
AntiMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -135,7 +135,7 @@ static ULONG WINAPI AntiMonikerImpl_Release(IMoniker *iface)
AntiMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -261,14 +261,11 @@ AntiMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
return E_NOTIMPL;
}
-/******************************************************************************
- * AntiMoniker_Reduce
- ******************************************************************************/
static HRESULT WINAPI
AntiMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar,
IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -556,7 +553,7 @@ AntiMonikerROTDataImpl_GetComparisonData(IROTData *iface, BYTE *data, ULONG data
{
AntiMonikerImpl *moniker = impl_from_IROTData(iface);
- TRACE("%p, %p, %u, %p.\n", iface, data, data_len, data_req);
+ TRACE("%p, %p, %lu, %p.\n", iface, data, data_len, data_req);
*data_req = sizeof(CLSID) + sizeof(DWORD);
if (data_len < *data_req)
diff --git a/dlls/ole32/bindctx.c b/dlls/ole32/bindctx.c
index 261c6b01c67..360464d13c5 100644
--- a/dlls/ole32/bindctx.c
+++ b/dlls/ole32/bindctx.c
@@ -118,7 +118,7 @@ static ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface)
BindCtxImpl *context = impl_from_IBindCtx(iface);
ULONG refcount = InterlockedDecrement(&context->ref);
- TRACE("%p refcount %d.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -234,7 +234,7 @@ BindCtxImpl_SetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts)
if (pbindopts->cbStruct > sizeof(This->options))
{
- WARN("invalid size %u.\n", pbindopts->cbStruct);
+ WARN("invalid size %lu.\n", pbindopts->cbStruct);
return E_INVALIDARG;
}
memcpy(&This->options, pbindopts, pbindopts->cbStruct);
@@ -492,7 +492,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
{
BindCtxImpl *object;
- TRACE("%#x, %p\n", reserved, bind_context);
+ TRACE("%#lx, %p.\n", reserved, bind_context);
if (!bind_context) return E_INVALIDARG;
@@ -500,7 +500,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
if (reserved)
{
- WARN("reserved should be 0, not 0x%x\n", reserved);
+ WARN("reserved should be 0, not %#lx.\n", reserved);
return E_INVALIDARG;
}
@@ -539,7 +539,7 @@ HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID riid, LPVOID * pp
HRESULT res;
IBindCtx * pbc;
- TRACE("(%p, %x, %s, %p)\n", pmk, grfOpt, debugstr_guid(riid), ppvResult);
+ TRACE("%p, %lx, %s, %p.\n", pmk, grfOpt, debugstr_guid(riid), ppvResult);
res = CreateBindCtx(grfOpt, &pbc);
if (SUCCEEDED(res))
diff --git a/dlls/ole32/classmoniker.c b/dlls/ole32/classmoniker.c
index 8fe60c6ba71..6199a5a5182 100644
--- a/dlls/ole32/classmoniker.c
+++ b/dlls/ole32/classmoniker.c
@@ -133,7 +133,7 @@ static ULONG WINAPI ClassMoniker_Release(IMoniker* iface)
ClassMoniker *moniker = impl_from_IMoniker(iface);
ULONG ref = InterlockedDecrement(&moniker->ref);
- TRACE("%p refcount %d\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -190,7 +190,7 @@ static HRESULT WINAPI ClassMoniker_Load(IMoniker *iface, IStream *stream)
heap_free(moniker->data);
if (!(moniker->data = heap_alloc(moniker->header.data_len)))
{
- WARN("Failed to allocate moniker data of size %u.\n", moniker->header.data_len);
+ WARN("Failed to allocate moniker data of size %lu.\n", moniker->header.data_len);
moniker->header.data_len = 0;
return E_OUTOFMEMORY;
}
@@ -278,16 +278,10 @@ static HRESULT WINAPI ClassMoniker_BindToStorage(IMoniker* iface,
return IMoniker_BindToObject(iface, pbc, pmkToLeft, riid, ppvResult);
}
-/******************************************************************************
- * ClassMoniker_Reduce
- ******************************************************************************/
-static HRESULT WINAPI ClassMoniker_Reduce(IMoniker* iface,
- IBindCtx* pbc,
- DWORD dwReduceHowFar,
- IMoniker** ppmkToLeft,
- IMoniker** ppmkReduced)
+static HRESULT WINAPI ClassMoniker_Reduce(IMoniker* iface, IBindCtx *pbc,
+ DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (!ppmkReduced)
return E_POINTER;
@@ -547,7 +541,7 @@ static HRESULT WINAPI ClassMonikerROTData_GetComparisonData(IROTData* iface,
{
ClassMoniker *This = impl_from_IROTData(iface);
- TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData);
+ TRACE("%p, %p, %lu, %p.\n", iface, pbData, cbMax, pcbData);
*pcbData = 2*sizeof(CLSID);
if (cbMax < *pcbData)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 1cad47a6a47..5d1be63a3f7 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -277,7 +277,7 @@ static inline HRESULT get_ole_clipbrd(ole_clipbrd **clipbrd)
static inline const char *dump_fmtetc(FORMATETC *fmt)
{
if (!fmt) return "(null)";
- return wine_dbg_sprintf("cf %04x ptd %p aspect %x lindex %d tymed %x",
+ return wine_dbg_sprintf("cf %04x ptd %p aspect %lx lindex %ld tymed %lx",
fmt->cfFormat, fmt->ptd, fmt->dwAspect, fmt->lindex, fmt->tymed);
}
@@ -338,9 +338,11 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_QueryInterface
static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_AddRef(LPENUMFORMATETC iface)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- TRACE("(%p)->(count=%u)\n",This, This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
- return InterlockedIncrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ return ref;
}
/************************************************************************
@@ -351,11 +353,10 @@ static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_AddRef(LPENUMFORMATETC iface)
static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_Release(LPENUMFORMATETC iface)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- ULONG ref;
+ ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(count=%u)\n",This, This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- ref = InterlockedDecrement(&This->ref);
if (!ref)
{
TRACE("() - destroying IEnumFORMATETC(%p)\n",This);
@@ -415,7 +416,7 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_Next
static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_Skip(LPENUMFORMATETC iface, ULONG celt)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- TRACE("(%p)->(num=%u)\n", This, celt);
+ TRACE("%p, %lu.\n", iface, celt);
This->pos += celt;
if (This->pos > This->data->count)
@@ -650,7 +651,7 @@ static HRESULT render_embed_source_hack(IDataObject *data, LPFORMATETC fmt)
if (FAILED(hr = IDataObject_GetDataHere(theOleClipboard->src_data, fmt, &std)))
{
- WARN("() : IDataObject_GetDataHere failed to render clipboard data! (%x)\n", hr);
+ WARN("() : IDataObject_GetDataHere failed to render clipboard data! (%lx)\n", hr);
GlobalFree(hStorage);
return hr;
}
@@ -1025,7 +1026,7 @@ static HRESULT render_format(IDataObject *data, LPFORMATETC fmt)
}
else
{
- FIXME("Unhandled tymed %x\n", fmt->tymed);
+ FIXME("Unhandled tymed %lx\n", fmt->tymed);
hr = DV_E_FORMATETC;
}
@@ -1089,10 +1090,11 @@ static HRESULT WINAPI snapshot_QueryInterface(IDataObject *iface,
static ULONG WINAPI snapshot_AddRef(IDataObject *iface)
{
snapshot *This = impl_from_IDataObject(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(count=%u)\n", This, This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- return InterlockedIncrement(&This->ref);
+ return ref;
}
/************************************************************************
@@ -1101,11 +1103,9 @@ static ULONG WINAPI snapshot_AddRef(IDataObject *iface)
static ULONG WINAPI snapshot_Release(IDataObject *iface)
{
snapshot *This = impl_from_IDataObject(iface);
- ULONG ref;
-
- TRACE("(%p)->(count=%u)\n", This, This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
- ref = InterlockedDecrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0)
{
@@ -1263,7 +1263,7 @@ static HRESULT get_priv_data(ole_priv_data **data)
else
TRACE("cf %04x\n", cf);
}
- TRACE("count %d\n", count);
+ TRACE("count %ld\n", count);
size += count * sizeof(ret->entries[0]);
/* There are holes in fmtetc so zero init */
@@ -1532,7 +1532,7 @@ static HRESULT WINAPI snapshot_GetData(IDataObject *iface, FORMATETC *fmt,
hr = get_stgmed_for_bitmap((HBITMAP)h, med);
else
{
- FIXME("Unhandled tymed - mask %x req tymed %x\n", mask, fmt->tymed);
+ FIXME("Unhandled tymed - mask %lx req tymed %lx\n", mask, fmt->tymed);
hr = E_FAIL;
goto end;
}
@@ -1558,7 +1558,7 @@ static HRESULT WINAPI snapshot_GetDataHere(IDataObject *iface, FORMATETC *fmt,
if ( !fmt || !med ) return E_INVALIDARG;
- TRACE("(%p, %p {%s}, %p (tymed %x)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
+ TRACE("%p, %p {%s}, %p (tymed %lx)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
if ( !OpenClipboard(NULL)) return CLIPBRD_E_CANT_OPEN;
@@ -1642,7 +1642,7 @@ static HRESULT WINAPI snapshot_GetDataHere(IDataObject *iface, FORMATETC *fmt,
break;
}
default:
- FIXME("Unhandled tymed - supported %x req tymed %x\n", supported, med->tymed);
+ FIXME("Unhandled tymed - supported %x req tymed %lx\n", supported, med->tymed);
hr = E_FAIL;
goto end;
}
@@ -1710,7 +1710,7 @@ static HRESULT WINAPI snapshot_EnumFormatEtc(IDataObject *iface, DWORD dir,
HRESULT hr;
ole_priv_data *data = NULL;
- TRACE("(%p, %x, %p)\n", iface, dir, enum_fmt);
+ TRACE("%p, %lx, %p.\n", iface, dir, enum_fmt);
*enum_fmt = NULL;
@@ -1737,7 +1737,7 @@ static HRESULT WINAPI snapshot_DAdvise(IDataObject *iface, FORMATETC *fmt,
DWORD flags, IAdviseSink *sink,
DWORD *conn)
{
- TRACE("(%p, %p, %x, %p, %p): not implemented\n", iface, fmt, flags, sink, conn);
+ TRACE("%p, %p, %lx, %p, %p.\n", iface, fmt, flags, sink, conn);
return E_NOTIMPL;
}
@@ -1748,7 +1748,7 @@ static HRESULT WINAPI snapshot_DAdvise(IDataObject *iface, FORMATETC *fmt,
*/
static HRESULT WINAPI snapshot_DUnadvise(IDataObject* iface, DWORD conn)
{
- TRACE("(%p, %d): not implemented\n", iface, conn);
+ TRACE("%p, %ld.\n", iface, conn);
return E_NOTIMPL;
}
diff --git a/dlls/ole32/comcat.c b/dlls/ole32/comcat.c
index 0b97b00d908..ad7e8a4b076 100644
--- a/dlls/ole32/comcat.c
+++ b/dlls/ole32/comcat.c
@@ -505,7 +505,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_GetCategoryDesc(
HKEY key;
HRESULT res;
- TRACE("CATID: %s LCID: %x\n",debugstr_guid(rcatid), lcid);
+ TRACE("CATID: %s LCID: %lx\n",debugstr_guid(rcatid), lcid);
if (rcatid == NULL || ppszDesc == NULL) return E_INVALIDARG;
@@ -589,10 +589,10 @@ static HRESULT WINAPI COMCAT_ICatInformation_IsClassOfCategories(
if (TRACE_ON(ole)) {
ULONG count;
- TRACE("CLSID: %s Implemented %u\n",debugstr_guid(rclsid),cImplemented);
+ TRACE("CLSID: %s Implemented %lu\n",debugstr_guid(rclsid),cImplemented);
for (count = 0; count < cImplemented; ++count)
TRACE(" %s\n",debugstr_guid(&rgcatidImpl[count]));
- TRACE("Required %u\n",cRequired);
+ TRACE("Required %lu\n",cRequired);
for (count = 0; count < cRequired; ++count)
TRACE(" %s\n",debugstr_guid(&rgcatidReq[count]));
}
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index aafc4cf19f8..8d2591c1211 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -373,7 +373,7 @@ static ULONG WINAPI ISynchronize_fnAddRef(ISynchronize *iface)
{
MREImpl *This = impl_from_ISynchronize(iface);
LONG ref = InterlockedIncrement(&This->ref);
- TRACE("%p - ref %d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -382,7 +382,7 @@ static ULONG WINAPI ISynchronize_fnRelease(ISynchronize *iface)
{
MREImpl *This = impl_from_ISynchronize(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("%p - ref %d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if(!ref)
{
@@ -397,7 +397,7 @@ static HRESULT WINAPI ISynchronize_fnWait(ISynchronize *iface, DWORD dwFlags, DW
{
MREImpl *This = impl_from_ISynchronize(iface);
DWORD index;
- TRACE("%p (%08x, %08x)\n", This, dwFlags, dwMilliseconds);
+ TRACE("%p, %#lx, %#lx.\n", iface, dwFlags, dwMilliseconds);
return CoWaitForMultipleHandles(dwFlags, dwMilliseconds, 1, &This->event, &index);
}
@@ -929,7 +929,7 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID reserved)
{
- TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, reserved);
+ TRACE("%p, %#lx, %p.\n", hinstDLL, fdwReason, reserved);
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c
index a94e4734f45..84099cee6d6 100644
--- a/dlls/ole32/compositemoniker.c
+++ b/dlls/ole32/compositemoniker.c
@@ -147,7 +147,7 @@ static ULONG WINAPI CompositeMonikerImpl_Release(IMoniker* iface)
CompositeMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->ref);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
if (!refcount)
{
@@ -205,13 +205,13 @@ static HRESULT WINAPI CompositeMonikerImpl_Load(IMoniker *iface, IStream *stream
hr = IStream_Read(stream, &count, sizeof(DWORD), NULL);
if (hr != S_OK)
{
- WARN("Failed to read component count, hr %#x.\n", hr);
+ WARN("Failed to read component count, hr %#lx.\n", hr);
return hr;
}
if (count < 2)
{
- WARN("Unexpected component count %u.\n", count);
+ WARN("Unexpected component count %lu.\n", count);
return E_UNEXPECTED;
}
@@ -222,7 +222,7 @@ static HRESULT WINAPI CompositeMonikerImpl_Load(IMoniker *iface, IStream *stream
{
if (FAILED(hr = OleLoadFromStream(stream, &IID_IMoniker, (void **)&m)))
{
- WARN("Failed to initialize component %u, hr %#x.\n", i, hr);
+ WARN("Failed to initialize component %lu, hr %#lx.\n", i, hr);
IMoniker_Release(last);
return hr;
}
@@ -416,7 +416,7 @@ static HRESULT WINAPI CompositeMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc
BOOL was_reduced;
HRESULT hr;
- TRACE("%p, %p, %d, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
if (!pbc || !reduced)
return E_INVALIDARG;
@@ -1021,7 +1021,7 @@ static HRESULT composite_get_moniker_comparison_data(IMoniker *moniker,
if (FAILED(hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rot_data)))
{
- WARN("Failed to get IROTData for component moniker, hr %#x.\n", hr);
+ WARN("Failed to get IROTData for component moniker, hr %#lx.\n", hr);
return hr;
}
@@ -1038,7 +1038,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
HRESULT hr;
ULONG len;
- TRACE("%p, %p, %u, %p\n", iface, data, max_len, ret_len);
+ TRACE("%p, %p, %lu, %p\n", iface, data, max_len, ret_len);
if (!moniker->comp_count)
return E_UNEXPECTED;
@@ -1052,7 +1052,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
*ret_len += len;
else
{
- WARN("Failed to get comparison data length for left component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data length for left component, hr %#lx.\n", hr);
return hr;
}
@@ -1062,7 +1062,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
*ret_len += len;
else
{
- WARN("Failed to get comparison data length for right component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data length for right component, hr %#lx.\n", hr);
return hr;
}
@@ -1074,14 +1074,14 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
max_len -= sizeof(CLSID);
if (FAILED(hr = composite_get_moniker_comparison_data(moniker->left, data, max_len, &len)))
{
- WARN("Failed to get comparison data for left component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data for left component, hr %#lx.\n", hr);
return hr;
}
data += len;
max_len -= len;
if (FAILED(hr = composite_get_moniker_comparison_data(moniker->right, data, max_len, &len)))
{
- WARN("Failed to get comparison data for right component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data for right component, hr %#lx.\n", hr);
return hr;
}
@@ -1121,7 +1121,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_GetUnmarshalClass(
{
CompositeMonikerImpl *This = impl_from_IMarshal(iface);
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pCid);
return IMoniker_GetClassID(&This->IMoniker_iface, pCid);
@@ -1135,7 +1135,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_GetMarshalSizeMax(
HRESULT hr;
ULONG size;
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pSize);
if (!moniker->comp_count)
@@ -1166,19 +1166,19 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_MarshalInterface(IMarshal *ifa
CompositeMonikerImpl *moniker = impl_from_IMarshal(iface);
HRESULT hr;
- TRACE("%p, %p, %s, %p, %x, %p, %#x\n", iface, stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, flags);
+ TRACE("%p, %p, %s, %p, %lx, %p, %#lx\n", iface, stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, flags);
if (!moniker->comp_count)
return E_UNEXPECTED;
if (FAILED(hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker->left, dwDestContext, pvDestContext, flags)))
{
- WARN("Failed to marshal left component, hr %#x.\n", hr);
+ WARN("Failed to marshal left component, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker->right, dwDestContext, pvDestContext, flags)))
- WARN("Failed to marshal right component, hr %#x.\n", hr);
+ WARN("Failed to marshal right component, hr %#lx.\n", hr);
return hr;
}
@@ -1205,13 +1205,13 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_UnmarshalInterface(IMarshal *i
if (FAILED(hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker->left)))
{
- WARN("Failed to unmarshal left moniker, hr %#x.\n", hr);
+ WARN("Failed to unmarshal left moniker, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker->right)))
{
- WARN("Failed to unmarshal right moniker, hr %#x.\n", hr);
+ WARN("Failed to unmarshal right moniker, hr %#lx.\n", hr);
return hr;
}
@@ -1229,7 +1229,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_ReleaseMarshalData(IMarshal *i
static HRESULT WINAPI CompositeMonikerMarshalImpl_DisconnectObject(IMarshal *iface,
DWORD dwReserved)
{
- TRACE("(0x%x)\n", dwReserved);
+ TRACE("%#lx\n", dwReserved);
/* can't disconnect a state-based marshal as nothing on server side to
* disconnect from */
return S_OK;
@@ -1286,7 +1286,7 @@ static ULONG WINAPI EnumMonikerImpl_Release(IEnumMoniker *iface)
ULONG refcount = InterlockedDecrement(&e->ref);
unsigned int i;
- TRACE("%p, refcount %d.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1305,7 +1305,7 @@ static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker *iface, ULONG count,
EnumMonikerImpl *e = impl_from_IEnumMoniker(iface);
unsigned int i;
- TRACE("%p, %u, %p, %p.\n", iface, count, m, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, count, m, fetched);
if (!m)
return E_INVALIDARG;
@@ -1329,7 +1329,7 @@ static HRESULT WINAPI EnumMonikerImpl_Skip(IEnumMoniker *iface, ULONG count)
{
EnumMonikerImpl *e = impl_from_IEnumMoniker(iface);
- TRACE("%p, %u.\n", iface, count);
+ TRACE("%p, %lu.\n", iface, count);
if (!count)
return S_OK;
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index a536f829515..e6cea25aca6 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -215,7 +215,7 @@ static inline DataCache *impl_from_IAdviseSink( IAdviseSink *iface )
const char *debugstr_formatetc(const FORMATETC *formatetc)
{
- return wine_dbg_sprintf("{ cfFormat = 0x%x, ptd = %p, dwAspect = %d, lindex = %d, tymed = %d }",
+ return wine_dbg_sprintf("{ cfFormat = 0x%x, ptd = %p, dwAspect = %ld, lindex = %ld, tymed = %ld }",
formatetc->cfFormat, formatetc->ptd, formatetc->dwAspect,
formatetc->lindex, formatetc->tymed);
}
@@ -353,7 +353,7 @@ static HRESULT check_valid_formatetc( const FORMATETC *fmt )
return CACHE_S_FORMATETC_NOTSUPPORTED;
else
{
- WARN("invalid clipformat/tymed combination: %d/%d\n", fmt->cfFormat, fmt->tymed);
+ WARN("invalid clipformat/tymed combination: %d/%ld\n", fmt->cfFormat, fmt->tymed);
return DV_E_TYMED;
}
}
@@ -427,7 +427,7 @@ static void DataCache_FireOnViewChange(
DWORD aspect,
LONG lindex)
{
- TRACE("(%p, %x, %d)\n", this, aspect, lindex);
+ TRACE("%p, %lx, %ld.\n", this, aspect, lindex);
/*
* The sink supplies a filter when it registers
@@ -2018,7 +2018,7 @@ static HRESULT WINAPI DataCache_Draw(
HRESULT hres;
DataCacheEntry *cache_entry;
- TRACE("(%p, %x, %d, %p, %p, %p, %p, %p, %p, %lx)\n",
+ TRACE("%p, %lx, %ld, %p, %p, %p, %p, %p, %p, %Ix.\n",
iface,
dwDrawAspect,
lindex,
@@ -2184,7 +2184,7 @@ static HRESULT WINAPI DataCache_SetAdvise(
{
DataCache *this = impl_from_IViewObject2(iface);
- TRACE("(%p, %x, %x, %p)\n", iface, aspects, advf, pAdvSink);
+ TRACE("%p, %lx, %lx, %p.\n", iface, aspects, advf, pAdvSink);
/*
* A call to this function removes the previous sink
@@ -2274,8 +2274,7 @@ static HRESULT WINAPI DataCache_GetExtent(
HRESULT hres = E_FAIL;
DataCacheEntry *cache_entry;
- TRACE("(%p, %x, %d, %p, %p)\n",
- iface, dwDrawAspect, lindex, ptd, lpsizel);
+ TRACE("%p, %lx, %ld, %p, %p.\n", iface, dwDrawAspect, lindex, ptd, lpsizel);
if (lpsizel==NULL)
return E_POINTER;
@@ -2284,7 +2283,7 @@ static HRESULT WINAPI DataCache_GetExtent(
lpsizel->cy = 0;
if (lindex!=-1)
- FIXME("Unimplemented flag lindex = %d\n", lindex);
+ FIXME("Unimplemented flag lindex = %ld\n", lindex);
/*
* Right now, we support only the callback from
@@ -2445,7 +2444,7 @@ static HRESULT WINAPI DataCache_Cache(
HRESULT hr;
FORMATETC fmt_cpy;
- TRACE("(%p, 0x%x, %p)\n", pformatetc, advf, pdwConnection);
+ TRACE("%p, %#lx, %p.\n", pformatetc, advf, pdwConnection);
if (!pformatetc || !pdwConnection)
return E_INVALIDARG;
@@ -2496,7 +2495,7 @@ static HRESULT WINAPI DataCache_Uncache(
DataCache *This = impl_from_IOleCache2(iface);
DataCacheEntry *cache_entry;
- TRACE("(%d)\n", dwConnection);
+ TRACE("%ld\n", dwConnection);
LIST_FOR_EACH_ENTRY(cache_entry, &This->cache_list, DataCacheEntry, entry)
if (cache_entry->id == dwConnection)
@@ -2505,7 +2504,7 @@ static HRESULT WINAPI DataCache_Uncache(
return S_OK;
}
- WARN("no connection found for %d\n", dwConnection);
+ WARN("no connection found for %ld\n", dwConnection);
return OLE_E_NOCONNECTION;
}
@@ -2626,7 +2625,7 @@ static HRESULT WINAPI DataCache_UpdateCache( IOleCache2 *iface, IDataObject *dat
int i, slots = 0;
BOOL done_one = FALSE;
- TRACE( "(%p %p %08x %p)\n", iface, data, mode, reserved );
+ TRACE("%p, %p, %#lx, %p.\n", iface, data, mode, reserved );
LIST_FOR_EACH_ENTRY( cache_entry, &This->cache_list, DataCacheEntry, entry )
{
@@ -2705,7 +2704,7 @@ static HRESULT WINAPI DataCache_DiscardCache(
DataCacheEntry *cache_entry;
HRESULT hr = S_OK;
- TRACE("(%d)\n", dwDiscardOptions);
+ TRACE("%ld\n", dwDiscardOptions);
if (dwDiscardOptions == DISCARDCACHE_SAVEIFDIRTY)
hr = DataCache_Save(&This->IPersistStorage_iface, This->presentationStorage, TRUE);
diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c
index 81ffa1e6dbc..b69a054b572 100644
--- a/dlls/ole32/defaulthandler.c
+++ b/dlls/ole32/defaulthandler.c
@@ -519,7 +519,7 @@ static HRESULT WINAPI DefaultHandler_Close(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%d)\n", dwSaveOption);
+ TRACE("%ld\n", dwSaveOption);
if (!object_is_running(This))
return S_OK;
@@ -548,7 +548,7 @@ static HRESULT WINAPI DefaultHandler_SetMoniker(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = S_OK;
- TRACE("(%p, %d, %p)\n", iface, dwWhichMoniker, pmk);
+ TRACE("%p, %ld, %p.\n", iface, dwWhichMoniker, pmk);
if (object_is_running(This))
{
@@ -576,8 +576,7 @@ static HRESULT WINAPI DefaultHandler_GetMoniker(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%p, %d, %d, %p)\n",
- iface, dwAssign, dwWhichMoniker, ppmk);
+ TRACE("%p, %ld, %ld, %p.\n", iface, dwAssign, dwWhichMoniker, ppmk);
if (object_is_running(This))
{
@@ -617,8 +616,7 @@ static HRESULT WINAPI DefaultHandler_InitFromData(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %p, %d, %d)\n",
- iface, pDataObject, fCreation, dwReserved);
+ TRACE("%p, %p, %d, %ld.\n", iface, pDataObject, fCreation, dwReserved);
if (object_is_running(This))
{
@@ -646,8 +644,7 @@ static HRESULT WINAPI DefaultHandler_GetClipboardData(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %d, %p)\n",
- iface, dwReserved, ppDataObject);
+ TRACE("%p, %ld, %p.\n", iface, dwReserved, ppDataObject);
if (object_is_running(This))
{
@@ -673,7 +670,7 @@ static HRESULT WINAPI DefaultHandler_DoVerb(
IRunnableObject *pRunnableObj = &This->IRunnableObject_iface;
HRESULT hr;
- TRACE("(%d, %p, %p, %d, %p, %s)\n", iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect));
+ TRACE("%ld, %p, %p, %ld, %p, %s.\n", iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect));
hr = IRunnableObject_Run(pRunnableObj, NULL);
if (FAILED(hr)) return hr;
@@ -809,7 +806,7 @@ static HRESULT WINAPI DefaultHandler_GetUserType(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, dwFormOfType, pszUserType);
+ TRACE("%p, %ld, %p.\n", iface, dwFormOfType, pszUserType);
if (object_is_running(This))
{
start_object_call( This );
@@ -836,8 +833,7 @@ static HRESULT WINAPI DefaultHandler_SetExtent(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %x, (%d x %d))\n", iface,
- dwDrawAspect, psizel->cx, psizel->cy);
+ TRACE("%p, %lx, (%ld x %ld))\n", iface, dwDrawAspect, psizel->cx, psizel->cy);
if (object_is_running(This))
{
@@ -868,7 +864,7 @@ static HRESULT WINAPI DefaultHandler_GetExtent(
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwDrawAspect, psizel);
+ TRACE("%p, %lx, %p.\n", iface, dwDrawAspect, psizel);
if (object_is_running(This))
{
@@ -947,7 +943,7 @@ static HRESULT WINAPI DefaultHandler_Unadvise(
{
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %d)\n", iface, dwConnection);
+ TRACE("%p, %ld.\n", iface, dwConnection);
/*
* If we don't have an advise holder yet, it means we don't have
@@ -1003,7 +999,7 @@ static HRESULT WINAPI DefaultHandler_GetMiscStatus(
HRESULT hres;
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwAspect, pdwStatus);
+ TRACE("%p, %lx, %p.\n", iface, dwAspect, pdwStatus);
if (object_is_running(This))
{
@@ -1278,7 +1274,7 @@ static HRESULT WINAPI DefaultHandler_EnumFormatEtc(
{
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwDirection, ppenumFormatEtc);
+ TRACE("%p, %lx, %p.\n", iface, dwDirection, ppenumFormatEtc);
return OleRegEnumFormatEtc(&This->clsid, dwDirection, ppenumFormatEtc);
}
@@ -1301,8 +1297,7 @@ static HRESULT WINAPI DefaultHandler_DAdvise(
HRESULT hres = S_OK;
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %p, %d, %p, %p)\n",
- iface, pformatetc, advf, pAdvSink, pdwConnection);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pformatetc, advf, pAdvSink, pdwConnection);
/* Make sure we have a data advise holder before we start. */
if (!This->dataAdviseHolder)
@@ -1341,7 +1336,7 @@ static HRESULT WINAPI DefaultHandler_DUnadvise(
{
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %d)\n", iface, dwConnection);
+ TRACE("%p, %ld.\n", iface, dwConnection);
/*
* If we don't have a data advise holder yet, it means that
@@ -2154,7 +2149,7 @@ static DefaultHandler* DefaultHandler_Construct(
if (SUCCEEDED(hr))
This->object_state = object_state_running;
if (FAILED(hr))
- WARN("object creation failed with error %08x\n", hr);
+ WARN("object creation failed with error %#lx\n", hr);
}
else
{
@@ -2241,7 +2236,7 @@ HRESULT WINAPI OleCreateEmbeddingHelper(
DefaultHandler* newHandler = NULL;
HRESULT hr = S_OK;
- TRACE("(%s, %p, %08x, %p, %s, %p)\n", debugstr_guid(clsid), pUnkOuter, flags, pCF, debugstr_guid(riid), ppvObj);
+ TRACE("%s, %p, %#lx, %p, %s, %p.\n", debugstr_guid(clsid), pUnkOuter, flags, pCF, debugstr_guid(riid), ppvObj);
if (!ppvObj)
return E_POINTER;
diff --git a/dlls/ole32/filelockbytes.c b/dlls/ole32/filelockbytes.c
index e9699c01650..072314046a6 100644
--- a/dlls/ole32/filelockbytes.c
+++ b/dlls/ole32/filelockbytes.c
@@ -189,7 +189,7 @@ static HRESULT WINAPI FileLockBytesImpl_ReadAt(
LARGE_INTEGER offset;
ULONG cbRead;
- TRACE("(%p)-> %i %p %i %p\n",This, ulOffset.u.LowPart, pv, cb, pcbRead);
+ TRACE("%p, %ld, %p, %lu, %p.\n", iface, ulOffset.u.LowPart, pv, cb, pcbRead);
/* verify a sane environment */
if (!This) return E_FAIL;
@@ -244,7 +244,7 @@ static HRESULT WINAPI FileLockBytesImpl_WriteAt(
LARGE_INTEGER offset;
ULONG cbWritten;
- TRACE("(%p)-> %i %p %i %p\n",This, ulOffset.u.LowPart, pv, cb, pcbWritten);
+ TRACE("%p, %ld, %p, %lu, %p.\n", iface, ulOffset.u.LowPart, pv, cb, pcbWritten);
/* verify a sane environment */
if (!This) return E_FAIL;
@@ -297,7 +297,7 @@ static HRESULT WINAPI FileLockBytesImpl_SetSize(ILockBytes* iface, ULARGE_INTEGE
HRESULT hr = S_OK;
LARGE_INTEGER newpos;
- TRACE("new size %u\n", newSize.u.LowPart);
+ TRACE("new size %lu\n", newSize.u.LowPart);
newpos.QuadPart = newSize.QuadPart;
if (SetFilePointerEx(This->hfile, newpos, NULL, FILE_BEGIN))
@@ -316,7 +316,7 @@ static HRESULT get_lock_error(void)
case ERROR_ACCESS_DENIED: return STG_E_ACCESSDENIED; break;
case ERROR_NOT_SUPPORTED: return STG_E_INVALIDFUNCTION; break;
default:
- FIXME("no mapping for error %d\n", GetLastError());
+ FIXME("no mapping for error %ld\n", GetLastError());
return STG_E_INVALIDFUNCTION;
}
}
@@ -328,7 +328,7 @@ static HRESULT WINAPI FileLockBytesImpl_LockRegion(ILockBytes* iface,
OVERLAPPED ol;
DWORD lock_flags = LOCKFILE_FAIL_IMMEDIATELY;
- TRACE("ofs %u count %u flags %x\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
+ TRACE("ofs %lu count %lu flags %lx\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
if (dwLockType & LOCK_WRITE)
return STG_E_INVALIDFUNCTION;
@@ -351,7 +351,7 @@ static HRESULT WINAPI FileLockBytesImpl_UnlockRegion(ILockBytes* iface,
FileLockBytesImpl* This = impl_from_ILockBytes(iface);
OVERLAPPED ol;
- TRACE("ofs %u count %u flags %x\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
+ TRACE("ofs %lu count %lu flags %lx\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
if (dwLockType & LOCK_WRITE)
return STG_E_INVALIDFUNCTION;
diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c
index 794b4507942..9b64d0e43e9 100644
--- a/dlls/ole32/filemoniker.c
+++ b/dlls/ole32/filemoniker.c
@@ -129,7 +129,7 @@ static ULONG WINAPI FileMonikerImpl_Release(IMoniker* iface)
FileMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG ref = InterlockedDecrement(&moniker->ref);
- TRACE("(%p, refcount %d)\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -611,7 +611,7 @@ FileMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
static HRESULT WINAPI FileMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD howfar,
IMoniker **toleft, IMoniker **reduced)
{
- TRACE("%p, %p, %d, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
if (!pbc || !reduced)
return E_INVALIDARG;
@@ -1233,7 +1233,7 @@ FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
int i;
LPWSTR pszFileName;
- TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData);
+ TRACE("%p, %p, %lu, %p.\n", iface, pbData, cbMax, pcbData);
*pcbData = sizeof(CLSID) + len * sizeof(WCHAR);
if (cbMax < *pcbData)
diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c
index fe6b5e58122..50848a2a020 100644
--- a/dlls/ole32/git.c
+++ b/dlls/ole32/git.c
@@ -95,7 +95,7 @@ static StdGITEntry* StdGlobalInterfaceTable_FindEntry(StdGlobalInterfaceTableImp
{
StdGITEntry* e;
- TRACE("This=%p, cookie=0x%x\n", This, cookie);
+ TRACE("%p, %#lx.\n", This, cookie);
LIST_FOR_EACH_ENTRY(e, &This->list, StdGITEntry, entry) {
if (e->cookie == cookie)
@@ -205,7 +205,7 @@ StdGlobalInterfaceTable_RegisterInterfaceInGlobal(
LeaveCriticalSection(&git_section);
- TRACE("Cookie is 0x%x\n", entry->cookie);
+ TRACE("Cookie is %#lx\n", entry->cookie);
return S_OK;
}
@@ -217,7 +217,7 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(
StdGITEntry* entry;
HRESULT hr;
- TRACE("iface=%p, dwCookie=0x%x\n", iface, dwCookie);
+ TRACE("%p, %#lx.\n", iface, dwCookie);
EnterCriticalSection(&git_section);
@@ -236,7 +236,7 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(
hr = CoReleaseMarshalData(entry->stream);
if (hr != S_OK)
{
- WARN("Failed to release marshal data, hr = 0x%08x\n", hr);
+ WARN("Failed to release marshal data, hr = %#lx\n", hr);
return hr;
}
IStream_Release(entry->stream);
@@ -255,13 +255,13 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
HRESULT hres;
IStream *stream;
- TRACE("dwCookie=0x%x, riid=%s, ppv=%p\n", dwCookie, debugstr_guid(riid), ppv);
+ TRACE("%#lx, %s, %p.\n", dwCookie, debugstr_guid(riid), ppv);
EnterCriticalSection(&git_section);
entry = StdGlobalInterfaceTable_FindEntry(This, dwCookie);
if (entry == NULL) {
- WARN("Entry for cookie 0x%x not found\n", dwCookie);
+ WARN("Entry for cookie %#lx not found\n", dwCookie);
LeaveCriticalSection(&git_section);
return E_INVALIDARG;
}
@@ -273,7 +273,7 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
LeaveCriticalSection(&git_section);
if (hres != S_OK) {
- WARN("Failed to clone stream with error 0x%08x\n", hres);
+ WARN("Failed to clone stream with error %#lx.\n", hres);
return hres;
}
diff --git a/dlls/ole32/itemmoniker.c b/dlls/ole32/itemmoniker.c
index 1ab9c52dbfb..112a8db4b16 100644
--- a/dlls/ole32/itemmoniker.c
+++ b/dlls/ole32/itemmoniker.c
@@ -198,7 +198,7 @@ static ULONG WINAPI ItemMonikerImpl_Release(IMoniker* iface)
ItemMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->ref);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -286,7 +286,7 @@ static HRESULT item_moniker_load_string_record(IStream *stream, WCHAR **ret)
if (str_len % sizeof(WCHAR))
{
- WARN("Unexpected Unicode name length %d.\n", str_len);
+ WARN("Unexpected Unicode name length %ld.\n", str_len);
hr = E_FAIL;
goto end;
}
@@ -491,16 +491,10 @@ static HRESULT WINAPI ItemMonikerImpl_BindToStorage(IMoniker *iface, IBindCtx *p
return hr;
}
-/******************************************************************************
- * ItemMoniker_Reduce
- ******************************************************************************/
-static HRESULT WINAPI ItemMonikerImpl_Reduce(IMoniker* iface,
- IBindCtx* pbc,
- DWORD dwReduceHowFar,
- IMoniker** ppmkToLeft,
- IMoniker** ppmkReduced)
+static HRESULT WINAPI ItemMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc,
+ DWORD dwReduceHowFar, IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -864,7 +858,7 @@ static HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData *iface,
int delim_len, i;
WCHAR *ptrW;
- TRACE("(%p, %p, %u, %p)\n", iface, buffer, max_len, data_len);
+ TRACE("%p, %p, %lu, %p.\n", iface, buffer, max_len, data_len);
delim_len = This->itemDelimiter && This->itemDelimiter[0] ? lstrlenW(This->itemDelimiter) : 0;
*data_len = sizeof(CLSID) + sizeof(WCHAR) + (delim_len + name_len) * sizeof(WCHAR);
diff --git a/dlls/ole32/memlockbytes.c b/dlls/ole32/memlockbytes.c
index 2d7d4572584..f974e4229eb 100644
--- a/dlls/ole32/memlockbytes.c
+++ b/dlls/ole32/memlockbytes.c
@@ -160,7 +160,7 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* iface, HGLOBAL* phglobal)
/* It is not our lockbytes implementation, so use a more generic way */
hres = ILockBytes_Stat(iface,&stbuf,STATFLAG_NONAME);
if (hres != S_OK) {
- ERR("Cannot ILockBytes_Stat, %x\n",hres);
+ ERR("Cannot ILockBytes_Stat, %lx\n",hres);
return hres;
}
TRACE("cbSize is %s\n", wine_dbgstr_longlong(stbuf.cbSize.QuadPart));
@@ -171,11 +171,11 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* iface, HGLOBAL* phglobal)
hres = ILockBytes_ReadAt(iface, start, GlobalLock(*phglobal), stbuf.cbSize.u.LowPart, &xread);
GlobalUnlock(*phglobal);
if (hres != S_OK) {
- FIXME("%p->ReadAt failed with %x\n",iface,hres);
+ FIXME("%p->ReadAt failed with %lx\n",iface,hres);
return hres;
}
if (stbuf.cbSize.u.LowPart != xread) {
- FIXME("Read size is not requested size %d vs %d?\n",stbuf.cbSize.u.LowPart, xread);
+ FIXME("Read size is not requested size %ld vs %ld?\n",stbuf.cbSize.u.LowPart, xread);
}
return S_OK;
}
diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c
index ac47f5528c8..09266a33aba 100644
--- a/dlls/ole32/moniker.c
+++ b/dlls/ole32/moniker.c
@@ -159,7 +159,7 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MonikerComparison
IROTData_Release(pROTData);
if (hr != S_OK)
{
- ERR("Failed to copy comparison data into buffer, hr = 0x%08x\n", hr);
+ ERR("Failed to copy comparison data into buffer, hr = %#lx\n", hr);
HeapFree(GetProcessHeap(), 0, *moniker_data);
return hr;
}
@@ -218,7 +218,7 @@ static HRESULT reduce_moniker(IMoniker *pmk, IBindCtx *pbc, IMoniker **pmkReduce
}
hr = IMoniker_Reduce(pmk, pbc, MKRREDUCE_ALL, NULL, pmkReduced);
if (FAILED(hr))
- ERR("reducing moniker failed with error 0x%08x\n", hr);
+ ERR("reducing moniker failed with error %#lx.\n", hr);
if (pbcNew) IBindCtx_Release(pbcNew);
return hr;
}
@@ -288,11 +288,11 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD flags,
IBindCtx *pbc;
InterfaceData *moniker = NULL;
- TRACE("%p, %#x, %p, %p, %p\n", This, flags, punkObject, pmkObjectName, pdwRegister);
+ TRACE("%p, %#lx, %p, %p, %p\n", iface, flags, punkObject, pmkObjectName, pdwRegister);
if (flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT))
{
- ERR("Invalid flags: 0x%08x\n", flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT));
+ ERR("Invalid flags: %#lx\n", flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT));
return E_INVALIDARG;
}
@@ -435,7 +435,7 @@ RunningObjectTableImpl_Revoke( IRunningObjectTable* iface, DWORD dwRegister)
RunningObjectTableImpl *This = impl_from_IRunningObjectTable(iface);
struct rot_entry *rot_entry;
- TRACE("(%p,%d)\n",This,dwRegister);
+ TRACE("%p, %ld.\n", iface, dwRegister);
EnterCriticalSection(&This->lock);
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, struct rot_entry, entry)
@@ -568,7 +568,7 @@ RunningObjectTableImpl_GetObject( IRunningObjectTable* iface,
}
}
else
- WARN("Moniker unavailable, IrotGetObject returned 0x%08x\n", hr);
+ WARN("Moniker unavailable, IrotGetObject returned %#lx\n", hr);
HeapFree(GetProcessHeap(), 0, moniker_data);
@@ -590,7 +590,7 @@ RunningObjectTableImpl_NoteChangeTime(IRunningObjectTable* iface,
struct rot_entry *rot_entry;
HRESULT hr = E_INVALIDARG;
- TRACE("(%p,%d,%p)\n",This,dwRegister,pfiletime);
+ TRACE("%p, %ld, %p.\n", iface, dwRegister, pfiletime);
EnterCriticalSection(&This->lock);
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, struct rot_entry, entry)
@@ -608,7 +608,7 @@ RunningObjectTableImpl_NoteChangeTime(IRunningObjectTable* iface,
LeaveCriticalSection(&This->lock);
done:
- TRACE("-- 0x08%x\n", hr);
+ TRACE("-- %#lx\n", hr);
return hr;
}
@@ -661,7 +661,7 @@ RunningObjectTableImpl_GetTimeOfLastChange(IRunningObjectTable* iface,
HeapFree(GetProcessHeap(), 0, moniker_data);
- TRACE("-- 0x%08x\n", hr);
+ TRACE("-- %#lx\n", hr);
return hr;
}
@@ -717,7 +717,7 @@ static RunningObjectTableImpl rot =
*/
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, IRunningObjectTable **ret)
{
- TRACE("%#x, %p\n", reserved, ret);
+ TRACE("%#lx, %p\n", reserved, ret);
if (reserved!=0)
return E_UNEXPECTED;
@@ -1048,7 +1048,7 @@ static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker* iface, ULONG celt, IM
EnumMonikerImpl *This = impl_from_IEnumMoniker(iface);
HRESULT hr = S_OK;
- TRACE("(%p) TabCurrentPos %d Tablastindx %d\n", This, This->pos, This->moniker_list->size);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
/* retrieve the requested number of moniker from the current position */
for(i = 0; (This->pos < This->moniker_list->size) && (i < celt); i++)
@@ -1270,7 +1270,7 @@ static HRESULT WINAPI MonikerMarshal_GetUnmarshalClass(
{
MonikerMarshal *This = impl_from_IMarshal(iface);
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pCid);
return IMoniker_GetClassID(This->moniker, pCid);
@@ -1284,7 +1284,7 @@ static HRESULT WINAPI MonikerMarshal_GetMarshalSizeMax(
HRESULT hr;
ULARGE_INTEGER size;
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pSize);
hr = IMoniker_GetSizeMax(This->moniker, &size);
@@ -1299,7 +1299,7 @@ static HRESULT WINAPI MonikerMarshal_MarshalInterface(LPMARSHAL iface, IStream *
{
MonikerMarshal *This = impl_from_IMarshal(iface);
- TRACE("(%p, %s, %p, %x, %p, %x)\n", pStm, debugstr_guid(riid), pv,
+ TRACE("%p, %s, %p, %lx, %p, %lx.\n", pStm, debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags);
return IMoniker_Save(This->moniker, pStm, FALSE);
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index a2781e51d5b..ee6a0b69b06 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -253,9 +253,10 @@ void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
/******************************************************************************
* OleInitializeWOW [OLE32.@]
*/
-HRESULT WINAPI OleInitializeWOW(DWORD x, DWORD y) {
- FIXME("(0x%08x, 0x%08x),stub!\n",x, y);
- return 0;
+HRESULT WINAPI OleInitializeWOW(DWORD x, DWORD y)
+{
+ FIXME("%#lx, %#lx stub!\n", x, y);
+ return 0;
}
/*************************************************************
@@ -664,7 +665,7 @@ HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
HRESULT hres;
LONG ret;
- TRACE("(%s, %u, %p)\n", debugstr_guid(clsid), form, usertype);
+ TRACE("%s, %lu, %p.\n", debugstr_guid(clsid), form, usertype);
if (!usertype)
return E_INVALIDARG;
@@ -735,7 +736,7 @@ HRESULT WINAPI DoDragDrop (
HWND hwndTrackWindow;
MSG msg;
- TRACE("(%p, %p, %08x, %p)\n", pDataObject, pDropSource, dwOKEffect, pdwEffect);
+ TRACE("%p, %p, %#lx, %p.\n", pDataObject, pDropSource, dwOKEffect, pdwEffect);
if (!pDataObject || !pDropSource || !pdwEffect)
return E_INVALIDARG;
@@ -844,7 +845,7 @@ HRESULT WINAPI OleRegGetMiscStatus(
LONG result;
HRESULT hr;
- TRACE("(%s, %d, %p)\n", debugstr_guid(clsid), dwAspect, pdwStatus);
+ TRACE("%s, %ld, %p.\n", debugstr_guid(clsid), dwAspect, pdwStatus);
if (!pdwStatus) return E_INVALIDARG;
@@ -934,7 +935,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
HRESULT hr = S_OK;
- TRACE("(%d, %p, %p)\n", celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
if (pceltFetched)
*pceltFetched = 0;
@@ -954,14 +955,14 @@ static HRESULT WINAPI EnumOLEVERB_Next(
}
else if (res != ERROR_SUCCESS)
{
- ERR("RegEnumKeyW failed with error %d\n", res);
+ ERR("RegEnumKeyW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
break;
}
res = RegQueryValueW(This->hkeyVerb, wszSubKey, NULL, &cbData);
if (res != ERROR_SUCCESS)
{
- ERR("RegQueryValueW failed with error %d\n", res);
+ ERR("RegQueryValueW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
break;
}
@@ -974,7 +975,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
res = RegQueryValueW(This->hkeyVerb, wszSubKey, pwszOLEVERB, &cbData);
if (res != ERROR_SUCCESS)
{
- ERR("RegQueryValueW failed with error %d\n", res);
+ ERR("RegQueryValueW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
CoTaskMemFree(pwszOLEVERB);
break;
@@ -1020,7 +1021,7 @@ static HRESULT WINAPI EnumOLEVERB_Skip(
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
- TRACE("(%d)\n", celt);
+ TRACE("%p, %lu.\n", iface, celt);
This->index += celt;
return S_OK;
@@ -1108,7 +1109,7 @@ HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
else if (res == REGDB_E_KEYMISSING)
ERR("no Verbs key for class %s\n", debugstr_guid(clsid));
else
- ERR("failed to open Verbs key for CLSID %s with error %d\n",
+ ERR("failed to open Verbs key for CLSID %s with error %ld\n",
debugstr_guid(clsid), res);
return res;
}
@@ -1117,7 +1118,7 @@ HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
NULL, NULL, NULL, NULL, NULL, NULL);
if (res != ERROR_SUCCESS)
{
- ERR("failed to get subkey count with error %d\n", GetLastError());
+ ERR("failed to get subkey count with error %ld\n", GetLastError());
return REGDB_E_READREGDB;
}
@@ -1602,7 +1603,7 @@ static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lPar
OleMenuHookItem *pHookItem = NULL;
WORD fuFlags;
- TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
+ TRACE("%i, %#Ix, %#Ix.\n", code, wParam, lParam );
/* Check if we're being asked to process the message */
if ( HC_ACTION != code )
@@ -1707,7 +1708,7 @@ static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lPara
OleMenuHookItem *pHookItem = NULL;
WORD wCode;
- TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
+ TRACE("%i, %#Ix, %#Ix.\n", code, wParam, lParam );
/* Check if we're being asked to process a messages */
if ( HC_ACTION != code )
@@ -1943,7 +1944,7 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
}
TRACE_(accel)("hAccel=%p, cAccelEntries=%d,"
- "msg->hwnd=%p, msg->message=%04x, wParam=%08lx, lParam=%08lx\n",
+ "msg->hwnd=%p, msg->message=%04x, wParam=%#Ix, lParam=%#Ix\n",
hAccel, cAccelEntries,
lpMsg->hwnd, lpMsg->message, lpMsg->wParam, lpMsg->lParam);
for(i = 0; i < cAccelEntries; i++)
@@ -1964,7 +1965,7 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
if(lpAccelTbl[i].fVirt & FVIRTKEY)
{
INT mask = 0;
- TRACE_(accel)("found accel for virt_key %04lx (scan %04x)\n",
+ TRACE_(accel)("found accel for virt_key %Ix (scan %04x)\n",
lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff);
if(GetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT;
if(GetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
@@ -2463,7 +2464,7 @@ HRESULT WINAPI OleCreate(
IUnknown * pUnk = NULL;
IOleObject *pOleObject = NULL;
- TRACE("(%s, %s, %d, %p, %p, %p, %p)\n", debugstr_guid(rclsid),
+ TRACE("%s, %s, %ld, %p, %p, %p, %p.\n", debugstr_guid(rclsid),
debugstr_guid(riid), renderopt, pFormatEtc, pClientSite, pStg, ppvObj);
hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, riid, (LPVOID*)&pUnk);
@@ -2488,7 +2489,7 @@ HRESULT WINAPI OleCreate(
{
TRACE("trying to set stg %p\n", pStg);
hres = IPersistStorage_InitNew(pPS, pStg);
- TRACE("-- result 0x%08x\n", hres);
+ TRACE("-- result %#lx\n", hres);
IPersistStorage_Release(pPS);
}
}
@@ -2497,7 +2498,7 @@ HRESULT WINAPI OleCreate(
{
TRACE("trying to set clientsite %p\n", pClientSite);
hres = IOleObject_SetClientSite(pOleObject, pClientSite);
- TRACE("-- result 0x%08x\n", hres);
+ TRACE("-- result %#lx\n", hres);
}
if (pOleObject)
@@ -2851,7 +2852,7 @@ HRESULT WINAPI OleCreateFromDataEx(IDataObject *data, REFIID iid, DWORD flags,
HRESULT hr;
UINT src_cf;
- FIXME("(%p, %s, %08x, %08x, %d, %p, %p, %p, %p, %p, %p, %p): stub\n",
+ FIXME("%p, %s, %#lx, %#lx, %ld, %p, %p, %p, %p, %p, %p, %p: stub\n",
data, debugstr_guid(iid), flags, renderopt, num_cache_fmts, adv_flags, cache_fmts,
sink, conns, client_site, stg, obj);
@@ -2884,7 +2885,7 @@ HRESULT WINAPI OleCreateFromData(IDataObject *data, REFIID iid, DWORD renderopt,
HRESULT WINAPI OleCreateLinkFromData(IDataObject *data, REFIID iid, DWORD renderopt, FORMATETC *fmt,
IOleClientSite *client_site, IStorage *stg, void **obj)
{
- FIXME("%p,%s,%08x,%p,%p,%p,%p: semi-stub\n",
+ FIXME("%p, %s, %#lx, %p, %p, %p, %p: semi-stub\n",
data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
return OleCreateFromData(data, iid, renderopt, fmt, client_site, stg, obj);
}
@@ -2904,8 +2905,7 @@ HRESULT WINAPI OleCreateStaticFromData(IDataObject *data, REFIID iid, DWORD rend
STGMEDIUM stgmedium;
LPOLESTR ole_typename;
- TRACE("(%p, %s, 0x%08x, %p, %p, %p, %p)\n",
- data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
+ TRACE("%p, %s, %#lx, %p, %p, %p, %p.\n", data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
if (!obj || !stg)
return E_INVALIDARG;
@@ -3007,11 +3007,11 @@ HRESULT WINAPI OleCreateFromFileEx(REFCLSID clsid, const OLECHAR *filename, REFI
IOleCache *cache = NULL;
ULONG i;
- TRACE("cls %s, %s, iid %s, flags %d, render opts %d, num fmts %d, adv flags %p, fmts %p\n", debugstr_guid(clsid),
+ TRACE("cls %s, %s, iid %s, flags %ld, render opts %ld, num fmts %ld, adv flags %p, fmts %p\n", debugstr_guid(clsid),
debugstr_w(filename), debugstr_guid(iid), flags, renderopt, num_fmts, adv_flags, fmts);
TRACE("sink %p, conns %p, client site %p, storage %p, obj %p\n", sink, conns, client_site, stg, obj);
for (i = 0; i < num_fmts; i++)
- TRACE("\t%d: fmt %s adv flags %d\n", i, debugstr_formatetc(fmts + i), adv_flags[i]);
+ TRACE("\t%ld: fmt %s adv flags %ld\n", i, debugstr_formatetc(fmts + i), adv_flags[i]);
hr = CreateFileMoniker( filename, &mon );
if (FAILED(hr)) return hr;
diff --git a/dlls/ole32/ole2stubs.c b/dlls/ole32/ole2stubs.c
index 7fad171facd..0d8198480b1 100644
--- a/dlls/ole32/ole2stubs.c
+++ b/dlls/ole32/ole2stubs.c
@@ -37,7 +37,7 @@ HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid,
DWORD renderopt, LPFORMATETC lpFormatEtc,
LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
{
- FIXME("(%p,%p,%i,%p,%p,%p,%p), stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj);
+ FIXME("%p, %p, %ld, %p, %p, %p, %p stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj);
return E_NOTIMPL;
}
@@ -77,7 +77,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH OleRegEnumFormatEtc (
DWORD dwDirection,
LPENUMFORMATETC* ppenumFormatetc)
{
- FIXME("(%p, %d, %p), stub!\n", clsid, dwDirection, ppenumFormatetc);
+ FIXME("%p, %ld, %p stub!\n", clsid, dwDirection, ppenumFormatetc);
return E_NOTIMPL;
}
diff --git a/dlls/ole32/oleobj.c b/dlls/ole32/oleobj.c
index 13a873655f5..464c4776b40 100644
--- a/dlls/ole32/oleobj.c
+++ b/dlls/ole32/oleobj.c
@@ -128,7 +128,7 @@ static HRESULT WINAPI EnumSTATDATA_Next(IEnumSTATDATA *iface, ULONG num, LPSTATD
DWORD count = 0;
HRESULT hr = S_OK;
- TRACE("(%d, %p, %p)\n", num, data, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, num, data, fetched);
while(num--)
{
@@ -153,7 +153,7 @@ static HRESULT WINAPI EnumSTATDATA_Skip(IEnumSTATDATA *iface, ULONG num)
{
EnumSTATDATA *This = impl_from_IEnumSTATDATA(iface);
- TRACE("(%d)\n", num);
+ TRACE("%p, %lu.\n", iface, num);
if(This->index + num >= This->num_of_elems)
{
@@ -309,7 +309,7 @@ static ULONG WINAPI OleAdviseHolderImpl_AddRef(IOleAdviseHolder *iface)
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(ref=%d)\n", This, ref - 1);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -320,9 +320,9 @@ static ULONG WINAPI OleAdviseHolderImpl_AddRef(IOleAdviseHolder *iface)
static ULONG WINAPI OleAdviseHolderImpl_Release(IOleAdviseHolder *iface)
{
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
- ULONG ref;
- TRACE("(%p)->(ref=%d)\n", This, This->ref);
- ref = InterlockedDecrement(&This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0) OleAdviseHolderImpl_Destructor(This);
@@ -382,7 +382,7 @@ static HRESULT WINAPI OleAdviseHolderImpl_Unadvise(IOleAdviseHolder *iface,
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
DWORD index;
- TRACE("(%p)->(%u)\n", This, dwConnection);
+ TRACE("%p, %lu.\n", iface, dwConnection);
/* The connection number is 1 more than the index, see OleAdviseHolder_Advise */
index = dwConnection - 1;
@@ -609,8 +609,9 @@ static HRESULT WINAPI DataAdviseHolder_QueryInterface(IDataAdviseHolder *iface,
static ULONG WINAPI DataAdviseHolder_AddRef(IDataAdviseHolder *iface)
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- TRACE("(%p) (ref=%d)\n", This, This->ref);
- return InterlockedIncrement(&This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
+ return ref;
}
/************************************************************************
@@ -619,10 +620,10 @@ static ULONG WINAPI DataAdviseHolder_AddRef(IDataAdviseHolder *iface)
static ULONG WINAPI DataAdviseHolder_Release(IDataAdviseHolder *iface)
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- ULONG ref;
- TRACE("(%p) (ref=%d)\n", This, This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
- ref = InterlockedDecrement(&This->ref);
if (ref==0) DataAdviseHolder_Destructor(This);
return ref;
@@ -641,8 +642,7 @@ static HRESULT WINAPI DataAdviseHolder_Advise(IDataAdviseHolder *iface,
STATDATA new_conn;
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- TRACE("(%p)->(%p, %p, %08x, %p, %p)\n", This, pDataObject, pFetc, advf,
- pAdvise, pdwConnection);
+ TRACE("%p, %p, %p, %#lx, %p, %p.\n", iface, pDataObject, pFetc, advf, pAdvise, pdwConnection);
if (pdwConnection==NULL)
return E_POINTER;
@@ -709,7 +709,8 @@ static HRESULT WINAPI DataAdviseHolder_Unadvise(IDataAdviseHolder *iface,
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
DWORD index;
- TRACE("(%p)->(%u)\n", This, dwConnection);
+
+ TRACE("%p, %lu.\n", iface, dwConnection);
/* The connection number is 1 more than the index, see DataAdviseHolder_Advise */
index = dwConnection - 1;
@@ -756,7 +757,7 @@ static HRESULT WINAPI DataAdviseHolder_SendOnDataChange(IDataAdviseHolder *iface
IEnumSTATDATA *pEnum;
HRESULT hr;
- TRACE("(%p)->(%p, %08x, %08x)\n", iface, data_obj, dwReserved, advf);
+ TRACE("%p, %p, %#lx, %#lx.\n", iface, data_obj, dwReserved, advf);
hr = IDataAdviseHolder_EnumAdvise(iface, &pEnum);
if (SUCCEEDED(hr))
diff --git a/dlls/ole32/pointermoniker.c b/dlls/ole32/pointermoniker.c
index c95c835e9e3..0beab94c649 100644
--- a/dlls/ole32/pointermoniker.c
+++ b/dlls/ole32/pointermoniker.c
@@ -95,7 +95,7 @@ static ULONG WINAPI PointerMonikerImpl_AddRef(IMoniker *iface)
PointerMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -105,7 +105,7 @@ static ULONG WINAPI PointerMonikerImpl_Release(IMoniker *iface)
PointerMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -230,7 +230,7 @@ static HRESULT WINAPI
PointerMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar,
IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -509,7 +509,7 @@ static HRESULT WINAPI pointer_moniker_marshal_GetUnmarshalClass(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %x, %p, %x, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %lx, %p, %lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, clsid);
return IMoniker_GetClassID(&moniker->IMoniker_iface, clsid);
@@ -520,7 +520,7 @@ static HRESULT WINAPI pointer_moniker_marshal_GetMarshalSizeMax(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %d, %p, %#x, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %ld, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, size);
return CoGetMarshalSizeMax(size, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
@@ -531,7 +531,7 @@ static HRESULT WINAPI pointer_moniker_marshal_MarshalInterface(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %x, %p, %x.\n", stream, debugstr_guid(riid), pv,
+ TRACE("%p, %s, %p, %lx, %p, %lx.\n", stream, debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags);
return CoMarshalInterface(stream, &IID_IUnknown, moniker->pObject, dwDestContext,
@@ -550,7 +550,7 @@ static HRESULT WINAPI pointer_moniker_marshal_UnmarshalInterface(IMarshal *iface
hr = CoUnmarshalInterface(stream, &IID_IUnknown, (void **)&object);
if (FAILED(hr))
{
- ERR("Couldn't unmarshal moniker, hr = %#x.\n", hr);
+ ERR("Couldn't unmarshal moniker, hr = %#lx.\n", hr);
return hr;
}
@@ -570,7 +570,7 @@ static HRESULT WINAPI pointer_moniker_marshal_ReleaseMarshalData(IMarshal *iface
static HRESULT WINAPI pointer_moniker_marshal_DisconnectObject(IMarshal *iface, DWORD reserved)
{
- TRACE("%p, %#x.\n", iface, reserved);
+ TRACE("%p, %#lx.\n", iface, reserved);
return S_OK;
}
@@ -699,7 +699,7 @@ static ULONG WINAPI ObjrefMonikerImpl_AddRef(IMoniker *iface)
ObjrefMonikerImpl *moniker = objref_impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
return refcount;
}
@@ -709,7 +709,7 @@ static ULONG WINAPI ObjrefMonikerImpl_Release(IMoniker *iface)
ObjrefMonikerImpl *moniker = objref_impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
if (!refcount)
{
@@ -772,7 +772,7 @@ static HRESULT WINAPI ObjrefMonikerImpl_BindToStorage(IMoniker *iface, IBindCtx
static HRESULT WINAPI ObjrefMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD howfar,
IMoniker **left, IMoniker **reduced)
{
- FIXME("(%p,%p,%d,%p,%p): stub\n", iface, pbc, howfar, left, reduced);
+ FIXME("%p, %p, %ld, %p, %p: stub\n", iface, pbc, howfar, left, reduced);
return E_NOTIMPL;
}
@@ -930,7 +930,7 @@ static HRESULT WINAPI objref_moniker_marshal_GetUnmarshalClass(IMarshal *iface,
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%x,%p)\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %#lx, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, clsid);
return IMoniker_GetClassID(&moniker->IMoniker_iface, clsid);
@@ -941,7 +941,7 @@ static HRESULT WINAPI objref_moniker_marshal_GetMarshalSizeMax(IMarshal *iface,
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%08x,%p)\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %#lx, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, size);
return CoGetMarshalSizeMax(size, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
@@ -952,7 +952,7 @@ static HRESULT WINAPI objref_moniker_marshal_MarshalInterface(IMarshal *iface, I
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%08x)\n", stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags);
+ TRACE("%p, %s, %p, %#lx, %p, %#lx\n", stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags);
return CoMarshalInterface(stream, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
}
@@ -969,7 +969,7 @@ static HRESULT WINAPI objref_moniker_marshal_UnmarshalInterface(IMarshal *iface,
hr = CoUnmarshalInterface(stream, &IID_IUnknown, (void **)&object);
if (FAILED(hr))
{
- ERR("Couldn't unmarshal moniker, hr = %#x.\n", hr);
+ ERR("Couldn't unmarshal moniker, hr = %#lx.\n", hr);
return hr;
}
@@ -988,7 +988,7 @@ static HRESULT WINAPI objref_moniker_marshal_ReleaseMarshalData(IMarshal *iface,
static HRESULT WINAPI objref_moniker_marshal_DisconnectObject(IMarshal *iface, DWORD reserved)
{
- TRACE("(%p,%08x)\n", iface, reserved);
+ TRACE("%p, %#lx.\n", iface, reserved);
return S_OK;
}
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index cd30dad8c99..28793d7cbd5 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -211,7 +211,7 @@ static ULONG WINAPI enum_stat_prop_stg_AddRef(IEnumSTATPROPSTG *iface)
struct enum_stat_prop_stg *penum = impl_from_IEnumSTATPROPSTG(iface);
LONG refcount = InterlockedIncrement(&penum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -221,7 +221,7 @@ static ULONG WINAPI enum_stat_prop_stg_Release(IEnumSTATPROPSTG *iface)
struct enum_stat_prop_stg *penum = impl_from_IEnumSTATPROPSTG(iface);
LONG refcount = InterlockedDecrement(&penum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -239,7 +239,7 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel
ULONG count = 0;
WCHAR *name;
- TRACE("%p, %u, %p, %p.\n", iface, celt, ret, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, ret, fetched);
if (penum->current == ~0u)
penum->current = 0;
@@ -267,7 +267,7 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel
static HRESULT WINAPI enum_stat_prop_stg_Skip(IEnumSTATPROPSTG *iface, ULONG celt)
{
- FIXME("%p, %u.\n", iface, celt);
+ FIXME("%p, %lu.\n", iface, celt);
return S_OK;
}
@@ -486,7 +486,7 @@ static HRESULT WINAPI IPropertyStorage_fnReadMultiple(
HRESULT hr = S_OK;
ULONG i;
- TRACE("(%p, %d, %p, %p)\n", iface, cpspec, rgpspec, rgpropvar);
+ TRACE("%p, %lu, %p, %p\n", iface, cpspec, rgpspec, rgpropvar);
if (!cpspec)
return S_FALSE;
@@ -613,7 +613,7 @@ static HRESULT PropertyStorage_StringCopy(LPCSTR src, UINT srcCP, LPSTR *dst, UI
HeapFree(GetProcessHeap(), 0, wideStr_tmp);
}
}
- TRACE("returning 0x%08x (%s)\n", hr,
+ TRACE("returning %#lx (%s)\n", hr,
dstCP == CP_UNICODE ? debugstr_w((LPCWSTR)*dst) : debugstr_a(*dst));
return hr;
}
@@ -671,7 +671,7 @@ static HRESULT PropertyStorage_StorePropWithId(PropertyStorage_impl *This,
case VT_VECTOR|VT_I1:
This->format = 1;
}
- TRACE("Setting 0x%08x to type %d\n", propid, propvar->vt);
+ TRACE("Setting %#lx to type %d\n", propid, propvar->vt);
if (prop)
{
PropVariantClear(prop);
@@ -727,7 +727,7 @@ static HRESULT PropertyStorage_StoreNameWithId(PropertyStorage_impl *This,
if (strlen(name) >= MAX_VERSION_0_PROP_NAME_LENGTH)
This->format = 1;
}
- TRACE("Adding prop name %s, propid %d\n",
+ TRACE("Adding prop name %s, propid %ld\n",
This->codePage == CP_UNICODE ? debugstr_w((LPCWSTR)name) :
debugstr_a(name), id);
dictionary_insert(This->name_to_propid, name, UlongToPtr(id));
@@ -750,7 +750,7 @@ static HRESULT WINAPI IPropertyStorage_fnWriteMultiple(
HRESULT hr = S_OK;
ULONG i;
- TRACE("(%p, %d, %p, %p)\n", iface, cpspec, rgpspec, rgpropvar);
+ TRACE("%p, %lu, %p, %p.\n", iface, cpspec, rgpspec, rgpropvar);
if (cpspec && (!rgpspec || !rgpropvar))
return E_INVALIDARG;
@@ -849,7 +849,7 @@ static HRESULT WINAPI IPropertyStorage_fnDeleteMultiple(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, cpspec, rgpspec);
+ TRACE("%p, %ld, %p.\n", iface, cpspec, rgpspec);
if (cpspec && !rgpspec)
return E_INVALIDARG;
@@ -895,7 +895,7 @@ static HRESULT WINAPI IPropertyStorage_fnReadPropertyNames(
ULONG i;
HRESULT hr = S_FALSE;
- TRACE("(%p, %d, %p, %p)\n", iface, cpropid, rgpropid, rglpwstrName);
+ TRACE("%p, %ld, %p, %p.\n", iface, cpropid, rgpropid, rglpwstrName);
if (cpropid && (!rgpropid || !rglpwstrName))
return E_INVALIDARG;
@@ -935,7 +935,7 @@ static HRESULT WINAPI IPropertyStorage_fnWritePropertyNames(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p, %p)\n", iface, cpropid, rgpropid, rglpwstrName);
+ TRACE("%p, %lu, %p, %p.\n", iface, cpropid, rgpropid, rglpwstrName);
if (cpropid && (!rgpropid || !rglpwstrName))
return E_INVALIDARG;
@@ -968,7 +968,7 @@ static HRESULT WINAPI IPropertyStorage_fnDeletePropertyNames(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, cpropid, rgpropid);
+ TRACE("%p, %ld, %p.\n", iface, cpropid, rgpropid);
if (cpropid && !rgpropid)
return E_INVALIDARG;
@@ -1003,7 +1003,7 @@ static HRESULT WINAPI IPropertyStorage_fnCommit(
PropertyStorage_impl *This = impl_from_IPropertyStorage(iface);
HRESULT hr;
- TRACE("(%p, 0x%08x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
if (!(This->grfMode & STGM_READWRITE))
return STG_E_ACCESSDENIED;
@@ -1149,7 +1149,7 @@ static void PropertyStorage_PropNameDestroy(void *k, void *d, void *extra)
static int PropertyStorage_PropCompare(const void *a, const void *b,
void *extra)
{
- TRACE("(%u, %u)\n", PtrToUlong(a), PtrToUlong(b));
+ TRACE("%lu, %lu.\n", PtrToUlong(a), PtrToUlong(b));
return PtrToUlong(a) - PtrToUlong(b);
}
@@ -1279,12 +1279,12 @@ static HRESULT propertystorage_read_scalar(PROPVARIANT *prop, const struct read_
case VT_INT:
case VT_I4:
hr = buffer_read_dword(buffer, offset, (DWORD *)&prop->lVal);
- TRACE("Read long %d\n", prop->lVal);
+ TRACE("Read long %ld\n", prop->lVal);
break;
case VT_UINT:
case VT_UI4:
hr = buffer_read_dword(buffer, offset, &prop->ulVal);
- TRACE("Read ulong %d\n", prop->ulVal);
+ TRACE("Read ulong %ld\n", prop->ulVal);
break;
case VT_I8:
hr = buffer_read_uint64(buffer, offset, (ULARGE_INTEGER *)&prop->hVal);
@@ -1398,7 +1398,7 @@ static HRESULT propertystorage_read_scalar(PROPVARIANT *prop, const struct read_
if (prop->blob.pBlobData)
{
hr = buffer_read_len(buffer, offset, prop->blob.pBlobData, count);
- TRACE("Read blob value of size %d\n", count);
+ TRACE("Read blob value of size %ld\n", count);
}
else
hr = STG_E_INSUFFICIENTMEMORY;
@@ -1583,7 +1583,7 @@ static HRESULT PropertyStorage_ReadHeaderFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1600,7 +1600,7 @@ static HRESULT PropertyStorage_ReadHeaderFromStream(IStream *stm,
&hdr->reserved);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1618,7 +1618,7 @@ static HRESULT PropertyStorage_ReadFmtIdOffsetFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1629,7 +1629,7 @@ static HRESULT PropertyStorage_ReadFmtIdOffsetFromStream(IStream *stm,
&fmt->dwOffset);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1647,7 +1647,7 @@ static HRESULT PropertyStorage_ReadSectionHeaderFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1658,7 +1658,7 @@ static HRESULT PropertyStorage_ReadSectionHeaderFromStream(IStream *stm,
cProperties), &hdr->cProperties);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1677,7 +1677,7 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (FAILED(hr = buffer_read_dword(buffer, offset, &numEntries)))
return hr;
- TRACE("Reading %d entries:\n", numEntries);
+ TRACE("Reading %ld entries:\n", numEntries);
offset += sizeof(DWORD);
@@ -1697,7 +1697,7 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (FAILED(hr = buffer_test_offset(buffer, offset, This->codePage == CP_UNICODE ?
ALIGNED_LENGTH(cbEntry * sizeof(WCHAR), 3) : cbEntry)))
{
- WARN("Broken name length for entry %d.\n", i);
+ WARN("Broken name length for entry %ld.\n", i);
return hr;
}
@@ -1709,11 +1709,11 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (ch)
{
- WARN("Dictionary entry name %d is not null-terminated.\n", i);
+ WARN("Dictionary entry name %ld is not null-terminated.\n", i);
return E_FAIL;
}
- TRACE("Reading entry with ID %#x, %d chars, name %s.\n", propid, cbEntry, This->codePage == CP_UNICODE ?
+ TRACE("Reading entry with ID %#lx, %ld chars, name %s.\n", propid, cbEntry, This->codePage == CP_UNICODE ?
debugstr_wn((WCHAR *)buffer->data, cbEntry) : debugstr_an((char *)buffer->data, cbEntry));
hr = PropertyStorage_StoreNameWithId(This, (char *)buffer->data + offset, This->codePage, propid);
@@ -1796,8 +1796,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
goto end;
if (fmtOffset.dwOffset > stat.cbSize.u.LowPart)
{
- WARN("invalid offset %d (stream length is %d)\n", fmtOffset.dwOffset,
- stat.cbSize.u.LowPart);
+ WARN("invalid offset %ld (stream length is %ld)\n", fmtOffset.dwOffset, stat.cbSize.u.LowPart);
hr = STG_E_INVALIDHEADER;
goto end;
}
@@ -1814,7 +1813,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
/* The section size includes the section header, so check it */
if (sectionHdr.cbSection < sizeof(PROPERTYSECTIONHEADER))
{
- WARN("section header too small, got %d\n", sectionHdr.cbSection);
+ WARN("section header too small, got %ld\n", sectionHdr.cbSection);
hr = STG_E_INVALIDHEADER;
goto end;
}
@@ -1831,7 +1830,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
hr = IStream_Read(This->stm, read_buffer.data, read_buffer.size, &count);
if (FAILED(hr))
goto end;
- TRACE("Reading %d properties:\n", sectionHdr.cProperties);
+ TRACE("Reading %ld properties:\n", sectionHdr.cProperties);
for (i = 0; SUCCEEDED(hr) && i < sectionHdr.cProperties; i++)
{
PROPERTYIDOFFSET *idOffset = (PROPERTYIDOFFSET *)(read_buffer.data +
@@ -1853,7 +1852,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
* later.
*/
dictOffset = idOffset->dwOffset;
- TRACE("Dictionary offset is %d\n", dictOffset);
+ TRACE("Dictionary offset is %ld\n", dictOffset);
}
else
{
@@ -1864,8 +1863,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
idOffset->dwOffset - sizeof(PROPERTYSECTIONHEADER), This->codePage,
Allocate_CoTaskMemAlloc, NULL)))
{
- TRACE("Read property with ID 0x%08x, type %d\n",
- idOffset->propid, prop.vt);
+ TRACE("Read property with ID %#lx, type %d\n", idOffset->propid, prop.vt);
switch(idOffset->propid)
{
case PID_CODEPAGE:
@@ -1901,7 +1899,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
}
if (!This->locale)
This->locale = LOCALE_SYSTEM_DEFAULT;
- TRACE("Code page is %d, locale is %d\n", This->codePage, This->locale);
+ TRACE("Code page is %d, locale is %ld\n", This->codePage, This->locale);
if (dictOffset)
hr = PropertyStorage_ReadDictionary(This, &read_buffer, dictOffset - sizeof(PROPERTYSECTIONHEADER));
@@ -2088,7 +2086,7 @@ static HRESULT PropertyStorage_WriteDictionaryToStream(
if (closure.bytesWritten % sizeof(DWORD))
{
DWORD padding = sizeof(DWORD) - closure.bytesWritten % sizeof(DWORD);
- TRACE("adding %d bytes of padding\n", padding);
+ TRACE("adding %ld bytes of padding\n", padding);
*sectionOffset += padding;
}
@@ -2109,7 +2107,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
assert(var);
assert(sectionOffset);
- TRACE("%p, %d, 0x%08x, (%d), (%d)\n", This, propNum, propid, var->vt,
+ TRACE("%p, %ld, %#lx, %d, %ld.\n", This, propNum, propid, var->vt,
*sectionOffset);
seek.QuadPart = SECTIONHEADER_OFFSET + sizeof(PROPERTYSECTIONHEADER) +
@@ -2288,7 +2286,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
if (bytesWritten % sizeof(DWORD))
{
DWORD padding = sizeof(DWORD) - bytesWritten % sizeof(DWORD);
- TRACE("adding %d bytes of padding\n", padding);
+ TRACE("adding %ld bytes of padding\n", padding);
*sectionOffset += padding;
}
}
@@ -2578,7 +2576,7 @@ static HRESULT PropertyStorage_ConstructEmpty(IStream *stm,
else
ps->codePage = CP_UNICODE;
ps->locale = LOCALE_SYSTEM_DEFAULT;
- TRACE("Code page is %d, locale is %d\n", ps->codePage, ps->locale);
+ TRACE("Code page is %d, locale is %ld\n", ps->codePage, ps->locale);
*pps = &ps->IPropertyStorage_iface;
TRACE("PropertyStorage %p constructed\n", ps);
hr = S_OK;
@@ -2626,7 +2624,7 @@ static ULONG WINAPI enum_stat_propset_stg_AddRef(IEnumSTATPROPSETSTG *iface)
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
LONG refcount = InterlockedIncrement(&psenum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -2636,7 +2634,7 @@ static ULONG WINAPI enum_stat_propset_stg_Release(IEnumSTATPROPSETSTG *iface)
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
LONG refcount = InterlockedDecrement(&psenum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -2653,7 +2651,7 @@ static HRESULT WINAPI enum_stat_propset_stg_Next(IEnumSTATPROPSETSTG *iface, ULO
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
ULONG count = 0;
- TRACE("%p, %u, %p, %p.\n", iface, celt, ret, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, ret, fetched);
if (psenum->current == ~0u)
psenum->current = 0;
@@ -2669,7 +2667,7 @@ static HRESULT WINAPI enum_stat_propset_stg_Next(IEnumSTATPROPSETSTG *iface, ULO
static HRESULT WINAPI enum_stat_propset_stg_Skip(IEnumSTATPROPSETSTG *iface, ULONG celt)
{
- FIXME("%p, %u.\n", iface, celt);
+ FIXME("%p, %lu.\n", iface, celt);
return S_OK;
}
@@ -2840,7 +2838,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate(
IStream *stm = NULL;
HRESULT r;
- TRACE("%p %s %08x %08x %p\n", This, debugstr_guid(rfmtid), grfFlags,
+ TRACE("%p, %s %#lx, %#lx, %p.\n", This, debugstr_guid(rfmtid), grfFlags,
grfMode, ppprstg);
/* be picky */
@@ -2879,7 +2877,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate(
IStream_Release( stm );
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -2897,7 +2895,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen(
WCHAR name[CCH_MAX_PROPSTG_NAME + 1];
HRESULT r;
- TRACE("%p %s %08x %p\n", This, debugstr_guid(rfmtid), grfMode, ppprstg);
+ TRACE("%p, %s, %#lx, %p.\n", This, debugstr_guid(rfmtid), grfMode, ppprstg);
/* be picky */
if (grfMode != (STGM_READWRITE|STGM_SHARE_EXCLUSIVE) &&
@@ -2926,7 +2924,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen(
IStream_Release( stm );
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -3205,7 +3203,7 @@ SERIALIZEDPROPERTYVALUE* WINAPI StgConvertVariantToProperty(const PROPVARIANT *p
USHORT CodePage, SERIALIZEDPROPERTYVALUE *pprop, ULONG *pcb, PROPID pid,
BOOLEAN fReserved, ULONG *pcIndirect)
{
- FIXME("%p,%d,%p,%p,%d,%d,%p\n", pvar, CodePage, pprop, pcb, pid, fReserved, pcIndirect);
+ FIXME("%p, %d, %p, %p, %ld, %d, %p.\n", pvar, CodePage, pprop, pcb, pid, fReserved, pcIndirect);
return NULL;
}
@@ -3217,7 +3215,7 @@ HRESULT WINAPI StgCreatePropStg(IUnknown *unk, REFFMTID fmt, const CLSID *clsid,
IStream *stm;
HRESULT r;
- TRACE("%p %s %s %08x %d %p\n", unk, debugstr_guid(fmt), debugstr_guid(clsid), flags, reserved, prop_stg);
+ TRACE("%p, %s, %s, %#lx, %ld, %p.\n", unk, debugstr_guid(fmt), debugstr_guid(clsid), flags, reserved, prop_stg);
if (!fmt || reserved)
{
@@ -3251,7 +3249,7 @@ HRESULT WINAPI StgCreatePropStg(IUnknown *unk, REFFMTID fmt, const CLSID *clsid,
}
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -3262,7 +3260,7 @@ HRESULT WINAPI StgOpenPropStg(IUnknown *unk, REFFMTID fmt, DWORD flags,
IStream *stm;
HRESULT r;
- TRACE("%p %s %08x %d %p\n", unk, debugstr_guid(fmt), flags, reserved, prop_stg);
+ TRACE("%p, %s, %#lx, %ld, %p.\n", unk, debugstr_guid(fmt), flags, reserved, prop_stg);
if (!fmt || reserved)
{
@@ -3296,6 +3294,6 @@ HRESULT WINAPI StgOpenPropStg(IUnknown *unk, REFFMTID fmt, DWORD flags,
}
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c
index 1a5f061250e..73fc1cc9480 100644
--- a/dlls/ole32/stg_stream.c
+++ b/dlls/ole32/stg_stream.c
@@ -136,8 +136,7 @@ static HRESULT WINAPI StgStreamImpl_Read(
ULONG bytesReadBuffer;
HRESULT res;
- TRACE("(%p, %p, %d, %p)\n",
- iface, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", iface, pv, cb, pcbRead);
if (!This->parentStorage)
{
@@ -167,7 +166,7 @@ static HRESULT WINAPI StgStreamImpl_Read(
This->currentPosition.QuadPart += *pcbRead;
}
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -192,8 +191,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
ULONG bytesWritten = 0;
HRESULT res;
- TRACE("(%p, %p, %d, %p)\n",
- iface, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", iface, pv, cb, pcbWritten);
/*
* Do we have permission to write to this stream?
@@ -204,7 +202,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
case STGM_READWRITE:
break;
default:
- WARN("access denied by flags: 0x%x\n", STGM_ACCESS_MODE(This->grfMode));
+ WARN("access denied by flags: %#lx\n", STGM_ACCESS_MODE(This->grfMode));
return STG_E_ACCESSDENIED;
}
@@ -250,7 +248,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
if (SUCCEEDED(res))
res = StorageBaseImpl_Flush(This->parentStorage);
- TRACE("<-- %08x, written %u\n", res, *pcbWritten);
+ TRACE("<-- %#lx, written %lu\n", res, *pcbWritten);
return res;
}
@@ -274,8 +272,7 @@ static HRESULT WINAPI StgStreamImpl_Seek(
DirEntry currentEntry;
HRESULT hr;
- TRACE("(%p, %d, %d, %p)\n",
- iface, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
+ TRACE("%p, %ld, %ld, %p.\n", iface, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
/*
* fail if the stream has no parent (as does windows)
@@ -316,7 +313,7 @@ static HRESULT WINAPI StgStreamImpl_Seek(
*plibNewPosition = currentEntry.size;
break;
default:
- WARN("invalid dwOrigin %d\n", dwOrigin);
+ WARN("invalid dwOrigin %ld\n", dwOrigin);
return STG_E_INVALIDFUNCTION;
}
@@ -345,7 +342,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
HRESULT hr;
- TRACE("(%p, %d)\n", iface, libNewSize.u.LowPart);
+ TRACE("%p, %ld.\n", iface, libNewSize.u.LowPart);
if(!This->parentStorage)
{
@@ -358,7 +355,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
*/
if (libNewSize.u.HighPart != 0)
{
- WARN("invalid value for libNewSize.u.HighPart %d\n", libNewSize.u.HighPart);
+ WARN("invalid value for libNewSize.u.HighPart %ld\n", libNewSize.u.HighPart);
return STG_E_INVALIDFUNCTION;
}
@@ -400,8 +397,7 @@ static HRESULT WINAPI StgStreamImpl_CopyTo(
ULARGE_INTEGER totalBytesRead;
ULARGE_INTEGER totalBytesWritten;
- TRACE("(%p, %p, %d, %p, %p)\n",
- iface, pstm, cb.u.LowPart, pcbRead, pcbWritten);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pstm, cb.u.LowPart, pcbRead, pcbWritten);
/*
* Sanity check
@@ -547,7 +543,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
DirEntry currentEntry;
HRESULT hr;
- TRACE("%p %p %d\n", This, pstatstg, grfStatFlag);
+ TRACE("%p, %p, %#lx.\n", This, pstatstg, grfStatFlag);
/*
* if stream has no parent, return STG_E_REVERTED
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 1c1baa5ce08..fa7158bad1b 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -292,7 +292,7 @@ static HRESULT validateSTGM(DWORD stgm)
if (stgm&~STGM_KNOWN_FLAGS)
{
- ERR("unknown flags %08x\n", stgm);
+ ERR("unknown flags %#lx\n", stgm);
return E_FAIL;
}
@@ -463,7 +463,7 @@ static ULONG WINAPI directwriterlock_Release(IDirectWriterLock *iface)
static HRESULT WINAPI directwriterlock_WaitForWriteAccess(IDirectWriterLock *iface, DWORD timeout)
{
StorageBaseImpl *This = impl_from_IDirectWriterLock(iface);
- FIXME("(%p)->(%d): stub\n", This, timeout);
+ FIXME("%p, %ld: stub\n", This, timeout);
return E_NOTIMPL;
}
@@ -995,7 +995,7 @@ static HRESULT IEnumSTATSTGImpl_GetNextRef(
memcpy(This->name, result_name, sizeof(result_name));
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1013,7 +1013,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
DirRef currentSearchNode;
HRESULT hr=S_OK;
- TRACE("%p,%u,%p,%p\n", iface, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
if ( (rgelt==0) || ( (celt!=1) && (pceltFetched==0) ) )
return E_INVALIDARG;
@@ -1073,7 +1073,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
if (SUCCEEDED(hr) && *pceltFetched != celt)
hr = S_FALSE;
- TRACE("<-- %08x (asked %u, got %u)\n", hr, celt, *pceltFetched);
+ TRACE("<-- %#lx (asked %lu, got %lu)\n", hr, celt, *pceltFetched);
return hr;
}
@@ -1088,7 +1088,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip(
DirRef currentSearchNode;
HRESULT hr=S_OK;
- TRACE("%p,%u\n", iface, celt);
+ TRACE("%p, %lu.\n", iface, celt);
if (This->parentStorage->reverted)
{
@@ -1109,7 +1109,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip(
if (SUCCEEDED(hr) && objectFetched != celt)
return S_FALSE;
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1282,7 +1282,7 @@ static ULONG WINAPI StorageBaseImpl_AddRef(
StorageBaseImpl *This = impl_from_IStorage(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) AddRef to %d\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -1302,7 +1302,7 @@ static ULONG WINAPI StorageBaseImpl_Release(
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ReleaseRef to %d\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0)
{
@@ -1447,7 +1447,7 @@ static HRESULT StorageBaseImpl_CopyChildEntryTo(StorageBaseImpl *This,
hr = StorageBaseImpl_CopyChildEntryTo( This, data.rightChild, skip_storage,
skip_stream, snbExclude, pstgDest );
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1455,7 +1455,7 @@ static BOOL StorageBaseImpl_IsStreamOpen(StorageBaseImpl * stg, DirRef streamEnt
{
StgStreamImpl *strm;
- TRACE("%p,%d\n", stg, streamEntry);
+ TRACE("%p, %ld.\n", stg, streamEntry);
LIST_FOR_EACH_ENTRY(strm, &stg->strmHead, StgStreamImpl, StrmListEntry)
{
@@ -1472,7 +1472,7 @@ static BOOL StorageBaseImpl_IsStorageOpen(StorageBaseImpl * stg, DirRef storageE
{
StorageInternalImpl *childstg;
- TRACE("%p,%d\n", stg, storageEntry);
+ TRACE("%p, %ld.\n", stg, storageEntry);
LIST_FOR_EACH_ENTRY(childstg, &stg->storageHead, StorageInternalImpl, ParentListEntry)
{
@@ -1506,8 +1506,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream(
DirRef streamEntryRef;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %s, %p, %x, %d, %p)\n",
- iface, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
+ TRACE("%p, %s, %p, %#lx, %ld, %p.\n", iface, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
if ( (pwcsName==NULL) || (ppstm==0) )
{
@@ -1595,7 +1594,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream(
end:
if (res == S_OK)
TRACE("<-- IStream %p\n", *ppstm);
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1622,9 +1621,8 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
DirRef storageEntryRef;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %s, %p, %x, %p, %d, %p)\n",
- iface, debugstr_w(pwcsName), pstgPriority,
- grfMode, snbExclude, reserved, ppstg);
+ TRACE("%p, %s, %p, %#lx, %p, %ld, %p.\n", iface, debugstr_w(pwcsName), pstgPriority,
+ grfMode, snbExclude, reserved, ppstg);
if ((pwcsName==NULL) || (ppstg==0) )
{
@@ -1732,7 +1730,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
res = STG_E_FILENOTFOUND;
end:
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1754,8 +1752,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements(
StorageBaseImpl *This = impl_from_IStorage(iface);
IEnumSTATSTGImpl* newEnum;
- TRACE("(%p, %d, %p, %d, %p)\n",
- iface, reserved1, reserved2, reserved3, ppenum);
+ TRACE("%p, %ld, %p, %ld, %p.\n", iface, reserved1, reserved2, reserved3, ppenum);
if (!ppenum)
return E_INVALIDARG;
@@ -1792,8 +1789,7 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
DirEntry currentEntry;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %p, %x)\n",
- iface, pstatstg, grfStatFlag);
+ TRACE("%p, %p, %#lx.\n", iface, pstatstg, grfStatFlag);
if (!pstatstg)
{
@@ -1827,9 +1823,9 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
end:
if (res == S_OK)
{
- TRACE("<-- STATSTG: pwcsName: %s, type: %d, cbSize.Low/High: %d/%d, grfMode: %08x, grfLocksSupported: %d, grfStateBits: %08x\n", debugstr_w(pstatstg->pwcsName), pstatstg->type, pstatstg->cbSize.u.LowPart, pstatstg->cbSize.u.HighPart, pstatstg->grfMode, pstatstg->grfLocksSupported, pstatstg->grfStateBits);
+ TRACE("<-- STATSTG: pwcsName: %s, type: %ld, cbSize.Low/High: %ld/%ld, grfMode: %#lx, grfLocksSupported: %ld, grfStateBits: %#lx\n", debugstr_w(pstatstg->pwcsName), pstatstg->type, pstatstg->cbSize.u.LowPart, pstatstg->cbSize.u.HighPart, pstatstg->grfMode, pstatstg->grfLocksSupported, pstatstg->grfStateBits);
}
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1935,9 +1931,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
DirRef currentEntryRef, newStreamEntryRef;
HRESULT hr;
- TRACE("(%p, %s, %x, %d, %d, %p)\n",
- iface, debugstr_w(pwcsName), grfMode,
- reserved1, reserved2, ppstm);
+ TRACE("%p, %s, %#lx, %ld, %ld, %p.\n", iface, debugstr_w(pwcsName), grfMode, reserved1, reserved2, ppstm);
if (ppstm == 0)
return STG_E_INVALIDPOINTER;
@@ -2130,9 +2124,8 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
DirRef newEntryRef;
HRESULT hr;
- TRACE("(%p, %s, %x, %d, %d, %p)\n",
- iface, debugstr_w(pwcsName), grfMode,
- reserved1, reserved2, ppstg);
+ TRACE("%p, %s, %#lx, %ld, %ld, %p.\n", iface, debugstr_w(pwcsName), grfMode,
+ reserved1, reserved2, ppstg);
if (ppstg == 0)
return STG_E_INVALIDPOINTER;
@@ -2150,7 +2143,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
if ( FAILED( validateSTGM(grfMode) ) ||
(grfMode & STGM_DELETEONRELEASE) )
{
- WARN("bad grfMode: 0x%x\n", grfMode);
+ WARN("bad grfMode: %#lx\n", grfMode);
return STG_E_INVALIDFLAG;
}
@@ -2278,7 +2271,7 @@ static HRESULT StorageBaseImpl_CopyStorageEntryTo(StorageBaseImpl *This,
hr = StorageBaseImpl_CopyChildEntryTo( This, data.dirRootEntry, skip_storage,
skip_stream, snbExclude, pstgDest );
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2297,9 +2290,7 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo(
BOOL skip_storage = FALSE, skip_stream = FALSE;
DWORD i;
- TRACE("(%p, %d, %p, %p, %p)\n",
- iface, ciidExclude, rgiidExclude,
- snbExclude, pstgDest);
+ TRACE("%p, %ld, %p, %p, %p.\n", iface, ciidExclude, rgiidExclude, snbExclude, pstgDest);
if ( pstgDest == 0 )
return STG_E_INVALIDPOINTER;
@@ -2381,9 +2372,8 @@ static HRESULT WINAPI StorageBaseImpl_MoveElementTo(
const OLECHAR *pwcsNewName,/* [string][in] */
DWORD grfFlags) /* [in] */
{
- FIXME("(%p %s %p %s %u): stub\n", iface,
- debugstr_w(pwcsName), pstgDest,
- debugstr_w(pwcsNewName), grfFlags);
+ FIXME("%p, %s, %p, %s, %#lx: stub\n", iface, debugstr_w(pwcsName), pstgDest,
+ debugstr_w(pwcsNewName), grfFlags);
return E_NOTIMPL;
}
@@ -2400,7 +2390,7 @@ static HRESULT WINAPI StorageBaseImpl_Commit(
DWORD grfCommitFlags)/* [in] */
{
StorageBaseImpl* This = impl_from_IStorage(iface);
- TRACE("(%p %d)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
return StorageBaseImpl_Flush(This);
}
@@ -2435,7 +2425,7 @@ static HRESULT deleteStorageContents(
HRESULT destroyHr = S_OK;
StorageInternalImpl *stg, *stg2;
- TRACE("%p,%d\n", parentStorage, indexToDelete);
+ TRACE("%p, %ld.\n", parentStorage, indexToDelete);
/* Invalidate any open storage objects. */
LIST_FOR_EACH_ENTRY_SAFE(stg, stg2, &parentStorage->storageHead, StorageInternalImpl, ParentListEntry)
@@ -2460,7 +2450,7 @@ static HRESULT deleteStorageContents(
if (hr != S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2471,7 +2461,7 @@ static HRESULT deleteStorageContents(
if (FAILED(hr))
{
IStorage_Release(childStorage);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2499,7 +2489,7 @@ static HRESULT deleteStorageContents(
IStorage_Release(childStorage);
IEnumSTATSTG_Release(elements);
- TRACE("%08x\n", hr);
+ TRACE("%#lx\n", hr);
return destroyHr;
}
@@ -2539,7 +2529,7 @@ static HRESULT deleteStreamContents(
if (hr!=S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return(hr);
}
@@ -2550,7 +2540,7 @@ static HRESULT deleteStreamContents(
if(hr != S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2558,7 +2548,7 @@ static HRESULT deleteStreamContents(
* Release the stream object.
*/
IStream_Release(pis);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return S_OK;
}
@@ -2625,7 +2615,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement(
if (hr!=S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2646,7 +2636,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement(
if (SUCCEEDED(hr))
hr = StorageBaseImpl_Flush(This);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2995,7 +2985,7 @@ static HRESULT StorageImpl_LoadFileHeader(
This->smallBlockSize != DEF_SMALL_BLOCK_SIZE ||
This->smallBlockLimit != LIMIT_TO_USE_SMALL_BLOCK)
{
- FIXME("Broken OLE storage file? bigblock=0x%x, smallblock=0x%x, sblimit=0x%x\n",
+ FIXME("Broken OLE storage file? bigblock=%#lx, smallblock=%#lx, sblimit=%#lx\n",
This->bigBlockSize, This->smallBlockSize, This->smallBlockLimit);
hr = STG_E_INVALIDHEADER;
}
@@ -3676,7 +3666,7 @@ static BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
if (FAILED(resRead) || FAILED(resWrite))
{
- ERR("conversion failed: resRead = 0x%08x, resWrite = 0x%08x\n", resRead, resWrite);
+ ERR("conversion failed: resRead = %#lx, resWrite = %#lx\n", resRead, resWrite);
BlockChainStream_SetSize(bbTempChain, size);
BlockChainStream_Destroy(bbTempChain);
return NULL;
@@ -3781,7 +3771,7 @@ static SmallBlockChainStream* Storage32Impl_BigBlocksToSmallBlocks(
if(FAILED(resRead) || FAILED(resWrite))
{
- ERR("conversion failed: resRead = 0x%08x, resWrite = 0x%08x\n", resRead, resWrite);
+ ERR("conversion failed: resRead = %#lx, resWrite = %#lx\n", resRead, resWrite);
SmallBlockChainStream_SetSize(sbTempChain, size);
SmallBlockChainStream_Destroy(sbTempChain);
return NULL;
@@ -4010,8 +4000,7 @@ static HRESULT StorageImpl_GetNextBlockInChain(
if(depotBlockCount >= This->bigBlockDepotCount)
{
- WARN("depotBlockCount %d, bigBlockDepotCount %d\n", depotBlockCount,
- This->bigBlockDepotCount);
+ WARN("depotBlockCount %ld, bigBlockDepotCount %ld\n", depotBlockCount, This->bigBlockDepotCount);
return STG_E_READFAULT;
}
@@ -5476,7 +5465,7 @@ static HRESULT WINAPI StorageInternalImpl_Commit(
DWORD grfCommitFlags) /* [in] */
{
StorageBaseImpl* This = impl_from_IStorage(iface);
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
return StorageBaseImpl_Flush(This);
}
@@ -5942,7 +5931,7 @@ static HRESULT WINAPI TransactedSnapshotImpl_Commit(
zero.QuadPart = 0;
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
/* Cannot commit a read-only transacted storage */
if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ )
@@ -6059,7 +6048,7 @@ end:
StorageBaseImpl_UnlockTransaction(This->transactedParent, TRUE);
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6152,7 +6141,7 @@ static HRESULT TransactedSnapshotImpl_CreateDirEntry(StorageBaseImpl *base,
*index = new_ref;
- TRACE("%s l=%x r=%x d=%x <-- %x\n", debugstr_w(newData->name), newData->leftChild, newData->rightChild, newData->dirRootEntry, *index);
+ TRACE("%s l=%lx r=%lx d=%lx <-- %lx\n", debugstr_w(newData->name), newData->leftChild, newData->rightChild, newData->dirRootEntry, *index);
return S_OK;
}
@@ -6163,12 +6152,12 @@ static HRESULT TransactedSnapshotImpl_WriteDirEntry(StorageBaseImpl *base,
TransactedSnapshotImpl* This = (TransactedSnapshotImpl*) base;
HRESULT hr;
- TRACE("%x %s l=%x r=%x d=%x\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
+ TRACE("%lx %s l=%lx r=%lx d=%lx\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6205,13 +6194,13 @@ static HRESULT TransactedSnapshotImpl_ReadDirEntry(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
memcpy(data, &This->entries[index].data, sizeof(DirEntry));
- TRACE("%x %s l=%x r=%x d=%x\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
+ TRACE("%lx %s l=%lx r=%lx d=%lx\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
return S_OK;
}
@@ -6271,14 +6260,14 @@ static HRESULT TransactedSnapshotImpl_StreamWriteAt(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
hr = TransactedSnapshotImpl_MakeStreamDirty(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6290,7 +6279,7 @@ static HRESULT TransactedSnapshotImpl_StreamWriteAt(StorageBaseImpl *base,
This->entries[index].data.size.QuadPart,
offset.QuadPart + size);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6303,7 +6292,7 @@ static HRESULT TransactedSnapshotImpl_StreamSetSize(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6346,7 +6335,7 @@ static HRESULT TransactedSnapshotImpl_StreamSetSize(StorageBaseImpl *base,
if (SUCCEEDED(hr))
This->entries[index].data.size = newsize;
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6360,14 +6349,14 @@ static HRESULT TransactedSnapshotImpl_StreamLink(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, src);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
hr = TransactedSnapshotImpl_EnsureReadEntry(This, dst);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6656,7 +6645,7 @@ static HRESULT WINAPI TransactedSharedImpl_Commit(
HRESULT hr;
ULONG transactionSig;
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx\n", iface, grfCommitFlags);
/* Cannot commit a read-only transacted storage */
if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ )
@@ -6724,7 +6713,7 @@ static HRESULT WINAPI TransactedSharedImpl_Commit(
This->lastTransactionSig = transactionSig+1;
}
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6862,7 +6851,7 @@ static HRESULT Storage_ConstructTransacted(StorageBaseImpl *parentStorage,
if (parentStorage->openFlags & fixme_flags)
{
fixme_flags &= ~parentStorage->openFlags;
- FIXME("Unimplemented flags %x\n", parentStorage->openFlags);
+ FIXME("Unimplemented flags %lx\n", parentStorage->openFlags);
}
if (toplevel && !(parentStorage->openFlags & STGM_NOSNAPSHOT) &&
@@ -7590,7 +7579,7 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This,
HRESULT hr;
BlockChainBlock *cachedBlock;
- TRACE("(%p)-> %i %p %i %p\n",This, offset.u.LowPart, buffer, size, bytesRead);
+ TRACE("%p, %li, %p, %lu, %p.\n",This, offset.u.LowPart, buffer, size, bytesRead);
/*
* Find the first block in the stream that contains part of the buffer.
@@ -8581,7 +8570,7 @@ static HRESULT create_storagefile(
IStorage_Release(&newStorage->IStorage_iface);
end:
- TRACE("<-- %p r = %08x\n", *ppstgOpen, hr);
+ TRACE("<-- %p r = %#lx\n", *ppstgOpen, hr);
return hr;
}
@@ -8613,9 +8602,7 @@ HRESULT WINAPI StgCreateDocfile(
{
STGOPTIONS stgoptions = {1, 0, 512};
- TRACE("(%s, %x, %d, %p)\n",
- debugstr_w(pwcsName), grfMode,
- reserved, ppstgOpen);
+ TRACE("%s, %#lx, %ld, %p.\n", debugstr_w(pwcsName), grfMode, reserved, ppstgOpen);
if (ppstgOpen == 0)
return STG_E_INVALIDPOINTER;
@@ -8630,7 +8617,7 @@ HRESULT WINAPI StgCreateDocfile(
*/
HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen)
{
- TRACE("(%s, %x, %x, %x, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
+ TRACE("%s, %#lx, %#lx, %#lx, %p, %p, %p, %p.\n", debugstr_w(pwcsName),
grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
if (stgfmt != STGFMT_FILE && grfAttrs != 0)
@@ -8670,7 +8657,7 @@ HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD st
HRESULT WINAPI StgCreatePropSetStg(IStorage *pstg, DWORD reserved,
IPropertySetStorage **propset)
{
- TRACE("(%p, 0x%x, %p)\n", pstg, reserved, propset);
+ TRACE("%p, %#lx, %p.\n", pstg, reserved, propset);
if (reserved)
return STG_E_INVALIDPARAMETER;
@@ -8682,7 +8669,7 @@ HRESULT WINAPI StgCreatePropSetStg(IStorage *pstg, DWORD reserved,
*/
HRESULT WINAPI StgOpenStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen)
{
- TRACE("(%s, %x, %x, %x, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
+ TRACE("%s, %#lx, %#lx, %#lx, %p, %p, %p, %p.\n", debugstr_w(pwcsName),
grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
if (stgfmt != STGFMT_DOCFILE && grfAttrs != 0)
@@ -8739,9 +8726,8 @@ HRESULT WINAPI StgOpenStorage(
DWORD accessMode;
LPWSTR temp_name = NULL;
- TRACE("(%s, %p, %x, %p, %d, %p)\n",
- debugstr_w(pwcsName), pstgPriority, grfMode,
- snbExclude, reserved, ppstgOpen);
+ TRACE("%s, %p, %#lx, %p, %ld, %p.\n", debugstr_w(pwcsName), pstgPriority, grfMode,
+ snbExclude, reserved, ppstgOpen);
if (pstgPriority)
{
@@ -8908,7 +8894,7 @@ HRESULT WINAPI StgOpenStorage(
end:
CoTaskMemFree(temp_name);
if (pstgPriority) IStorage_Release(pstgPriority);
- TRACE("<-- %08x, IStorage %p\n", hr, ppstgOpen ? *ppstgOpen : NULL);
+ TRACE("<-- %#lx, IStorage %p\n", hr, ppstgOpen ? *ppstgOpen : NULL);
return hr;
}
@@ -9242,7 +9228,7 @@ static HRESULT STREAM_ReadString( IStream *stm, LPWSTR *string )
if( count != sizeof(len) )
return E_OUTOFMEMORY;
- TRACE("%d bytes\n",len);
+ TRACE("%ld bytes\n",len);
str = CoTaskMemAlloc( len );
if( !str )
@@ -9381,7 +9367,7 @@ HRESULT WINAPI ReadFmtUserTypeStg (LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lp
r = IStorage_OpenStream( pstg, L"\1CompObj", NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm );
if( FAILED ( r ) )
{
- WARN("Failed to open stream r = %08x\n", r);
+ WARN("Failed to open stream r = %#lx\n", r);
return r;
}
@@ -10576,7 +10562,7 @@ enum stream_1ole_flags {
HRESULT WINAPI OleConvertIStorageToOLESTREAMEx ( LPSTORAGE stg, CLIPFORMAT cf, LONG width, LONG height,
DWORD size, LPSTGMEDIUM medium, LPOLESTREAM olestream )
{
- FIXME("%p %x %d %d %d %p %p stub\n", stg, cf, width, height, size, medium, olestream);
+ FIXME("%p, %x, %ld, %ld, %ld, %p, %p: stub\n", stg, cf, width, height, size, medium, olestream);
return E_NOTIMPL;
}
@@ -10604,7 +10590,7 @@ HRESULT WINAPI GetConvertStg(IStorage *stg)
if (header[0] != version_magic)
{
- ERR("got wrong version magic for 1Ole stream, 0x%08x\n", header[0]);
+ ERR("got wrong version magic for 1Ole stream, %#lx.\n", header[0]);
return E_FAIL;
}
diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c
index c58053489be..9a8ab431ea0 100644
--- a/dlls/ole32/usrmarshal.c
+++ b/dlls/ole32/usrmarshal.c
@@ -106,7 +106,7 @@ ULONG __RPC_USER HMETAFILE_UserSize(ULONG *pFlags, ULONG StartingSize, HMETAFILE
{
ULONG size = StartingSize;
- TRACE("(%s, %d, &%p\n", debugstr_user_flags(pFlags), StartingSize, *phmf);
+ TRACE("%s, %lu, &%p.\n", debugstr_user_flags(pFlags), StartingSize, *phmf);
ALIGN_LENGTH(size, 3);
@@ -302,7 +302,7 @@ void __RPC_USER HMETAFILE_UserFree(ULONG *pFlags, HMETAFILE *phmf)
*/
ULONG __RPC_USER HENHMETAFILE_UserSize(ULONG *pFlags, ULONG size, HENHMETAFILE *phEmf)
{
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), size, *phEmf);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), size, *phEmf);
ALIGN_LENGTH(size, 3);
@@ -498,7 +498,7 @@ void __RPC_USER HENHMETAFILE_UserFree(ULONG *pFlags, HENHMETAFILE *phEmf)
*/
ULONG __RPC_USER HMETAFILEPICT_UserSize(ULONG *pFlags, ULONG size, HMETAFILEPICT *phMfp)
{
- TRACE("(%s, %d, &%p)\n", debugstr_user_flags(pFlags), size, *phMfp);
+ TRACE("%s, %lu, &%p.\n", debugstr_user_flags(pFlags), size, *phMfp);
ALIGN_LENGTH(size, 3);
@@ -721,7 +721,7 @@ ULONG __RPC_USER STGMEDIUM_UserSize(ULONG *pFlags, ULONG StartingSize, STGMEDIUM
{
ULONG size = StartingSize;
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pStgMedium);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), StartingSize, pStgMedium);
ALIGN_LENGTH(size, 3);
@@ -961,7 +961,7 @@ unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(ULONG *pFlags, unsigned char
pBuffer += sizeof(DWORD);
if (*(DWORD *)pBuffer != 0)
{
- ERR("invalid offset %d\n", *(DWORD *)pBuffer);
+ ERR("invalid offset %ld\n", *(DWORD *)pBuffer);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
@@ -970,14 +970,13 @@ unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(ULONG *pFlags, unsigned char
pBuffer += sizeof(DWORD);
if (conformance != variance)
{
- ERR("conformance (%d) and variance (%d) should be equal\n",
- conformance, variance);
+ ERR("conformance (%ld) and variance (%ld) should be equal\n", conformance, variance);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
if (conformance > 0x7fffffff)
{
- ERR("conformance 0x%x too large\n", conformance);
+ ERR("conformance %#lx too large\n", conformance);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
@@ -1141,7 +1140,7 @@ ULONG __RPC_USER SNB_UserSize(ULONG *pFlags, ULONG StartingSize, SNB *pSnb)
{
ULONG size = StartingSize;
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pSnb);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), StartingSize, pSnb);
ALIGN_LENGTH(size, 3);
@@ -1305,7 +1304,7 @@ HRESULT CALLBACK IEnumUnknown_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumUnknown_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1317,7 +1316,7 @@ HRESULT __RPC_STUB IEnumUnknown_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumUnknown_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1363,7 +1362,7 @@ HRESULT CALLBACK IEnumMoniker_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumMoniker_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1375,7 +1374,7 @@ HRESULT __RPC_STUB IEnumMoniker_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumMoniker_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1449,7 +1448,7 @@ HRESULT CALLBACK IEnumString_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumString_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1461,7 +1460,7 @@ HRESULT __RPC_STUB IEnumString_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumString_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1477,7 +1476,7 @@ HRESULT CALLBACK ISequentialStream_Read_Proxy(
ULONG read;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbRead);
hr = ISequentialStream_RemoteRead_Proxy(This, pv, cb, &read);
if(pcbRead) *pcbRead = read;
@@ -1491,7 +1490,7 @@ HRESULT __RPC_STUB ISequentialStream_Read_Stub(
ULONG cb,
ULONG *pcbRead)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbRead);
return ISequentialStream_Read(This, pv, cb, pcbRead);
}
@@ -1504,7 +1503,7 @@ HRESULT CALLBACK ISequentialStream_Write_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
hr = ISequentialStream_RemoteWrite_Proxy(This, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1518,7 +1517,7 @@ HRESULT __RPC_STUB ISequentialStream_Write_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
return ISequentialStream_Write(This, pv, cb, pcbWritten);
}
@@ -1531,7 +1530,7 @@ HRESULT CALLBACK IStream_Seek_Proxy(
ULARGE_INTEGER newpos;
HRESULT hr;
- TRACE("(%p)->(%s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
+ TRACE("%p, %s, %ld, %p.\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
hr = IStream_RemoteSeek_Proxy(This, dlibMove, dwOrigin, &newpos);
if(plibNewPosition) *plibNewPosition = newpos;
@@ -1545,7 +1544,7 @@ HRESULT __RPC_STUB IStream_Seek_Stub(
DWORD dwOrigin,
ULARGE_INTEGER *plibNewPosition)
{
- TRACE("(%p)->(%s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
+ TRACE("%p, %s, %ld, %p.\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
return IStream_Seek(This, dlibMove, dwOrigin, plibNewPosition);
}
@@ -1587,7 +1586,7 @@ HRESULT CALLBACK IEnumSTATSTG_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumSTATSTG_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1599,7 +1598,7 @@ HRESULT __RPC_STUB IEnumSTATSTG_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumSTATSTG_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1614,7 +1613,7 @@ HRESULT CALLBACK IStorage_OpenStream_Proxy(
DWORD reserved2,
IStream **ppstm)
{
- TRACE("(%p)->(%s, %p, %08x, %d %p)\n", This, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
+ TRACE("%p, %s, %p, %#lx, %ld, %p.\n", This, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
if(reserved1) WARN("reserved1 %p\n", reserved1);
return IStorage_RemoteOpenStream_Proxy(This, pwcsName, 0, NULL, grfMode, reserved2, ppstm);
@@ -1629,8 +1628,8 @@ HRESULT __RPC_STUB IStorage_OpenStream_Stub(
DWORD reserved2,
IStream **ppstm)
{
- TRACE("(%p)->(%s, %d, %p, %08x, %d %p)\n", This, debugstr_w(pwcsName), cbReserved1, reserved1, grfMode, reserved2, ppstm);
- if(cbReserved1 || reserved1) WARN("cbReserved1 %d reserved1 %p\n", cbReserved1, reserved1);
+ TRACE("%p, %s, %ld, %p, %#lx, %ld, %p.\n", This, debugstr_w(pwcsName), cbReserved1, reserved1, grfMode, reserved2, ppstm);
+ if(cbReserved1 || reserved1) WARN("cbReserved1 %ld reserved1 %p\n", cbReserved1, reserved1);
return IStorage_OpenStream(This, pwcsName, NULL, grfMode, reserved2, ppstm);
}
@@ -1642,7 +1641,7 @@ HRESULT CALLBACK IStorage_EnumElements_Proxy(
DWORD reserved3,
IEnumSTATSTG **ppenum)
{
- TRACE("(%p)->(%d, %p, %d, %p)\n", This, reserved1, reserved2, reserved3, ppenum);
+ TRACE("%p, %ld, %p, %ld, %p.\n", This, reserved1, reserved2, reserved3, ppenum);
if(reserved2) WARN("reserved2 %p\n", reserved2);
return IStorage_RemoteEnumElements_Proxy(This, reserved1, 0, NULL, reserved3, ppenum);
@@ -1656,8 +1655,8 @@ HRESULT __RPC_STUB IStorage_EnumElements_Stub(
DWORD reserved3,
IEnumSTATSTG **ppenum)
{
- TRACE("(%p)->(%d, %d, %p, %d, %p)\n", This, reserved1, cbReserved2, reserved2, reserved3, ppenum);
- if(cbReserved2 || reserved2) WARN("cbReserved2 %d reserved2 %p\n", cbReserved2, reserved2);
+ TRACE("%p, %ld, %ld, %p, %ld, %p.\n", This, reserved1, cbReserved2, reserved2, reserved3, ppenum);
+ if(cbReserved2 || reserved2) WARN("cbReserved2 %ld reserved2 %p\n", cbReserved2, reserved2);
return IStorage_EnumElements(This, reserved1, NULL, reserved3, ppenum);
}
@@ -1672,7 +1671,7 @@ HRESULT CALLBACK ILockBytes_ReadAt_Proxy(
ULONG read;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
hr = ILockBytes_RemoteReadAt_Proxy(This, ulOffset, pv, cb, &read);
if(pcbRead) *pcbRead = read;
@@ -1687,7 +1686,7 @@ HRESULT __RPC_STUB ILockBytes_ReadAt_Stub(
ULONG cb,
ULONG *pcbRead)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
return ILockBytes_ReadAt(This, ulOffset, pv, cb, pcbRead);
}
@@ -1701,7 +1700,7 @@ HRESULT CALLBACK ILockBytes_WriteAt_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
hr = ILockBytes_RemoteWriteAt_Proxy(This, ulOffset, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1716,7 +1715,7 @@ HRESULT __RPC_STUB ILockBytes_WriteAt_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
return ILockBytes_WriteAt(This, ulOffset, pv, cb, pcbWritten);
}
@@ -1729,7 +1728,7 @@ HRESULT CALLBACK IFillLockBytes_FillAppend_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
hr = IFillLockBytes_RemoteFillAppend_Proxy(This, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1743,7 +1742,7 @@ HRESULT __RPC_STUB IFillLockBytes_FillAppend_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
return IFillLockBytes_FillAppend(This, pv, cb, pcbWritten);
}
@@ -1757,7 +1756,7 @@ HRESULT CALLBACK IFillLockBytes_FillAt_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
hr = IFillLockBytes_RemoteFillAt_Proxy(This, ulOffset, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1772,7 +1771,7 @@ HRESULT __RPC_STUB IFillLockBytes_FillAt_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %ld, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
return IFillLockBytes_FillAt(This, ulOffset, pv, cb, pcbWritten);
}
@@ -1807,7 +1806,7 @@ HRESULT CALLBACK IEnumSTATDATA_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %ld, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumSTATDATA_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1819,7 +1818,7 @@ HRESULT __RPC_STUB IEnumSTATDATA_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumSTATDATA_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1850,7 +1849,7 @@ void CALLBACK IAdviseSink_OnViewChange_Proxy(
DWORD dwAspect,
LONG lindex)
{
- TRACE("(%p)->(%d, %d)\n", This, dwAspect, lindex);
+ TRACE("%p, %ld, %ld.\n", This, dwAspect, lindex);
IAdviseSink_RemoteOnViewChange_Proxy(This, dwAspect, lindex);
}
@@ -1859,7 +1858,7 @@ HRESULT __RPC_STUB IAdviseSink_OnViewChange_Stub(
DWORD dwAspect,
LONG lindex)
{
- TRACE("(%p)->(%d, %d)\n", This, dwAspect, lindex);
+ TRACE("%p, %ld, %ld.\n", This, dwAspect, lindex);
IAdviseSink_OnViewChange(This, dwAspect, lindex);
return S_OK;
}
@@ -2054,7 +2053,7 @@ HRESULT CALLBACK IOleCache2_UpdateCache_Proxy(
DWORD grfUpdf,
LPVOID pReserved)
{
- TRACE("(%p, %p, 0x%08x, %p)\n", This, pDataObject, grfUpdf, pReserved);
+ TRACE("%p, %p, %#lx, %p.\n", This, pDataObject, grfUpdf, pReserved);
return IOleCache2_RemoteUpdateCache_Proxy(This, pDataObject, grfUpdf, (LONG_PTR)pReserved);
}
@@ -2064,7 +2063,7 @@ HRESULT __RPC_STUB IOleCache2_UpdateCache_Stub(
DWORD grfUpdf,
LONG_PTR pReserved)
{
- TRACE("(%p, %p, 0x%08x, %li)\n", This, pDataObject, grfUpdf, pReserved);
+ TRACE("%p, %p, %#lx, %Id.\n", This, pDataObject, grfUpdf, pReserved);
return IOleCache2_UpdateCache(This, pDataObject, grfUpdf, (void*)pReserved);
}
@@ -2075,7 +2074,7 @@ HRESULT CALLBACK IEnumOLEVERB_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumOLEVERB_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -2087,7 +2086,7 @@ HRESULT __RPC_STUB IEnumOLEVERB_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumOLEVERB_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
--
2.34.1
2
1
09 Feb '22
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/xolehlp/Makefile.in | 1 -
dlls/xolehlp/xolehlp.c | 34 +++++++++++++++++-----------------
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/dlls/xolehlp/Makefile.in b/dlls/xolehlp/Makefile.in
index c2bebe884fe..f39cd90f0b9 100644
--- a/dlls/xolehlp/Makefile.in
+++ b/dlls/xolehlp/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = xolehlp.dll
IMPORTS = uuid
diff --git a/dlls/xolehlp/xolehlp.c b/dlls/xolehlp/xolehlp.c
index d3355c1c34e..e61f4b35fc8 100644
--- a/dlls/xolehlp/xolehlp.c
+++ b/dlls/xolehlp/xolehlp.c
@@ -68,7 +68,7 @@ static ULONG WINAPI ResourceManager_AddRef(IResourceManager *iface)
ResourceManager *This = impl_from_IResourceManager(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
return ref;
}
@@ -78,7 +78,7 @@ static ULONG WINAPI ResourceManager_Release(IResourceManager *iface)
ResourceManager *This = impl_from_IResourceManager(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
if (ref == 0)
{
@@ -98,7 +98,7 @@ static HRESULT WINAPI ResourceManager_Enlist(IResourceManager *iface,
static HRESULT WINAPI ResourceManager_Reenlist(IResourceManager *iface,
byte *pPrepInfo,ULONG cbPrepInfo,DWORD lTimeout,XACTSTAT *pXactStat)
{
- FIXME("(%p, %p, %u, %u, %p): stub\n", iface, pPrepInfo, cbPrepInfo, lTimeout, pXactStat);
+ FIXME("(%p, %p, %lu, %lu, %p): stub\n", iface, pPrepInfo, cbPrepInfo, lTimeout, pXactStat);
return E_NOTIMPL;
}
static HRESULT WINAPI ResourceManager_ReenlistmentComplete(IResourceManager *iface)
@@ -186,7 +186,7 @@ static ULONG WINAPI TransactionOptions_AddRef(ITransactionOptions *iface)
TransactionOptions *This = impl_from_ITransactionOptions(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
return ref;
}
@@ -196,7 +196,7 @@ static ULONG WINAPI TransactionOptions_Release(ITransactionOptions *iface)
TransactionOptions *This = impl_from_ITransactionOptions(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
if (ref == 0)
{
@@ -211,7 +211,7 @@ static HRESULT WINAPI TransactionOptions_SetOptions(ITransactionOptions *iface,
TransactionOptions *This = impl_from_ITransactionOptions(iface);
if (!pOptions) return E_INVALIDARG;
- TRACE("(%p, %u, %s)\n", iface, pOptions->ulTimeout, debugstr_a(pOptions->szDescription));
+ TRACE("(%p, %lu, %s)\n", iface, pOptions->ulTimeout, debugstr_a(pOptions->szDescription));
This->opts = *pOptions;
return S_OK;
}
@@ -295,7 +295,7 @@ static ULONG WINAPI Transaction_AddRef(ITransaction *iface)
Transaction *This = impl_from_ITransaction(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
return ref;
}
@@ -305,7 +305,7 @@ static ULONG WINAPI Transaction_Release(ITransaction *iface)
Transaction *This = impl_from_ITransaction(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
if (ref == 0)
{
@@ -317,7 +317,7 @@ static ULONG WINAPI Transaction_Release(ITransaction *iface)
static HRESULT WINAPI Transaction_Commit(ITransaction *iface,
BOOL fRetaining, DWORD grfTC, DWORD grfRM)
{
- FIXME("(%p, %d, %08x, %08x): stub\n", iface, fRetaining, grfTC, grfRM);
+ FIXME("(%p, %d, %08lx, %08lx): stub\n", iface, fRetaining, grfTC, grfRM);
return E_NOTIMPL;
}
static HRESULT WINAPI Transaction_Abort(ITransaction *iface,
@@ -425,7 +425,7 @@ static ULONG WINAPI TransactionDispenser_AddRef(ITransactionDispenser *iface)
TransactionManager *This = impl_from_ITransactionDispenser(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
return ref;
}
@@ -435,7 +435,7 @@ static ULONG WINAPI TransactionDispenser_Release(ITransactionDispenser *iface)
TransactionManager *This = impl_from_ITransactionDispenser(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
if (ref == 0)
{
@@ -460,7 +460,7 @@ static HRESULT WINAPI TransactionDispenser_BeginTransaction(ITransactionDispense
ITransactionOptions *pOptions,
ITransaction **ppTransaction)
{
- FIXME("(%p, %p, %08x, %08x, %p, %p): semi-stub\n", iface, punkOuter,
+ FIXME("(%p, %p, %08lx, %08lx, %p, %p): semi-stub\n", iface, punkOuter,
isoLevel, isoFlags, pOptions, ppTransaction);
if (!ppTransaction) return E_INVALIDARG;
@@ -556,7 +556,7 @@ static HRESULT WINAPI TransactionImportWhereabouts_GetWhereaboutsSize(ITransacti
static HRESULT WINAPI TransactionImportWhereabouts_GetWhereabouts(ITransactionImportWhereabouts *iface,
ULONG cbWhereabouts, BYTE *rgbWhereabouts,ULONG *pcbUsed)
{
- FIXME("(%p, %u, %p, %p): stub returning fake value\n", iface, cbWhereabouts, rgbWhereabouts, pcbUsed);
+ FIXME("(%p, %lu, %p, %p): stub returning fake value\n", iface, cbWhereabouts, rgbWhereabouts, pcbUsed);
if (!rgbWhereabouts || !pcbUsed) return E_INVALIDARG;
*rgbWhereabouts = 0;
@@ -597,7 +597,7 @@ static ULONG WINAPI TransactionImport_Release(ITransactionImport *iface)
static HRESULT WINAPI TransactionImport_Import(ITransactionImport *iface,
ULONG cbTransactionCookie, byte *rgbTransactionCookie, IID *piid, void **ppvTransaction)
{
- FIXME("(%p, %u, %p, %s, %p): stub\n", iface, cbTransactionCookie, rgbTransactionCookie, debugstr_guid(piid), ppvTransaction);
+ FIXME("(%p, %lu, %p, %s, %p): stub\n", iface, cbTransactionCookie, rgbTransactionCookie, debugstr_guid(piid), ppvTransaction);
if (!rgbTransactionCookie || !piid || !ppvTransaction) return E_INVALIDARG;
return E_NOTIMPL;
@@ -653,7 +653,7 @@ static BOOL is_local_machineW( const WCHAR *server )
HRESULT CDECL DtcGetTransactionManager(char *host, char *tm_name, REFIID riid,
DWORD dwReserved1, WORD wcbReserved2, void *pvReserved2, void **ppv)
{
- TRACE("(%s, %s, %s, %d, %d, %p, %p)\n", debugstr_a(host), debugstr_a(tm_name),
+ TRACE("(%s, %s, %s, %ld, %d, %p, %p)\n", debugstr_a(host), debugstr_a(tm_name),
debugstr_guid(riid), dwReserved1, wcbReserved2, pvReserved2, ppv);
if (!is_local_machineA(host))
@@ -667,7 +667,7 @@ HRESULT CDECL DtcGetTransactionManager(char *host, char *tm_name, REFIID riid,
HRESULT CDECL DtcGetTransactionManagerExA(CHAR *host, CHAR *tm_name, REFIID riid,
DWORD options, void *config, void **ppv)
{
- TRACE("(%s, %s, %s, %d, %p, %p)\n", debugstr_a(host), debugstr_a(tm_name),
+ TRACE("(%s, %s, %s, %ld, %p, %p)\n", debugstr_a(host), debugstr_a(tm_name),
debugstr_guid(riid), options, config, ppv);
if (!is_local_machineA(host))
@@ -681,7 +681,7 @@ HRESULT CDECL DtcGetTransactionManagerExA(CHAR *host, CHAR *tm_name, REFIID riid
HRESULT CDECL DtcGetTransactionManagerExW(WCHAR *host, WCHAR *tm_name, REFIID riid,
DWORD options, void *config, void **ppv)
{
- TRACE("(%s, %s, %s, %d, %p, %p)\n", debugstr_w(host), debugstr_w(tm_name),
+ TRACE("(%s, %s, %s, %ld, %p, %p)\n", debugstr_w(host), debugstr_w(tm_name),
debugstr_guid(riid), options, config, ppv);
if (!is_local_machineW(host))
--
2.34.1
1
0
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/qasf/Makefile.in | 1 -
dlls/qasf/dmowrapper.c | 16 ++++++++--------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/qasf/Makefile.in b/dlls/qasf/Makefile.in
index d82abfeea7d..ee8fd0451e1 100644
--- a/dlls/qasf/Makefile.in
+++ b/dlls/qasf/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = qasf.dll
IMPORTS = strmbase dmoguids strmiids uuid ole32 oleaut32
diff --git a/dlls/qasf/dmowrapper.c b/dlls/qasf/dmowrapper.c
index 54581b48bee..95e12e860ae 100644
--- a/dlls/qasf/dmowrapper.c
+++ b/dlls/qasf/dmowrapper.c
@@ -86,7 +86,7 @@ static HRESULT WINAPI buffer_SetLength(IMediaBuffer *iface, DWORD len)
{
struct buffer *buffer = impl_from_IMediaBuffer(iface);
- TRACE("iface %p, len %u.\n", iface, len);
+ TRACE("iface %p, len %lu.\n", iface, len);
return IMediaSample_SetActualDataLength(buffer->sample, len);
}
@@ -216,7 +216,7 @@ static HRESULT process_output(struct dmo_wrapper *filter, IMediaObject *dmo)
if (FAILED(hr = IMemAllocator_GetBuffer(filter->sources[i].pin.pAllocator,
&filter->sources[i].buffer.sample, NULL, NULL, 0)))
{
- ERR("Failed to get sample, hr %#x.\n", hr);
+ ERR("Failed to get sample, hr %#lx.\n", hr);
goto out;
}
buffers[i].pBuffer = &filter->sources[i].buffer.IMediaBuffer_iface;
@@ -263,7 +263,7 @@ static HRESULT process_output(struct dmo_wrapper *filter, IMediaObject *dmo)
{
if (FAILED(hr = IMemInputPin_Receive(filter->sources[i].pin.pMemInputPin, sample)))
{
- WARN("Downstream sink returned %#x.\n", hr);
+ WARN("Downstream sink returned %#lx.\n", hr);
goto out;
}
IMediaSample_SetActualDataLength(sample, 0);
@@ -300,7 +300,7 @@ static HRESULT WINAPI dmo_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
{
if (FAILED(hr = IMediaObject_Discontinuity(dmo, index)))
{
- ERR("Discontinuity() failed, hr %#x.\n", hr);
+ ERR("Discontinuity() failed, hr %#lx.\n", hr);
goto out;
}
@@ -324,7 +324,7 @@ static HRESULT WINAPI dmo_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
if (FAILED(hr = IMediaObject_ProcessInput(dmo, index,
&filter->input_buffer.IMediaBuffer_iface, flags, start, stop - start)))
{
- ERR("ProcessInput() failed, hr %#x.\n", hr);
+ ERR("ProcessInput() failed, hr %#lx.\n", hr);
goto out;
}
@@ -346,11 +346,11 @@ static HRESULT dmo_wrapper_sink_eos(struct strmbase_sink *iface)
IUnknown_QueryInterface(filter->dmo, &IID_IMediaObject, (void **)&dmo);
if (FAILED(hr = IMediaObject_Discontinuity(dmo, index)))
- ERR("Discontinuity() failed, hr %#x.\n", hr);
+ ERR("Discontinuity() failed, hr %#lx.\n", hr);
process_output(filter, dmo);
if (FAILED(hr = IMediaObject_Flush(dmo)))
- ERR("Flush() failed, hr %#x.\n", hr);
+ ERR("Flush() failed, hr %#lx.\n", hr);
for (i = 0; i < filter->source_count; ++i)
{
@@ -372,7 +372,7 @@ static HRESULT dmo_wrapper_end_flush(struct strmbase_sink *iface)
IUnknown_QueryInterface(filter->dmo, &IID_IMediaObject, (void **)&dmo);
if (FAILED(hr = IMediaObject_Flush(dmo)))
- ERR("Flush() failed, hr %#x.\n", hr);
+ ERR("Flush() failed, hr %#lx.\n", hr);
for (i = 0; i < filter->source_count; ++i)
{
--
2.34.1
2
4
09 Feb '22
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52532
Signed-off-by: Esme Povirk <esme(a)codeweavers.com>
---
dlls/winex11.drv/window.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 36fb41ac710..7e5b17288bf 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -2536,7 +2536,10 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
else
{
if (swp_flags & (SWP_FRAMECHANGED|SWP_STATECHANGED)) set_wm_hints( data );
- if (!event_type) update_net_wm_states( data );
+ if (!event_type ||
+ (!(swp_flags & (SWP_NOMOVE|SWP_NOSIZE)) &&
+ (is_window_rect_full_screen( &old_whole_rect ) != is_window_rect_full_screen( &data->whole_rect ))))
+ update_net_wm_states( data );
}
}
--
2.30.2
2
1
[RFC PATCH v5 0/5] Fix sock_recv reordering issue (#52401): unknown_status + wineserver call approach
by Jinoh Kang 09 Feb '22
by Jinoh Kang 09 Feb '22
09 Feb '22
<preamble>
This is my forth attempt to tackle the issue #52401 [1]: "Improper
synchronization in sock_recv/sock_send leads to arbitrary reordering of
completion of I/O requests", which was initially reported (outside Bugzilla)
by Dongwan Kim [2].
Basically, the old process of sock_recv is:
1. Perform the I/O synchronously.
2. Report the result back to the server,
or queue up the request in the server.
3. If blocking, wait for I/O to complete.
The new process of sock_recv would be:
1. Queue up the request in the server.
2. Perform the I/O synchronously.
3. Report the result back to the server,
4. If blocking, wait for I/O to complete.
Everything except the actual I/O requires communicating with wineserver.
My goal here is to fix the issue without introducing extra calls to wineserver.
(However, if it turns out that this goal is not of utmost significance, then
this patch serie can be easily modified so that it issues separate server
calls.)
The previous approaches are listed here:
- Add a new select type called SELECT_SIGNAL_WAIT_ASYNC [3].
Zebediah has pointed out [4] that it is not very elegant to (ab-)use
the synchronization machinery for communicating the async result.
- Use APC_ASYNC_IO to perform the synchronous I/O [5].
This ended up with a total of 11 patches, and turned out to be
rather too complicated for a simple task.
- Add a new wineserver call, and use "add_queue" hook to save a round
trip to the server [6].
</preamble>
Each of the above turned out to be either too intrusive, complicated, or
hard to verify. Per suggestion by Zebediah [7], this is my (hopefully)
last approach: keep the new wineserver call, but keep out the implicit
STATUS_PENDING transition from "add_queue"; also, (re-)use the
"unknown_status" field.
Changelog:
- v1 -> v2: fix async queue hang on synchronous failure
- v2 -> v3: rewrite handling of pending/failed asyncs.
- v3 -> v4: don't set IOSB on synchronous failure, make more robust
[1] https://bugs.winehq.org/show_bug.cgi?id=52401
[2] https://www.winehq.org/pipermail/wine-devel/2021-May/186454.html
[3] https://www.winehq.org/pipermail/wine-devel/2022-January/204695.html
[4] https://www.winehq.org/pipermail/wine-devel/2022-January/204710.html
[5] https://www.winehq.org/pipermail/wine-devel/2022-January/205168.html
[6] https://www.winehq.org/pipermail/wine-devel/2022-January/205193.html
[7] https://www.winehq.org/pipermail/wine-devel/2022-January/205738.html
Jinoh Kang (5):
server: Allow calling async_handoff() with status code STATUS_ALERTED.
server: Add a new server request "set_async_direct_result."
server: Attempt to complete I/O request immediately in recv_socket.
ntdll: Don't call try_recv before server call in sock_recv.
server: Replace redundant recv_socket status fields with force_async
boolean field.
dlls/ntdll/unix/socket.c | 36 +++++++++--------
dlls/ntdll/unix/sync.c | 26 ++++++++++++
dlls/ntdll/unix/unix_private.h | 1 +
dlls/ws2_32/tests/sock.c | 8 ++--
server/async.c | 72 ++++++++++++++++++++++++++++++++++
server/protocol.def | 14 ++++++-
server/sock.c | 39 ++++++++++++------
7 files changed, 160 insertions(+), 36 deletions(-)
--
2.34.1
3
7
[PATCH 1/5] wined3d: Use the chunk allocator for GL indirect draw buffers.
by Zebediah Figura 09 Feb '22
by Zebediah Figura 09 Feb '22
09 Feb '22
From: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/wined3d/adapter_gl.c | 1 +
dlls/wined3d/context_gl.c | 258 +++++++++++++++++++++++++++++----
dlls/wined3d/device.c | 110 ++++++++++++++
dlls/wined3d/wined3d_private.h | 66 ++++++---
4 files changed, 390 insertions(+), 45 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index 5511a70a8ff..e903c67b56a 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -4283,6 +4283,7 @@ static void adapter_gl_destroy_device(struct wined3d_device *device)
struct wined3d_device_gl *device_gl = wined3d_device_gl(device);
wined3d_device_cleanup(&device_gl->d);
+ heap_free(device_gl->retired_blocks);
heap_free(device_gl);
}
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index 3a83027522a..9b8a887bd92 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -2618,6 +2618,37 @@ static void wined3d_context_gl_poll_fences(struct wined3d_context_gl *context_gl
}
}
+static void wined3d_context_gl_cleanup_resources(struct wined3d_context_gl *context_gl)
+{
+ struct wined3d_device_gl *device_gl = wined3d_device_gl(context_gl->c.device);
+ struct wined3d_retired_block_gl *r, *blocks;
+ SIZE_T count, i = 0;
+ uint64_t id;
+
+ wined3d_context_gl_poll_fences(context_gl);
+ id = device_gl->completed_fence_id;
+
+ blocks = device_gl->retired_blocks;
+ count = device_gl->retired_block_count;
+ while (i < count)
+ {
+ r = &blocks[i];
+
+ if (r->fence_id > id)
+ {
+ ++i;
+ continue;
+ }
+
+ wined3d_allocator_block_free(r->block);
+ if (i != --count)
+ *r = blocks[count];
+ else
+ ++i;
+ }
+ device_gl->retired_block_count = count;
+}
+
void wined3d_context_gl_wait_command_fence(struct wined3d_context_gl *context_gl, uint64_t id)
{
struct wined3d_device_gl *device_gl = wined3d_device_gl(context_gl->c.device);
@@ -2635,7 +2666,7 @@ void wined3d_context_gl_wait_command_fence(struct wined3d_context_gl *context_gl
if ((ret = wined3d_fence_wait(context_gl->submitted.fences[i].fence, &device_gl->d)) != WINED3D_FENCE_OK)
ERR("Failed to wait for command fence with id 0x%s, ret %#x.\n", wine_dbgstr_longlong(id), ret);
- wined3d_context_gl_poll_fences(context_gl);
+ wined3d_context_gl_cleanup_resources(context_gl);
return;
}
@@ -2665,7 +2696,133 @@ void wined3d_context_gl_submit_command_fence(struct wined3d_context_gl *context_
device_gl->completed_fence_id = 0;
device_gl->current_fence_id = 1;
}
- wined3d_context_gl_poll_fences(context_gl);
+ wined3d_context_gl_cleanup_resources(context_gl);
+}
+
+static void wined3d_context_gl_destroy_allocator_block(struct wined3d_context_gl *context_gl,
+ struct wined3d_allocator_block *block, uint64_t fence_id)
+{
+ struct wined3d_device_gl *device_gl = wined3d_device_gl(context_gl->c.device);
+ struct wined3d_retired_block_gl *r;
+
+ if (device_gl->completed_fence_id > fence_id)
+ {
+ wined3d_allocator_block_free(block);
+ TRACE("Freed block %p.\n", block);
+ return;
+ }
+
+ if (!wined3d_array_reserve((void **)&device_gl->retired_blocks,
+ &device_gl->retired_blocks_size, device_gl->retired_block_count + 1,
+ sizeof(*device_gl->retired_blocks)))
+ {
+ ERR("Leaking block %p.\n", block);
+ return;
+ }
+
+ r = &device_gl->retired_blocks[device_gl->retired_block_count++];
+ r->block = block;
+ r->fence_id = fence_id;
+}
+
+/* We always have buffer storage here. */
+GLuint wined3d_context_gl_allocate_vram_chunk_buffer(struct wined3d_context_gl *context_gl,
+ unsigned int pool, size_t size)
+{
+ const struct wined3d_gl_info *gl_info = context_gl->gl_info;
+ GLbitfield flags;
+ GLuint id = 0;
+
+ TRACE("context_gl %p, pool %u, size %zu.\n", context_gl, pool, size);
+
+ GL_EXTCALL(glGenBuffers(1, &id));
+ if (!id)
+ {
+ checkGLcall("buffer object creation");
+ return 0;
+ }
+ wined3d_context_gl_bind_bo(context_gl, GL_PIXEL_UNPACK_BUFFER, id);
+
+ flags = wined3d_device_gl_get_memory_type_flags(pool) | GL_DYNAMIC_STORAGE_BIT;
+ if (flags & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT))
+ flags |= GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT;
+ GL_EXTCALL(glBufferStorage(GL_PIXEL_UNPACK_BUFFER, size, NULL, flags));
+
+ checkGLcall("buffer object creation");
+
+ TRACE("Created buffer object %u.\n", id);
+
+ return id;
+}
+
+static struct wined3d_allocator_block *wined3d_context_gl_allocate_memory(struct wined3d_context_gl *context_gl,
+ unsigned int memory_type, GLsizeiptr size, GLuint *id)
+{
+ struct wined3d_device_gl *device_gl = wined3d_device_gl(context_gl->c.device);
+ struct wined3d_allocator *allocator = &device_gl->allocator;
+ struct wined3d_allocator_block *block;
+
+ if (size > WINED3D_ALLOCATOR_CHUNK_SIZE / 2)
+ {
+ *id = wined3d_context_gl_allocate_vram_chunk_buffer(context_gl, memory_type, size);
+ return NULL;
+ }
+
+ if (!(block = wined3d_allocator_allocate(allocator, &context_gl->c, memory_type, size)))
+ {
+ *id = 0;
+ return NULL;
+ }
+
+ *id = wined3d_allocator_chunk_gl(block->chunk)->gl_buffer;
+
+ return block;
+}
+
+static void *wined3d_allocator_chunk_gl_map(struct wined3d_allocator_chunk_gl *chunk_gl,
+ struct wined3d_context_gl *context_gl)
+{
+ const struct wined3d_gl_info *gl_info = context_gl->gl_info;
+
+ TRACE("chunk %p, gl_buffer %u, map_ptr %p.\n", chunk_gl, chunk_gl->gl_buffer, chunk_gl->c.map_ptr);
+
+ if (!chunk_gl->c.map_ptr)
+ {
+ unsigned int flags = wined3d_device_gl_get_memory_type_flags(chunk_gl->memory_type) & ~GL_CLIENT_STORAGE_BIT;
+
+ flags |= GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT;
+ if (!(flags & GL_MAP_READ_BIT))
+ flags |= GL_MAP_UNSYNCHRONIZED_BIT;
+ if (flags & GL_MAP_WRITE_BIT)
+ flags |= GL_MAP_FLUSH_EXPLICIT_BIT;
+ wined3d_context_gl_bind_bo(context_gl, GL_PIXEL_UNPACK_BUFFER, chunk_gl->gl_buffer);
+ chunk_gl->c.map_ptr = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER,
+ 0, WINED3D_ALLOCATOR_CHUNK_SIZE, flags));
+ if (!chunk_gl->c.map_ptr)
+ {
+ ERR("Failed to map chunk memory.\n");
+ return NULL;
+ }
+ }
+
+ ++chunk_gl->c.map_count;
+
+ return chunk_gl->c.map_ptr;
+}
+
+static void wined3d_allocator_chunk_gl_unmap(struct wined3d_allocator_chunk_gl *chunk_gl,
+ struct wined3d_context_gl *context_gl)
+{
+ const struct wined3d_gl_info *gl_info = context_gl->gl_info;
+
+ TRACE("chunk_gl %p, context_gl %p.\n", chunk_gl, context_gl);
+
+ if (!--chunk_gl->c.map_count && !wined3d_map_persistent())
+ {
+ wined3d_context_gl_bind_bo(context_gl, GL_PIXEL_UNPACK_BUFFER, chunk_gl->gl_buffer);
+ GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
+ chunk_gl->c.map_ptr = NULL;
+ }
}
static void *wined3d_bo_gl_map(struct wined3d_bo_gl *bo, struct wined3d_context_gl *context_gl, uint32_t flags)
@@ -2708,6 +2865,15 @@ map:
if (bo->b.map_ptr)
return bo->b.map_ptr;
+ if (bo->memory)
+ {
+ struct wined3d_allocator_chunk_gl *chunk_gl = wined3d_allocator_chunk_gl(bo->memory->chunk);
+
+ if (!(map_ptr = wined3d_allocator_chunk_gl_map(chunk_gl, context_gl)))
+ ERR("Failed to map chunk.\n");
+ return map_ptr;
+ }
+
gl_info = context_gl->gl_info;
wined3d_context_gl_bind_bo(context_gl, bo->binding, bo->id);
@@ -2766,7 +2932,12 @@ static void wined3d_bo_gl_unmap(struct wined3d_bo_gl *bo, struct wined3d_context
return;
wined3d_context_gl_bind_bo(context_gl, bo->binding, bo->id);
- GL_EXTCALL(glUnmapBuffer(bo->binding));
+
+ if (bo->memory)
+ wined3d_allocator_chunk_gl_unmap(wined3d_allocator_chunk_gl(bo->memory->chunk), context_gl);
+ else
+ GL_EXTCALL(glUnmapBuffer(bo->binding));
+
wined3d_context_gl_bind_bo(context_gl, bo->binding, 0);
checkGLcall("Unmap buffer object");
}
@@ -2920,7 +3091,23 @@ void wined3d_context_gl_destroy_bo(struct wined3d_context_gl *context_gl, struct
TRACE("context_gl %p, bo %p.\n", context_gl, bo);
+ if (bo->memory)
+ {
+ if (bo->b.map_ptr)
+ wined3d_allocator_chunk_gl_unmap(wined3d_allocator_chunk_gl(bo->memory->chunk), context_gl);
+ wined3d_context_gl_destroy_allocator_block(context_gl, bo->memory, bo->command_fence_id);
+ bo->id = 0;
+ return;
+ }
+
+ if (bo->b.map_ptr)
+ {
+ wined3d_context_gl_bind_bo(context_gl, bo->binding, bo->id);
+ GL_EXTCALL(glUnmapBuffer(bo->binding));
+ }
+
TRACE("Destroying GL buffer %u.\n", bo->id);
+
GL_EXTCALL(glDeleteBuffers(1, &bo->id));
checkGLcall("buffer object destruction");
bo->id = 0;
@@ -2929,42 +3116,61 @@ void wined3d_context_gl_destroy_bo(struct wined3d_context_gl *context_gl, struct
bool wined3d_context_gl_create_bo(struct wined3d_context_gl *context_gl, GLsizeiptr size,
GLenum binding, GLenum usage, bool coherent, GLbitfield flags, struct wined3d_bo_gl *bo)
{
+ unsigned int memory_type_idx = wined3d_device_gl_find_memory_type(flags);
const struct wined3d_gl_info *gl_info = context_gl->gl_info;
+ struct wined3d_allocator_block *memory = NULL;
+ GLsizeiptr buffer_offset = 0;
GLuint id = 0;
TRACE("context_gl %p, size %lu, binding %#x, usage %#x, coherent %#x, flags %#x, bo %p.\n",
context_gl, size, binding, usage, coherent, flags, bo);
- GL_EXTCALL(glGenBuffers(1, &id));
- if (!id)
- {
- checkGLcall("buffer object creation");
- return false;
- }
- wined3d_context_gl_bind_bo(context_gl, binding, id);
-
- if (!coherent && gl_info->supported[APPLE_FLUSH_BUFFER_RANGE])
- {
- GL_EXTCALL(glBufferParameteriAPPLE(binding, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE));
- GL_EXTCALL(glBufferParameteriAPPLE(binding, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE));
- }
-
if (gl_info->supported[ARB_BUFFER_STORAGE])
{
- if (flags & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT))
- flags |= GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT;
- GL_EXTCALL(glBufferStorage(binding, size, NULL, flags | GL_DYNAMIC_STORAGE_BIT));
+ switch (binding)
+ {
+ case GL_DRAW_INDIRECT_BUFFER:
+ if ((memory = wined3d_context_gl_allocate_memory(context_gl, memory_type_idx, size, &id)))
+ buffer_offset = memory->offset;
+ break;
+
+ default:
+ WARN_(d3d_perf)("Not allocating chunk memory for binding type %#x.\n", binding);
+ id = wined3d_context_gl_allocate_vram_chunk_buffer(context_gl, memory_type_idx, size);
+ break;
+ }
+
+ if (!id)
+ {
+ WARN("Failed to allocate buffer.\n");
+ return false;
+ }
}
else
{
- GL_EXTCALL(glBufferData(binding, size, NULL, usage));
- }
+ GL_EXTCALL(glGenBuffers(1, &id));
+ if (!id)
+ {
+ checkGLcall("buffer object creation");
+ return false;
+ }
+ wined3d_context_gl_bind_bo(context_gl, binding, id);
- wined3d_context_gl_bind_bo(context_gl, binding, 0);
- checkGLcall("buffer object creation");
+ if (!coherent && gl_info->supported[APPLE_FLUSH_BUFFER_RANGE])
+ {
+ GL_EXTCALL(glBufferParameteriAPPLE(binding, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE));
+ GL_EXTCALL(glBufferParameteriAPPLE(binding, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE));
+ }
+
+ GL_EXTCALL(glBufferData(binding, size, NULL, usage));
+
+ wined3d_context_gl_bind_bo(context_gl, binding, 0);
+ checkGLcall("buffer object creation");
+ }
TRACE("Created buffer object %u.\n", id);
bo->id = id;
+ bo->memory = memory;
bo->size = size;
bo->binding = binding;
bo->usage = usage;
@@ -2972,8 +3178,8 @@ bool wined3d_context_gl_create_bo(struct wined3d_context_gl *context_gl, GLsizei
bo->b.coherent = coherent;
list_init(&bo->b.users);
bo->command_fence_id = 0;
- bo->b.memory_offset = 0;
- bo->b.buffer_offset = 0;
+ bo->b.buffer_offset = buffer_offset;
+ bo->b.memory_offset = bo->b.buffer_offset;
bo->b.map_ptr = NULL;
return true;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index aa456d3e702..09be992dd2f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -955,6 +955,101 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
wined3d_device_context_set_depth_stencil_view(context, ds_enable ? device->auto_depth_stencil_view : NULL);
}
+static struct wined3d_allocator_chunk *wined3d_allocator_gl_create_chunk(struct wined3d_allocator *allocator,
+ struct wined3d_context *context, unsigned int memory_type, size_t chunk_size)
+{
+ struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
+ struct wined3d_allocator_chunk_gl *chunk_gl;
+
+ TRACE("allocator %p, context %p, memory_type %u, chunk_size %zu.\n", allocator, context, memory_type, chunk_size);
+
+ if (!(chunk_gl = heap_alloc(sizeof(*chunk_gl))))
+ return NULL;
+
+ if (!wined3d_allocator_chunk_init(&chunk_gl->c, allocator))
+ {
+ heap_free(chunk_gl);
+ return NULL;
+ }
+
+ chunk_gl->memory_type = memory_type;
+ if (!(chunk_gl->gl_buffer = wined3d_context_gl_allocate_vram_chunk_buffer(context_gl, memory_type, chunk_size)))
+ {
+ wined3d_allocator_chunk_cleanup(&chunk_gl->c);
+ heap_free(chunk_gl);
+ return NULL;
+ }
+ list_add_head(&allocator->pools[memory_type].chunks, &chunk_gl->c.entry);
+
+ return &chunk_gl->c;
+}
+
+static void wined3d_allocator_gl_destroy_chunk(struct wined3d_allocator_chunk *chunk)
+{
+ struct wined3d_allocator_chunk_gl *chunk_gl = wined3d_allocator_chunk_gl(chunk);
+ const struct wined3d_gl_info *gl_info;
+ struct wined3d_context_gl *context_gl;
+ struct wined3d_device_gl *device_gl;
+
+ TRACE("chunk %p.\n", chunk);
+
+ device_gl = CONTAINING_RECORD(chunk_gl->c.allocator, struct wined3d_device_gl, allocator);
+ context_gl = wined3d_context_gl(context_acquire(&device_gl->d, NULL, 0));
+ gl_info = context_gl->gl_info;
+
+ wined3d_context_gl_bind_bo(context_gl, GL_PIXEL_UNPACK_BUFFER, chunk_gl->gl_buffer);
+ if (chunk_gl->c.map_ptr)
+ GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
+ GL_EXTCALL(glDeleteBuffers(1, &chunk_gl->gl_buffer));
+ TRACE("Freed buffer %u.\n", chunk_gl->gl_buffer);
+ wined3d_allocator_chunk_cleanup(&chunk_gl->c);
+ heap_free(chunk_gl);
+
+ context_release(&context_gl->c);
+}
+
+static const struct wined3d_allocator_ops wined3d_allocator_gl_ops =
+{
+ .allocator_create_chunk = wined3d_allocator_gl_create_chunk,
+ .allocator_destroy_chunk = wined3d_allocator_gl_destroy_chunk,
+};
+
+static const struct
+{
+ GLbitfield flags;
+}
+gl_memory_types[] =
+{
+ {0},
+ {GL_MAP_READ_BIT},
+ {GL_MAP_WRITE_BIT},
+ {GL_MAP_READ_BIT | GL_MAP_WRITE_BIT},
+
+ {GL_CLIENT_STORAGE_BIT},
+ {GL_CLIENT_STORAGE_BIT | GL_MAP_READ_BIT},
+ {GL_CLIENT_STORAGE_BIT | GL_MAP_WRITE_BIT},
+ {GL_CLIENT_STORAGE_BIT | GL_MAP_READ_BIT | GL_MAP_WRITE_BIT},
+};
+
+unsigned int wined3d_device_gl_find_memory_type(GLbitfield flags)
+{
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(gl_memory_types); ++i)
+ {
+ if (gl_memory_types[i].flags == flags)
+ return i;
+ }
+
+ assert(0);
+ return 0;
+}
+
+GLbitfield wined3d_device_gl_get_memory_type_flags(unsigned int memory_type_idx)
+{
+ return gl_memory_types[memory_type_idx].flags;
+}
+
void wined3d_device_gl_delete_opengl_contexts_cs(void *object)
{
struct wined3d_device_gl *device_gl = object;
@@ -978,6 +1073,12 @@ void wined3d_device_gl_delete_opengl_contexts_cs(void *object)
device->blitter->ops->blitter_destroy(device->blitter, context);
device->shader_backend->shader_free_private(device, context);
wined3d_device_gl_destroy_dummy_textures(device_gl, context_gl);
+
+ wined3d_context_gl_submit_command_fence(context_gl);
+ wined3d_context_gl_wait_command_fence(context_gl,
+ wined3d_device_gl(context_gl->c.device)->current_fence_id - 1);
+ wined3d_allocator_cleanup(&device_gl->allocator);
+
context_release(context);
while (device->context_count)
@@ -1010,10 +1111,18 @@ void wined3d_device_gl_create_primary_opengl_context_cs(void *object)
return;
}
+ if (!wined3d_allocator_init(&device_gl->allocator, ARRAY_SIZE(gl_memory_types), &wined3d_allocator_gl_ops))
+ {
+ WARN("Failed to initialise allocator.\n");
+ context_release(context);
+ return;
+ }
+
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
device->adapter->vertex_pipe, device->adapter->fragment_pipe)))
{
ERR("Failed to allocate shader private data, hr %#x.\n", hr);
+ wined3d_allocator_cleanup(&device_gl->allocator);
context_release(context);
return;
}
@@ -1022,6 +1131,7 @@ void wined3d_device_gl_create_primary_opengl_context_cs(void *object)
{
ERR("Failed to create CPU blitter.\n");
device->shader_backend->shader_free_private(device, NULL);
+ wined3d_allocator_cleanup(&device_gl->allocator);
context_release(context);
return;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1b3a13024f9..ef1062ec9b4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1617,6 +1617,9 @@ struct wined3d_bo_gl
struct wined3d_bo b;
GLuint id;
+
+ struct wined3d_allocator_block *memory;
+
GLsizeiptr size;
GLenum binding;
GLenum usage;
@@ -2355,6 +2358,8 @@ void wined3d_context_gl_alloc_so_statistics_query(struct wined3d_context_gl *con
struct wined3d_so_statistics_query *query) DECLSPEC_HIDDEN;
void wined3d_context_gl_alloc_timestamp_query(struct wined3d_context_gl *context_gl,
struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
+GLuint wined3d_context_gl_allocate_vram_chunk_buffer(struct wined3d_context_gl *context_gl,
+ unsigned int pool, size_t size) DECLSPEC_HIDDEN;
void wined3d_context_gl_apply_blit_state(struct wined3d_context_gl *context_gl,
const struct wined3d_device *device) DECLSPEC_HIDDEN;
BOOL wined3d_context_gl_apply_clear_state(struct wined3d_context_gl *context_gl, const struct wined3d_state *state,
@@ -3956,25 +3961,6 @@ static inline struct wined3d_device_no3d *wined3d_device_no3d(struct wined3d_dev
return CONTAINING_RECORD(device, struct wined3d_device_no3d, d);
}
-struct wined3d_device_gl
-{
- struct wined3d_device d;
-
- /* Textures for when no other textures are bound. */
- struct wined3d_dummy_textures dummy_textures;
-
- uint64_t completed_fence_id;
- uint64_t current_fence_id;
-};
-
-static inline struct wined3d_device_gl *wined3d_device_gl(struct wined3d_device *device)
-{
- return CONTAINING_RECORD(device, struct wined3d_device_gl, d);
-}
-
-void wined3d_device_gl_create_primary_opengl_context_cs(void *object) DECLSPEC_HIDDEN;
-void wined3d_device_gl_delete_opengl_contexts_cs(void *object) DECLSPEC_HIDDEN;
-
struct wined3d_null_resources_vk
{
struct wined3d_bo_vk bo;
@@ -4021,6 +4007,18 @@ void wined3d_allocator_chunk_cleanup(struct wined3d_allocator_chunk *chunk) DECL
bool wined3d_allocator_chunk_init(struct wined3d_allocator_chunk *chunk,
struct wined3d_allocator *allocator) DECLSPEC_HIDDEN;
+struct wined3d_allocator_chunk_gl
+{
+ struct wined3d_allocator_chunk c;
+ unsigned int memory_type;
+ GLuint gl_buffer;
+};
+
+static inline struct wined3d_allocator_chunk_gl *wined3d_allocator_chunk_gl(struct wined3d_allocator_chunk *chunk)
+{
+ return CONTAINING_RECORD(chunk, struct wined3d_allocator_chunk_gl, c);
+}
+
struct wined3d_allocator_chunk_vk
{
struct wined3d_allocator_chunk c;
@@ -4155,6 +4153,36 @@ void wined3d_device_vk_destroy_null_views(struct wined3d_device_vk *device_vk,
void wined3d_device_vk_uav_clear_state_init(struct wined3d_device_vk *device_vk) DECLSPEC_HIDDEN;
void wined3d_device_vk_uav_clear_state_cleanup(struct wined3d_device_vk *device_vk) DECLSPEC_HIDDEN;
+struct wined3d_device_gl
+{
+ struct wined3d_device d;
+
+ /* Textures for when no other textures are bound. */
+ struct wined3d_dummy_textures dummy_textures;
+
+ struct wined3d_allocator allocator;
+ uint64_t completed_fence_id;
+ uint64_t current_fence_id;
+
+ struct wined3d_retired_block_gl
+ {
+ struct wined3d_allocator_block *block;
+ uint64_t fence_id;
+ } *retired_blocks;
+ SIZE_T retired_blocks_size;
+ SIZE_T retired_block_count;
+};
+
+static inline struct wined3d_device_gl *wined3d_device_gl(struct wined3d_device *device)
+{
+ return CONTAINING_RECORD(device, struct wined3d_device_gl, d);
+}
+
+void wined3d_device_gl_create_primary_opengl_context_cs(void *object) DECLSPEC_HIDDEN;
+void wined3d_device_gl_delete_opengl_contexts_cs(void *object) DECLSPEC_HIDDEN;
+unsigned int wined3d_device_gl_find_memory_type(GLbitfield flags) DECLSPEC_HIDDEN;
+GLbitfield wined3d_device_gl_get_memory_type_flags(unsigned int memory_type_idx) DECLSPEC_HIDDEN;
+
static inline float wined3d_alpha_ref(const struct wined3d_state *state)
{
return (state->render_states[WINED3D_RS_ALPHAREF] & 0xff) / 255.0f;
--
2.34.1
4
16
09 Feb '22
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/shlwapi/tests/url.c | 485 ++++++++++++++-------------------------
1 file changed, 176 insertions(+), 309 deletions(-)
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c
index 0cc14dc65bf..ea58163ce2e 100644
--- a/dlls/shlwapi/tests/url.c
+++ b/dlls/shlwapi/tests/url.c
@@ -29,30 +29,6 @@
#include "wininet.h"
#include "intshcut.h"
-/* ################ */
-static HMODULE hShlwapi;
-static HRESULT (WINAPI *pUrlUnescapeA)(LPSTR,LPSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pUrlUnescapeW)(LPWSTR,LPWSTR,LPDWORD,DWORD);
-static BOOL (WINAPI *pUrlIsA)(LPCSTR,URLIS);
-static BOOL (WINAPI *pUrlIsW)(LPCWSTR,URLIS);
-static HRESULT (WINAPI *pUrlHashA)(LPCSTR,LPBYTE,DWORD);
-static HRESULT (WINAPI *pUrlHashW)(LPCWSTR,LPBYTE,DWORD);
-static HRESULT (WINAPI *pUrlGetPartA)(LPCSTR,LPSTR,LPDWORD,DWORD,DWORD);
-static HRESULT (WINAPI *pUrlGetPartW)(LPCWSTR,LPWSTR,LPDWORD,DWORD,DWORD);
-static HRESULT (WINAPI *pUrlEscapeA)(LPCSTR,LPSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pUrlEscapeW)(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pUrlCreateFromPathA)(LPCSTR,LPSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pUrlCreateFromPathW)(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pUrlCombineA)(LPCSTR,LPCSTR,LPSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pUrlCombineW)(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pUrlCanonicalizeA)(LPCSTR, LPSTR, LPDWORD, DWORD);
-static HRESULT (WINAPI *pUrlCanonicalizeW)(LPCWSTR, LPWSTR, LPDWORD, DWORD);
-static HRESULT (WINAPI *pUrlApplySchemeA)(LPCSTR,LPSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pUrlApplySchemeW)(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-static HRESULT (WINAPI *pParseURLA)(LPCSTR,PARSEDURLA*);
-static HRESULT (WINAPI *pParseURLW)(LPCWSTR,PARSEDURLW*);
-static HRESULT (WINAPI *pHashData)(LPBYTE, DWORD, LPBYTE, DWORD);
-
static const char* TEST_URL_1 = "http://www.winehq.org/tests?date=10/10/1923";
static const char* TEST_URL_2 = "http://localhost:8080/tests%2e.html?date=Mon%2010/10/1923";
static const char* TEST_URL_3 = "http://foo:bar(a)localhost:21/internal.php?query=x&return=y";
@@ -539,15 +515,10 @@ static void test_UrlApplyScheme(void)
DWORD len;
DWORD i;
- if (!pUrlApplySchemeA) {
- win_skip("UrlApplySchemeA not found\n");
- return;
- }
-
for (i = 0; i < ARRAY_SIZE(TEST_APPLY); i++) {
len = TEST_APPLY_MAX_LENGTH;
lstrcpyA(newurl, untouchedA);
- res = pUrlApplySchemeA(TEST_APPLY[i].url, newurl, &len, TEST_APPLY[i].flags);
+ res = UrlApplySchemeA(TEST_APPLY[i].url, newurl, &len, TEST_APPLY[i].flags);
ok( res == TEST_APPLY[i].res,
"#%dA: got HRESULT 0x%x (expected 0x%x)\n", i, res, TEST_APPLY[i].res);
@@ -563,7 +534,7 @@ static void test_UrlApplyScheme(void)
MultiByteToWideChar(CP_ACP, 0, newurl, -1, newurlW, len);
MultiByteToWideChar(CP_ACP, 0, TEST_APPLY[i].url, -1, urlW, len);
- res = pUrlApplySchemeW(urlW, newurlW, &len, TEST_APPLY[i].flags);
+ res = UrlApplySchemeW(urlW, newurlW, &len, TEST_APPLY[i].flags);
WideCharToMultiByte(CP_ACP, 0, newurlW, -1, newurl, TEST_APPLY_MAX_LENGTH, NULL, NULL);
ok( res == TEST_APPLY[i].res,
"#%dW: got HRESULT 0x%x (expected 0x%x)\n", i, res, TEST_APPLY[i].res);
@@ -579,7 +550,7 @@ static void test_UrlApplyScheme(void)
/* buffer too small */
lstrcpyA(newurl, untouchedA);
len = lstrlenA(TEST_APPLY[0].newurl);
- res = pUrlApplySchemeA(TEST_APPLY[0].url, newurl, &len, TEST_APPLY[0].flags);
+ res = UrlApplySchemeA(TEST_APPLY[0].url, newurl, &len, TEST_APPLY[0].flags);
ok(res == E_POINTER, "got HRESULT 0x%x (expected E_POINTER)\n", res);
/* The returned length include the space for the terminating 0 */
i = lstrlenA(TEST_APPLY[0].newurl)+1;
@@ -589,18 +560,18 @@ static void test_UrlApplyScheme(void)
/* NULL as parameter. The length and the buffer are not modified */
lstrcpyA(newurl, untouchedA);
len = TEST_APPLY_MAX_LENGTH;
- res = pUrlApplySchemeA(NULL, newurl, &len, TEST_APPLY[0].flags);
+ res = UrlApplySchemeA(NULL, newurl, &len, TEST_APPLY[0].flags);
ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res);
ok(len == TEST_APPLY_MAX_LENGTH, "got len %d\n", len);
ok(!lstrcmpA(newurl, untouchedA), "got '%s' (expected '%s')\n", newurl, untouchedA);
len = TEST_APPLY_MAX_LENGTH;
- res = pUrlApplySchemeA(TEST_APPLY[0].url, NULL, &len, TEST_APPLY[0].flags);
+ res = UrlApplySchemeA(TEST_APPLY[0].url, NULL, &len, TEST_APPLY[0].flags);
ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res);
ok(len == TEST_APPLY_MAX_LENGTH, "got len %d\n", len);
lstrcpyA(newurl, untouchedA);
- res = pUrlApplySchemeA(TEST_APPLY[0].url, newurl, NULL, TEST_APPLY[0].flags);
+ res = UrlApplySchemeA(TEST_APPLY[0].url, newurl, NULL, TEST_APPLY[0].flags);
ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res);
ok(!lstrcmpA(newurl, untouchedA), "got '%s' (expected '%s')\n", newurl, untouchedA);
@@ -616,25 +587,18 @@ static void hash_url(const char* szUrl)
DWORD cbSize = sizeof(DWORD);
DWORD dwHash1, dwHash2;
- res = pUrlHashA(szTestUrl, (LPBYTE)&dwHash1, cbSize);
+ res = UrlHashA(szTestUrl, (LPBYTE)&dwHash1, cbSize);
ok(res == S_OK, "UrlHashA returned 0x%x (expected S_OK) for %s\n", res, szUrl);
- if (pUrlHashW) {
- res = pUrlHashW(wszTestUrl, (LPBYTE)&dwHash2, cbSize);
- ok(res == S_OK, "UrlHashW returned 0x%x (expected S_OK) for %s\n", res, szUrl);
- ok(dwHash1 == dwHash2,
- "Hashes didn't match (A: 0x%x, W: 0x%x) for %s\n", dwHash1, dwHash2, szUrl);
- }
- FreeWideString(wszTestUrl);
+ res = UrlHashW(wszTestUrl, (LPBYTE)&dwHash2, cbSize);
+ ok(res == S_OK, "UrlHashW returned 0x%x (expected S_OK) for %s\n", res, szUrl);
+ ok(dwHash1 == dwHash2,
+ "Hashes didn't match (A: 0x%x, W: 0x%x) for %s\n", dwHash1, dwHash2, szUrl);
+ FreeWideString(wszTestUrl);
}
static void test_UrlHash(void)
{
- if (!pUrlHashA) {
- win_skip("UrlHashA not found\n");
- return;
- }
-
hash_url(TEST_URL_1);
hash_url(TEST_URL_2);
hash_url(TEST_URL_3);
@@ -652,31 +616,30 @@ static void test_url_part(const char* szUrl, DWORD dwPart, DWORD dwFlags, const
DWORD dwSize;
dwSize = 1;
- res = pUrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags);
+ res = UrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags);
ok(res == E_POINTER, "UrlGetPart for \"%s\" gave: 0x%08x\n", szUrl, res);
ok(dwSize == strlen(szExpected)+1 ||
(*szExpected == '?' && dwSize == strlen(szExpected)),
"UrlGetPart for \"%s\" gave size: %u\n", szUrl, dwSize);
dwSize = INTERNET_MAX_URL_LENGTH;
- res = pUrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags);
+ res = UrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags);
ok(res == S_OK,
"UrlGetPartA for \"%s\" part 0x%08x returned 0x%x and \"%s\"\n",
szUrl, dwPart, res, szPart);
- if (pUrlGetPartW) {
- dwSize = INTERNET_MAX_URL_LENGTH;
- res = pUrlGetPartW(wszUrl, wszPart, &dwSize, dwPart, dwFlags);
- ok(res == S_OK,
- "UrlGetPartW for \"%s\" part 0x%08x returned 0x%x\n",
- szUrl, dwPart, res);
- wszConvertedPart = GetWideString(szPart);
+ dwSize = INTERNET_MAX_URL_LENGTH;
+ res = UrlGetPartW(wszUrl, wszPart, &dwSize, dwPart, dwFlags);
+ ok(res == S_OK,
+ "UrlGetPartW for \"%s\" part 0x%08x returned 0x%x\n",
+ szUrl, dwPart, res);
- ok(lstrcmpW(wszPart,wszConvertedPart)==0,
- "Strings didn't match between ansi and unicode UrlGetPart!\n");
+ wszConvertedPart = GetWideString(szPart);
- FreeWideString(wszConvertedPart);
- }
+ ok(lstrcmpW(wszPart,wszConvertedPart)==0,
+ "Strings didn't match between ansi and unicode UrlGetPart!\n");
+
+ FreeWideString(wszConvertedPart);
FreeWideString(wszUrl);
/* Note that v6.0 and later don't return '?' with the query */
@@ -698,57 +661,47 @@ static void test_UrlGetPart(void)
const char* short_url = "ascheme:";
CHAR szPart[INTERNET_MAX_URL_LENGTH];
+ WCHAR bufW[5];
DWORD dwSize;
HRESULT res;
- if (!pUrlGetPartA) {
- win_skip("UrlGetPartA not found\n");
- return;
- }
-
- res = pUrlGetPartA(NULL, NULL, NULL, URL_PART_SCHEME, 0);
+ res = UrlGetPartA(NULL, NULL, NULL, URL_PART_SCHEME, 0);
ok(res == E_INVALIDARG, "null params gave: 0x%08x\n", res);
- res = pUrlGetPartA(NULL, szPart, &dwSize, URL_PART_SCHEME, 0);
+ res = UrlGetPartA(NULL, szPart, &dwSize, URL_PART_SCHEME, 0);
ok(res == E_INVALIDARG, "null URL gave: 0x%08x\n", res);
- res = pUrlGetPartA(res_url, NULL, &dwSize, URL_PART_SCHEME, 0);
+ res = UrlGetPartA(res_url, NULL, &dwSize, URL_PART_SCHEME, 0);
ok(res == E_INVALIDARG, "null szPart gave: 0x%08x\n", res);
- res = pUrlGetPartA(res_url, szPart, NULL, URL_PART_SCHEME, 0);
+ res = UrlGetPartA(res_url, szPart, NULL, URL_PART_SCHEME, 0);
ok(res == E_INVALIDARG, "null URL gave: 0x%08x\n", res);
dwSize = 0;
szPart[0]='x'; szPart[1]=0;
- res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_SCHEME, 0);
+ res = UrlGetPartA("hi", szPart, &dwSize, URL_PART_SCHEME, 0);
ok(res == E_INVALIDARG, "UrlGetPartA(*pcchOut = 0) returned %08X\n", res);
ok(szPart[0] == 'x' && szPart[1] == 0, "UrlGetPartA(*pcchOut = 0) modified szPart: \"%s\"\n", szPart);
ok(dwSize == 0, "dwSize = %d\n", dwSize);
dwSize = sizeof szPart;
szPart[0]='x'; szPart[1]=0;
- res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_SCHEME, 0);
+ res = UrlGetPartA("hi", szPart, &dwSize, URL_PART_SCHEME, 0);
ok (res==S_FALSE, "UrlGetPartA(\"hi\") returned %08X\n", res);
ok(szPart[0]==0, "UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart);
ok(dwSize == 0, "dwSize = %d\n", dwSize);
- if(pUrlGetPartW)
- {
- const WCHAR hiW[] = {'h','i',0};
- WCHAR bufW[5];
-
- /* UrlGetPartW returns S_OK instead of S_FALSE */
- dwSize = sizeof szPart;
- bufW[0]='x'; bufW[1]=0;
- res = pUrlGetPartW(hiW, bufW, &dwSize, URL_PART_SCHEME, 0);
- todo_wine ok(res==S_OK, "UrlGetPartW(\"hi\") returned %08X\n", res);
- ok(bufW[0] == 0, "UrlGetPartW(\"hi\") return \"%c\"\n", bufW[0]);
- ok(dwSize == 0, "dwSize = %d\n", dwSize);
- }
+ /* UrlGetPartW returns S_OK instead of S_FALSE */
+ dwSize = sizeof szPart;
+ bufW[0]='x'; bufW[1]=0;
+ res = UrlGetPartW(L"hi", bufW, &dwSize, URL_PART_SCHEME, 0);
+ todo_wine ok(res==S_OK, "UrlGetPartW(\"hi\") returned %08X\n", res);
+ ok(bufW[0] == 0, "UrlGetPartW(\"hi\") return \"%c\"\n", bufW[0]);
+ ok(dwSize == 0, "dwSize = %d\n", dwSize);
dwSize = sizeof szPart;
szPart[0]='x'; szPart[1]=0;
- res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_QUERY, 0);
+ res = UrlGetPartA("hi", szPart, &dwSize, URL_PART_QUERY, 0);
ok (res==S_FALSE, "UrlGetPartA(\"hi\") returned %08X\n", res);
ok(szPart[0]==0, "UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart);
ok(dwSize == 0, "dwSize = %d\n", dwSize);
@@ -774,7 +727,7 @@ static void test_UrlGetPart(void)
test_url_part(short_url, URL_PART_SCHEME, 0, "ascheme");
dwSize = sizeof(szPart);
- res = pUrlGetPartA(about_url, szPart, &dwSize, URL_PART_HOSTNAME, 0);
+ res = UrlGetPartA(about_url, szPart, &dwSize, URL_PART_HOSTNAME, 0);
ok(res==E_FAIL, "returned %08x\n", res);
test_url_part(res_url, URL_PART_SCHEME, 0, "res");
@@ -782,52 +735,52 @@ static void test_UrlGetPart(void)
dwSize = sizeof szPart;
szPart[0]='x'; szPart[1]=0;
- res = pUrlGetPartA(res_url, szPart, &dwSize, URL_PART_QUERY, 0);
+ res = UrlGetPartA(res_url, szPart, &dwSize, URL_PART_QUERY, 0);
ok(res==S_FALSE, "UrlGetPartA returned %08X\n", res);
ok(szPart[0]==0, "UrlGetPartA gave \"%s\" instead of \"\"\n", szPart);
ok(dwSize == 0, "dwSize = %d\n", dwSize);
dwSize = sizeof(szPart);
- res = pUrlGetPartA("file://c:\\index.htm", szPart, &dwSize, URL_PART_HOSTNAME, 0);
+ res = UrlGetPartA("file://c:\\index.htm", szPart, &dwSize, URL_PART_HOSTNAME, 0);
ok(res==S_FALSE, "returned %08x\n", res);
ok(dwSize == 0, "dwSize = %d\n", dwSize);
dwSize = sizeof(szPart);
szPart[0] = 'x'; szPart[1] = '\0';
- res = pUrlGetPartA("file:some text", szPart, &dwSize, URL_PART_HOSTNAME, 0);
+ res = UrlGetPartA("file:some text", szPart, &dwSize, URL_PART_HOSTNAME, 0);
ok(res==S_FALSE, "returned %08x\n", res);
ok(szPart[0] == '\0', "szPart[0] = %c\n", szPart[0]);
ok(dwSize == 0, "dwSize = %d\n", dwSize);
dwSize = sizeof(szPart);
szPart[0] = 'x'; szPart[1] = '\0';
- res = pUrlGetPartA("index.htm", szPart, &dwSize, URL_PART_HOSTNAME, 0);
+ res = UrlGetPartA("index.htm", szPart, &dwSize, URL_PART_HOSTNAME, 0);
ok(res==E_FAIL, "returned %08x\n", res);
dwSize = sizeof(szPart);
szPart[0] = 'x'; szPart[1] = '\0';
- res = pUrlGetPartA(excid_url, szPart, &dwSize, URL_PART_HOSTNAME, 0);
+ res = UrlGetPartA(excid_url, szPart, &dwSize, URL_PART_HOSTNAME, 0);
ok(res==E_FAIL, "returned %08x\n", res);
ok(szPart[0] == 'x', "szPart[0] = %c\n", szPart[0]);
ok(dwSize == sizeof(szPart), "dwSize = %d\n", dwSize);
dwSize = sizeof(szPart);
szPart[0] = 'x'; szPart[1] = '\0';
- res = pUrlGetPartA(excid_url, szPart, &dwSize, URL_PART_QUERY, 0);
+ res = UrlGetPartA(excid_url, szPart, &dwSize, URL_PART_QUERY, 0);
ok(res==S_FALSE, "returned %08x\n", res);
ok(szPart[0] == 0, "szPart[0] = %c\n", szPart[0]);
ok(dwSize == 0, "dwSize = %d\n", dwSize);
dwSize = sizeof(szPart);
szPart[0] = 'x'; szPart[1] = '\0';
- res = pUrlGetPartA(foo_url, szPart, &dwSize, URL_PART_HOSTNAME, 0);
+ res = UrlGetPartA(foo_url, szPart, &dwSize, URL_PART_HOSTNAME, 0);
ok(res==E_FAIL, "returned %08x\n", res);
ok(szPart[0] == 'x', "szPart[0] = %c\n", szPart[0]);
ok(dwSize == sizeof(szPart), "dwSize = %d\n", dwSize);
dwSize = sizeof(szPart);
szPart[0] = 'x'; szPart[1] = '\0';
- res = pUrlGetPartA(foo_url, szPart, &dwSize, URL_PART_QUERY, 0);
+ res = UrlGetPartA(foo_url, szPart, &dwSize, URL_PART_QUERY, 0);
ok(res==S_FALSE, "returned %08x\n", res);
ok(szPart[0] == 0, "szPart[0] = %c\n", szPart[0]);
ok(dwSize == 0, "dwSize = %d\n", dwSize);
@@ -846,28 +799,26 @@ static void test_url_canonicalize(int index, const char *szUrl, DWORD dwFlags, H
DWORD dwSize;
dwSize = INTERNET_MAX_URL_LENGTH;
- ret = pUrlCanonicalizeA(szUrl, NULL, &dwSize, dwFlags);
+ ret = UrlCanonicalizeA(szUrl, NULL, &dwSize, dwFlags);
ok(ret != dwExpectReturn, "got 0s%x: Unexpected return for NULL buffer, index %d\n", ret, index);
- ret = pUrlCanonicalizeA(szUrl, szReturnUrl, &dwSize, dwFlags);
+ ret = UrlCanonicalizeA(szUrl, szReturnUrl, &dwSize, dwFlags);
ok(ret == dwExpectReturn || ret == dwExpectReturnAlt,
"UrlCanonicalizeA failed: expected=0x%08x or 0x%08x, got=0x%08x, index %d\n",
dwExpectReturn, dwExpectReturnAlt, ret, index);
todo_wine_if (todo)
ok(strcmp(szReturnUrl,szExpectUrl)==0, "UrlCanonicalizeA dwFlags 0x%08x url '%s' Expected \"%s\", but got \"%s\", index %d\n", dwFlags, szUrl, szExpectUrl, szReturnUrl, index);
- if (pUrlCanonicalizeW) {
- dwSize = INTERNET_MAX_URL_LENGTH;
- ret = pUrlCanonicalizeW(wszUrl, NULL, &dwSize, dwFlags);
- ok(ret != dwExpectReturn, "got 0x%x: Unexpected return for NULL buffer, index %d\n", ret, index);
- ret = pUrlCanonicalizeW(wszUrl, wszReturnUrl, &dwSize, dwFlags);
- ok(ret == dwExpectReturn, "UrlCanonicalizeW failed: expected 0x%08x, got 0x%x, index %d\n",
- dwExpectReturn, ret, index);
+ dwSize = INTERNET_MAX_URL_LENGTH;
+ ret = UrlCanonicalizeW(wszUrl, NULL, &dwSize, dwFlags);
+ ok(ret != dwExpectReturn, "got 0x%x: Unexpected return for NULL buffer, index %d\n", ret, index);
+ ret = UrlCanonicalizeW(wszUrl, wszReturnUrl, &dwSize, dwFlags);
+ ok(ret == dwExpectReturn, "UrlCanonicalizeW failed: expected 0x%08x, got 0x%x, index %d\n",
+ dwExpectReturn, ret, index);
- wszConvertedUrl = GetWideString(szReturnUrl);
- ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0,
- "Strings didn't match between ansi and unicode UrlCanonicalize, index %d!\n", index);
- FreeWideString(wszConvertedUrl);
- }
+ wszConvertedUrl = GetWideString(szReturnUrl);
+ ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0,
+ "Strings didn't match between ansi and unicode UrlCanonicalize, index %d!\n", index);
+ FreeWideString(wszConvertedUrl);
FreeWideString(wszUrl);
FreeWideString(wszExpectUrl);
@@ -881,40 +832,35 @@ static void test_UrlEscapeA(void)
unsigned int i;
char empty_string[] = "";
- if (!pUrlEscapeA) {
- win_skip("UrlEscapeA not found\n");
- return;
- }
-
- ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY);
+ ret = UrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG);
ok(size == 0, "got %d, expected %d\n", size, 0);
size = 0;
- ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY);
+ ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG);
ok(size == 0, "got %d, expected %d\n", size, 0);
size = 1;
- ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY);
+ ret = UrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG);
ok(size == 1, "got %d, expected %d\n", size, 1);
size = 1;
- ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, NULL, URL_ESCAPE_SPACES_ONLY);
+ ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, NULL, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG);
ok(size == 1, "got %d, expected %d\n", size, 1);
size = 1;
empty_string[0] = 127;
- ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY);
+ ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_POINTER, "got %x, expected %x\n", ret, E_POINTER);
ok(size == 34, "got %d, expected %d\n", size, 34);
ok(empty_string[0] == 127, "String has changed, empty_string[0] = %d\n", empty_string[0]);
size = 1;
empty_string[0] = 127;
- ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_AS_UTF8);
+ ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_AS_UTF8);
ok(ret == E_NOTIMPL || broken(ret == E_POINTER), /* < Win7/Win2k8 */
"got %x, expected %x\n", ret, E_NOTIMPL);
ok(size == 1 || broken(size == 34), /* < Win7/Win2k8 */
@@ -925,7 +871,7 @@ static void test_UrlEscapeA(void)
CHAR ret_url[INTERNET_MAX_URL_LENGTH];
size = INTERNET_MAX_URL_LENGTH;
- ret = pUrlEscapeA(TEST_ESCAPE[i].url, ret_url, &size, TEST_ESCAPE[i].flags);
+ ret = UrlEscapeA(TEST_ESCAPE[i].url, ret_url, &size, TEST_ESCAPE[i].flags);
ok(ret == TEST_ESCAPE[i].expectret, "UrlEscapeA returned 0x%08x instead of 0x%08x for \"%s\"\n",
ret, TEST_ESCAPE[i].expectret, TEST_ESCAPE[i].url);
ok(!strcmp(ret_url, TEST_ESCAPE[i].expecturl), "Expected \"%s\", but got \"%s\" for \"%s\"\n",
@@ -947,11 +893,6 @@ static void test_UrlEscapeW(void)
WCHAR wc;
int i;
- if (!pUrlEscapeW) {
- win_skip("UrlEscapeW not found\n");
- return;
- }
-
/* Check error paths */
ret = UrlEscapeW(path_test, NULL, NULL, URL_ESCAPE_SPACES_ONLY);
@@ -989,21 +930,21 @@ static void test_UrlEscapeW(void)
/* Check actual escaping */
size = ARRAY_SIZE(overwrite);
- ret = pUrlEscapeW(overwrite, overwrite, &size, URL_ESCAPE_SPACES_ONLY);
+ ret = UrlEscapeW(overwrite, overwrite, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == S_OK, "got %x, expected S_OK\n", ret);
ok(size == 9, "got %d, expected 9\n", size);
ok(!lstrcmpW(overwrite, out), "got %s, expected %s\n", wine_dbgstr_w(overwrite), wine_dbgstr_w(out));
size = 1;
wc = 127;
- ret = pUrlEscapeW(overwrite, &wc, &size, URL_ESCAPE_SPACES_ONLY);
+ ret = UrlEscapeW(overwrite, &wc, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_POINTER, "got %x, expected %x\n", ret, E_POINTER);
ok(size == 10, "got %d, expected 10\n", size);
ok(wc == 127, "String has changed, wc = %d\n", wc);
/* non-ASCII range */
size = ARRAY_SIZE(ret_urlW);
- ret = pUrlEscapeW(naW, ret_urlW, &size, 0);
+ ret = UrlEscapeW(naW, ret_urlW, &size, 0);
ok(ret == S_OK, "got %x, expected S_OK\n", ret);
ok(!lstrcmpW(naescapedW, ret_urlW), "got %s, expected %s\n", wine_dbgstr_w(ret_urlW), wine_dbgstr_w(naescapedW));
@@ -1014,7 +955,7 @@ static void test_UrlEscapeW(void)
size = INTERNET_MAX_URL_LENGTH;
urlW = GetWideString(TEST_ESCAPE[i].url);
expected_urlW = GetWideString(TEST_ESCAPE[i].expecturl);
- ret = pUrlEscapeW(urlW, ret_urlW, &size, TEST_ESCAPE[i].flags);
+ ret = UrlEscapeW(urlW, ret_urlW, &size, TEST_ESCAPE[i].flags);
ok(ret == TEST_ESCAPE[i].expectret, "UrlEscapeW returned 0x%08x instead of 0x%08x for %s\n",
ret, TEST_ESCAPE[i].expectret, wine_dbgstr_w(urlW));
ok(!lstrcmpW(ret_urlW, expected_urlW), "Expected %s, but got %s for %s flags %08x\n",
@@ -1027,7 +968,7 @@ static void test_UrlEscapeW(void)
WCHAR ret_url[INTERNET_MAX_URL_LENGTH];
size = INTERNET_MAX_URL_LENGTH;
- ret = pUrlEscapeW(TEST_ESCAPEW[i].url, ret_url, &size, TEST_ESCAPEW[i].flags);
+ ret = UrlEscapeW(TEST_ESCAPEW[i].url, ret_url, &size, TEST_ESCAPEW[i].flags);
ok(ret == TEST_ESCAPEW[i].expectret, "UrlEscapeW returned 0x%08x instead of 0x%08x for \"%s\"\n",
ret, TEST_ESCAPEW[i].expectret, wine_dbgstr_w(TEST_ESCAPEW[i].url));
ok(!lstrcmpW(ret_url, TEST_ESCAPEW[i].expecturl) ||
@@ -1050,27 +991,22 @@ static void test_UrlCanonicalizeA(void)
DWORD urllen;
HRESULT hr;
- if (!pUrlCanonicalizeA) {
- win_skip("UrlCanonicalizeA not found\n");
- return;
- }
-
urllen = lstrlenA(winehqA);
/* Parameter checks */
dwSize = ARRAY_SIZE(szReturnUrl);
- hr = pUrlCanonicalizeA(NULL, szReturnUrl, &dwSize, URL_UNESCAPE);
+ hr = UrlCanonicalizeA(NULL, szReturnUrl, &dwSize, URL_UNESCAPE);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
dwSize = ARRAY_SIZE(szReturnUrl);
- hr = pUrlCanonicalizeA(winehqA, NULL, &dwSize, URL_UNESCAPE);
+ hr = UrlCanonicalizeA(winehqA, NULL, &dwSize, URL_UNESCAPE);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
- hr = pUrlCanonicalizeA(winehqA, szReturnUrl, NULL, URL_UNESCAPE);
+ hr = UrlCanonicalizeA(winehqA, szReturnUrl, NULL, URL_UNESCAPE);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
dwSize = 0;
- hr = pUrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_UNESCAPE);
+ hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_UNESCAPE);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
/* buffer has no space for the result */
@@ -1078,7 +1014,7 @@ static void test_UrlCanonicalizeA(void)
memset(szReturnUrl, '#', urllen+4);
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == E_POINTER) && (dwSize == (urllen + 1)),
"got 0x%x with %u and size %u for '%s' and %u (expected 'E_POINTER' and size %u)\n",
hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen+1);
@@ -1088,7 +1024,7 @@ static void test_UrlCanonicalizeA(void)
memset(szReturnUrl, '#', urllen+4);
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == E_POINTER) && (dwSize == (urllen + 1)),
"got 0x%x with %u and size %u for '%s' and %u (expected 'E_POINTER' and size %u)\n",
hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen+1);
@@ -1098,7 +1034,7 @@ static void test_UrlCanonicalizeA(void)
memset(szReturnUrl, '#', urllen+4);
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == S_OK) && (dwSize == urllen),
"got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)\n",
hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen);
@@ -1108,7 +1044,7 @@ static void test_UrlCanonicalizeA(void)
memset(szReturnUrl, '#', urllen+4);
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == S_OK) && (dwSize == urllen),
"got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)\n",
hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen);
@@ -1118,7 +1054,7 @@ static void test_UrlCanonicalizeA(void)
memset(szReturnUrl, '#', urllen+4);
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == E_INVALIDARG) && (dwSize == 0),
"got 0x%x with %u and size %u for '%s' and %u (expected 'E_INVALIDARG' and size %u)\n",
hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), 0);
@@ -1128,7 +1064,7 @@ static void test_UrlCanonicalizeA(void)
memset(longurl, 'a', sizeof(longurl));
memcpy(longurl, winehqA, sizeof(winehqA)-1);
longurl[sizeof(longurl)-1] = '\0';
- hr = pUrlCanonicalizeA(longurl, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeA(longurl, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok(hr == S_OK, "hr = %x\n", hr);
test_url_canonicalize(-1, "", 0, S_OK, S_FALSE /* Vista/win2k8 */, "", FALSE);
@@ -1151,27 +1087,22 @@ static void test_UrlCanonicalizeW(void)
HRESULT hr;
int i;
-
- if (!pUrlCanonicalizeW) {
- win_skip("UrlCanonicalizeW not found\n");
- return;
- }
urllen = lstrlenW(winehqW);
/* Parameter checks */
dwSize = ARRAY_SIZE(szReturnUrl);
- hr = pUrlCanonicalizeW(NULL, szReturnUrl, &dwSize, URL_UNESCAPE);
+ hr = UrlCanonicalizeW(NULL, szReturnUrl, &dwSize, URL_UNESCAPE);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
dwSize = ARRAY_SIZE(szReturnUrl);
- hr = pUrlCanonicalizeW(winehqW, NULL, &dwSize, URL_UNESCAPE);
+ hr = UrlCanonicalizeW(winehqW, NULL, &dwSize, URL_UNESCAPE);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
- hr = pUrlCanonicalizeW(winehqW, szReturnUrl, NULL, URL_UNESCAPE);
+ hr = UrlCanonicalizeW(winehqW, szReturnUrl, NULL, URL_UNESCAPE);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
dwSize = 0;
- hr = pUrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_UNESCAPE);
+ hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_UNESCAPE);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
/* buffer has no space for the result */
@@ -1179,7 +1110,7 @@ static void test_UrlCanonicalizeW(void)
memset(szReturnUrl, '#', (urllen+4) * sizeof(WCHAR));
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == E_POINTER) && (dwSize == (urllen + 1)),
"got 0x%x with %u and size %u for %u (expected 'E_POINTER' and size %u)\n",
hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen+1);
@@ -1190,7 +1121,7 @@ static void test_UrlCanonicalizeW(void)
memset(szReturnUrl, '#', (urllen+4) * sizeof(WCHAR));
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == E_POINTER) && (dwSize == (urllen + 1)),
"got 0x%x with %u and size %u for %u (expected 'E_POINTER' and size %u)\n",
hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen+1);
@@ -1200,7 +1131,7 @@ static void test_UrlCanonicalizeW(void)
memset(szReturnUrl, '#', (urllen+4) * sizeof(WCHAR));
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == S_OK) && (dwSize == urllen),
"got 0x%x with %u and size %u for %u (expected 'S_OK' and size %u)\n",
hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen);
@@ -1210,7 +1141,7 @@ static void test_UrlCanonicalizeW(void)
memset(szReturnUrl, '#', (urllen+4) * sizeof(WCHAR));
szReturnUrl[urllen+4] = '\0';
SetLastError(0xdeadbeef);
- hr = pUrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
+ hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE);
ok( (hr == S_OK) && (dwSize == urllen),
"got 0x%x with %u and size %u for %u (expected 'S_OK' and size %u)\n",
hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen);
@@ -1226,7 +1157,7 @@ static void test_UrlCanonicalizeW(void)
pos = lstrlenW(szUrl) - 1;
szUrl[pos] = i;
urllen = INTERNET_MAX_URL_LENGTH;
- pUrlCanonicalizeW(szUrl, szReturnUrl, &urllen, 0);
+ UrlCanonicalizeW(szUrl, szReturnUrl, &urllen, 0);
choped = lstrlenW(szReturnUrl) < lstrlenW(szUrl);
ok(choped == (i <= 32), "Incorrect char chopping for char %d\n", i);
}
@@ -1244,54 +1175,47 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
DWORD dwSize;
DWORD dwExpectLen = lstrlenA(szExpectUrl);
- if (!pUrlCombineA) {
- win_skip("UrlCombineA not found\n");
- return;
- }
-
wszUrl1 = GetWideString(szUrl1);
wszUrl2 = GetWideString(szUrl2);
wszExpectUrl = GetWideString(szExpectUrl);
- hr = pUrlCombineA(szUrl1, szUrl2, NULL, NULL, dwFlags);
+ hr = UrlCombineA(szUrl1, szUrl2, NULL, NULL, dwFlags);
ok(hr == E_INVALIDARG, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG);
dwSize = 0;
- hr = pUrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags);
+ hr = UrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags);
ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER);
ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1);
dwSize--;
- hr = pUrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags);
+ hr = UrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags);
ok(hr == E_POINTER, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_POINTER);
ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1);
- hr = pUrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags);
+ hr = UrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags);
ok(hr == dwExpectReturn, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn);
ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen);
if(SUCCEEDED(hr)) {
ok(strcmp(szReturnUrl,szExpectUrl)==0, "Expected %s, but got %s\n", szExpectUrl, szReturnUrl);
}
- if (pUrlCombineW) {
- dwSize = 0;
- hr = pUrlCombineW(wszUrl1, wszUrl2, NULL, &dwSize, dwFlags);
- ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER);
- ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1);
+ dwSize = 0;
+ hr = UrlCombineW(wszUrl1, wszUrl2, NULL, &dwSize, dwFlags);
+ ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER);
+ ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1);
- dwSize--;
- hr = pUrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags);
- ok(hr == E_POINTER, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, E_POINTER);
- ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1);
+ dwSize--;
+ hr = UrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags);
+ ok(hr == E_POINTER, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, E_POINTER);
+ ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1);
- hr = pUrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags);
- ok(hr == dwExpectReturn, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn);
- ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen);
- if(SUCCEEDED(hr)) {
- wszConvertedUrl = GetWideString(szReturnUrl);
- ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, "Strings didn't match between ansi and unicode UrlCombine!\n");
- FreeWideString(wszConvertedUrl);
- }
+ hr = UrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags);
+ ok(hr == dwExpectReturn, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn);
+ ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen);
+ if(SUCCEEDED(hr)) {
+ wszConvertedUrl = GetWideString(szReturnUrl);
+ ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, "Strings didn't match between ansi and unicode UrlCombine!\n");
+ FreeWideString(wszConvertedUrl);
}
FreeWideString(wszUrl1);
@@ -1320,32 +1244,25 @@ static void test_UrlCreateFromPath(void)
WCHAR ret_urlW[INTERNET_MAX_URL_LENGTH];
WCHAR *pathW, *urlW;
- if (!pUrlCreateFromPathA) {
- win_skip("UrlCreateFromPathA not found\n");
- return;
- }
-
for (i = 0; i < ARRAY_SIZE(TEST_URLFROMPATH); i++) {
len = INTERNET_MAX_URL_LENGTH;
- ret = pUrlCreateFromPathA(TEST_URLFROMPATH[i].path, ret_url, &len, 0);
+ ret = UrlCreateFromPathA(TEST_URLFROMPATH[i].path, ret_url, &len, 0);
ok(ret == TEST_URLFROMPATH[i].ret, "ret %08x from path %s\n", ret, TEST_URLFROMPATH[i].path);
ok(!lstrcmpiA(ret_url, TEST_URLFROMPATH[i].url), "url %s from path %s\n", ret_url, TEST_URLFROMPATH[i].path);
ok(len == strlen(ret_url), "ret len %d from path %s\n", len, TEST_URLFROMPATH[i].path);
- if (pUrlCreateFromPathW) {
- len = INTERNET_MAX_URL_LENGTH;
- pathW = GetWideString(TEST_URLFROMPATH[i].path);
- urlW = GetWideString(TEST_URLFROMPATH[i].url);
- ret = pUrlCreateFromPathW(pathW, ret_urlW, &len, 0);
- WideCharToMultiByte(CP_ACP, 0, ret_urlW, -1, ret_url, sizeof(ret_url),0,0);
- ok(ret == TEST_URLFROMPATH[i].ret, "ret %08x from path L\"%s\", expected %08x\n",
- ret, TEST_URLFROMPATH[i].path, TEST_URLFROMPATH[i].ret);
- ok(!lstrcmpiW(ret_urlW, urlW), "got %s expected %s from path L\"%s\"\n",
- ret_url, TEST_URLFROMPATH[i].url, TEST_URLFROMPATH[i].path);
- ok(len == lstrlenW(ret_urlW), "ret len %d from path L\"%s\"\n", len, TEST_URLFROMPATH[i].path);
- FreeWideString(urlW);
- FreeWideString(pathW);
- }
+ len = INTERNET_MAX_URL_LENGTH;
+ pathW = GetWideString(TEST_URLFROMPATH[i].path);
+ urlW = GetWideString(TEST_URLFROMPATH[i].url);
+ ret = UrlCreateFromPathW(pathW, ret_urlW, &len, 0);
+ WideCharToMultiByte(CP_ACP, 0, ret_urlW, -1, ret_url, sizeof(ret_url),0,0);
+ ok(ret == TEST_URLFROMPATH[i].ret, "ret %08x from path L\"%s\", expected %08x\n",
+ ret, TEST_URLFROMPATH[i].path, TEST_URLFROMPATH[i].ret);
+ ok(!lstrcmpiW(ret_urlW, urlW), "got %s expected %s from path L\"%s\"\n",
+ ret_url, TEST_URLFROMPATH[i].url, TEST_URLFROMPATH[i].path);
+ ok(len == lstrlenW(ret_urlW), "ret len %d from path L\"%s\"\n", len, TEST_URLFROMPATH[i].path);
+ FreeWideString(urlW);
+ FreeWideString(pathW);
}
}
@@ -1354,9 +1271,9 @@ static void test_UrlCreateFromPath(void)
static void test_UrlIs_null(DWORD flag)
{
BOOL ret;
- ret = pUrlIsA(NULL, flag);
+ ret = UrlIsA(NULL, flag);
ok(ret == FALSE, "pUrlIsA(NULL, %d) failed\n", flag);
- ret = pUrlIsW(NULL, flag);
+ ret = UrlIsW(NULL, flag);
ok(ret == FALSE, "pUrlIsW(NULL, %d) failed\n", flag);
}
@@ -1366,11 +1283,6 @@ static void test_UrlIs(void)
size_t i;
WCHAR wurl[80];
- if (!pUrlIsA) {
- win_skip("UrlIsA not found\n");
- return;
- }
-
test_UrlIs_null(URLIS_APPLIABLE);
test_UrlIs_null(URLIS_DIRECTORY);
test_UrlIs_null(URLIS_FILEURL);
@@ -1382,40 +1294,36 @@ static void test_UrlIs(void)
for (i = 0; i < ARRAY_SIZE(TEST_PATH_IS_URL); i++) {
MultiByteToWideChar(CP_ACP, 0, TEST_PATH_IS_URL[i].path, -1, wurl, ARRAY_SIZE(wurl));
- ret = pUrlIsA( TEST_PATH_IS_URL[i].path, URLIS_URL );
+ ret = UrlIsA( TEST_PATH_IS_URL[i].path, URLIS_URL );
ok( ret == TEST_PATH_IS_URL[i].expect,
"returned %d from path %s, expected %d\n", ret, TEST_PATH_IS_URL[i].path,
TEST_PATH_IS_URL[i].expect );
- if (pUrlIsW) {
- ret = pUrlIsW( wurl, URLIS_URL );
- ok( ret == TEST_PATH_IS_URL[i].expect,
- "returned %d from path (UrlIsW) %s, expected %d\n", ret,
- TEST_PATH_IS_URL[i].path, TEST_PATH_IS_URL[i].expect );
- }
+ ret = UrlIsW( wurl, URLIS_URL );
+ ok( ret == TEST_PATH_IS_URL[i].expect,
+ "returned %d from path (UrlIsW) %s, expected %d\n", ret,
+ TEST_PATH_IS_URL[i].path, TEST_PATH_IS_URL[i].expect );
}
for (i = 0; i < ARRAY_SIZE(TEST_URLIS_ATTRIBS); i++) {
MultiByteToWideChar(CP_ACP, 0, TEST_URLIS_ATTRIBS[i].url, -1, wurl, ARRAY_SIZE(wurl));
- ret = pUrlIsA( TEST_URLIS_ATTRIBS[i].url, URLIS_OPAQUE);
+ ret = UrlIsA( TEST_URLIS_ATTRIBS[i].url, URLIS_OPAQUE);
ok( ret == TEST_URLIS_ATTRIBS[i].expectOpaque,
"returned %d for URLIS_OPAQUE, url \"%s\", expected %d\n", ret, TEST_URLIS_ATTRIBS[i].url,
TEST_URLIS_ATTRIBS[i].expectOpaque );
- ret = pUrlIsA( TEST_URLIS_ATTRIBS[i].url, URLIS_FILEURL);
+ ret = UrlIsA( TEST_URLIS_ATTRIBS[i].url, URLIS_FILEURL);
ok( ret == TEST_URLIS_ATTRIBS[i].expectFile,
"returned %d for URLIS_FILEURL, url \"%s\", expected %d\n", ret, TEST_URLIS_ATTRIBS[i].url,
TEST_URLIS_ATTRIBS[i].expectFile );
- if (pUrlIsW) {
- ret = pUrlIsW( wurl, URLIS_OPAQUE);
- ok( ret == TEST_URLIS_ATTRIBS[i].expectOpaque,
- "returned %d for URLIS_OPAQUE (UrlIsW), url \"%s\", expected %d\n",
- ret, TEST_URLIS_ATTRIBS[i].url, TEST_URLIS_ATTRIBS[i].expectOpaque );
- ret = pUrlIsW( wurl, URLIS_FILEURL);
- ok( ret == TEST_URLIS_ATTRIBS[i].expectFile,
- "returned %d for URLIS_FILEURL (UrlIsW), url \"%s\", expected %d\n",
- ret, TEST_URLIS_ATTRIBS[i].url, TEST_URLIS_ATTRIBS[i].expectFile );
- }
+ ret = UrlIsW( wurl, URLIS_OPAQUE);
+ ok( ret == TEST_URLIS_ATTRIBS[i].expectOpaque,
+ "returned %d for URLIS_OPAQUE (UrlIsW), url \"%s\", expected %d\n",
+ ret, TEST_URLIS_ATTRIBS[i].url, TEST_URLIS_ATTRIBS[i].expectOpaque );
+ ret = UrlIsW( wurl, URLIS_FILEURL);
+ ok( ret == TEST_URLIS_ATTRIBS[i].expectFile,
+ "returned %d for URLIS_FILEURL (UrlIsW), url \"%s\", expected %d\n",
+ ret, TEST_URLIS_ATTRIBS[i].url, TEST_URLIS_ATTRIBS[i].expectFile );
}
}
@@ -1436,13 +1344,9 @@ static void test_UrlUnescape(void)
'C',':','/','P','r','o','g','r','a','m','%','2','0','F','i','l','e','s',0};
HRESULT res;
- if (!pUrlUnescapeA) {
- win_skip("UrlUnescapeA not found\n");
- return;
- }
for (i = 0; i < ARRAY_SIZE(TEST_URL_UNESCAPE); i++) {
dwEscaped=INTERNET_MAX_URL_LENGTH;
- res = pUrlUnescapeA(TEST_URL_UNESCAPE[i].url, szReturnUrl, &dwEscaped, 0);
+ res = UrlUnescapeA(TEST_URL_UNESCAPE[i].url, szReturnUrl, &dwEscaped, 0);
ok(res == S_OK,
"UrlUnescapeA returned 0x%x (expected S_OK) for \"%s\"\n",
res, TEST_URL_UNESCAPE[i].url);
@@ -1450,53 +1354,49 @@ static void test_UrlUnescape(void)
ZeroMemory(szReturnUrl, sizeof(szReturnUrl));
/* if we set the buffer pointer to NULL here, UrlUnescape fails and the string is not converted */
- res = pUrlUnescapeA(TEST_URL_UNESCAPE[i].url, szReturnUrl, NULL, 0);
+ res = UrlUnescapeA(TEST_URL_UNESCAPE[i].url, szReturnUrl, NULL, 0);
ok(res == E_INVALIDARG,
"UrlUnescapeA returned 0x%x (expected E_INVALIDARG) for \"%s\"\n",
res, TEST_URL_UNESCAPE[i].url);
ok(strcmp(szReturnUrl,"")==0, "Expected empty string\n");
- if (pUrlUnescapeW) {
- dwEscaped = INTERNET_MAX_URL_LENGTH;
- urlW = GetWideString(TEST_URL_UNESCAPE[i].url);
- expected_urlW = GetWideString(TEST_URL_UNESCAPE[i].expect);
- res = pUrlUnescapeW(urlW, ret_urlW, &dwEscaped, 0);
- ok(res == S_OK,
- "UrlUnescapeW returned 0x%x (expected S_OK) for \"%s\"\n",
- res, TEST_URL_UNESCAPE[i].url);
+ dwEscaped = INTERNET_MAX_URL_LENGTH;
+ urlW = GetWideString(TEST_URL_UNESCAPE[i].url);
+ expected_urlW = GetWideString(TEST_URL_UNESCAPE[i].expect);
+ res = UrlUnescapeW(urlW, ret_urlW, &dwEscaped, 0);
+ ok(res == S_OK,
+ "UrlUnescapeW returned 0x%x (expected S_OK) for \"%s\"\n",
+ res, TEST_URL_UNESCAPE[i].url);
- WideCharToMultiByte(CP_ACP,0,ret_urlW,-1,szReturnUrl,INTERNET_MAX_URL_LENGTH,0,0);
- ok(lstrcmpW(ret_urlW, expected_urlW)==0,
- "Expected \"%s\", but got \"%s\" from \"%s\" flags %08lx\n",
- TEST_URL_UNESCAPE[i].expect, szReturnUrl, TEST_URL_UNESCAPE[i].url, 0L);
- FreeWideString(urlW);
- FreeWideString(expected_urlW);
- }
+ WideCharToMultiByte(CP_ACP,0,ret_urlW,-1,szReturnUrl,INTERNET_MAX_URL_LENGTH,0,0);
+ ok(lstrcmpW(ret_urlW, expected_urlW)==0,
+ "Expected \"%s\", but got \"%s\" from \"%s\" flags %08lx\n",
+ TEST_URL_UNESCAPE[i].expect, szReturnUrl, TEST_URL_UNESCAPE[i].url, 0L);
+ FreeWideString(urlW);
+ FreeWideString(expected_urlW);
}
dwEscaped = sizeof(inplace);
- res = pUrlUnescapeA(inplace, NULL, &dwEscaped, URL_UNESCAPE_INPLACE);
+ res = UrlUnescapeA(inplace, NULL, &dwEscaped, URL_UNESCAPE_INPLACE);
ok(res == S_OK, "UrlUnescapeA returned 0x%x (expected S_OK)\n", res);
ok(!strcmp(inplace, expected), "got %s expected %s\n", inplace, expected);
ok(dwEscaped == 27, "got %d expected 27\n", dwEscaped);
/* if we set the buffer pointer to NULL, the string apparently still gets converted (Google Lively does this) */
- res = pUrlUnescapeA(another_inplace, NULL, NULL, URL_UNESCAPE_INPLACE);
+ res = UrlUnescapeA(another_inplace, NULL, NULL, URL_UNESCAPE_INPLACE);
ok(res == S_OK, "UrlUnescapeA returned 0x%x (expected S_OK)\n", res);
ok(!strcmp(another_inplace, expected), "got %s expected %s\n", another_inplace, expected);
- if (pUrlUnescapeW) {
- dwEscaped = sizeof(inplaceW);
- res = pUrlUnescapeW(inplaceW, NULL, &dwEscaped, URL_UNESCAPE_INPLACE);
- ok(res == S_OK, "UrlUnescapeW returned 0x%x (expected S_OK)\n", res);
- ok(dwEscaped == 50, "got %d expected 50\n", dwEscaped);
+ dwEscaped = sizeof(inplaceW);
+ res = UrlUnescapeW(inplaceW, NULL, &dwEscaped, URL_UNESCAPE_INPLACE);
+ ok(res == S_OK, "UrlUnescapeW returned 0x%x (expected S_OK)\n", res);
+ ok(dwEscaped == 50, "got %d expected 50\n", dwEscaped);
- /* if we set the buffer pointer to NULL, the string apparently still gets converted (Google Lively does this) */
- res = pUrlUnescapeW(another_inplaceW, NULL, NULL, URL_UNESCAPE_INPLACE);
- ok(res == S_OK, "UrlUnescapeW returned 0x%x (expected S_OK)\n", res);
+ /* if we set the buffer pointer to NULL, the string apparently still gets converted (Google Lively does this) */
+ res = UrlUnescapeW(another_inplaceW, NULL, NULL, URL_UNESCAPE_INPLACE);
+ ok(res == S_OK, "UrlUnescapeW returned 0x%x (expected S_OK)\n", res);
- ok(lstrlenW(another_inplaceW) == 24, "got %d expected 24\n", lstrlenW(another_inplaceW));
- }
+ ok(lstrlenW(another_inplaceW) == 24, "got %d expected 24\n", lstrlenW(another_inplaceW));
}
static const struct parse_url_test_t {
@@ -1534,7 +1434,7 @@ static void test_ParseURL(void)
for (test = parse_url_tests; test < parse_url_tests + ARRAY_SIZE(parse_url_tests); test++) {
memset(&parseda, 0xd0, sizeof(parseda));
parseda.cbSize = sizeof(parseda);
- hres = pParseURLA(test->url, &parseda);
+ hres = ParseURLA(test->url, &parseda);
ok(hres == test->hres, "ParseURL failed: %08x, expected %08x\n", hres, test->hres);
if(hres == S_OK) {
ok(parseda.pszProtocol == test->url, "parseda.pszProtocol = %s, expected %s\n",
@@ -1557,7 +1457,7 @@ static void test_ParseURL(void)
memset(&parsedw, 0xd0, sizeof(parsedw));
parsedw.cbSize = sizeof(parsedw);
- hres = pParseURLW(url, &parsedw);
+ hres = ParseURLW(url, &parsedw);
ok(hres == test->hres, "ParseURL failed: %08x, expected %08x\n", hres, test->hres);
if(hres == S_OK) {
ok(parsedw.pszProtocol == url, "parsedw.pszProtocol = %s, expected %s\n",
@@ -1598,36 +1498,36 @@ static void test_HashData(void)
int i;
/* Test hashing with identically sized input/output buffers. */
- res = pHashData(input, 16, output, 16);
+ res = HashData(input, 16, output, 16);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
if(res == S_OK)
ok(!memcmp(output, expected, sizeof(expected)),
"Output buffer did not match expected contents\n");
/* Test hashing with larger output buffer. */
- res = pHashData(input, 16, output, 32);
+ res = HashData(input, 16, output, 32);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
if(res == S_OK)
ok(!memcmp(output, expected2, sizeof(expected2)),
"Output buffer did not match expected contents\n");
/* Test hashing with smaller input buffer. */
- res = pHashData(input, 8, output, 16);
+ res = HashData(input, 8, output, 16);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
if(res == S_OK)
ok(!memcmp(output, expected3, sizeof(expected3)),
"Output buffer did not match expected contents\n");
/* Test passing NULL pointers for input/output parameters. */
- res = pHashData(NULL, 0, NULL, 0);
+ res = HashData(NULL, 0, NULL, 0);
ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
"Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
- res = pHashData(input, 0, NULL, 0);
+ res = HashData(input, 0, NULL, 0);
ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
"Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
- res = pHashData(NULL, 0, output, 0);
+ res = HashData(NULL, 0, output, 0);
ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
"Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
@@ -1638,7 +1538,7 @@ static void test_HashData(void)
for (i = 0; i < ARRAY_SIZE(output); i++)
output[i] = 0xFF;
- res = pHashData(input, 0, output, 0);
+ res = HashData(input, 0, output, 0);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
/* The buffers should be unchanged. */
@@ -1655,12 +1555,12 @@ static void test_HashData(void)
}
/* Input/output parameters are not validated. */
- res = pHashData((BYTE *)0xdeadbeef, 0, (BYTE *)0xdeadbeef, 0);
+ res = HashData((BYTE *)0xdeadbeef, 0, (BYTE *)0xdeadbeef, 0);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
if (0)
{
- res = pHashData((BYTE *)0xdeadbeef, 1, (BYTE *)0xdeadbeef, 1);
+ res = HashData((BYTE *)0xdeadbeef, 1, (BYTE *)0xdeadbeef, 1);
trace("HashData returned 0x%08x\n", res);
}
}
@@ -1669,39 +1569,6 @@ static void test_HashData(void)
START_TEST(url)
{
- char *pFunc;
-
- hShlwapi = GetModuleHandleA("shlwapi.dll");
-
- /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */
- pFunc = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileEx");
- if(!pFunc){
- win_skip("Too old shlwapi version\n");
- return;
- }
-
- pUrlUnescapeA = (void *) GetProcAddress(hShlwapi, "UrlUnescapeA");
- pUrlUnescapeW = (void *) GetProcAddress(hShlwapi, "UrlUnescapeW");
- pUrlIsA = (void *) GetProcAddress(hShlwapi, "UrlIsA");
- pUrlIsW = (void *) GetProcAddress(hShlwapi, "UrlIsW");
- pUrlHashA = (void *) GetProcAddress(hShlwapi, "UrlHashA");
- pUrlHashW = (void *) GetProcAddress(hShlwapi, "UrlHashW");
- pUrlGetPartA = (void *) GetProcAddress(hShlwapi, "UrlGetPartA");
- pUrlGetPartW = (void *) GetProcAddress(hShlwapi, "UrlGetPartW");
- pUrlEscapeA = (void *) GetProcAddress(hShlwapi, "UrlEscapeA");
- pUrlEscapeW = (void *) GetProcAddress(hShlwapi, "UrlEscapeW");
- pUrlCreateFromPathA = (void *) GetProcAddress(hShlwapi, "UrlCreateFromPathA");
- pUrlCreateFromPathW = (void *) GetProcAddress(hShlwapi, "UrlCreateFromPathW");
- pUrlCombineA = (void *) GetProcAddress(hShlwapi, "UrlCombineA");
- pUrlCombineW = (void *) GetProcAddress(hShlwapi, "UrlCombineW");
- pUrlCanonicalizeA = (void *) GetProcAddress(hShlwapi, "UrlCanonicalizeA");
- pUrlCanonicalizeW = (void *) GetProcAddress(hShlwapi, "UrlCanonicalizeW");
- pUrlApplySchemeA = (void *) GetProcAddress(hShlwapi, "UrlApplySchemeA");
- pUrlApplySchemeW = (void *) GetProcAddress(hShlwapi, "UrlApplySchemeW");
- pParseURLA = (void*)GetProcAddress(hShlwapi, (LPCSTR)1);
- pParseURLW = (void*)GetProcAddress(hShlwapi, (LPCSTR)2);
- pHashData = (void*)GetProcAddress(hShlwapi, "HashData");
-
test_UrlApplyScheme();
test_UrlHash();
test_UrlGetPart();
--
2.34.1
1
4
Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com>
---
Fixes a crash where two threads calling SetupDiGetClassDevs() would end
up in alloc_devnode() at the same time. One thread would start iterating
through the table after devnode_table_size was set but before
devnode_table was allocated, and crash.
dlls/setupapi/devinst.c | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index ecc0b58ca5c..f3ae4fdb1da 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -233,11 +233,21 @@ static inline void copy_device_iface_data(SP_DEVICE_INTERFACE_DATA *data,
static struct device **devnode_table;
static unsigned int devnode_table_size;
+static CRITICAL_SECTION devnode_table_cs;
+static CRITICAL_SECTION_DEBUG critsect_debug =
+{
+ 0, 0, &devnode_table_cs,
+ { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
+ 0, 0, { (DWORD_PTR)(__FILE__ ": devnode_table_cs") }
+};
+static CRITICAL_SECTION devnode_table_cs = { &critsect_debug, -1, 0, 0, 0, 0 };
static DEVINST alloc_devnode(struct device *device)
{
unsigned int i;
+ EnterCriticalSection(&devnode_table_cs);
+
for (i = 0; i < devnode_table_size; ++i)
{
if (!devnode_table[i])
@@ -260,21 +270,33 @@ static DEVINST alloc_devnode(struct device *device)
}
devnode_table[i] = device;
+
+ LeaveCriticalSection(&devnode_table_cs);
+
return i;
}
static void free_devnode(DEVINST devnode)
{
+ EnterCriticalSection(&devnode_table_cs);
devnode_table[devnode] = NULL;
+ LeaveCriticalSection(&devnode_table_cs);
}
static struct device *get_devnode_device(DEVINST devnode)
{
+ struct device *device = NULL;
+
+ EnterCriticalSection(&devnode_table_cs);
+
if (devnode < devnode_table_size)
- return devnode_table[devnode];
+ device = devnode_table[devnode];
+ else
+ WARN("device node %u not found\n", devnode);
- WARN("device node %u not found\n", devnode);
- return NULL;
+ LeaveCriticalSection(&devnode_table_cs);
+
+ return device;
}
static void SETUPDI_GuidToString(const GUID *guid, LPWSTR guidStr)
--
2.32.0 (Apple Git-132)
2
2
[tools 1/3] testbot/SetWinLocale: Better detect when Windows has rebooted.
by Francois Gouget 08 Feb '22
by Francois Gouget 08 Feb '22
08 Feb '22
This no longer relies on a long pause to give time for Windows to start
rebooting and should detect when TestAgentd is ready again faster.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/SetWinLocale | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index 2324a5cb16..dc551853af 100755
--- a/testbot/bin/SetWinLocale
+++ b/testbot/bin/SetWinLocale
@@ -902,18 +902,19 @@ if ($OptReboot)
{
my $Cmd = ["shutdown.exe", "/r", "/t", "0"];
Debug(Elapsed($Start), " Rebooting: ", join(" ", @$Cmd), "\n");
+ my $OldCount = $TA->GetProperties("start.count");
$TA->Run($Cmd, 0);
# Note that we cannot wait for this command since it reboots Windows
- # Wait a bit to make sure we don't reconnect before Windows has rebooted.
- sleep(30);
-
- Debug(Elapsed($Start), " Waiting for Windows to boot\n");
- $TA->SetConnectTimeout(undef, undef, $WaitForBoot);
- if (!$TA->Ping())
+ my ($OneTimeout, $MinAttempts, $MinTimeout) = $TA->SetConnectTimeout(3, 1, 3);
+ while (1)
{
- FatalError("could not reconnect to $OptHostName after the reboot: ", $TA->GetLastError(), "\n");
+ my $NewCount = $TA->GetProperties("start.count");
+ next if (!defined $NewCount); # Rebooting (TestAgentd is not running)
+ last if ($NewCount != $OldCount); # start.count got incremented
+ sleep(10); # Not rebooting yet
}
+ $TA->SetConnectTimeout($OneTimeout, $MinAttempts, $MinTimeout);
# Skip this check on pre-Windows 10 versions, i.e. those that don't have
# 'CountryName' and if the settings were not changed in the first place.
--
2.30.2
1
2
[tools] testbot/LibvirtTool: Revert() does not need its own VM object.
by Francois Gouget 08 Feb '22
by Francois Gouget 08 Feb '22
08 Feb '22
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/LibvirtTool.pl | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 7a865499c2..b6b1fad581 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -447,9 +447,9 @@ sub CheckOff()
return ChangeStatus("dirty", "off", "done");
}
-sub SetupTestAgentd($$$$)
+sub SetupTestAgentd($$$)
{
- my ($VM, $Booting, $UpgradeTestAgentd, $ResetStartCount) = @_;
+ my ($Booting, $UpgradeTestAgentd, $ResetStartCount) = @_;
Debug(Elapsed($Start), " Setting up the $VMKey TestAgent server\n");
LogMsg "Setting up the $VMKey TestAgent server\n";
@@ -572,7 +572,6 @@ sub CreateSnapshot($$)
sub Revert()
{
- my $VM = CreateVMs()->GetItem($VMKey);
if (!$Debug and $VM->Status ne "reverting")
{
Error("The VM is not ready to be reverted (". $VM->Status .")\n");
@@ -648,7 +647,7 @@ sub Revert()
# Set up the TestAgent server. Note that setting the locale will require a
# reboot so reset start.count in that case.
- SetupTestAgentd($VM, $Booting, ($CreateSnapshot or $SetLocale), $SetLocale);
+ SetupTestAgentd($Booting, ($CreateSnapshot or $SetLocale), $SetLocale);
if ($CreateSnapshot)
{
--
2.30.2
1
0