ddraw: Win64 printf format warning fixes

H. Verbeet hverbeet at gmail.com
Tue Oct 10 12:23:27 CDT 2006


-------------- next part --------------
---

 dlls/ddraw/Makefile.in     |    1 
 dlls/ddraw/clipper.c       |   12 +--
 dlls/ddraw/ddraw.c         |   50 ++++++------
 dlls/ddraw/ddraw_thunks.c  |   12 +--
 dlls/ddraw/device.c        |  184 ++++++++++++++++++++++----------------------
 dlls/ddraw/direct3d.c      |   16 ++--
 dlls/ddraw/executebuffer.c |   36 ++++-----
 dlls/ddraw/gamma.c         |    4 -
 dlls/ddraw/light.c         |    6 +
 dlls/ddraw/main.c          |   14 ++-
 dlls/ddraw/material.c      |    8 +-
 dlls/ddraw/palette.c       |   10 +-
 dlls/ddraw/parent.c        |    4 -
 dlls/ddraw/surface.c       |   56 +++++++------
 dlls/ddraw/texture.c       |    6 +
 dlls/ddraw/utils.c         |   34 ++++----
 dlls/ddraw/vertexbuffer.c  |   22 +++--
 dlls/ddraw/viewport.c      |   28 +++----
 18 files changed, 251 insertions(+), 252 deletions(-)

diff --git a/dlls/ddraw/Makefile.in b/dlls/ddraw/Makefile.in
index e725e6b..b31c052 100644
--- a/dlls/ddraw/Makefile.in
+++ b/dlls/ddraw/Makefile.in
@@ -7,7 +7,6 @@ IMPORTLIB = libddraw.$(IMPLIBEXT)
 IMPORTS   = ole32 user32 gdi32 advapi32 kernel32 ntdll
 EXTRAINCL = @X_CFLAGS@
 EXTRALIBS = -ldxguid -luuid @X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ 
-EXTRADEFS = -DWINE_NO_LONG_AS_INT
 
 C_SRCS = \
 	clipper.c \
diff --git a/dlls/ddraw/clipper.c b/dlls/ddraw/clipper.c
index a5fe15e..be4ef9d 100644
--- a/dlls/ddraw/clipper.c
+++ b/dlls/ddraw/clipper.c
@@ -86,7 +86,7 @@ static ULONG WINAPI IDirectDrawClipperIm
     IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p)->() incrementing from %lu.\n", This, ref - 1);
+    TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
 
     return ref;
 }
@@ -102,7 +102,7 @@ static ULONG WINAPI IDirectDrawClipperIm
     IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p)->() decrementing from %lu.\n", This, ref + 1);
+    TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
 
     if (ref == 0)
     {
@@ -132,9 +132,9 @@ static HRESULT WINAPI IDirectDrawClipper
 ) {
     IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
 
-    TRACE("(%p)->(0x%08lx,0x%08lx)\n", This, dwFlags, (DWORD)hWnd);
+    TRACE("(%p)->(0x%08x,0x%08x)\n", This, dwFlags, (DWORD)hWnd);
     if( dwFlags ) {
-	FIXME("dwFlags = 0x%08lx, not supported.\n",dwFlags);
+	FIXME("dwFlags = 0x%08x, not supported.\n",dwFlags);
 	return DDERR_INVALIDPARAMS;
     }
 
@@ -227,7 +227,7 @@ static HRESULT WINAPI IDirectDrawClipper
     IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
     static int warned = 0;
     if (warned++ < 10 || lprgn == NULL)
-        FIXME("(%p,%p,%ld),stub!\n",This,lprgn,dwFlag);
+        FIXME("(%p,%p,%d),stub!\n",This,lprgn,dwFlag);
     return DD_OK;
 }
 
