[PATCH] ole32: Build without WINE_NO_LONG_TYPES.

Nikolay Sivov nsivov at codeweavers.com
Tue Feb 8 14:09:20 CST 2022


Signed-off-by: Nikolay Sivov <nsivov at 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




More information about the wine-devel mailing list