@@ -272,7 +272,7 @@ static HRESULT WINAPI IDirectDrawClipper
 ) {
     IDirectDrawImpl* pOwner;
     IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
-    TRACE("(%p)->(%p,0x%08lx)\n", This, lpDD, dwFlags);
+    TRACE("(%p)->(%p,0x%08x)\n", This, lpDD, dwFlags);
 
     if (This->ddraw_owner != NULL) return DDERR_ALREADYINITIALIZED;
 
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 341d936..972c512 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -221,7 +221,7 @@ IDirectDrawImpl_AddRef(IDirectDraw7 *ifa
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
     ULONG ref = InterlockedIncrement(&This->ref7);
 
-    TRACE("(%p) : incrementing IDirectDraw7 refcount from %lu.\n", This, ref -1);
+    TRACE("(%p) : incrementing IDirectDraw7 refcount from %u.\n", This, ref -1);
 
     if(ref == 1) InterlockedIncrement(&This->numIfaces);
 
@@ -280,7 +280,7 @@ IDirectDrawImpl_Release(IDirectDraw7 *if
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
     ULONG ref = InterlockedDecrement(&This->ref7);
 
-    TRACE("(%p)->() decrementing IDirectDraw7 refcount from %lu.\n", This, ref +1);
+    TRACE("(%p)->() decrementing IDirectDraw7 refcount from %u.\n", This, ref +1);
 
     if(ref == 0)
     {
@@ -336,7 +336,7 @@ IDirectDrawImpl_SetupFullscreenWindow(ID
     /* Make sure the window is managed, otherwise we won't get keyboard input */
     style |= WS_POPUP | WS_SYSMENU;
 
-    TRACE("Old style was %08lx,%08lx, setting to %08lx,%08lx\n",
+    TRACE("Old style was %08x,%08x, setting to %08x,%08x\n",
           This->style, This->exStyle, style, exStyle);
 
     SetWindowLongW(window, GWL_STYLE, style);
@@ -372,7 +372,7 @@ IDirectDrawImpl_RestoreWindow(IDirectDra
          */
         return;
     }
-    TRACE("(%p): Restoring window settings of window %p to %08lx, %08lx\n",
+    TRACE("(%p): Restoring window settings of window %p to %08x, %08x\n",
           This, window, This->style, This->exStyle);
 
     SetWindowLongW(window, GWL_STYLE, This->style);
@@ -441,14 +441,14 @@ IDirectDrawImpl_SetCooperativeLevel(IDir
     HWND window;
     HRESULT hr;
 
-    FIXME("(%p)->(%p,%08lx)\n",This,hwnd,cooplevel);
+    FIXME("(%p)->(%p,%08x)\n",This,hwnd,cooplevel);
     DDRAW_dump_cooperativelevel(cooplevel);
 
     /* Get the old window */
     hr = IWineD3DDevice_GetHWND(This->wineD3DDevice, &window);
     if(hr != D3D_OK)
     {
-        ERR("IWineD3DDevice::GetHWND failed, hr = %08lx\n", hr);
+        ERR("IWineD3DDevice::GetHWND failed, hr = %08x\n", hr);
         return hr;
     }
 
@@ -649,11 +649,11 @@ IDirectDrawImpl_SetDisplayMode(IDirectDr
 {
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
     WINED3DDISPLAYMODE Mode;
-    TRACE("(%p)->(%ld,%ld,%ld,%ld,%lx: Relay!\n", This, Width, Height, BPP, RefreshRate, Flags);
+    TRACE("(%p)->(%d,%d,%d,%d,%x: Relay!\n", This, Width, Height, BPP, RefreshRate, Flags);
 
     if( !Width || !Height )
     {
-        ERR("Width=%ld, Height=%ld, what to do?\n", Width, Height);
+        ERR("Width=%d, Height=%d, what to do?\n", Width, Height);
         /* It looks like Need for Speed Porsche Unleashed expects DD_OK here */
         return DD_OK;
     }
@@ -835,7 +835,7 @@ IDirectDrawImpl_GetDisplayMode(IDirectDr
                                       &Mode);
     if( hr != D3D_OK )
     {
-        ERR(" (%p) IWineD3DDevice::GetDisplayMode returned %08lx\n", This, hr);
+        ERR(" (%p) IWineD3DDevice::GetDisplayMode returned %08x\n", This, hr);
         return hr;
     }
 
@@ -1064,7 +1064,7 @@ IDirectDrawImpl_WaitForVerticalBlank(IDi
                                      HANDLE h)
 {
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
-    FIXME("(%p)->(%lx,%p): Stub\n", This, Flags, h);
+    FIXME("(%p)->(%x,%p): Stub\n", This, Flags, h);
 
     /* MSDN says DDWAITVB_BLOCKBEGINEVENT is not supported */
     if(Flags & DDWAITVB_BLOCKBEGINEVENT)
@@ -1164,7 +1164,7 @@ IDirectDrawImpl_TestCooperativeLevel(IDi
 
         case WINED3DERR_DRIVERINTERNALERROR:
         default:
-            ERR("(%p) Unexpected return value %08lx from wineD3D, " \
+            ERR("(%p) Unexpected return value %08x from wineD3D, " \
                 " returning DD_OK\n", This, hr);
     }
 
@@ -1226,7 +1226,7 @@ IDirectDrawImpl_GetGDISurface(IDirectDra
                                                 GDISurface);
     if(hr != DD_OK)
     {
-        ERR("IDirectDrawSurface7::GetAttachedSurface failed, hr = %lx\n", hr);
+        ERR("IDirectDrawSurface7::GetAttachedSurface failed, hr = %x\n", hr);
     }
 
     /* The AddRef is OK this time */
@@ -1354,7 +1354,7 @@ IDirectDrawImpl_EvaluateMode(IDirectDraw
                              DWORD *Timeout)
 {
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
-    FIXME("(%p)->(%ld,%p): Stub!\n", This, Flags, Timeout);
+    FIXME("(%p)->(%d,%p): Stub!\n", This, Flags, Timeout);
 
     /* When implementing this, implement it in WineD3D */
 
@@ -1382,7 +1382,7 @@ IDirectDrawImpl_GetDeviceIdentifier(IDir
                                     DWORD Flags)
 {
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
-    TRACE("(%p)->(%p,%08lx)\n", This, DDDI, Flags);
+    TRACE("(%p)->(%p,%08x)\n", This, DDDI, Flags);
 
     if(!DDDI)
         return DDERR_INVALIDPARAMS;
@@ -1477,7 +1477,7 @@ IDirectDrawImpl_StartModeTest(IDirectDra
                               DWORD Flags)
 {
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
-    WARN("(%p)->(%p, %ld, %lx): Semi-Stub, most likely harmless\n", This, Modes, NumModes, Flags);
+    WARN("(%p)->(%p, %d, %x): Semi-Stub, most likely harmless\n", This, Modes, NumModes, Flags);
 
     /* This looks sane */
     if( (!Modes) || (NumModes == 0) ) return DDERR_INVALIDPARAMS;
@@ -1888,7 +1888,7 @@ IDirectDrawImpl_CreateNewSurface(IDirect
 
     if(hr != D3D_OK)
     {
-        ERR("IWineD3DDevice::CreateSurface failed. hr = %08lx\n", hr);
+        ERR("IWineD3DDevice::CreateSurface failed. hr = %08x\n", hr);
         return hr;
     }
 
@@ -2236,7 +2236,7 @@ IDirectDrawImpl_CreateSurface(IDirectDra
                     (rect.bottom - rect.top) <= 1 )
                 {
                     FIXME("Wanted to get surface dimensions from window %p, but it has only \
-                           a size of %ldx%ld. Using full screen dimensions\n",
+                           a size of %dx%d. Using full screen dimensions\n",
                            window, rect.right - rect.left, rect.bottom - rect.top);
                 }
                 else
@@ -2244,7 +2244,7 @@ IDirectDrawImpl_CreateSurface(IDirectDra
                     /* Not sure if this is correct */
                     desc2.dwWidth = rect.right - rect.left;
                     desc2.dwHeight = rect.bottom - rect.top;
-                    TRACE("Using window %p's dimensions: %ldx%ld\n", window, desc2.dwWidth, desc2.dwHeight);
+                    TRACE("Using window %p's dimensions: %dx%d\n", window, desc2.dwWidth, desc2.dwHeight);
                 }
             }
         }
@@ -2296,7 +2296,7 @@ IDirectDrawImpl_CreateSurface(IDirectDra
     hr = IDirectDrawImpl_CreateNewSurface(This, &desc2, &object, 0);
     if( hr != DD_OK)
     {
-        ERR("IDirectDrawImpl_CreateNewSurface failed with %08lx\n", hr);
+        ERR("IDirectDrawImpl_CreateNewSurface failed with %08x\n", hr);
         return hr;
     }
 
@@ -2397,7 +2397,7 @@ IDirectDrawImpl_CreateSurface(IDirectDra
         hr = IDirectDrawImpl_AttachD3DDevice(This, target->first_complex);
         if(hr != D3D_OK)
         {
-            ERR("IDirectDrawImpl_AttachD3DDevice failed, hr = %lx\n", hr);
+            ERR("IDirectDrawImpl_AttachD3DDevice failed, hr = %x\n", hr);
         }
     }
 
@@ -2604,7 +2604,7 @@ IDirectDrawImpl_EnumSurfaces(IDirectDraw
     all = Flags & DDENUMSURFACES_ALL;
     nomatch = Flags & DDENUMSURFACES_NOMATCH;
 
-    TRACE("(%p)->(%lx,%p,%p,%p)\n", This, Flags, DDSD, Context, Callback);
+    TRACE("(%p)->(%x,%p,%p,%p)\n", This, Flags, DDSD, Context, Callback);
 
     if(!Callback)
         return DDERR_INVALIDPARAMS;
@@ -2721,7 +2721,7 @@ D3D7CB_CreateDepthStencilSurface(IUnknow
     This->depthstencil = FALSE;
     if(FAILED(hr))
     {
-        ERR(" (%p) Creating a DepthStencil Surface failed, result = %lx\n", This, hr);
+        ERR(" (%p) Creating a DepthStencil Surface failed, result = %x\n", This, hr);
         return hr;
     }
     *ppSurface = This->DepthStencilBuffer->WineD3DSurface;
@@ -2920,7 +2920,7 @@ DirectDrawCreateClipper(DWORD Flags,
                         IUnknown *UnkOuter)
 {
     IDirectDrawClipperImpl* object;
-    TRACE("(%08lx,%p,%p)\n", Flags, Clipper, UnkOuter);
+    TRACE("(%08x,%p,%p)\n", Flags, Clipper, UnkOuter);
 
     if (UnkOuter != NULL) return CLASS_E_NOAGGREGATION;
 
@@ -2950,7 +2950,7 @@ IDirectDrawImpl_CreateClipper(IDirectDra
                               IUnknown *UnkOuter)
 {
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
-    TRACE("(%p)->(%lx,%p,%p)\n", This, Flags, Clipper, UnkOuter);
+    TRACE("(%p)->(%x,%p,%p)\n", This, Flags, Clipper, UnkOuter);
     return DirectDrawCreateClipper(Flags, Clipper, UnkOuter);
 }
 
@@ -2981,7 +2981,7 @@ IDirectDrawImpl_CreatePalette(IDirectDra
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
     IDirectDrawPaletteImpl *object;
     HRESULT hr = DDERR_GENERIC;
-    TRACE("(%p)->(%lx,%p,%p,%p)\n", This, Flags, ColorTable, Palette, pUnkOuter);
+    TRACE("(%p)->(%x,%p,%p,%p)\n", This, Flags, ColorTable, Palette, pUnkOuter);
 
     if(pUnkOuter != NULL)
     {
diff --git a/dlls/ddraw/ddraw_thunks.c b/dlls/ddraw/ddraw_thunks.c
index c0b0641..1b7fa5b 100644
--- a/dlls/ddraw/ddraw_thunks.c
+++ b/dlls/ddraw/ddraw_thunks.c
@@ -78,7 +78,7 @@ IDirectDrawImpl_AddRef(LPDIRECTDRAW ifac
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw, iface);
     ULONG ref = InterlockedIncrement(&This->ref1);
 
-    TRACE("(%p) : incrementing IDirectDraw refcount from %lu.\n", This, ref -1);
+    TRACE("(%p) : incrementing IDirectDraw refcount from %u.\n", This, ref -1);
 
     if(ref == 1) InterlockedIncrement(&This->numIfaces);
 
@@ -91,7 +91,7 @@ IDirectDraw2Impl_AddRef(LPDIRECTDRAW2 if
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw2, iface);
     ULONG ref = InterlockedIncrement(&This->ref2);
 
-    TRACE("(%p) : incrementing IDirectDraw2 refcount from %lu.\n", This, ref -1);
+    TRACE("(%p) : incrementing IDirectDraw2 refcount from %u.\n", This, ref -1);
 
     if(ref == 1) InterlockedIncrement(&This->numIfaces);
 
@@ -104,7 +104,7 @@ IDirectDraw4Impl_AddRef(LPDIRECTDRAW4 if
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw4, iface);
     ULONG ref = InterlockedIncrement(&This->ref4);
 
-    TRACE("(%p) : incrementing IDirectDraw4 refcount from %lu.\n", This, ref -1);
+    TRACE("(%p) : incrementing IDirectDraw4 refcount from %u.\n", This, ref -1);
 
     if(ref == 1) InterlockedIncrement(&This->numIfaces);
 
@@ -117,7 +117,7 @@ IDirectDrawImpl_Release(LPDIRECTDRAW ifa
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw, iface);
     ULONG ref = InterlockedDecrement(&This->ref1);
 
-    TRACE_(ddraw)("(%p)->() decrementing IDirectDraw refcount from %lu.\n", This, ref +1);
+    TRACE_(ddraw)("(%p)->() decrementing IDirectDraw refcount from %u.\n", This, ref +1);
 
     if(ref == 0)
     {
@@ -134,7 +134,7 @@ IDirectDraw2Impl_Release(LPDIRECTDRAW2 i
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw2, iface);
     ULONG ref = InterlockedDecrement(&This->ref2);
 
-    TRACE_(ddraw)("(%p)->() decrementing IDirectDraw2 refcount from %lu.\n", This, ref +1);
+    TRACE_(ddraw)("(%p)->() decrementing IDirectDraw2 refcount from %u.\n", This, ref +1);
 
     if(ref == 0)
     {
@@ -151,7 +151,7 @@ IDirectDraw4Impl_Release(LPDIRECTDRAW4 i
     ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw4, iface);
     ULONG ref = InterlockedDecrement(&This->ref4);
 
-    TRACE_(ddraw)("(%p)->() decrementing IDirectDraw4 refcount from %lu.\n", This, ref +1);
+    TRACE_(ddraw)("(%p)->() decrementing IDirectDraw4 refcount from %u.\n", This, ref +1);
 
     if(ref == 0)
     {
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index c728a7a..a051684 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -231,7 +231,7 @@ IDirect3DDeviceImpl_7_AddRef(IDirect3DDe
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) : incrementing from %lu.\n", This, ref -1);
+    TRACE("(%p) : incrementing from %u.\n", This, ref -1);
 
     return ref;
 }
@@ -277,7 +277,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DD
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p)->() decrementing from %lu.\n", This, ref +1);
+    TRACE("(%p)->() decrementing from %u.\n", This, ref +1);
 
     /* This method doesn't destroy the WineD3DDevice, because it's still in use for
      * 2D rendering. IDirectDrawSurface7::Release will destroy the WineD3DDevice
@@ -330,7 +330,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DD
                     case DDrawHandle_Texture:
                     {
                         IDirectDrawSurfaceImpl *surf = (IDirectDrawSurfaceImpl *) This->Handles[i].ptr;
-                        FIXME("Texture Handle %ld not unset properly\n", i + 1);
+                        FIXME("Texture Handle %d not unset properly\n", i + 1);
                         surf->Handle = 0;
                     }
                     break;
@@ -338,7 +338,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DD
                     case DDrawHandle_Material:
                     {
                         IDirect3DMaterialImpl *mat = (IDirect3DMaterialImpl *) This->Handles[i].ptr;
-                        FIXME("Material handle %ld not unset properly\n", i + 1);
+                        FIXME("Material handle %d not unset properly\n", i + 1);
                         mat->Handle = 0;
                     }
                     break;
@@ -346,14 +346,14 @@ IDirect3DDeviceImpl_7_Release(IDirect3DD
                     case DDrawHandle_Matrix:
                     {
                         /* No fixme here because this might happen because of sloppy apps */
-                        WARN("Leftover matrix handle %ld, deleting\n", i + 1);
+                        WARN("Leftover matrix handle %d, deleting\n", i + 1);
                         IDirect3DDevice_DeleteMatrix(ICOM_INTERFACE(This, IDirect3DDevice),
                                                      i + 1);
                     }
                     break;
 
                     default:
-                        FIXME("Unknown handle %ld not unset properly\n", i + 1);
+                        FIXME("Unknown handle %d not unset properly\n", i + 1);
                 }
             }
         }
@@ -737,7 +737,7 @@ IDirect3DDeviceImpl_1_Execute(IDirect3DD
     IDirect3DExecuteBufferImpl *Direct3DExecuteBufferImpl = ICOM_OBJECT(IDirect3DExecuteBufferImpl, IDirect3DExecuteBuffer, ExecuteBuffer);
     IDirect3DViewportImpl *Direct3DViewportImpl = ICOM_OBJECT(IDirect3DViewportImpl, IDirect3DViewport3, Viewport);
 
-    TRACE("(%p)->(%p,%p,%08lx)\n", This, Direct3DExecuteBufferImpl, Direct3DViewportImpl, Flags);
+    TRACE("(%p)->(%p,%p,%08x)\n", This, Direct3DExecuteBufferImpl, Direct3DViewportImpl, Flags);
 
     if(!Direct3DExecuteBufferImpl)
         return DDERR_INVALIDPARAMS;
@@ -899,7 +899,7 @@ IDirect3DDeviceImpl_3_NextViewport(IDire
     IDirect3DViewportImpl *vp = ICOM_OBJECT(IDirect3DViewportImpl, IDirect3DViewport3, Viewport3);
     IDirect3DViewportImpl *res = NULL;
 
-    TRACE("(%p)->(%p,%p,%08lx)\n", This, vp, lplpDirect3DViewport3, Flags);
+    TRACE("(%p)->(%p,%p,%08x)\n", This, vp, lplpDirect3DViewport3, Flags);
 
     if(!vp)
     {
@@ -949,7 +949,7 @@ Thunk_IDirect3DDeviceImpl_2_NextViewport
     IDirect3DViewportImpl *vp = ICOM_OBJECT(IDirect3DViewportImpl, IDirect3DViewport3, Viewport2);
     IDirect3DViewport3 *res;
     HRESULT hr;
-    TRACE_(ddraw_thunk)("(%p)->(%p,%p,%08lx) thunking to IDirect3DDevice3 interface.\n", This, vp, lplpDirect3DViewport2, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%p,%p,%08x) thunking to IDirect3DDevice3 interface.\n", This, vp, lplpDirect3DViewport2, Flags);
     hr = IDirect3DDevice3_NextViewport(ICOM_INTERFACE(This, IDirect3DDevice3),
                                        ICOM_INTERFACE(vp, IDirect3DViewport3),
                                        &res,
@@ -968,7 +968,7 @@ Thunk_IDirect3DDeviceImpl_1_NextViewport
     IDirect3DViewportImpl *vp = ICOM_OBJECT(IDirect3DViewportImpl, IDirect3DViewport3, Viewport);
     IDirect3DViewport3 *res;
     HRESULT hr;
-    TRACE_(ddraw_thunk)("(%p)->(%p,%p,%08lx) thunking to IDirect3DDevice3 interface.\n", This, vp, lplpDirect3DViewport, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%p,%p,%08x) thunking to IDirect3DDevice3 interface.\n", This, vp, lplpDirect3DViewport, Flags);
     hr = IDirect3DDevice3_NextViewport(ICOM_INTERFACE(This, IDirect3DDevice3),
                                        ICOM_INTERFACE(vp, IDirect3DViewport3),
                                        &res,
@@ -1008,7 +1008,7 @@ IDirect3DDeviceImpl_1_Pick(IDirect3DDevi
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice, iface);
     IDirect3DExecuteBufferImpl *execbuf = ICOM_OBJECT(IDirect3DExecuteBufferImpl, IDirect3DExecuteBuffer, ExecuteBuffer);
     IDirect3DViewportImpl *vp = ICOM_OBJECT(IDirect3DViewportImpl, IDirect3DViewport3, Viewport);
-    FIXME("(%p)->(%p,%p,%08lx,%p): stub!\n", This, execbuf, vp, Flags, Rect);
+    FIXME("(%p)->(%p,%p,%08x,%p): stub!\n", This, execbuf, vp, Flags, Rect);
 
     return D3D_OK;
 }
@@ -1262,7 +1262,7 @@ IDirect3DDeviceImpl_1_CreateMatrix(IDire
     }
     This->Handles[(DWORD) *D3DMatHandle - 1].ptr = Matrix;
     This->Handles[(DWORD) *D3DMatHandle - 1].type = DDrawHandle_Matrix;
-    TRACE(" returning matrix handle %ld\n", *D3DMatHandle);
+    TRACE(" returning matrix handle %d\n", *D3DMatHandle);
 
     return D3D_OK;
 }
@@ -1291,19 +1291,19 @@ IDirect3DDeviceImpl_1_SetMatrix(IDirect3
                                 D3DMATRIX *D3DMatrix)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice, iface);
-    TRACE("(%p)->(%08lx,%p)\n", This, (DWORD) D3DMatHandle, D3DMatrix);
+    TRACE("(%p)->(%08x,%p)\n", This, (DWORD) D3DMatHandle, D3DMatrix);
 
     if( (!D3DMatHandle) || (!D3DMatrix) )
         return DDERR_INVALIDPARAMS;
 
     if(D3DMatHandle > This->numHandles)
     {
-        ERR("Handle %ld out of range\n", D3DMatHandle);
+        ERR("Handle %d out of range\n", D3DMatHandle);
         return DDERR_INVALIDPARAMS;
     }
     else if(This->Handles[D3DMatHandle - 1].type != DDrawHandle_Matrix)
     {
-        ERR("Handle %ld is not a matrix handle\n", D3DMatHandle);
+        ERR("Handle %d is not a matrix handle\n", D3DMatHandle);
         return DDERR_INVALIDPARAMS;
     }
 
@@ -1337,7 +1337,7 @@ IDirect3DDeviceImpl_1_GetMatrix(IDirect3
                                 D3DMATRIX *D3DMatrix)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice, iface);
-    TRACE("(%p)->(%08lx,%p)\n", This, (DWORD) D3DMatHandle, D3DMatrix);
+    TRACE("(%p)->(%08x,%p)\n", This, (DWORD) D3DMatHandle, D3DMatrix);
 
     if(!D3DMatrix)
         return DDERR_INVALIDPARAMS;
@@ -1346,12 +1346,12 @@ IDirect3DDeviceImpl_1_GetMatrix(IDirect3
 
     if(D3DMatHandle > This->numHandles)
     {
-        ERR("Handle %ld out of range\n", D3DMatHandle);
+        ERR("Handle %d out of range\n", D3DMatHandle);
         return DDERR_INVALIDPARAMS;
     }
     else if(This->Handles[D3DMatHandle - 1].type != DDrawHandle_Matrix)
     {
-        ERR("Handle %ld is not a matrix handle\n", D3DMatHandle);
+        ERR("Handle %d is not a matrix handle\n", D3DMatHandle);
         return DDERR_INVALIDPARAMS;
     }
 
@@ -1381,19 +1381,19 @@ IDirect3DDeviceImpl_1_DeleteMatrix(IDire
                                    D3DMATRIXHANDLE D3DMatHandle)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice, iface);
-    TRACE("(%p)->(%08lx)\n", This, (DWORD) D3DMatHandle);
+    TRACE("(%p)->(%08x)\n", This, (DWORD) D3DMatHandle);
 
     if(!D3DMatHandle)
         return DDERR_INVALIDPARAMS;
 
     if(D3DMatHandle > This->numHandles)
     {
-        ERR("Handle %ld out of range\n", D3DMatHandle);
+        ERR("Handle %d out of range\n", D3DMatHandle);
         return DDERR_INVALIDPARAMS;
     }
     else if(This->Handles[D3DMatHandle - 1].type != DDrawHandle_Matrix)
     {
-        ERR("Handle %ld is not a matrix handle\n", D3DMatHandle);
+        ERR("Handle %d is not a matrix handle\n", D3DMatHandle);
         return DDERR_INVALIDPARAMS;
     }
 
@@ -1713,7 +1713,7 @@ IDirect3DDeviceImpl_7_SetRenderTarget(ID
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     IDirectDrawSurfaceImpl *Target = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, NewTarget);
-    TRACE("(%p)->(%p,%08lx): Relay\n", This, NewTarget, Flags);
+    TRACE("(%p)->(%p,%08x): Relay\n", This, NewTarget, Flags);
 
     /* Flags: Not used */
 
@@ -1729,7 +1729,7 @@ Thunk_IDirect3DDeviceImpl_3_SetRenderTar
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
     IDirectDrawSurfaceImpl *Target = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, NewRenderTarget);
-    TRACE_(ddraw_thunk)("(%p)->(%p,%08lx) thunking to IDirect3DDevice7 interface.\n", This, Target, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%p,%08x) thunking to IDirect3DDevice7 interface.\n", This, Target, Flags);
     return IDirect3DDevice7_SetRenderTarget(ICOM_INTERFACE(This, IDirect3DDevice7),
                                             ICOM_INTERFACE(Target, IDirectDrawSurface7),
                                             Flags);
@@ -1742,7 +1742,7 @@ Thunk_IDirect3DDeviceImpl_2_SetRenderTar
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
     IDirectDrawSurfaceImpl *Target = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface3, NewRenderTarget);
-    TRACE_(ddraw_thunk)("(%p)->(%p,%08lx) thunking to IDirect3DDevice7 interface.\n", This, Target, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%p,%08x) thunking to IDirect3DDevice7 interface.\n", This, Target, Flags);
     return IDirect3DDevice7_SetRenderTarget(ICOM_INTERFACE(This, IDirect3DDevice7),
                                             ICOM_INTERFACE(Target, IDirectDrawSurface7),
                                             Flags);
@@ -1834,7 +1834,7 @@ IDirect3DDeviceImpl_3_Begin(IDirect3DDev
                             DWORD Flags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE("(%p)->(%d,%ld,%08lx)\n", This, PrimitiveType, VertexTypeDesc, Flags);
+    TRACE("(%p)->(%d,%d,%08x)\n", This, PrimitiveType, VertexTypeDesc, Flags);
 
     This->primitive_type = PrimitiveType;
     This->vertex_type = VertexTypeDesc;
@@ -1853,7 +1853,7 @@ Thunk_IDirect3DDeviceImpl_2_Begin(IDirec
 {
     DWORD FVF;
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
-    TRACE_(ddraw_thunk)("(%p/%p)->(%08x,%08x,%08lx): Thunking to IDirect3DDevice3\n", This, iface, d3dpt, dwVertexTypeDesc, dwFlags);
+    TRACE_(ddraw_thunk)("(%p/%p)->(%08x,%08x,%08x): Thunking to IDirect3DDevice3\n", This, iface, d3dpt, dwVertexTypeDesc, dwFlags);
 
     switch(dwVertexTypeDesc)
     {
@@ -1899,7 +1899,7 @@ IDirect3DDeviceImpl_3_BeginIndexed(IDire
                                    DWORD Flags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    FIXME("(%p)->(%08x,%08lx,%p,%08lx,%08lx): stub!\n", This, PrimitiveType, VertexType, Vertices, NumVertices, Flags);
+    FIXME("(%p)->(%08x,%08x,%p,%08x,%08x): stub!\n", This, PrimitiveType, VertexType, Vertices, NumVertices, Flags);
     return D3D_OK;
 }
 
@@ -1914,7 +1914,7 @@ Thunk_IDirect3DDeviceImpl_2_BeginIndexed
 {
     DWORD FVF;
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
-    TRACE_(ddraw_thunk)("(%p/%p)->(%08x,%08x,%p,%08lx,%08lx): Thunking to IDirect3DDevice3\n", This, iface, d3dptPrimitiveType, d3dvtVertexType, lpvVertices, dwNumVertices, dwFlags);
+    TRACE_(ddraw_thunk)("(%p/%p)->(%08x,%08x,%p,%08x,%08x): Thunking to IDirect3DDevice3\n", This, iface, d3dptPrimitiveType, d3dvtVertexType, lpvVertices, dwNumVertices, dwFlags);
 
     switch(d3dvtVertexType)
     {
@@ -2044,7 +2044,7 @@ IDirect3DDeviceImpl_3_End(IDirect3DDevic
                           DWORD Flags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE("(%p)->(%08lx)\n", This, Flags);
+    TRACE("(%p)->(%08x)\n", This, Flags);
 
     return IDirect3DDevice7_DrawPrimitive(ICOM_INTERFACE(This, IDirect3DDevice7),
                                           This->primitive_type, This->vertex_type,
@@ -2057,7 +2057,7 @@ Thunk_IDirect3DDeviceImpl_2_End(IDirect3
                                 DWORD dwFlags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08lx) thunking to IDirect3DDevice3 interface.\n", This, dwFlags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x) thunking to IDirect3DDevice3 interface.\n", This, dwFlags);
     return IDirect3DDevice3_End(ICOM_INTERFACE(This, IDirect3DDevice3),
                                 dwFlags);
 }
@@ -2142,7 +2142,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDi
                                      DWORD Value)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    TRACE("(%p)->(%08x,%ld): Relay\n", This, RenderStateType, Value);
+    TRACE("(%p)->(%08x,%d): Relay\n", This, RenderStateType, Value);
 
     /* Some render states need special care */
     switch(RenderStateType)
@@ -2158,12 +2158,12 @@ IDirect3DDeviceImpl_7_SetRenderState(IDi
 
             if(Value > This->numHandles)
             {
-                FIXME("Specified handle %ld out of range\n", Value);
+                FIXME("Specified handle %d out of range\n", Value);
                 return DDERR_INVALIDPARAMS;
             }
             if(This->Handles[Value - 1].type != DDrawHandle_Texture)
             {
-                FIXME("Handle %ld isn't a texture handle\n", Value);
+                FIXME("Handle %d isn't a texture handle\n", Value);
                 return DDERR_INVALIDPARAMS;
             }
             else
@@ -2188,7 +2188,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDi
                     tex_mag = WINED3DTEXF_LINEAR;
                     break;
                 default:
-                    ERR("Unhandled texture mag %ld !\n",Value);
+                    ERR("Unhandled texture mag %d !\n",Value);
             }
 
             return IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
@@ -2209,7 +2209,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDi
                     tex_min = WINED3DTEXF_LINEAR;
                     break;
                 default:
-                    ERR("Unhandled texture mag %ld !\n",Value);
+                    ERR("Unhandled texture mag %d !\n",Value);
             }
 
             return IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
@@ -2281,7 +2281,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDi
                     break;
 
                 default:
-                    ERR("Unhandled texture environment %ld !\n",Value);
+                    ERR("Unhandled texture environment %d !\n",Value);
                 }
                 return D3D_OK;
             break;
@@ -2300,7 +2300,7 @@ Thunk_IDirect3DDeviceImpl_3_SetRenderSta
                                            DWORD Value)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08lx) thunking to IDirect3DDevice7 interface.\n", This, RenderStateType, Value);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, RenderStateType, Value);
     return IDirect3DDevice7_SetRenderState(ICOM_INTERFACE(This, IDirect3DDevice7),
                                            RenderStateType,
                                            Value);
@@ -2312,7 +2312,7 @@ Thunk_IDirect3DDeviceImpl_2_SetRenderSta
                                            DWORD Value)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08lx) thunking to IDirect3DDevice7 interface.\n", This, RenderStateType, Value);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, RenderStateType, Value);
     return IDirect3DDevice7_SetRenderState(ICOM_INTERFACE(This, IDirect3DDevice7),
                                            RenderStateType,
                                            Value);
@@ -2343,7 +2343,7 @@ IDirect3DDeviceImpl_3_SetLightState(IDir
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
 
-    TRACE("(%p)->(%08x,%08lx)\n", This, LightStateType, Value);
+    TRACE("(%p)->(%08x,%08x)\n", This, LightStateType, Value);
 
     if (!LightStateType && (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
     {
@@ -2358,12 +2358,12 @@ IDirect3DDeviceImpl_3_SetLightState(IDir
         if(Value == 0) mat = NULL;
         else if(Value > This->numHandles)
         {
-            ERR("Material handle out of range(%ld)\n", Value);
+            ERR("Material handle out of range(%d)\n", Value);
             return DDERR_INVALIDPARAMS;
         }
         else if(This->Handles[Value - 1].type != DDrawHandle_Material)
         {
-            ERR("Invalid handle %ld\n", Value);
+            ERR("Invalid handle %d\n", Value);
             return DDERR_INVALIDPARAMS;
         }
         else
@@ -2440,7 +2440,7 @@ Thunk_IDirect3DDeviceImpl_2_SetLightStat
                                           DWORD Value)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08lx) thunking to IDirect3DDevice3 interface.\n", This, LightStateType, Value);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x) thunking to IDirect3DDevice3 interface.\n", This, LightStateType, Value);
     return IDirect3DDevice3_SetLightState(ICOM_INTERFACE(This, IDirect3DDevice3),
                                           LightStateType,
                                           Value);
@@ -2764,7 +2764,7 @@ IDirect3DDeviceImpl_7_DrawPrimitive(IDir
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     UINT PrimitiveCount, stride;
     HRESULT hr;
-    TRACE("(%p)->(%08x,%08lx,%p,%08lx,%08lx): Relay!\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Flags);
+    TRACE("(%p)->(%08x,%08x,%p,%08x,%08x): Relay!\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Flags);
 
     if(!Vertices)
         return DDERR_INVALIDPARAMS;
@@ -2823,7 +2823,7 @@ Thunk_IDirect3DDeviceImpl_3_DrawPrimitiv
                                           DWORD Flags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08lx,%p,%08lx,%08lx) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Flags);
     return IDirect3DDevice7_DrawPrimitive(ICOM_INTERFACE(This, IDirect3DDevice7),
                                           PrimitiveType,
                                           VertexType,
@@ -2842,7 +2842,7 @@ Thunk_IDirect3DDeviceImpl_2_DrawPrimitiv
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
     DWORD FVF;
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p,%08lx,%08lx) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Flags);
 
     switch(VertexType)
     {
@@ -2899,7 +2899,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimiti
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     UINT PrimitiveCount = 0;
     HRESULT hr;
-    TRACE("(%p)->(%08x,%08lx,%p,%08lx,%p,%08lx,%08lx): Relay!\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Indices, IndexCount, Flags);
+    TRACE("(%p)->(%08x,%08x,%p,%08x,%p,%08x,%08x): Relay!\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Indices, IndexCount, Flags);
     /* Get the primitive number */
     switch(PrimitiveType)
     {
@@ -2934,7 +2934,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimiti
     hr = IWineD3DDevice_SetFVF(This->wineD3DDevice, VertexType);
     if(FAILED(hr))
     {
-        ERR(" (%p) Setting the FVF failed, hr = %lx!\n", This, hr);
+        ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
         return hr;
     }
 
@@ -2960,7 +2960,7 @@ Thunk_IDirect3DDeviceImpl_3_DrawIndexedP
                                                  DWORD Flags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08lx,%p,%08lx,%p,%08lx,%08lx) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Indices, IndexCount, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p,%08x,%p,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Indices, IndexCount, Flags);
     return IDirect3DDevice7_DrawIndexedPrimitive(ICOM_INTERFACE(This, IDirect3DDevice7),
                                                  PrimitiveType,
                                                  VertexType,
@@ -2983,7 +2983,7 @@ Thunk_IDirect3DDeviceImpl_2_DrawIndexedP
 {
     DWORD FVF;
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p,%08lx,%p,%08lx,%08lx) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Indices, IndexCount, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p,%08x,%p,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, Vertices, VertexCount, Indices, IndexCount, Flags);
 
     switch(VertexType)
     {
@@ -3133,7 +3133,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrid
     int i;
     UINT PrimitiveCount;
 
-    TRACE("(%p)->(%08x,%08lx,%p,%08lx,%08lx): stub!\n", This, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Flags);
+    TRACE("(%p)->(%08x,%08x,%p,%08x,%08x): stub!\n", This, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Flags);
 
     /* Get the strided data right. the wined3d structure is a bit bigger
      * Watch out: The contents of the strided data are determined by the fvf,
@@ -3186,7 +3186,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrid
             case 2: WineD3DStrided.u.s.texCoords[i].dwType = WINED3DDECLTYPE_FLOAT2; break;
             case 3: WineD3DStrided.u.s.texCoords[i].dwType = WINED3DDECLTYPE_FLOAT3; break;
             case 4: WineD3DStrided.u.s.texCoords[i].dwType = WINED3DDECLTYPE_FLOAT4; break;
-            default: ERR("Unexpected texture coordinate size %ld\n",
+            default: ERR("Unexpected texture coordinate size %d\n",
                          GET_TEXCOORD_SIZE_FROM_FVF(VertexType, i));
         }
     }
@@ -3239,7 +3239,7 @@ Thunk_IDirect3DDeviceImpl_3_DrawPrimitiv
                                                  DWORD Flags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08lx,%p,%08lx,%08lx) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Flags);
     return IDirect3DDevice7_DrawPrimitiveStrided(ICOM_INTERFACE(This, IDirect3DDevice7),
                                                  PrimitiveType,
                                                  VertexType,
@@ -3276,7 +3276,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimiti
                                                   DWORD Flags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    FIXME("(%p)->(%08x,%08lx,%p,%08lx,%p,%08lx,%08lx): stub!\n", This, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Indices, IndexCount, Flags);
+    FIXME("(%p)->(%08x,%08x,%p,%08x,%p,%08x,%08x): stub!\n", This, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Indices, IndexCount, Flags);
 
     /* I'll implement it as soon as I find a app to test it.
      * This needs an additional method in IWineD3DDevice.
@@ -3295,7 +3295,7 @@ Thunk_IDirect3DDeviceImpl_3_DrawIndexedP
                                                         DWORD Flags)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%08lx,%p,%08lx,%p,%08lx,%08lx) thunking to IDirect3DDevice7 interface.\n", iface, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Indices, IndexCount, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p,%08x,%p,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", iface, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Indices, IndexCount, Flags);
     return IDirect3DDevice7_DrawIndexedPrimitiveStrided(ICOM_INTERFACE(This, IDirect3DDevice7),
                                                         PrimitiveType,
                                                         VertexType,
@@ -3340,7 +3340,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(ID
     DWORD stride;
     WINED3DVERTEXBUFFER_DESC Desc;
 
-    TRACE("(%p)->(%08x,%p,%08lx,%08lx,%08lx)\n", This, PrimitiveType, D3DVertexBuf, StartVertex, NumVertices, Flags);
+    TRACE("(%p)->(%08x,%p,%08x,%08x,%08x)\n", This, PrimitiveType, D3DVertexBuf, StartVertex, NumVertices, Flags);
 
     /* Sanity checks */
     if(!vb)
@@ -3384,7 +3384,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(ID
                                       &Desc);
     if(hr != D3D_OK)
     {
-        ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr = %08lx\n", This, hr);
+        ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr = %08x\n", This, hr);
         return hr;
     }
     stride = get_flexible_vertex_size(Desc.FVF);
@@ -3392,7 +3392,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(ID
     hr = IWineD3DDevice_SetFVF(This->wineD3DDevice, Desc.FVF);
     if(FAILED(hr))
     {
-        ERR(" (%p) Setting the FVF failed, hr = %lx!\n", This, hr);
+        ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
         return hr;
     }
 
@@ -3404,7 +3404,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(ID
                                         stride);
     if(hr != D3D_OK)
     {
-        ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08lx\n", This, hr);
+        ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x\n", This, hr);
         return hr;
     }
 
@@ -3425,7 +3425,7 @@ Thunk_IDirect3DDeviceImpl_3_DrawPrimitiv
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
     IDirect3DVertexBufferImpl *vb = ICOM_OBJECT(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, D3DVertexBuf);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%p,%08lx,%08lx,%08lx) thunking to IDirect3DDevice7 interface.\n", This,  PrimitiveType, vb, StartVertex, NumVertices, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%p,%08x,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This,  PrimitiveType, vb, StartVertex, NumVertices, Flags);
     return IDirect3DDevice7_DrawPrimitiveVB(ICOM_INTERFACE(This, IDirect3DDevice7),
                                             PrimitiveType,
                                             ICOM_INTERFACE(vb, IDirect3DVertexBuffer7),
@@ -3470,7 +3470,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimiti
     HRESULT hr;
     WINED3DVERTEXBUFFER_DESC Desc;
 
-    TRACE("(%p)->(%08x,%p,%ld,%ld,%p,%ld,%08lx)\n", This, PrimitiveType, vb, StartVertex, NumVertices, Indices, IndexCount, Flags);
+    TRACE("(%p)->(%08x,%p,%d,%d,%p,%d,%08x)\n", This, PrimitiveType, vb, StartVertex, NumVertices, Indices, IndexCount, Flags);
 
     /* Steps:
      * 1) Calculate some things: Vertex count -> Primitive count, stride, ...
@@ -3515,16 +3515,16 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimiti
                                       &Desc);
     if(hr != D3D_OK)
     {
-        ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr = %08lx\n", This, hr);
+        ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr = %08x\n", This, hr);
         return hr;
     }
     stride = get_flexible_vertex_size(Desc.FVF);
-    TRACE("Vertex buffer FVF = %08lx, stride=%ld\n", Desc.FVF, stride);
+    TRACE("Vertex buffer FVF = %08x, stride=%d\n", Desc.FVF, stride);
 
     hr = IWineD3DDevice_SetFVF(This->wineD3DDevice, Desc.FVF);
     if(FAILED(hr))
     {
-        ERR(" (%p) Setting the FVF failed, hr = %lx!\n", This, hr);
+        ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
         return hr;
     }
 
@@ -3542,14 +3542,14 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimiti
     assert(IndexCount < 0x100000);
     if(hr != D3D_OK)
     {
-        ERR("(%p) IWineD3DIndexBuffer::Lock failed with hr = %08lx\n", This, hr);
+        ERR("(%p) IWineD3DIndexBuffer::Lock failed with hr = %08x\n", This, hr);
         return hr;
     }
     memcpy(LockedIndices, Indices, IndexCount * sizeof(WORD));
     hr = IWineD3DIndexBuffer_Unlock(This->indexbuffer);
     if(hr != D3D_OK)
     {
-        ERR("(%p) IWineD3DIndexBuffer::Unlock failed with hr = %08lx\n", This, hr);
+        ERR("(%p) IWineD3DIndexBuffer::Unlock failed with hr = %08x\n", This, hr);
         return hr;
     }
 
@@ -3566,7 +3566,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimiti
                                         stride);
     if(hr != D3D_OK)
     {
-        ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08lx\n", This, hr);
+        ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x\n", This, hr);
         return hr;
     }
 
@@ -3592,7 +3592,7 @@ Thunk_IDirect3DDeviceImpl_3_DrawIndexedP
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
     IDirect3DVertexBufferImpl *VB = ICOM_OBJECT(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, D3DVertexBuf);
-    TRACE_(ddraw_thunk)("(%p)->(%08x,%p,%p,%08lx,%08lx) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VB, Indices, IndexCount, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%p,%p,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, PrimitiveType, VB, Indices, IndexCount, Flags);
 
     return IDirect3DDevice7_DrawIndexedPrimitiveVB(ICOM_INTERFACE(This, IDirect3DDevice7),
                                                    PrimitiveType,
@@ -3641,7 +3641,7 @@ IDirect3DDeviceImpl_7_ComputeSphereVisib
                                               DWORD *ReturnValues)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    FIXME("(%p)->(%p,%p,%08lx,%08lx,%p): stub!\n", This, Centers, Radii, NumSpheres, Flags, ReturnValues);
+    FIXME("(%p)->(%p,%p,%08x,%08x,%p): stub!\n", This, Centers, Radii, NumSpheres, Flags, ReturnValues);
 
     /* the DirectX 7 sdk says that the visibility is computed by
      * back-transforming the viewing frustum to model space
@@ -3677,7 +3677,7 @@ Thunk_IDirect3DDeviceImpl_3_ComputeSpher
                                                     DWORD *ReturnValues)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%p,%p,%08lx,%08lx,%p) thunking to IDirect3DDevice7 interface.\n", This, Centers, Radii, NumSpheres, Flags, ReturnValues);
+    TRACE_(ddraw_thunk)("(%p)->(%p,%p,%08x,%08x,%p) thunking to IDirect3DDevice7 interface.\n", This, Centers, Radii, NumSpheres, Flags, ReturnValues);
     return IDirect3DDevice7_ComputeSphereVisibility(ICOM_INTERFACE(This, IDirect3DDevice7),
                                                     Centers,
                                                     Radii,
@@ -3713,7 +3713,7 @@ IDirect3DDeviceImpl_7_GetTexture(IDirect
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     IWineD3DBaseTexture *Surf;
     HRESULT hr;
-    TRACE("(%p)->(%ld,%p): Relay\n", This, Stage, Texture);
+    TRACE("(%p)->(%d,%p): Relay\n", This, Stage, Texture);
 
     if(!Texture)
     {
@@ -3744,7 +3744,7 @@ Thunk_IDirect3DDeviceImpl_3_GetTexture(I
     HRESULT ret;
     IDirectDrawSurface7 *ret_val;
 
-    TRACE_(ddraw_thunk)("(%p)->(%ld,%p) thunking to IDirect3DDevice7 interface.\n", This, Stage, Texture2);
+    TRACE_(ddraw_thunk)("(%p)->(%d,%p) thunking to IDirect3DDevice7 interface.\n", This, Stage, Texture2);
     ret = IDirect3DDevice7_GetTexture(ICOM_INTERFACE(This, IDirect3DDevice7),
                                       Stage,
                                       &ret_val);
@@ -3779,7 +3779,7 @@ IDirect3DDeviceImpl_7_SetTexture(IDirect
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     IDirectDrawSurfaceImpl *surf = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, Texture);
-    TRACE("(%p)->(%08lx,%p): Relay!\n", This, Stage, surf);
+    TRACE("(%p)->(%08x,%p): Relay!\n", This, Stage, surf);
 
     /* Texture may be NULL here */
     return IWineD3DDevice_SetTexture(This->wineD3DDevice,
@@ -3794,7 +3794,7 @@ Thunk_IDirect3DDeviceImpl_3_SetTexture(I
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
     IDirectDrawSurfaceImpl *tex = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirect3DTexture2, Texture2);
-    TRACE_(ddraw_thunk)("(%p)->(%ld,%p) thunking to IDirect3DDevice7 interface.\n", This, Stage, tex);
+    TRACE_(ddraw_thunk)("(%p)->(%d,%p) thunking to IDirect3DDevice7 interface.\n", This, Stage, tex);
     return IDirect3DDevice7_SetTexture(ICOM_INTERFACE(This, IDirect3DDevice7),
                                        Stage,
                                        ICOM_INTERFACE(tex, IDirectDrawSurface7));
@@ -3825,7 +3825,7 @@ IDirect3DDeviceImpl_7_GetTextureStageSta
                                            DWORD *State)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    TRACE("(%p)->(%08lx,%08x,%p): Relay!\n", This, Stage, TexStageStateType, State);
+    TRACE("(%p)->(%08x,%08x,%p): Relay!\n", This, Stage, TexStageStateType, State);
 
     if(!State)
         return DDERR_INVALIDPARAMS;
@@ -3843,7 +3843,7 @@ Thunk_IDirect3DDeviceImpl_3_GetTextureSt
                                                  DWORD *State)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08lx,%08x,%p) thunking to IDirect3DDevice7 interface.\n", This, Stage, TexStageStateType, State);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%p) thunking to IDirect3DDevice7 interface.\n", This, Stage, TexStageStateType, State);
     return IDirect3DDevice7_GetTextureStageState(ICOM_INTERFACE(This, IDirect3DDevice7),
                                                  Stage,
                                                  TexStageStateType,
@@ -3875,7 +3875,7 @@ IDirect3DDeviceImpl_7_SetTextureStageSta
                                            DWORD State)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    TRACE("(%p)->(%08lx,%08x,%08lx): Relay!\n", This, Stage, TexStageStateType, State);
+    TRACE("(%p)->(%08x,%08x,%08x): Relay!\n", This, Stage, TexStageStateType, State);
     switch(TexStageStateType)
     {
         /* Mipfilter is a sampler state with different values */
@@ -3889,7 +3889,7 @@ IDirect3DDeviceImpl_7_SetTextureStageSta
                 case 0: /* Unchecked */
                 case D3DTFP_LINEAR: value = WINED3DTEXF_LINEAR; break;
                 default:
-                    ERR("Unexpected mipfilter value %ld\n", State);
+                    ERR("Unexpected mipfilter value %d\n", State);
                     value = WINED3DTEXF_NONE;
             }
             return IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
@@ -3927,7 +3927,7 @@ Thunk_IDirect3DDeviceImpl_3_SetTextureSt
                                                  DWORD State)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice3, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08lx,%08x,%08lx) thunking to IDirect3DDevice7 interface.\n", This, Stage, TexStageStateType, State);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%08x) thunking to IDirect3DDevice7 interface.\n", This, Stage, TexStageStateType, State);
     return IDirect3DDevice7_SetTextureStageState(ICOM_INTERFACE(This, IDirect3DDevice7),
                                                  Stage,
                                                  TexStageStateType,
@@ -4003,7 +4003,7 @@ IDirect3DDeviceImpl_7_Clear(IDirect3DDev
                             DWORD Stencil)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    TRACE("(%p)->(%08lx,%p,%08lx,%08lx,%f,%08lx): Relay\n", This, Count, Rects, Flags, (DWORD) Color, Z, Stencil);
+    TRACE("(%p)->(%08x,%p,%08x,%08x,%f,%08x): Relay\n", This, Count, Rects, Flags, (DWORD) Color, Z, Stencil);
 
     return IWineD3DDevice_Clear(This->wineD3DDevice, Count, Rects, Flags, Color, Z, Stencil);
 }
@@ -4152,7 +4152,7 @@ IDirect3DDeviceImpl_7_SetLight(IDirect3D
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     HRESULT hr;
-    TRACE("(%p)->(%08lx,%p): Relay!\n", This, LightIndex, Light);
+    TRACE("(%p)->(%08x,%p): Relay!\n", This, LightIndex, Light);
 
     hr = IWineD3DDevice_SetLight(This->wineD3DDevice,
                                  LightIndex,
@@ -4181,7 +4181,7 @@ IDirect3DDeviceImpl_7_GetLight(IDirect3D
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     HRESULT rc;
-    TRACE("(%p)->(%08lx,%p): Relay!\n", This, LightIndex, Light);
+    TRACE("(%p)->(%08x,%p): Relay!\n", This, LightIndex, Light);
 
     rc =  IWineD3DDevice_GetLight(This->wineD3DDevice,
                                   LightIndex,
@@ -4300,7 +4300,7 @@ IDirect3DDeviceImpl_7_ApplyStateBlock(ID
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     HRESULT hr;
-    TRACE("(%p)->(%08lx): Relay!\n", This, BlockHandle);
+    TRACE("(%p)->(%08x): Relay!\n", This, BlockHandle);
 
     if(!BlockHandle)
         return D3DERR_INVALIDSTATEBLOCK;
@@ -4331,7 +4331,7 @@ IDirect3DDeviceImpl_7_CaptureStateBlock(
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     HRESULT hr;
-    TRACE("(%p)->(%08lx): Relay!\n", This, BlockHandle);
+    TRACE("(%p)->(%08x): Relay!\n", This, BlockHandle);
 
     if(BlockHandle == 0)
         return D3DERR_INVALIDSTATEBLOCK;
@@ -4360,7 +4360,7 @@ IDirect3DDeviceImpl_7_DeleteStateBlock(I
                                        DWORD BlockHandle)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    TRACE("(%p)->(%08lx): Relay!\n", This, BlockHandle);
+    TRACE("(%p)->(%08x): Relay!\n", This, BlockHandle);
 
     if(BlockHandle == 0)
         return D3DERR_INVALIDSTATEBLOCK;
@@ -4439,7 +4439,7 @@ IDirect3DDeviceImpl_7_Load(IDirect3DDevi
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     IDirectDrawSurfaceImpl *dest = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, DestTex);
     IDirectDrawSurfaceImpl *src = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, SrcTex);
-    FIXME("(%p)->(%p,%p,%p,%p,%08lx): Partially Implemented!\n", This, dest, DestPoint, src, SrcRect, Flags);
+    FIXME("(%p)->(%p,%p,%p,%p,%08x): Partially Implemented!\n", This, dest, DestPoint, src, SrcRect, Flags);
 
     if( (!src) || (!dest) )
         return DDERR_INVALIDPARAMS;
@@ -4472,7 +4472,7 @@ IDirect3DDeviceImpl_7_LightEnable(IDirec
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     HRESULT hr;
-    TRACE("(%p)->(%08lx,%d): Relay!\n", This, LightIndex, Enable);
+    TRACE("(%p)->(%08x,%d): Relay!\n", This, LightIndex, Enable);
 
     hr = IWineD3DDevice_SetLightEnable(This->wineD3DDevice, LightIndex, Enable);
     return hr_ddraw_from_wined3d(hr);
@@ -4502,7 +4502,7 @@ IDirect3DDeviceImpl_7_GetLightEnable(IDi
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
     HRESULT hr;
-    TRACE("(%p)->(%08lx,%p): Relay\n", This, LightIndex, Enable);
+    TRACE("(%p)->(%08x,%p): Relay\n", This, LightIndex, Enable);
 
     if(!Enable)
         return DDERR_INVALIDPARAMS;
@@ -4534,7 +4534,7 @@ IDirect3DDeviceImpl_7_SetClipPlane(IDire
                                    D3DVALUE* PlaneEquation)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    TRACE("(%p)->(%08lx,%p): Relay!\n", This, Index, PlaneEquation);
+    TRACE("(%p)->(%08x,%p): Relay!\n", This, Index, PlaneEquation);
 
     if(!PlaneEquation)
         return DDERR_INVALIDPARAMS;
@@ -4563,7 +4563,7 @@ IDirect3DDeviceImpl_7_GetClipPlane(IDire
                                    D3DVALUE* PlaneEquation)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    TRACE("(%p)->(%ld,%p): Relay!\n", This, Index, PlaneEquation);
+    TRACE("(%p)->(%d,%p): Relay!\n", This, Index, PlaneEquation);
 
     if(!PlaneEquation)
         return DDERR_INVALIDPARAMS;
@@ -4594,7 +4594,7 @@ IDirect3DDeviceImpl_7_GetInfo(IDirect3DD
                               DWORD Size)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
-    TRACE("(%p)->(%08lx,%p,%08lx)\n", This, DevInfoID, DevInfoStruct, Size);
+    TRACE("(%p)->(%08x,%p,%08x)\n", This, DevInfoID, DevInfoStruct, Size);
 
     if (TRACE_ON(d3d7))
     {
@@ -4820,7 +4820,7 @@ IDirect3DDeviceImpl_CreateHandle(IDirect
         if(This->Handles[i].ptr == NULL &&
            This->Handles[i].type == DDrawHandle_Unknown)
         {
-            TRACE("Reusing freed handle %ld\n", i + 1);
+            TRACE("Reusing freed handle %d\n", i + 1);
             return i + 1;
         }
     }
@@ -4842,6 +4842,6 @@ IDirect3DDeviceImpl_CreateHandle(IDirect
         HeapFree(GetProcessHeap(), 0, oldHandles);
     }
 
-    TRACE("Returning %ld\n", This->numHandles);
+    TRACE("Returning %d\n", This->numHandles);
     return This->numHandles;
 }
diff --git a/dlls/ddraw/direct3d.c b/dlls/ddraw/direct3d.c
index ab59340..4a35938 100644
--- a/dlls/ddraw/direct3d.c
+++ b/dlls/ddraw/direct3d.c
@@ -851,7 +851,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 
                                                 This->d3d_target->WineD3DSurface,
                                                 target->WineD3DSurface);
         if(hr != D3D_OK)
-            ERR("(%p) Error %08lx setting the front and back buffer\n", This, hr);
+            ERR("(%p) Error %08x setting the front and back buffer\n", This, hr);
 
         object->OffScreenTarget = TRUE;
     }
@@ -946,13 +946,13 @@ IDirect3DImpl_7_CreateVertexBuffer(IDire
     ICOM_THIS_FROM(IDirectDrawImpl, IDirect3D7, iface);
     IDirect3DVertexBufferImpl *object;
     HRESULT hr;
-    TRACE("(%p)->(%p,%p,%08lx)\n", This, Desc, VertexBuffer, Flags);
+    TRACE("(%p)->(%p,%p,%08x)\n", This, Desc, VertexBuffer, Flags);
 
     TRACE("(%p) Vertex buffer description:\n", This);
-    TRACE("(%p)  dwSize=%ld\n", This, Desc->dwSize);
-    TRACE("(%p)  dwCaps=%08lx\n", This, Desc->dwCaps);
-    TRACE("(%p)  FVF=%08lx\n", This, Desc->dwFVF);
-    TRACE("(%p)  dwNumVertices=%ld\n", This, Desc->dwNumVertices);
+    TRACE("(%p)  dwSize=%d\n", This, Desc->dwSize);
+    TRACE("(%p)  dwCaps=%08x\n", This, Desc->dwCaps);
+    TRACE("(%p)  FVF=%08x\n", This, Desc->dwFVF);
+    TRACE("(%p)  dwNumVertices=%d\n", This, Desc->dwNumVertices);
 
     /* D3D7 SDK: "No Flags are currently defined for this method. This
      * parameter must be 0"
@@ -993,7 +993,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDire
                                            (IUnknown *) ICOM_INTERFACE(object, IDirect3DVertexBuffer7));
     if(hr != D3D_OK)
     {
-        ERR("(%p) IWineD3DDevice::CreateVertexBuffer failed with hr=%08lx\n", This, hr);
+        ERR("(%p) IWineD3DDevice::CreateVertexBuffer failed with hr=%08x\n", This, hr);
         HeapFree(GetProcessHeap(), 0, object);
         if (hr == WINED3DERR_INVALIDCALL)
             return DDERR_INVALIDPARAMS;
@@ -1017,7 +1017,7 @@ Thunk_IDirect3DImpl_3_CreateVertexBuffer
 {
     ICOM_THIS_FROM(IDirectDrawImpl, IDirect3D3, iface);
     HRESULT hr;
-    TRACE("(%p)->(%p,%p,%08lx,%p): Relaying to IDirect3D7\n", This, Desc, VertexBuffer, Flags, UnkOuter);
+    TRACE("(%p)->(%p,%p,%08x,%p): Relaying to IDirect3D7\n", This, Desc, VertexBuffer, Flags, UnkOuter);
 
     if(UnkOuter != NULL) return CLASS_E_NOAGGREGATION;
 
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 3f5069d..306575b 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -56,17 +56,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d7);
  *****************************************************************************/
 
 static void _dump_executedata(LPD3DEXECUTEDATA lpData) {
-    DPRINTF("dwSize : %ld\n", lpData->dwSize);
-    DPRINTF("Vertex      Offset : %ld  Count  : %ld\n", lpData->dwVertexOffset, lpData->dwVertexCount);
-    DPRINTF("Instruction Offset : %ld  Length : %ld\n", lpData->dwInstructionOffset, lpData->dwInstructionLength);
-    DPRINTF("HVertex     Offset : %ld\n", lpData->dwHVertexOffset);
+    DPRINTF("dwSize : %d\n", lpData->dwSize);
+    DPRINTF("Vertex      Offset : %d  Count  : %d\n", lpData->dwVertexOffset, lpData->dwVertexCount);
+    DPRINTF("Instruction Offset : %d  Length : %d\n", lpData->dwInstructionOffset, lpData->dwInstructionLength);
+    DPRINTF("HVertex     Offset : %d\n", lpData->dwHVertexOffset);
 }
 
 static void _dump_D3DEXECUTEBUFFERDESC(LPD3DEXECUTEBUFFERDESC lpDesc) {
-    DPRINTF("dwSize       : %ld\n", lpDesc->dwSize);
-    DPRINTF("dwFlags      : %lx\n", lpDesc->dwFlags);
-    DPRINTF("dwCaps       : %lx\n", lpDesc->dwCaps);
-    DPRINTF("dwBufferSize : %ld\n", lpDesc->dwBufferSize);
+    DPRINTF("dwSize       : %d\n", lpDesc->dwSize);
+    DPRINTF("dwFlags      : %x\n", lpDesc->dwFlags);
+    DPRINTF("dwCaps       : %x\n", lpDesc->dwCaps);
+    DPRINTF("dwBufferSize : %d\n", lpDesc->dwBufferSize);
     DPRINTF("lpData       : %p\n", lpDesc->lpData);
 }
 
@@ -225,9 +225,9 @@ IDirect3DExecuteBufferImpl_Execute(IDire
                     if(!ci->u2.dwArg[0]) {
                         ERR("Setting a NULL matrix handle, what should I do?\n");
                     } else if(ci->u2.dwArg[0] > lpDevice->numHandles) {
-                        ERR("Handle %ld is out of bounds\n", ci->u2.dwArg[0]);
+                        ERR("Handle %d is out of bounds\n", ci->u2.dwArg[0]);
                     } else if(lpDevice->Handles[ci->u2.dwArg[0] - 1].type != DDrawHandle_Matrix) {
-                        ERR("Handle %ld is not a matrix handle\n", ci->u2.dwArg[0]);
+                        ERR("Handle %d is not a matrix handle\n", ci->u2.dwArg[0]);
                     } else {
                         IDirect3DDevice7_SetTransform(ICOM_INTERFACE(lpDevice, IDirect3DDevice7),
                                                       ci->u1.drstRenderStateType, (LPD3DMATRIX) lpDevice->Handles[ci->u2.dwArg[0] - 1].ptr);
@@ -243,7 +243,7 @@ IDirect3DExecuteBufferImpl_Execute(IDire
 		for (i = 0; i < count; i++) {
 		    LPD3DSTATE ci = (LPD3DSTATE) instr;
 
-		    TRACE("(%08x,%08lx)\n",ci->u1.dlstLightStateType, ci->u2.dwArg[0]);
+                    TRACE("(%08x,%08x)\n",ci->u1.dlstLightStateType, ci->u2.dwArg[0]);
 
 		    if (!ci->u1.dlstLightStateType && (ci->u1.dlstLightStateType > D3DLIGHTSTATE_COLORVERTEX))
 			ERR("Unexpected Light State Type\n");
@@ -340,7 +340,7 @@ IDirect3DExecuteBufferImpl_Execute(IDire
 		for (i = 0; i < count; i++) {
 		    LPD3DPROCESSVERTICES ci = (LPD3DPROCESSVERTICES) instr;
 
-		    TRACE("  Start : %d Dest : %d Count : %ld\n",
+                    TRACE("  Start : %d Dest : %d Count : %d\n",
 			  ci->wStart, ci->wDest, ci->dwCount);
 		    TRACE("  Flags : ");
 		    if (TRACE_ON(d3d7)) {
@@ -512,13 +512,13 @@ IDirect3DExecuteBufferImpl_Execute(IDire
 
 		    if ((This->data.dsStatus.dwStatus & ci->dwMask) == ci->dwValue) {
 		        if (!ci->bNegate) {
-			    TRACE(" Branch to %ld\n", ci->dwOffset);
+                            TRACE(" Branch to %d\n", ci->dwOffset);
 			    instr = (char*)current + ci->dwOffset;
 			    break;
 			}
 		    } else {
 		        if (ci->bNegate) {
-			    TRACE(" Branch to %ld\n", ci->dwOffset);
+                            TRACE(" Branch to %d\n", ci->dwOffset);
 			    instr = (char*)current + ci->dwOffset;
 			    break;
 			}
@@ -617,7 +617,7 @@ IDirect3DExecuteBufferImpl_AddRef(IDirec
     ICOM_THIS_FROM(IDirect3DExecuteBufferImpl, IDirect3DExecuteBuffer, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    FIXME("(%p)->()incrementing from %lu.\n", This, ref - 1);
+    FIXME("(%p)->()incrementing from %u.\n", This, ref - 1);
 
     return ref;
 }
@@ -637,7 +637,7 @@ IDirect3DExecuteBufferImpl_Release(IDire
     ICOM_THIS_FROM(IDirect3DExecuteBufferImpl, IDirect3DExecuteBuffer, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p)->()decrementing from %lu.\n", This, ref + 1);
+    TRACE("(%p)->()decrementing from %u.\n", This, ref + 1);
 
     if (!ref) {
         if (This->need_free)
@@ -811,7 +811,7 @@ IDirect3DExecuteBufferImpl_Validate(IDir
                                     DWORD Reserved)
 {
     ICOM_THIS_FROM(IDirect3DExecuteBufferImpl, IDirect3DExecuteBuffer, iface);
-    TRACE("(%p)->(%p,%p,%p,%08lx): Unimplemented!\n", This, Offset, Func, UserArg, Reserved);
+    TRACE("(%p)->(%p,%p,%p,%08x): Unimplemented!\n", This, Offset, Func, UserArg, Reserved);
     return DDERR_UNSUPPORTED; /* Unchecked */
 }
 
@@ -833,7 +833,7 @@ IDirect3DExecuteBufferImpl_Optimize(IDir
                                     DWORD Dummy)
 {
     ICOM_THIS_FROM(IDirect3DExecuteBufferImpl, IDirect3DExecuteBuffer, iface);
-    TRACE("(%p)->(%08lx): Unimplemented\n", This, Dummy);
+    TRACE("(%p)->(%08x): Unimplemented\n", This, Dummy);
     return DDERR_UNSUPPORTED; /* Unchecked */
 }
 
diff --git a/dlls/ddraw/gamma.c b/dlls/ddraw/gamma.c
index 1b33e48..735c329 100644
--- a/dlls/ddraw/gamma.c
+++ b/dlls/ddraw/gamma.c
@@ -134,7 +134,7 @@ IDirectDrawGammaControlImpl_GetGammaRamp
                                          DDGAMMARAMP *GammaRamp)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawGammaControl, iface);
-    TRACE("(%p)->(%08lx,%p)\n", This,Flags,GammaRamp);
+    TRACE("(%p)->(%08x,%p)\n", This,Flags,GammaRamp);
 
     /* This looks sane */
     if(!GammaRamp)
@@ -178,7 +178,7 @@ IDirectDrawGammaControlImpl_SetGammaRamp
                                          DDGAMMARAMP *GammaRamp)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawGammaControl, iface);
-    TRACE("(%p)->(%08lx,%p)\n", This,Flags,GammaRamp);
+    TRACE("(%p)->(%08x,%p)\n", This,Flags,GammaRamp);
 
     /* This looks sane */
     if(!GammaRamp)
diff --git a/dlls/ddraw/light.c b/dlls/ddraw/light.c
index d5b7dd6..8ff984f 100644
--- a/dlls/ddraw/light.c
+++ b/dlls/ddraw/light.c
@@ -88,7 +88,7 @@ IDirect3DLightImpl_AddRef(IDirect3DLight
     ICOM_THIS_FROM(IDirect3DLightImpl, IDirect3DLight, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p)->() incrementing from %lu.\n", This, ref - 1);
+    TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
 
     return ref;
 }
@@ -109,7 +109,7 @@ IDirect3DLightImpl_Release(IDirect3DLigh
     ICOM_THIS_FROM(IDirect3DLightImpl, IDirect3DLight, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p)->() decrementing from %lu.\n", This, ref + 1);
+    TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
 
     if (!ref) {
         HeapFree(GetProcessHeap(), 0, This);
@@ -160,7 +160,7 @@ IDirect3DLightImpl_Initialize(IDirect3DL
  *****************************************************************************/
 static void dump_light(LPD3DLIGHT2 light)
 {
-    DPRINTF("    - dwSize : %ld\n", light->dwSize);
+    DPRINTF("    - dwSize : %d\n", light->dwSize);
 }
 
 static const float zero_value[] = {
diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c
index 6778c57..8865fe5 100644
--- a/dlls/ddraw/main.c
+++ b/dlls/ddraw/main.c
@@ -222,7 +222,7 @@ DDRAW_Create(GUID *guid,
                                (IUnknown *) ICOM_INTERFACE(This, IDirectDraw7));
     if(FAILED(hr))
     {
-        ERR("Failed to create a wineD3DDevice, result = %lx\n", hr);
+        ERR("Failed to create a wineD3DDevice, result = %x\n", hr);
         goto err_out;
     }
     This->wineD3DDevice = wineD3DDevice;
@@ -592,7 +592,7 @@ IDirectDrawClassFactoryImpl_AddRef(IClas
     ICOM_THIS_FROM(IClassFactoryImpl, IClassFactory, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p)->() incrementing from %ld.\n", This, ref - 1);
+    TRACE("(%p)->() incrementing from %d.\n", This, ref - 1);
 
     return ref;
 }
@@ -612,7 +612,7 @@ IDirectDrawClassFactoryImpl_Release(ICla
 {
     ICOM_THIS_FROM(IClassFactoryImpl, IClassFactory, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
-    TRACE("(%p)->() decrementing from %ld.\n", This, ref+1);
+    TRACE("(%p)->() decrementing from %d.\n", This, ref+1);
 
     if (ref == 0)
         HeapFree(GetProcessHeap(), 0, This);
@@ -768,7 +768,7 @@ DestroyCallback(IDirectDrawSurface7 *sur
     ULONG ref;
 
     ref = IDirectDrawSurface7_Release(surf);  /* For the EnumSurfaces */
-    WARN("Surface %p has an reference count of %ld\n", Impl, ref);
+    WARN("Surface %p has an reference count of %d\n", Impl, ref);
 
     /* Skip surfaces which are attached somewhere or which are
      * part of a complex compound. They will get released when destroying
@@ -812,7 +812,7 @@ DllMain(HINSTANCE hInstDLL,
         DWORD Reason,
         void *lpv)
 {
-    TRACE("(%p,%lx,%p)\n", hInstDLL, Reason, lpv);
+    TRACE("(%p,%x,%p)\n", hInstDLL, Reason, lpv);
     if (Reason == DLL_PROCESS_ATTACH)
     {
         char buffer[MAX_PATH+10];
@@ -879,7 +879,7 @@ DllMain(HINSTANCE hInstDLL,
                 int i;
                 IDirectDrawImpl *ddraw = LIST_ENTRY(entry, IDirectDrawImpl, ddraw_list_entry);
 
-                WARN("DDraw %p has a refcount of %ld\n", ddraw, ddraw->ref7 + ddraw->ref4 + ddraw->ref2 + ddraw->ref1);
+                WARN("DDraw %p has a refcount of %d\n", ddraw, ddraw->ref7 + ddraw->ref4 + ddraw->ref2 + ddraw->ref1);
 
                 /* Add references to each interface to avoid freeing them unexpectadely */
                 IDirectDraw_AddRef(ICOM_INTERFACE(ddraw, IDirectDraw));
@@ -915,7 +915,7 @@ DllMain(HINSTANCE hInstDLL,
 
                 /* Check the surface count */
                 if(ddraw->surfaces > 0)
-                    ERR("DDraw %p still has %ld surfaces attached\n", ddraw, ddraw->surfaces);
+                    ERR("DDraw %p still has %d surfaces attached\n", ddraw, ddraw->surfaces);
 
                 /* Release all hanging references to destroy the objects. This
                     * restores the screen mode too
diff --git a/dlls/ddraw/material.c b/dlls/ddraw/material.c
index 3483c72..32a5091 100644
--- a/dlls/ddraw/material.c
+++ b/dlls/ddraw/material.c
@@ -49,7 +49,7 @@ WINE_DECLARE_DEBUG_CHANNEL(ddraw_thunk);
 
 static void dump_material(LPD3DMATERIAL mat)
 {
-    DPRINTF("  dwSize : %ld\n", mat->dwSize);
+    DPRINTF("  dwSize : %d\n", mat->dwSize);
 }
 
 /*****************************************************************************
@@ -124,7 +124,7 @@ IDirect3DMaterialImpl_AddRef(IDirect3DMa
     ICOM_THIS_FROM(IDirect3DMaterialImpl, IDirect3DMaterial3, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p)->() incrementing from %lu.\n", This, ref - 1);
+    TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
 
     return ref;
 }
@@ -145,7 +145,7 @@ IDirect3DMaterialImpl_Release(IDirect3DM
     ICOM_THIS_FROM(IDirect3DMaterialImpl, IDirect3DMaterial3, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p)->() decrementing from %lu.\n", This, ref + 1);
+    TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
 
     if (!ref)
     {
@@ -324,7 +324,7 @@ IDirect3DMaterialImpl_GetHandle(IDirect3
         device->Handles[This->Handle - 1].type = DDrawHandle_Material;
     }
     *lpHandle = This->Handle;
-    TRACE(" returning handle %08lx.\n", *lpHandle);
+    TRACE(" returning handle %08x.\n", *lpHandle);
 
     return D3D_OK;
 }
diff --git a/dlls/ddraw/palette.c b/dlls/ddraw/palette.c
index 03bdb3a..afe95cc 100644
--- a/dlls/ddraw/palette.c
+++ b/dlls/ddraw/palette.c
@@ -81,7 +81,7 @@ IDirectDrawPaletteImpl_AddRef(IDirectDra
     ICOM_THIS_FROM(IDirectDrawPaletteImpl, IDirectDrawPalette, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p)->() incrementing from %lu.\n", This, ref - 1);
+    TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
 
     return ref;
 }
@@ -101,7 +101,7 @@ IDirectDrawPaletteImpl_Release(IDirectDr
     ICOM_THIS_FROM(IDirectDrawPaletteImpl, IDirectDrawPalette, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p)->() decrementing from %lu.\n", This, ref + 1);
+    TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
 
     if (ref == 0)
     {
@@ -137,7 +137,7 @@ IDirectDrawPaletteImpl_Initialize(IDirec
                                   DWORD Flags,
                                   PALETTEENTRY *ColorTable)
 {
-    TRACE("(%p)->(%p,%lx,%p)\n", iface, DD, Flags, ColorTable);
+    TRACE("(%p)->(%p,%x,%p)\n", iface, DD, Flags, ColorTable);
     return DDERR_ALREADYINITIALIZED;
 }
 
@@ -191,7 +191,7 @@ IDirectDrawPaletteImpl_SetEntries(IDirec
                                   PALETTEENTRY *PalEnt)
 {
     ICOM_THIS_FROM(IDirectDrawPaletteImpl, IDirectDrawPalette, iface);
-    TRACE("(%p)->(%lx,%ld,%ld,%p): Relay\n", This, Flags, Start, Count, PalEnt);
+    TRACE("(%p)->(%x,%d,%d,%p): Relay\n", This, Flags, Start, Count, PalEnt);
 
     if(!PalEnt)
         return DDERR_INVALIDPARAMS;
@@ -224,7 +224,7 @@ IDirectDrawPaletteImpl_GetEntries(IDirec
                                   PALETTEENTRY *PalEnt)
 {
     ICOM_THIS_FROM(IDirectDrawPaletteImpl, IDirectDrawPalette, iface);
-    TRACE("(%p)->(%lx,%ld,%ld,%p): Relay\n", This, Flags, Start, Count, PalEnt);
+    TRACE("(%p)->(%x,%d,%d,%p): Relay\n", This, Flags, Start, Count, PalEnt);
 
     if(!PalEnt)
         return DDERR_INVALIDPARAMS;
diff --git a/dlls/ddraw/parent.c b/dlls/ddraw/parent.c
index 3b7b3d8..14f6172 100644
--- a/dlls/ddraw/parent.c
+++ b/dlls/ddraw/parent.c
@@ -103,7 +103,7 @@ IParentImpl_AddRef(IParent *iface)
     ICOM_THIS_FROM(IParentImpl, IParent, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) : AddRef from %ld\n", This, ref - 1);
+    TRACE("(%p) : AddRef from %d\n", This, ref - 1);
 
     return ref;
 }
@@ -128,7 +128,7 @@ IParentImpl_Release(IParent *iface)
     ICOM_THIS_FROM(IParentImpl, IParent, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p) : ReleaseRef to %ld\n", This, ref);
+    TRACE("(%p) : ReleaseRef to %d\n", This, ref);
 
     if (ref == 0)
     {
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 6c3050c..0ce28da 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -163,7 +163,7 @@ IDirectDrawSurfaceImpl_AddRef(IDirectDra
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     ULONG refCount = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) : AddRef increasing from %ld\n", This, refCount - 1);
+    TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1);
     return refCount;
 }
 
@@ -190,7 +190,7 @@ static void IDirectDrawSurfaceImpl_Destr
          * because the 2nd surface was addref()ed when the app
          * called GetAttachedSurface
          */
-        WARN("(%p): Destroying surface with refount %ld\n", This, This->ref);
+        WARN("(%p): Destroying surface with refount %d\n", This, This->ref);
     }
 
     /* Check for attached surfaces and detach them */
@@ -283,7 +283,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDr
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     ULONG ref;
-    TRACE("(%p) : Releasing from %ld\n", This, This->ref);
+    TRACE("(%p) : Releasing from %d\n", This, This->ref);
     ref = InterlockedDecrement(&This->ref);
 
     if (ref == 0)
@@ -436,7 +436,7 @@ IDirectDrawSurfaceImpl_GetAttachedSurfac
         our_caps.dwCaps4 = 0;
     }
 
-    TRACE("(%p): Looking for caps: %lx,%lx,%lx,%lx\n", This, our_caps.dwCaps, our_caps.dwCaps2, our_caps.dwCaps3, our_caps.dwCaps4); /* FIXME: Better debugging */
+    TRACE("(%p): Looking for caps: %x,%x,%x,%x\n", This, our_caps.dwCaps, our_caps.dwCaps2, our_caps.dwCaps3, our_caps.dwCaps4); /* FIXME: Better debugging */
 
     /* First, look at the complex chain */
     surf = This;
@@ -445,7 +445,7 @@ IDirectDrawSurfaceImpl_GetAttachedSurfac
     {
         if (TRACE_ON(ddraw))
         {
-            TRACE("Surface: (%p) caps: %lx,%lx,%lx,%lx\n", surf,
+            TRACE("Surface: (%p) caps: %x,%x,%x,%x\n", surf,
                    surf->surface_desc.ddsCaps.dwCaps,
                    surf->surface_desc.ddsCaps.dwCaps2,
                    surf->surface_desc.ddsCaps.dwCaps3,
@@ -477,7 +477,7 @@ IDirectDrawSurfaceImpl_GetAttachedSurfac
     {
         if (TRACE_ON(ddraw))
         {
-            TRACE("Surface: (%p) caps: %lx,%lx,%lx,%lx\n", surf,
+            TRACE("Surface: (%p) caps: %x,%x,%x,%x\n", surf,
                    surf->surface_desc.ddsCaps.dwCaps,
                    surf->surface_desc.ddsCaps.dwCaps2,
                    surf->surface_desc.ddsCaps.dwCaps3,
@@ -548,7 +548,7 @@ IDirectDrawSurfaceImpl_Lock(IDirectDrawS
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     WINED3DLOCKED_RECT LockedRect;
     HRESULT hr;
-    TRACE("(%p)->(%p,%p,%lx,%p)\n", This, Rect, DDSD, Flags, h);
+    TRACE("(%p)->(%p,%p,%x,%p)\n", This, Rect, DDSD, Flags, h);
 
     if(!DDSD)
         return DDERR_INVALIDPARAMS;
@@ -642,7 +642,7 @@ IDirectDrawSurfaceImpl_Flip(IDirectDrawS
     IDirectDrawSurfaceImpl *Override = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, DestOverride);
     IDirectDrawSurface7 *Override7;
     HRESULT hr;
-    TRACE("(%p)->(%p,%lx)\n", This, DestOverride, Flags);
+    TRACE("(%p)->(%p,%x)\n", This, DestOverride, Flags);
 
     /* Flip has to be called from a front buffer
      * What about overlay surfaces, AFAIK they can flip too?
@@ -701,7 +701,7 @@ IDirectDrawSurfaceImpl_Blt(IDirectDrawSu
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     IDirectDrawSurfaceImpl *Src = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, SrcSurface);
-    TRACE("(%p)->(%p,%p,%p,%lx,%p)\n", This, DestRect, Src, SrcRect, Flags, DDBltFx);
+    TRACE("(%p)->(%p,%p,%p,%x,%p)\n", This, DestRect, Src, SrcRect, Flags, DDBltFx);
 
     return IWineD3DSurface_Blt(This->WineD3DSurface,
                                DestRect,
@@ -817,7 +817,7 @@ IDirectDrawSurfaceImpl_DeleteAttachedSur
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     IDirectDrawSurfaceImpl *Surf = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, Attach);
     IDirectDrawSurfaceImpl *Prev = This;
-    TRACE("(%p)->(%08lx,%p)\n", This, Flags, Surf);
+    TRACE("(%p)->(%08x,%p)\n", This, Flags, Surf);
 
     if (!Surf || (Surf->first_attached != This) || (Surf == This) )
         return DDERR_SURFACENOTATTACHED; /* unchecked */
@@ -974,7 +974,7 @@ static HRESULT WINAPI
 IDirectDrawSurfaceImpl_SetPriority(IDirectDrawSurface7 *iface, DWORD Priority)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
-    TRACE("(%p)->(%ld): Relay!\n",This,Priority);
+    TRACE("(%p)->(%d): Relay!\n",This,Priority);
 
     return IWineD3DSurface_SetPriority(This->WineD3DSurface, Priority);
 }
@@ -1032,7 +1032,7 @@ IDirectDrawSurfaceImpl_SetPrivateData(ID
                                       DWORD Flags)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
-    TRACE("(%p)->(%s,%p,%ld,%lx): Relay\n", This, debugstr_guid(tag), Data, Size, Flags);
+    TRACE("(%p)->(%s,%p,%d,%x): Relay\n", This, debugstr_guid(tag), Data, Size, Flags);
 
     return IWineD3DSurface_SetPrivateData(This->WineD3DSurface,
                                           tag,
@@ -1114,7 +1114,7 @@ static HRESULT WINAPI
 IDirectDrawSurfaceImpl_PageLock(IDirectDrawSurface7 *iface,
                                 DWORD Flags)
 {
-    TRACE("(%p)->(%lx)\n", iface, Flags);
+    TRACE("(%p)->(%x)\n", iface, Flags);
 
     /* This is Windows memory management related - we don't need this */
     return DD_OK;
@@ -1136,7 +1136,7 @@ static HRESULT WINAPI
 IDirectDrawSurfaceImpl_PageUnlock(IDirectDrawSurface7 *iface,
                                   DWORD Flags)
 {
-    TRACE("(%p)->(%lx)\n", iface, Flags);
+    TRACE("(%p)->(%x)\n", iface, Flags);
 
     return DD_OK;
 }
@@ -1155,7 +1155,7 @@ IDirectDrawSurfaceImpl_PageUnlock(IDirec
  *****************************************************************************/
 static HRESULT WINAPI IDirectDrawSurfaceImpl_BltBatch(IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
 {
-    TRACE("(%p)->(%p,%ld,%08lx)\n",iface,Batch,Count,Flags);
+    TRACE("(%p)->(%p,%d,%08x)\n",iface,Batch,Count,Flags);
 
     /* MSDN: "not currently implemented" */
     return DDERR_UNSUPPORTED;
@@ -1233,7 +1233,7 @@ IDirectDrawSurfaceImpl_EnumOverlayZOrder
                                           void *context,
                                           LPDDENUMSURFACESCALLBACK7 cb)
 {
-     FIXME("(%p)->(%lx,%p,%p): Stub!\n", iface, Flags, context, cb);
+     FIXME("(%p)->(%x,%p,%p): Stub!\n", iface, Flags, context, cb);
 
     return DD_OK;
 }
@@ -1255,7 +1255,7 @@ IDirectDrawSurfaceImpl_GetBltStatus(IDir
                                     DWORD Flags)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
-    TRACE("(%p)->(%lx): Relay\n", This, Flags);
+    TRACE("(%p)->(%x): Relay\n", This, Flags);
 
     return IWineD3DSurface_GetBltStatus(This->WineD3DSurface, Flags);
 }
@@ -1330,7 +1330,7 @@ IDirectDrawSurfaceImpl_GetFlipStatus(IDi
                                      DWORD Flags)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
-    TRACE("(%p)->(%lx): Relay\n", This, Flags);
+    TRACE("(%p)->(%x): Relay\n", This, Flags);
 
     return IWineD3DSurface_GetFlipStatus(This->WineD3DSurface, Flags);
 }
@@ -1418,7 +1418,7 @@ IDirectDrawSurfaceImpl_GetSurfaceDesc(ID
     if ((DDSD->dwSize < sizeof(DDSURFACEDESC)) ||
         (DDSD->dwSize > sizeof(DDSURFACEDESC2)))
     {
-        ERR("Impossible/Strange struct size %ld.\n",DDSD->dwSize);
+        ERR("Impossible/Strange struct size %d.\n",DDSD->dwSize);
         return DDERR_GENERIC;
     }
 
@@ -1531,7 +1531,7 @@ IDirectDrawSurfaceImpl_SetOverlayPositio
                                           LONG Y)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
-    TRACE("(%p)->(%ld,%ld): Relay\n", This, X, Y);
+    TRACE("(%p)->(%d,%d): Relay\n", This, X, Y);
 
     return IWineD3DSurface_SetOverlayPosition(This->WineD3DSurface,
                                               X,
@@ -1563,7 +1563,7 @@ IDirectDrawSurfaceImpl_UpdateOverlay(IDi
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     IDirectDrawSurfaceImpl *Dst = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, DstSurface);
-    TRACE("(%p)->(%p,%p,%p,%lx,%p): Relay\n", This, SrcRect, Dst, DstRect, Flags, FX);
+    TRACE("(%p)->(%p,%p,%p,%x,%p): Relay\n", This, SrcRect, Dst, DstRect, Flags, FX);
 
     return IWineD3DSurface_UpdateOverlay(This->WineD3DSurface,
                                          SrcRect,
@@ -1589,7 +1589,7 @@ IDirectDrawSurfaceImpl_UpdateOverlayDisp
                                             DWORD Flags)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
-    TRACE("(%p)->(%lx)\n", This, Flags);
+    TRACE("(%p)->(%x)\n", This, Flags);
     return DDERR_UNSUPPORTED;
 }
 
@@ -1614,7 +1614,7 @@ IDirectDrawSurfaceImpl_UpdateOverlayZOrd
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     IDirectDrawSurfaceImpl *Ref = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, DDSRef);
 
-    TRACE("(%p)->(%lx,%p): Relay\n", This, Flags, Ref);
+    TRACE("(%p)->(%x,%p): Relay\n", This, Flags, Ref);
     return IWineD3DSurface_UpdateOverlayZOrder(This->WineD3DSurface,
                                                Flags,
                                                Ref ? Ref->WineD3DSurface : NULL);
@@ -1723,7 +1723,7 @@ IDirectDrawSurfaceImpl_SetLOD(IDirectDra
                               DWORD MaxLOD)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
-    TRACE("(%p)->(%ld)\n", This, MaxLOD);
+    TRACE("(%p)->(%d)\n", This, MaxLOD);
 
     if (!(This->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_TEXTUREMANAGE))
         return DDERR_INVALIDOBJECT;
@@ -1796,7 +1796,7 @@ IDirectDrawSurfaceImpl_BltFast(IDirectDr
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     IDirectDrawSurfaceImpl *src = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, Source);
-    TRACE("(%p)->(%ld,%ld,%p,%p,%ld): Relay\n", This, dstx, dsty, Source, rsrc, trans);
+    TRACE("(%p)->(%d,%d,%p,%p,%d): Relay\n", This, dstx, dsty, Source, rsrc, trans);
 
     return IWineD3DSurface_BltFast(This->WineD3DSurface,
                                    dstx, dsty,
@@ -1894,7 +1894,7 @@ IDirectDrawSurfaceImpl_SetSurfaceDesc(ID
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     WINED3DFORMAT newFormat = WINED3DFMT_UNKNOWN;
     HRESULT hr;
-    TRACE("(%p)->(%p,%lx)\n", This, DDSD, Flags);
+    TRACE("(%p)->(%p,%x)\n", This, DDSD, Flags);
 
     if(!DDSD)
         return DDERR_INVALIDPARAMS;
@@ -2026,7 +2026,7 @@ IDirectDrawSurfaceImpl_SetColorKey(IDire
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
     IDirectDrawSurfaceImpl *surf;
     HRESULT hr;
-    TRACE("(%p)->(%lx,%p)\n", This, Flags, CKey);
+    TRACE("(%p)->(%x,%p)\n", This, Flags, CKey);
 
     for(surf = This->first_complex; surf; surf = surf->next_complex)
     {
@@ -2035,7 +2035,7 @@ IDirectDrawSurfaceImpl_SetColorKey(IDire
                                          CKey);
         if(FAILED(hr))
         {
-            WARN("IWineD3DSurface::SetColorKey for surface %p failed with hr=%08lx\n",
+            WARN("IWineD3DSurface::SetColorKey for surface %p failed with hr=%08x\n",
                  surf->WineD3DSurface, hr);
             return hr;
         }
diff --git a/dlls/ddraw/texture.c b/dlls/ddraw/texture.c
index a29b26e..087996b 100644
--- a/dlls/ddraw/texture.c
+++ b/dlls/ddraw/texture.c
@@ -159,7 +159,7 @@ IDirect3DTextureImpl_PaletteChanged(IDir
                                          DWORD Count)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirect3DTexture2, iface);
-    FIXME("(%p)->(%08lx,%08lx): stub!\n", This, Start, Count);
+    FIXME("(%p)->(%08x,%08x): stub!\n", This, Start, Count);
     return D3D_OK;
 }
 
@@ -169,7 +169,7 @@ Thunk_IDirect3DTextureImpl_1_PaletteChan
                                             DWORD Count)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirect3DTexture, iface);
-    TRACE("(%p)->(%08lx,%08lx) thunking to IDirect3DTexture2 interface.\n", This, Start, Count);
+    TRACE("(%p)->(%08x,%08x) thunking to IDirect3DTexture2 interface.\n", This, Start, Count);
 
     return IDirect3DTexture2_PaletteChanged(COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirect3DTexture, IDirect3DTexture2, iface),
                                             Start,
@@ -230,7 +230,7 @@ IDirect3DTextureImpl_GetHandle(IDirect3D
     }
     *lpHandle = This->Handle;
 
-    TRACE(" returning handle %08lx.\n", *lpHandle);
+    TRACE(" returning handle %08x.\n", *lpHandle);
 
     return D3D_OK;
 }
diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c
index 7c6c478..32005f5 100644
--- a/dlls/ddraw/utils.c
+++ b/dlls/ddraw/utils.c
@@ -437,7 +437,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DD
             case 1:
             case 2:
             case 4:
-                ERR("Unsupported Alpha-Only bit depth 0x%lx\n", DDPixelFormat->u1.dwAlphaBitDepth);
+                ERR("Unsupported Alpha-Only bit depth 0x%x\n", DDPixelFormat->u1.dwAlphaBitDepth);
             case 8:
                 return WINED3DFMT_A8;
 
@@ -484,7 +484,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DD
                     return WINED3DFMT_L8;
 
                 default:
-                    ERR("Unknown luminance-only bit depth 0x%lx\n", DDPixelFormat->u1.dwLuminanceBitCount);
+                    ERR("Unknown luminance-only bit depth 0x%x\n", DDPixelFormat->u1.dwLuminanceBitCount);
                     return WINED3DFMT_UNKNOWN;
              }
         }
@@ -505,7 +505,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DD
                     if(DDPixelFormat->u2.dwStencilBitDepth == 1)
                         return WINED3DFMT_D15S1;
 
-                    ERR("Don't know how to handle a 16 bit Z buffer with %ld bit stencil buffer pixelformat\n", DDPixelFormat->u2.dwStencilBitDepth);
+                    ERR("Don't know how to handle a 16 bit Z buffer with %d bit stencil buffer pixelformat\n", DDPixelFormat->u2.dwStencilBitDepth);
                     return WINED3DFMT_UNKNOWN;
 
                 case 24:
@@ -519,7 +519,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DD
                         return WINED3DFMT_D24X4S4;
 
                 default:
-                    ERR("Unknown Z buffer depth %ld\n", DDPixelFormat->u1.dwZBufferBitDepth);
+                    ERR("Unknown Z buffer depth %d\n", DDPixelFormat->u1.dwZBufferBitDepth);
                     return WINED3DFMT_UNKNOWN;
             }
         }
@@ -541,7 +541,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DD
                     return WINED3DFMT_D32;
 
                 default:
-                    ERR("Unsupported Z buffer depth %ld\n", DDPixelFormat->u1.dwZBufferBitDepth);
+                    ERR("Unsupported Z buffer depth %d\n", DDPixelFormat->u1.dwZBufferBitDepth);
                     return WINED3DFMT_UNKNOWN;
             }
         }
@@ -617,7 +617,7 @@ PixelFormat_DD2WineD3D(DDPIXELFORMAT *DD
 static void
 DDRAW_dump_DWORD(const void *in)
 {
-    DPRINTF("%ld", *((const DWORD *) in));
+    DPRINTF("%d", *((const DWORD *) in));
 }
 static void
 DDRAW_dump_PTR(const void *in)
@@ -627,7 +627,7 @@ DDRAW_dump_PTR(const void *in)
 void
 DDRAW_dump_DDCOLORKEY(const DDCOLORKEY *ddck)
 {
-    DPRINTF(" Low : %ld  - High : %ld", ddck->dwColorSpaceLowValue, ddck->dwColorSpaceHighValue);
+    DPRINTF(" Low : %d  - High : %d", ddck->dwColorSpaceLowValue, ddck->dwColorSpaceHighValue);
 }
 void DDRAW_dump_DDSCAPS2(const DDSCAPS2 *in)
 {
@@ -769,7 +769,7 @@ DDRAW_dump_pixelformat(const DDPIXELFORM
     DDRAW_dump_pixelformat_flag(pf->dwFlags);
     if (pf->dwFlags & DDPF_FOURCC)
     {
-        DPRINTF(", dwFourCC code '%c%c%c%c' (0x%08lx) - %ld bits per pixel",
+        DPRINTF(", dwFourCC code '%c%c%c%c' (0x%08x) - %d bits per pixel",
                 (unsigned char)( pf->dwFourCC     &0xff),
                 (unsigned char)((pf->dwFourCC>> 8)&0xff),
                 (unsigned char)((pf->dwFourCC>>16)&0xff),
@@ -781,7 +781,7 @@ DDRAW_dump_pixelformat(const DDPIXELFORM
     if (pf->dwFlags & DDPF_RGB)
     {
         const char *cmd;
-        DPRINTF(", RGB bits: %ld, ", pf->u1.dwRGBBitCount);
+        DPRINTF(", RGB bits: %d, ", pf->u1.dwRGBBitCount);
         switch (pf->u1.dwRGBBitCount)
         {
         case 4: cmd = "%1lx"; break;
@@ -805,16 +805,16 @@ DDRAW_dump_pixelformat(const DDPIXELFORM
     }
     if (pf->dwFlags & DDPF_ZBUFFER)
     {
-        DPRINTF(", Z bits : %ld", pf->u1.dwZBufferBitDepth);
+        DPRINTF(", Z bits : %d", pf->u1.dwZBufferBitDepth);
     }
     if (pf->dwFlags & DDPF_ALPHA)
     {
-        DPRINTF(", Alpha bits : %ld", pf->u1.dwAlphaBitDepth);
+        DPRINTF(", Alpha bits : %d", pf->u1.dwAlphaBitDepth);
     }
     if (pf->dwFlags & DDPF_BUMPDUDV)
     {
         const char *cmd = "%08lx";
-        DPRINTF(", Bump bits: %ld, ", pf->u1.dwBumpBitCount);
+        DPRINTF(", Bump bits: %d, ", pf->u1.dwBumpBitCount);
         DPRINTF(" U "); DPRINTF(cmd, pf->u2.dwBumpDuBitMask);
         DPRINTF(" V "); DPRINTF(cmd, pf->u3.dwBumpDvBitMask);
         DPRINTF(" L "); DPRINTF(cmd, pf->u4.dwBumpLuminanceBitMask);
@@ -1098,7 +1098,7 @@ void DDRAW_dump_DDCAPS(const DDCAPS *lpc
       FE(DDSVCAPS_STEREOSEQUENTIAL),
     };
 
-    DPRINTF(" - dwSize : %ld\n", lpcaps->dwSize);
+    DPRINTF(" - dwSize : %d\n", lpcaps->dwSize);
     DPRINTF(" - dwCaps : "); DDRAW_dump_flags(lpcaps->dwCaps, flags1, sizeof(flags1)/sizeof(flags1[0]));
     DPRINTF(" - dwCaps2 : "); DDRAW_dump_flags(lpcaps->dwCaps2, flags2, sizeof(flags2)/sizeof(flags2[0]));
     DPRINTF(" - dwCKeyCaps : "); DDRAW_dump_flags(lpcaps->dwCKeyCaps, flags3, sizeof(flags3)/sizeof(flags3[0]));
@@ -1107,10 +1107,10 @@ void DDRAW_dump_DDCAPS(const DDCAPS *lpc
     DPRINTF(" - dwPalCaps : "); DDRAW_dump_flags(lpcaps->dwPalCaps, flags6, sizeof(flags6)/sizeof(flags6[0]));
     DPRINTF(" - dwSVCaps : "); DDRAW_dump_flags(lpcaps->dwSVCaps, flags7, sizeof(flags7)/sizeof(flags7[0]));
     DPRINTF("...\n");
-    DPRINTF(" - dwNumFourCCCodes : %ld\n", lpcaps->dwNumFourCCCodes);
-    DPRINTF(" - dwCurrVisibleOverlays : %ld\n", lpcaps->dwCurrVisibleOverlays);
-    DPRINTF(" - dwMinOverlayStretch : %ld\n", lpcaps->dwMinOverlayStretch);
-    DPRINTF(" - dwMaxOverlayStretch : %ld\n", lpcaps->dwMaxOverlayStretch);
+    DPRINTF(" - dwNumFourCCCodes : %d\n", lpcaps->dwNumFourCCCodes);
+    DPRINTF(" - dwCurrVisibleOverlays : %d\n", lpcaps->dwCurrVisibleOverlays);
+    DPRINTF(" - dwMinOverlayStretch : %d\n", lpcaps->dwMinOverlayStretch);
+    DPRINTF(" - dwMaxOverlayStretch : %d\n", lpcaps->dwMaxOverlayStretch);
     DPRINTF("...\n");
     DPRINTF(" - ddsCaps : "); DDRAW_dump_DDSCAPS2(&lpcaps->ddsCaps); DPRINTF("\n");
 }
diff --git a/dlls/ddraw/vertexbuffer.c b/dlls/ddraw/vertexbuffer.c
index 51dcc5e..8dda6dc 100644
--- a/dlls/ddraw/vertexbuffer.c
+++ b/dlls/ddraw/vertexbuffer.c
@@ -130,7 +130,7 @@ IDirect3DVertexBufferImpl_AddRef(IDirect
     ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p/%p)->() incrementing from %lu.\n", This, iface, ref - 1);
+    TRACE("(%p/%p)->() incrementing from %u.\n", This, iface, ref - 1);
 
     return ref;
 }
@@ -160,7 +160,7 @@ IDirect3DVertexBufferImpl_Release(IDirec
     ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p)->() decrementing from %lu.\n", This, ref + 1);
+    TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
 
     if (ref == 0)
     {
@@ -212,7 +212,7 @@ IDirect3DVertexBufferImpl_Lock(IDirect3D
     ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
     WINED3DVERTEXBUFFER_DESC Desc;
     HRESULT hr;
-    TRACE("(%p)->(%08lx,%p,%p)\n", This, Flags, Data, Size);
+    TRACE("(%p)->(%08x,%p,%p)\n", This, Flags, Data, Size);
 
     if(Size)
     {
@@ -221,7 +221,7 @@ IDirect3DVertexBufferImpl_Lock(IDirect3D
                                           &Desc);
         if(hr != D3D_OK)
         {
-            ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr=%08lx\n", This, hr);
+            ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr=%08x\n", This, hr);
             return hr;
         }
         *Size = Desc.Size;
@@ -241,7 +241,7 @@ Thunk_IDirect3DVertexBufferImpl_1_Lock(I
                                        DWORD *Size)
 {
     ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
-    TRACE_(ddraw_thunk)("(%p)->(%08lx,%p,%p) thunking to IDirect3DVertexBuffer7 interface.\n", This, Flags, Data, Size);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%p,%p) thunking to IDirect3DVertexBuffer7 interface.\n", This, Flags, Data, Size);
 
     return IDirect3DVertexBuffer7_Lock(ICOM_INTERFACE(This, IDirect3DVertexBuffer7),
                                        Flags,
@@ -316,7 +316,7 @@ IDirect3DVertexBufferImpl_ProcessVertice
     BOOL oldClip, doClip;
     HRESULT hr;
 
-    TRACE("(%p)->(%08lx,%ld,%ld,%p,%ld,%p,%08lx)\n", This, VertexOp, DestIndex, Count, Src, SrcIndex, D3D, Flags);
+    TRACE("(%p)->(%08x,%d,%d,%p,%d,%p,%08x)\n", This, VertexOp, DestIndex, Count, Src, SrcIndex, D3D, Flags);
 
     /* Vertex operations:
      * D3DVOP_CLIP: Clips vertices outside the viewing frustrum. Needs clipping information
@@ -376,7 +376,7 @@ Thunk_IDirect3DVertexBufferImpl_1_Proces
     IDirect3DVertexBufferImpl *Src = ICOM_OBJECT(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, SrcBuffer);
     IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice3, D3DDevice);
 
-    TRACE_(ddraw_thunk)("(%p)->(%08lx,%08lx,%08lx,%p,%08lx,%p,%08lx) thunking to IDirect3DVertexBuffer7 interface.\n", This, VertexOp, DestIndex, Count, Src, SrcIndex, D3D, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%08x,%p,%08x,%p,%08x) thunking to IDirect3DVertexBuffer7 interface.\n", This, VertexOp, DestIndex, Count, Src, SrcIndex, D3D, Flags);
 
     return IDirect3DVertexBuffer7_ProcessVertices(ICOM_INTERFACE(This, IDirect3DVertexBuffer7),
                                                   VertexOp,
@@ -417,7 +417,7 @@ IDirect3DVertexBufferImpl_GetVertexBuffe
                                       &WDesc);
     if(hr != D3D_OK)
     {
-        ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr=%08lx\n", This, hr);
+        ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr=%08x\n", This, hr);
         return hr;
     }
 
@@ -466,7 +466,7 @@ IDirect3DVertexBufferImpl_Optimize(IDire
 {
     ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
     IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice7, D3DDevice);
-    FIXME("(%p)->(%p,%08lx): stub!\n", This, D3D, Flags);
+    FIXME("(%p)->(%p,%08x): stub!\n", This, D3D, Flags);
 
     /* We could forward this call to WineD3D and take advantage
      * of it once we use OpenGL vertex buffers
@@ -483,7 +483,7 @@ Thunk_IDirect3DVertexBufferImpl_1_Optimi
 {
     ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
     IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice3, D3DDevice);
-    TRACE_(ddraw_thunk)("(%p)->(%p,%08lx) thunking to IDirect3DVertexBuffer7 interface.\n", This, D3D, Flags);
+    TRACE_(ddraw_thunk)("(%p)->(%p,%08x) thunking to IDirect3DVertexBuffer7 interface.\n", This, D3D, Flags);
 
     return IDirect3DVertexBuffer7_Optimize(ICOM_INTERFACE(This, IDirect3DVertexBuffer7),
                                            ICOM_INTERFACE(D3D, IDirect3DDevice7),
@@ -524,7 +524,7 @@ IDirect3DVertexBufferImpl_ProcessVertice
 {
     ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
     IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice7, D3DDevice);
-    FIXME("(%p)->(%08lx,%08lx,%08lx,%p,%08lx,%p,%08lx): stub!\n", This, VertexOp, DestIndex, Count, StrideData, VertexTypeDesc, D3D, Flags);
+    FIXME("(%p)->(%08x,%08x,%08x,%p,%08x,%p,%08x): stub!\n", This, VertexOp, DestIndex, Count, StrideData, VertexTypeDesc, D3D, Flags);
     return DD_OK;
 }
 
diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c
index 71c426b..c33d625 100644
--- a/dlls/ddraw/viewport.c
+++ b/dlls/ddraw/viewport.c
@@ -97,9 +97,9 @@ void viewport_activate(IDirect3DViewport
  *****************************************************************************/
 static void _dump_D3DVIEWPORT(D3DVIEWPORT *lpvp)
 {
-    TRACE("    - dwSize = %ld   dwX = %ld   dwY = %ld\n",
+    TRACE("    - dwSize = %d   dwX = %d   dwY = %d\n",
 	  lpvp->dwSize, lpvp->dwX, lpvp->dwY);
-    TRACE("    - dwWidth = %ld   dwHeight = %ld\n",
+    TRACE("    - dwWidth = %d   dwHeight = %d\n",
 	  lpvp->dwWidth, lpvp->dwHeight);
     TRACE("    - dvScaleX = %f   dvScaleY = %f\n",
 	  lpvp->dvScaleX, lpvp->dvScaleY);
@@ -111,9 +111,9 @@ static void _dump_D3DVIEWPORT(D3DVIEWPOR
 
 static void _dump_D3DVIEWPORT2(D3DVIEWPORT2 *lpvp)
 {
-    TRACE("    - dwSize = %ld   dwX = %ld   dwY = %ld\n",
+    TRACE("    - dwSize = %d   dwX = %d   dwY = %d\n",
 	  lpvp->dwSize, lpvp->dwX, lpvp->dwY);
-    TRACE("    - dwWidth = %ld   dwHeight = %ld\n",
+    TRACE("    - dwWidth = %d   dwHeight = %d\n",
 	  lpvp->dwWidth, lpvp->dwHeight);
     TRACE("    - dvClipX = %f   dvClipY = %f\n",
 	  lpvp->dvClipX, lpvp->dvClipY);
@@ -181,7 +181,7 @@ IDirect3DViewportImpl_AddRef(IDirect3DVi
     ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p)->() incrementing from %lu.\n", This, ref - 1);
+    TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
 
     return ref;
 }
@@ -201,7 +201,7 @@ IDirect3DViewportImpl_Release(IDirect3DV
     ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p)->() decrementing from %lu.\n", This, ref + 1);
+    TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
 
     if (!ref) {
         HeapFree(GetProcessHeap(), 0, This);
@@ -339,7 +339,7 @@ IDirect3DViewportImpl_TransformVertices(
                                         DWORD *lpOffScreen)
 {
     ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface);
-    FIXME("(%p)->(%08lx,%p,%08lx,%p): stub!\n", This, dwVertexCount, lpData, dwFlags, lpOffScreen);
+    FIXME("(%p)->(%08x,%p,%08x,%p): stub!\n", This, dwVertexCount, lpData, dwFlags, lpOffScreen);
     if (lpOffScreen)
 	*lpOffScreen = 0;
     return DD_OK;
@@ -363,7 +363,7 @@ IDirect3DViewportImpl_LightElements(IDir
                                     LPD3DLIGHTDATA lpData)
 {
     ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface);
-    TRACE("(%p)->(%08lx,%p): Unimplemented!\n", This, dwElementCount, lpData);
+    TRACE("(%p)->(%08x,%p): Unimplemented!\n", This, dwElementCount, lpData);
     return DDERR_UNSUPPORTED;
 }
 
@@ -384,16 +384,16 @@ IDirect3DViewportImpl_SetBackground(IDir
                                     D3DMATERIALHANDLE hMat)
 {
     ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface);
-    TRACE("(%p)->(%ld)\n", This, (DWORD) hMat);
+    TRACE("(%p)->(%d)\n", This, (DWORD) hMat);
 
     if(hMat && hMat > This->ddraw->d3ddevice->numHandles)
     {
-        WARN("Specified Handle %ld out of range\n", hMat);
+        WARN("Specified Handle %d out of range\n", hMat);
         return DDERR_INVALIDPARAMS;
     }
     else if(hMat && This->ddraw->d3ddevice->Handles[hMat - 1].type != DDrawHandle_Material)
     {
-        WARN("Handle %ld is not a material handle\n", hMat);
+        WARN("Handle %d is not a material handle\n", hMat);
         return DDERR_INVALIDPARAMS;
     }
 
@@ -526,7 +526,7 @@ IDirect3DViewportImpl_Clear(IDirect3DVie
     ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface);
     DWORD color = 0x00000000;
     
-    TRACE("(%p/%p)->(%08lx,%p,%08lx)\n", This, iface, dwCount, lpRects, dwFlags);
+    TRACE("(%p/%p)->(%08x,%p,%08x)\n", This, iface, dwCount, lpRects, dwFlags);
     if (This->active_device == NULL) {
         ERR(" Trying to clear a viewport not attached to a device !\n");
 	return D3DERR_VIEWPORTHASNODEVICE;
@@ -664,7 +664,7 @@ IDirect3DViewportImpl_NextLight(IDirect3
                                 DWORD dwFlags)
 {
     ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface);
-    FIXME("(%p)->(%p,%p,%08lx): stub!\n", This, lpDirect3DLight, lplpDirect3DLight, dwFlags);
+    FIXME("(%p)->(%p,%p,%08x): stub!\n", This, lpDirect3DLight, lplpDirect3DLight, dwFlags);
     return D3D_OK;
 }
 
@@ -824,7 +824,7 @@ IDirect3DViewportImpl_Clear2(IDirect3DVi
                              DWORD dwStencil)
 {
     ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface);
-    TRACE("(%p)->(%08lx,%p,%08lx,%08lx,%f,%08lx)\n", This, dwCount, lpRects, dwFlags, dwColor, dvZ, dwStencil);
+    TRACE("(%p)->(%08x,%p,%08x,%08x,%f,%08x)\n", This, dwCount, lpRects, dwFlags, dwColor, dvZ, dwStencil);
     if (This->active_device == NULL) {
         ERR(" Trying to clear a viewport not attached to a device !\n");
 	return D3DERR_VIEWPORTHASNODEVICE;


More information about the wine-patches mailing list