msi: Win64 printf format warning fixes.
diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in
index 97c2daf..2b27d29 100644
--- a/dlls/msi/Makefile.in
+++ b/dlls/msi/Makefile.in
@@ -6,7 +6,6 @@
 IMPORTLIB = libmsi.$(IMPLIBEXT)
 IMPORTS   = urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 kernel32
 EXTRALIBS = -luuid
-EXTRADEFS = -DWINE_NO_LONG_AS_INT
 
 C_SRCS = \
 	action.c \
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 49cba04..be92b6f 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2136,7 +2136,7 @@
             }
             msi_free(deformated);
 
-            TRACE("Data %li bytes(%i)\n",*size,count);
+            TRACE("Data %i bytes(%i)\n",*size,count);
         }
         else
         {
@@ -2162,7 +2162,7 @@
             if (deformated[0] == '-')
                 d = -d;
             *(LPDWORD)data = d;
-            TRACE("DWORD %li\n",*(LPDWORD)data);
+            TRACE("DWORD %i\n",*(LPDWORD)data);
 
             msi_free(deformated);
         }
@@ -3639,7 +3639,7 @@
 
     if (!r)
     {
-        ERR("Unable to copy package (%s -> %s) (error %ld)\n",
+        ERR("Unable to copy package (%s -> %s) (error %d)\n",
             debugstr_w(msiFilePath), debugstr_w(packagefile), GetLastError());
         return ERROR_FUNCTION_FAILED;
     }
@@ -4073,7 +4073,7 @@
     }
 
     if (count)
-        FIXME("%s -> %lu ignored %s table values\n",
+        FIXME("%s -> %u ignored %s table values\n",
               action, count, debugstr_w(table));
 
     return ERROR_SUCCESS;
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index 063f65d..dc271a4 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -154,7 +154,7 @@
         TRACE("MaxVersion is %d.%d.%d.%d\n", HIWORD(sig->MaxVersionMS),
          LOWORD(sig->MaxVersionMS), HIWORD(sig->MaxVersionLS),
          LOWORD(sig->MaxVersionLS));
-        TRACE("MinSize is %ld, MaxSize is %ld;\n", sig->MinSize, sig->MaxSize);
+        TRACE("MinSize is %d, MaxSize is %d;\n", sig->MinSize, sig->MaxSize);
         TRACE("Languages is %s\n", debugstr_w(sig->Languages));
 
 end:
@@ -286,7 +286,7 @@
                 sprintfW(*appValue + i * 3, binFmt, value[i]);
             break;
         default:
-            WARN("unimplemented for values of type %ld\n", regType);
+            WARN("unimplemented for values of type %d\n", regType);
             *appValue = NULL;
     }
 }
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index dad67a2..b93e68e 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -382,7 +382,7 @@
     case ERROR_NO_MORE_ITEMS:
         return ERROR_SUCCESS;
     default:
-        ERR("Invalid Return Code %ld\n",rc);
+        ERR("Invalid Return Code %d\n",rc);
         return ERROR_INSTALL_FAILURE;
     }
 }
@@ -502,14 +502,13 @@
 {
     thread_struct *stuff;
     DWORD rc = 0;
-  
-    TRACE("MSI Thread (0x%lx) started for custom action\n",
-                        GetCurrentThreadId());
-    
+
+    TRACE("MSI Thread (%x) started for custom action\n", GetCurrentThreadId());
+
     stuff = (thread_struct*)info;
     rc = ACTION_CallDllFunction(stuff);
 
-    TRACE("MSI Thread (0x%lx) finished (rc %li)\n",GetCurrentThreadId(), rc);
+    TRACE("MSI Thread (%x) finished (rc %i)\n",GetCurrentThreadId(), rc);
     /* clse all handles for this thread */
     MsiCloseAllHandles();
     return rc;
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index daef086..a0d1867 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -65,7 +65,7 @@
     msi_destroy_stringtable( db->strings );
     r = IStorage_Release( db->storage );
     if( r )
-        ERR("database reference count was not zero (%ld)\n", r);
+        ERR("database reference count was not zero (%d)\n", r);
     if (db->deletefile)
     {
         DeleteFileW( db->deletefile );
@@ -141,7 +141,7 @@
 
     if( FAILED( r ) )
     {
-        FIXME("open failed r = %08lx!\n",r);
+        FIXME("open failed r = %08x!\n",r);
         return ERROR_FUNCTION_FAILED;
     }
 
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 55743ca..ef685e0 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -579,7 +579,7 @@
             SendMessageW(ctrl->hwnd, PBM_SETPOS, 100*(ctrl->progress_current/ctrl->progress_max), 0);
             break;
         default:
-            ERR("Unknown progress message %ld\n", func);
+            ERR("Unknown progress message %d\n", func);
             break;
         }
     }
@@ -886,7 +886,7 @@
     *pcb = count;
     info->offset += count;
 
-    TRACE("%ld/%ld\n", info->offset, info->length);
+    TRACE("%d/%d\n", info->offset, info->length);
 
     return 0;
 }
@@ -2743,7 +2743,7 @@
     dialog->size.cx = sz.cx;
     dialog->size.cy = sz.cy;
 
-    TRACE("%lu %lu %lu %lu\n", pos->left, pos->top, pos->right, pos->bottom);
+    TRACE("%u %u %u %u\n", pos->left, pos->top, pos->right, pos->bottom);
 
     style = GetWindowLongPtrW( dialog->hwnd, GWL_STYLE );
     AdjustWindowRect( pos, style, FALSE );
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 81c5ac4..5f9f4d8 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -96,7 +96,7 @@
 
     WriteFile(the_file,data,size,&write,NULL);
     CloseHandle(the_file);
-    TRACE("wrote %li bytes to %s\n",write,debugstr_w(source));
+    TRACE("wrote %i bytes to %s\n",write,debugstr_w(source));
 end:
     msi_free(data);
     return rc;
@@ -242,7 +242,7 @@
                               NULL, CREATE_ALWAYS, attrs, NULL );
         if ( handle == INVALID_HANDLE_VALUE )
         {
-            ERR("failed to create %s (error %ld)\n",
+            ERR("failed to create %s (error %d)\n",
                 debugstr_w( f->TargetPath ), GetLastError() );
             return 0;
         }
@@ -793,7 +793,7 @@
         rc = ERROR_SUCCESS;
 
     if (rc != ERROR_SUCCESS)
-        ERR("Failed to copy file %s -> %s, last error %ld\n",
+        ERR("Failed to copy file %s -> %s, last error %d\n",
             debugstr_w(file->TargetPath), debugstr_w(dest_path), GetLastError());
 
     FIXME("We should track these duplicate files as well\n");   
diff --git a/dlls/msi/format.c b/dlls/msi/format.c
index 2909089..7cbcacc 100644
--- a/dlls/msi/format.c
+++ b/dlls/msi/format.c
@@ -471,7 +471,7 @@
             TRACE("after value %s\n", debugstr_wn((LPWSTR)newdata,
                                     size/sizeof(WCHAR)));
             chunk = (len - (progress - ptr)) * sizeof(WCHAR);
-            TRACE("after chunk is %li + %li\n",size,chunk);
+            TRACE("after chunk is %i + %i\n",size,chunk);
             if (size)
                 nd2 = msi_realloc(newdata,(size+chunk));
             else
@@ -583,7 +583,7 @@
         if (value!=NULL)
         {
             LPBYTE nd2;
-            TRACE("value %s, chunk %li size %li\n",debugstr_w((LPWSTR)value),
+            TRACE("value %s, chunk %i size %i\n",debugstr_w((LPWSTR)value),
                     chunk, size);
             if (size)
                 nd2= msi_realloc(newdata,(size + chunk));
@@ -616,7 +616,7 @@
     DWORD len;
     UINT rc = ERROR_INVALID_PARAMETER;
 
-    TRACE("%p %p %p %li\n",package, record ,buffer, *size);
+    TRACE("%p %p %p %i\n", package, record ,buffer, *size);
 
     rec = msi_dup_record_field(record,0);
     if (!rec)
@@ -663,7 +663,7 @@
     DWORD len,lenA;
     UINT rc = ERROR_INVALID_PARAMETER;
 
-    TRACE("%p %p %p %li\n",package, record ,buffer, *size);
+    TRACE("%p %p %p %i\n", package, record ,buffer, *size);
 
     rec = msi_dup_record_field(record,0);
     if (!rec)
diff --git a/dlls/msi/insert.c b/dlls/msi/insert.c
index 2b0f68a..33c915f 100644
--- a/dlls/msi/insert.c
+++ b/dlls/msi/insert.c
@@ -78,7 +78,7 @@
         switch( vl->val->type )
         {
         case EXPR_SVAL:
-            TRACE("field %ld -> %s\n", i, debugstr_w(vl->val->u.sval));
+            TRACE("field %d -> %s\n", i, debugstr_w(vl->val->u.sval));
             MSI_RecordSetStringW( merged, i, vl->val->u.sval );
             break;
         case EXPR_IVAL:
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index d15f222..662f9ea 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -150,7 +150,7 @@
 UINT WINAPI MsiAdvertiseProductExA(LPCSTR szPackagePath, LPCSTR szScriptfilePath,
       LPCSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions)
 {
-    FIXME("%s %s %s %08x %08lx %08lx\n", debugstr_a(szPackagePath),
+    FIXME("%s %s %s %08x %08x %08x\n", debugstr_a(szPackagePath),
           debugstr_a(szScriptfilePath), debugstr_a(szTransforms),
           lgidLanguage, dwPlatform, dwOptions);
     return ERROR_CALL_NOT_IMPLEMENTED;
@@ -159,7 +159,7 @@
 UINT WINAPI MsiAdvertiseProductExW( LPCWSTR szPackagePath, LPCWSTR szScriptfilePath,
       LPCWSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions)
 {
-    FIXME("%s %s %s %08x %08lx %08lx\n", debugstr_w(szPackagePath),
+    FIXME("%s %s %s %08x %08x %08x\n", debugstr_w(szPackagePath),
           debugstr_w(szScriptfilePath), debugstr_w(szTransforms),
           lgidLanguage, dwPlatform, dwOptions);
     return ERROR_CALL_NOT_IMPLEMENTED;
@@ -214,13 +214,13 @@
 
 UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode)
 {
-    FIXME("%s %08lx\n", debugstr_a(szProduct), dwReinstallMode);
+    FIXME("%s %08x\n", debugstr_a(szProduct), dwReinstallMode);
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
 UINT WINAPI MsiReinstallProductW(LPCWSTR szProduct, DWORD dwReinstallMode)
 {
-    FIXME("%s %08lx\n", debugstr_w(szProduct), dwReinstallMode);
+    FIXME("%s %08x\n", debugstr_w(szProduct), dwReinstallMode);
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
@@ -589,7 +589,7 @@
     LPWSTR szwLogFile = NULL;
     UINT r;
 
-    TRACE("%08lx %s %08lx\n", dwLogMode, debugstr_a(szLogFile), attributes);
+    TRACE("%08x %s %08x\n", dwLogMode, debugstr_a(szLogFile), attributes);
 
     if( szLogFile )
     {
@@ -606,7 +606,7 @@
 {
     HANDLE file = INVALID_HANDLE_VALUE;
 
-    TRACE("%08lx %s %08lx\n", dwLogMode, debugstr_w(szLogFile), attributes);
+    TRACE("%08x %s %08x\n", dwLogMode, debugstr_w(szLogFile), attributes);
 
     if (szLogFile)
     {
@@ -708,7 +708,7 @@
 {
     INSTALLUI_HANDLERA prev = gUIHandlerA;
 
-    TRACE("%p %lx %p\n",puiHandler, dwMessageFilter,pvContext);
+    TRACE("%p %x %p\n",puiHandler, dwMessageFilter,pvContext);
     gUIHandlerA = puiHandler;
     gUIFilter = dwMessageFilter;
     gUIContext = pvContext;
@@ -721,7 +721,7 @@
 {
     INSTALLUI_HANDLERW prev = gUIHandlerW;
 
-    TRACE("%p %lx %p\n",puiHandler,dwMessageFilter,pvContext);
+    TRACE("%p %x %p\n",puiHandler,dwMessageFilter,pvContext);
     gUIHandlerW = puiHandler;
     gUIFilter = dwMessageFilter;
     gUIContext = pvContext;
@@ -847,16 +847,16 @@
 UINT WINAPI MsiMessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,
                 WORD wLanguageId, DWORD f)
 {
-    FIXME("%p %s %s %u %08x %08lx\n",hWnd,debugstr_a(lpText),debugstr_a(lpCaption),
-          uType,wLanguageId,f);
+    FIXME("%p %s %s %u %08x %08x\n", hWnd, debugstr_a(lpText), debugstr_a(lpCaption),
+          uType, wLanguageId, f);
     return MessageBoxExA(hWnd,lpText,lpCaption,uType,wLanguageId); 
 }
 
 UINT WINAPI MsiMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,
                 WORD wLanguageId, DWORD f)
 {
-    FIXME("%p %s %s %u %08x %08lx\n",hWnd,debugstr_w(lpText),debugstr_w(lpCaption),
-          uType,wLanguageId,f);
+    FIXME("%p %s %s %u %08x %08x\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption),
+          uType, wLanguageId, f);
     return MessageBoxExW(hWnd,lpText,lpCaption,uType,wLanguageId); 
 }
 
@@ -864,7 +864,7 @@
                 DWORD dwInstallMode, DWORD dwAssemblyInfo, LPSTR lpPathBuf,
                 DWORD* pcchPathBuf )
 {
-    FIXME("%s %s %08lx %08lx %p %p\n", debugstr_a(szAssemblyName),
+    FIXME("%s %s %08x %08x %p %p\n", debugstr_a(szAssemblyName),
           debugstr_a(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf,
           pcchPathBuf);
     return ERROR_CALL_NOT_IMPLEMENTED;
@@ -874,7 +874,7 @@
                 DWORD dwInstallMode, DWORD dwAssemblyInfo, LPWSTR lpPathBuf,
                 DWORD* pcchPathBuf )
 {
-    FIXME("%s %s %08lx %08lx %p %p\n", debugstr_w(szAssemblyName),
+    FIXME("%s %s %08x %08x %p %p\n", debugstr_w(szAssemblyName),
           debugstr_w(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf,
           pcchPathBuf);
     return ERROR_CALL_NOT_IMPLEMENTED;
@@ -898,7 +898,7 @@
                 DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, BYTE* pbHashData,
                 DWORD* pcbHashData)
 {
-    FIXME("%s %08lx %p %p %p\n", debugstr_a(szSignedObjectPath), dwFlags,
+    FIXME("%s %08x %p %p %p\n", debugstr_a(szSignedObjectPath), dwFlags,
           ppcCertContext, pbHashData, pcbHashData);
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
@@ -907,7 +907,7 @@
                 DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, BYTE* pbHashData,
                 DWORD* pcbHashData)
 {
-    FIXME("%s %08lx %p %p %p\n", debugstr_w(szSignedObjectPath), dwFlags,
+    FIXME("%s %08x %p %p %p\n", debugstr_w(szSignedObjectPath), dwFlags,
           ppcCertContext, pbHashData, pcbHashData);
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
@@ -1243,7 +1243,7 @@
     UINT puLen;
     WCHAR tmp[32];
 
-    TRACE("%s %p %ld %p %ld\n", debugstr_w(szFilePath),
+    TRACE("%s %p %d %p %d\n", debugstr_w(szFilePath),
           lpVersionBuf, pcchVersionBuf?*pcchVersionBuf:0,
           lpLangBuf, pcchLangBuf?*pcchLangBuf:0);
 
@@ -1344,7 +1344,7 @@
 {
     INSTALLSTATE state;
 
-    TRACE("%s %s %li %li\n", debugstr_w(szProduct), debugstr_w(szFeature),
+    TRACE("%s %s %i %i\n", debugstr_w(szProduct), debugstr_w(szFeature),
           dwInstallMode, dwReserved);
 
     state = MsiQueryFeatureStateW( szProduct, szFeature );
@@ -1370,7 +1370,7 @@
     INSTALLSTATE ret = INSTALLSTATE_UNKNOWN;
     LPWSTR prod = NULL, feat = NULL;
 
-    TRACE("%s %s %li %li\n", debugstr_a(szProduct), debugstr_a(szFeature),
+    TRACE("%s %s %i %i\n", debugstr_a(szProduct), debugstr_a(szFeature),
           dwInstallMode, dwReserved);
 
     prod = strdupAtoW( szProduct );
@@ -1421,7 +1421,7 @@
     DWORD sz;
     UINT rc;
 
-    TRACE("%s %s %li %s %li %li %p %p\n", debugstr_w(szComponent),
+    TRACE("%s %s %i %s %i %i %p %p\n", debugstr_w(szComponent),
           debugstr_w(szQualifier), dwInstallMode, debugstr_w(szProduct),
           Unused1, Unused2, lpPathBuf, pcchPathBuf);
 
@@ -1479,7 +1479,7 @@
     UINT r = ERROR_OUTOFMEMORY;
     awstring path;
 
-    TRACE("%s %s %lu %s %lu %lu %p %p\n", debugstr_a(szComponent),
+    TRACE("%s %s %u %s %u %u %p %p\n", debugstr_a(szComponent),
           debugstr_a(szQualifier), dwInstallMode, debugstr_a(szProduct),
           Unused1, Unused2, lpPathBuf, pcchPathBuf);
 
@@ -1774,11 +1774,11 @@
 {
     WCHAR path[MAX_PATH];
 
-    TRACE("%ld\n", dwReserved);
+    TRACE("%d\n", dwReserved);
 
     if (dwReserved)
     {
-        FIXME("dwReserved=%ld\n", dwReserved);
+        FIXME("dwReserved=%d\n", dwReserved);
         return ERROR_INVALID_PARAMETER;
     }
 
@@ -1895,7 +1895,7 @@
     LPWSTR ptr;
     DWORD sz;
 
-    FIXME("%s %s %li\n", debugstr_w(szProduct), debugstr_w(szFeature),
+    FIXME("%s %s %i\n", debugstr_w(szProduct), debugstr_w(szFeature),
                            dwReinstallMode);
 
     ptr = reinstallmode;
@@ -1959,7 +1959,7 @@
     LPWSTR wszFeature;
     UINT rc;
 
-    TRACE("%s %s %li\n", debugstr_a(szProduct), debugstr_a(szFeature),
+    TRACE("%s %s %i\n", debugstr_a(szProduct), debugstr_a(szFeature),
                            dwReinstallMode);
 
     wszProduct = strdupAtoW(szProduct);
@@ -1995,7 +1995,7 @@
     DWORD length;
     UINT r = ERROR_FUNCTION_FAILED;
 
-    TRACE("%s %08lx %p\n", debugstr_w(szFilePath), dwOptions, pHash );
+    TRACE("%s %08x %p\n", debugstr_w(szFilePath), dwOptions, pHash );
 
     if (dwOptions)
         return ERROR_INVALID_PARAMETER;
@@ -2043,7 +2043,7 @@
     LPWSTR file;
     UINT r;
 
-    TRACE("%s %08lx %p\n", debugstr_a(szFilePath), dwOptions, pHash );
+    TRACE("%s %08x %p\n", debugstr_a(szFilePath), dwOptions, pHash );
 
     file = strdupAtoW( szFilePath );
     if (szFilePath && !file)
@@ -2060,7 +2060,7 @@
 UINT WINAPI MsiAdvertiseScriptW( LPCWSTR szScriptFile, DWORD dwFlags,
                                  PHKEY phRegData, BOOL fRemoveItems )
 {
-    FIXME("%s %08lx %p %d\n",
+    FIXME("%s %08x %p %d\n",
           debugstr_w( szScriptFile ), dwFlags, phRegData, fRemoveItems );
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
@@ -2071,7 +2071,7 @@
 UINT WINAPI MsiAdvertiseScriptA( LPCSTR szScriptFile, DWORD dwFlags,
                                  PHKEY phRegData, BOOL fRemoveItems )
 {
-    FIXME("%s %08lx %p %d\n",
+    FIXME("%s %08x %p %d\n",
           debugstr_a( szScriptFile ), dwFlags, phRegData, fRemoveItems );
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c
index e146cc8..7816e13 100644
--- a/dlls/msi/msiquery.c
+++ b/dlls/msi/msiquery.c
@@ -813,7 +813,7 @@
     r = MSI_IterateRecords( query, 0, msi_primary_key_iterator, &info );
     if( r == ERROR_SUCCESS )
     {
-        TRACE("Found %ld primary keys\n", info.n );
+        TRACE("Found %d primary keys\n", info.n );
 
         /* allocate a record and fill in the names of the tables */
         info.rec = MSI_CreateRecord( info.n );
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 1959dd0..b9f4bb5 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -576,13 +576,13 @@
     MSIPACKAGE *package = NULL;
     UINT ret;
 
-    TRACE("%s %08lx %p\n", debugstr_w(szPackage), dwOptions, phPackage );
+    TRACE("%s %08x %p\n", debugstr_w(szPackage), dwOptions, phPackage );
 
     if( szPackage == NULL )
         return ERROR_INVALID_PARAMETER;
 
     if( dwOptions )
-        FIXME("dwOptions %08lx not supported\n", dwOptions);
+        FIXME("dwOptions %08x not supported\n", dwOptions);
 
     ret = MSI_OpenPackageW( szPackage, &package );
     if( ret == ERROR_SUCCESS )
@@ -744,7 +744,7 @@
         }
     }
 
-    TRACE("(%p %lx %lx %s)\n",gUIHandlerA, gUIFilter, log_type,
+    TRACE("(%p %x %x %s)\n", gUIHandlerA, gUIFilter, log_type,
                              debugstr_w(message));
 
     /* convert it to ASCII */
@@ -1009,7 +1009,7 @@
 
     if ( *pchValueBuf <= len )
     {
-        TRACE("have %lu, need %u -> ERROR_MORE_DATA\n", *pchValueBuf, len);
+        TRACE("have %u, need %u -> ERROR_MORE_DATA\n", *pchValueBuf, len);
         r = ERROR_MORE_DATA;
     }
     else
diff --git a/dlls/msi/record.c b/dlls/msi/record.c
index 8bc3871..6705a03 100644
--- a/dlls/msi/record.c
+++ b/dlls/msi/record.c
@@ -641,7 +641,7 @@
     ulSize.QuadPart = sz;
     IStream_SetSize(*pstm, ulSize);
 
-    TRACE("read %s, %ld bytes into IStream %p\n", debugstr_w(szFile), sz, *pstm);
+    TRACE("read %s, %d bytes into IStream %p\n", debugstr_w(szFile), sz, *pstm);
 
     return ERROR_SUCCESS;
 }
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index e31e343..b246f5f 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -686,8 +686,8 @@
     DWORD r;
     WCHAR szwGuid[GUID_SIZE];
 
-    TRACE("%ld %p\n",index,lpguid);
-    
+    TRACE("%d %p\n", index, lpguid);
+
     if (NULL == lpguid)
         return ERROR_INVALID_PARAMETER;
     r = MsiEnumProductsW(index, szwGuid);
@@ -703,7 +703,7 @@
     DWORD r;
     WCHAR szKeyName[SQUISH_GUID_SIZE];
 
-    TRACE("%ld %p\n",index,lpguid);
+    TRACE("%d %p\n", index, lpguid);
 
     if (NULL == lpguid)
         return ERROR_INVALID_PARAMETER;
@@ -727,7 +727,7 @@
     WCHAR szwFeature[GUID_SIZE], szwParent[GUID_SIZE];
     LPWSTR szwProduct = NULL;
 
-    TRACE("%s %ld %p %p\n",debugstr_a(szProduct),index,szFeature,szParent);
+    TRACE("%s %d %p %p\n", debugstr_a(szProduct), index, szFeature, szParent);
 
     if( szProduct )
     {
@@ -756,7 +756,7 @@
     HKEY hkeyProduct = 0;
     DWORD r, sz;
 
-    TRACE("%s %ld %p %p\n",debugstr_w(szProduct),index,szFeature,szParent);
+    TRACE("%s %d %p %p\n", debugstr_w(szProduct), index, szFeature, szParent);
 
     if( !szProduct )
         return ERROR_INVALID_PARAMETER;
@@ -777,7 +777,7 @@
     DWORD r;
     WCHAR szwGuid[GUID_SIZE];
 
-    TRACE("%ld %p\n",index,lpguid);
+    TRACE("%d %p\n", index, lpguid);
 
     r = MsiEnumComponentsW(index, szwGuid);
     if( r == ERROR_SUCCESS )
@@ -792,7 +792,7 @@
     DWORD r;
     WCHAR szKeyName[SQUISH_GUID_SIZE];
 
-    TRACE("%ld %p\n",index,lpguid);
+    TRACE("%d %p\n", index, lpguid);
 
     r = MSIREG_OpenComponents(&hkeyComponents);
     if( r != ERROR_SUCCESS )
@@ -812,7 +812,7 @@
     WCHAR szwProduct[GUID_SIZE];
     LPWSTR szwComponent = NULL;
 
-    TRACE("%s %ld %p\n",debugstr_a(szComponent),index,szProduct);
+    TRACE("%s %d %p\n", debugstr_a(szComponent), index, szProduct);
 
     if( szComponent )
     {
@@ -839,7 +839,7 @@
     DWORD r, sz;
     WCHAR szValName[SQUISH_GUID_SIZE];
 
-    TRACE("%s %ld %p\n",debugstr_w(szComponent),index,szProduct);
+    TRACE("%s %d %p\n", debugstr_w(szComponent), index, szProduct);
 
     r = MSIREG_OpenComponentsKey(szComponent,&hkeyComp,FALSE);
     if( r != ERROR_SUCCESS )
@@ -864,7 +864,7 @@
     UINT r, r2;
     HKEY key;
 
-    TRACE("%s %08lx %p %p %p %p\n", debugstr_w(szComponent), iIndex,
+    TRACE("%s %08x %p %p %p %p\n", debugstr_w(szComponent), iIndex,
           lpQualBuf, pcchQual, lpAppBuf, pcchAppBuf);
 
     if (!szComponent)
@@ -901,7 +901,7 @@
  
         if (type != REG_MULTI_SZ)
         {
-            ERR("component data has wrong type (%ld)\n", type);
+            ERR("component data has wrong type (%d)\n", type);
             goto end;
         }
 
@@ -924,7 +924,7 @@
                 goto end;
             continue;
         }
-        ERR("should be enough data, but isn't %ld %ld\n", name_sz, val_sz );
+        ERR("should be enough data, but isn't %d %d\n", name_sz, val_sz );
         goto end;
     }
 
@@ -960,7 +960,7 @@
     LPWSTR comp;
     UINT r;
 
-    TRACE("%s %08lx %p %p %p %p\n", debugstr_a(szComponent), iIndex,
+    TRACE("%s %08x %p %p %p %p\n", debugstr_a(szComponent), iIndex,
           lpQualifierBuf, pcchQualifierBuf, lpApplicationDataBuf,
           pcchApplicationDataBuf);
 
@@ -989,7 +989,7 @@
 {
     awstring qual, appdata;
 
-    TRACE("%s %08lx %p %p %p %p\n", debugstr_w(szComponent), iIndex,
+    TRACE("%s %08x %p %p %p %p\n", debugstr_w(szComponent), iIndex,
           lpQualifierBuf, pcchQualifierBuf, lpApplicationDataBuf,
           pcchApplicationDataBuf);
 
@@ -1014,7 +1014,7 @@
     HKEY hkey;
     WCHAR szKeyName[SQUISH_GUID_SIZE];
 
-    TRACE("%s %lu %lu %p\n", debugstr_w(szUpgradeCode), dwReserved,
+    TRACE("%s %u %u %p\n", debugstr_w(szUpgradeCode), dwReserved,
           iProductIndex, lpProductBuf);
 
     if (NULL == szUpgradeCode)
@@ -1045,7 +1045,7 @@
     WCHAR productW[GUID_SIZE];
     UINT r;
 
-    TRACE("%s %lu %lu %p\n", debugstr_a(szUpgradeCode), dwReserved,
+    TRACE("%s %u %u %p\n", debugstr_a(szUpgradeCode), dwReserved,
           iProductIndex, lpProductBuf);
 
     if (szUpgradeCode)
@@ -1069,10 +1069,10 @@
 /***********************************************************************
  * MsiEnumPatchesA            [MSI.@]
  */
-UINT WINAPI MsiEnumPatchesA( LPCSTR szProduct, DWORD iPatchIndex, 
+UINT WINAPI MsiEnumPatchesA( LPCSTR szProduct, DWORD iPatchIndex,
         LPSTR lpPatchBuf, LPSTR lpTransformsBuf, DWORD* pcchTransformsBuf)
 {
-    FIXME("%s %ld %p %p %p\n", debugstr_a(szProduct),
+    FIXME("%s %d %p %p %p\n", debugstr_a(szProduct),
           iPatchIndex, lpPatchBuf, lpTransformsBuf, pcchTransformsBuf);
     return ERROR_NO_MORE_ITEMS;
 }
@@ -1080,10 +1080,10 @@
 /***********************************************************************
  * MsiEnumPatchesW            [MSI.@]
  */
-UINT WINAPI MsiEnumPatchesW( LPCWSTR szProduct, DWORD iPatchIndex, 
+UINT WINAPI MsiEnumPatchesW( LPCWSTR szProduct, DWORD iPatchIndex,
         LPWSTR lpPatchBuf, LPWSTR lpTransformsBuf, DWORD* pcchTransformsBuf)
 {
-    FIXME("%s %ld %p %p %p\n", debugstr_w(szProduct),
+    FIXME("%s %d %p %p %p\n", debugstr_w(szProduct),
           iPatchIndex, lpPatchBuf, lpTransformsBuf, pcchTransformsBuf);
     return ERROR_NO_MORE_ITEMS;
 }
diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index 388bd28..ebf0c08 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -299,7 +299,7 @@
     HKEY sourcekey;
     UINT rc;
 
-    TRACE("%s %s %x %lx %s %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), 
+    TRACE("%s %s %x %x %s %s\n", debugstr_w(szProduct), debugstr_w(szUserSid),
             dwContext, dwOptions, debugstr_w(szProperty), debugstr_w(szValue));
 
     if (!szProduct || lstrlenW(szProduct) > 39)
@@ -367,9 +367,9 @@
             typechar = 'u';
         else if (dwOptions & MSISOURCETYPE_MEDIA)
             typechar = 'm';
-        else 
-            ERR("Unknown source type! 0x%lx\n",dwOptions);
-        
+        else
+            ERR("Unknown source type! %x\n", dwOptions);
+
         size = (lstrlenW(szValue)+5)*sizeof(WCHAR);
         buffer = msi_alloc(size);
         sprintfW(buffer, LastUsedSource_Fmt, typechar, 1, szValue);
@@ -465,11 +465,10 @@
     HKEY typekey;
     UINT rc;
     media_info source_struct;
-   
-    TRACE("%s, %s, %x, %lx, %s, %li\n", debugstr_w(szProduct), 
-            debugstr_w(szUserSid), dwContext, dwOptions, debugstr_w(szSource), 
-            dwIndex);
-    
+
+    TRACE("%s %s %x %x %s %i\n", debugstr_w(szProduct), debugstr_w(szUserSid),
+          dwContext, dwOptions, debugstr_w(szSource), dwIndex);
+
     if (!szProduct)
         return ERROR_INVALID_PARAMETER;
 
@@ -504,7 +503,7 @@
         rc = OpenMediaSubkey(sourcekey, &typekey, TRUE);
     else
     {
-        ERR("unknown media type: %08lx\n", dwOptions);
+        ERR("unknown media type: %08x\n", dwOptions);
         RegCloseKey(sourcekey);
         return ERROR_FUNCTION_FAILED;
     }
@@ -558,9 +557,9 @@
     LPWSTR buffer;
     DWORD size;
 
-    TRACE("%s %s %x %lx %li %s %s\n", debugstr_w(szProduct), 
-            debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId, 
-            debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt)); 
+    TRACE("%s %s %x %x %i %s %s\n", debugstr_w(szProduct),
+            debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId,
+            debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt));
 
     if (!szProduct || lstrlenW(szProduct) > 39)
         return ERROR_INVALID_PARAMETER;
@@ -624,7 +623,7 @@
  */
 UINT WINAPI MsiSourceListClearAllA( LPCSTR szProduct, LPCSTR szUserName, DWORD dwReserved )
 {
-    FIXME("(%s %s %ld) stub\n", debugstr_a(szProduct), debugstr_a(szUserName), dwReserved);
+    FIXME("(%s %s %d)\n", debugstr_a(szProduct), debugstr_a(szUserName), dwReserved);
     return ERROR_SUCCESS;
 }
 
@@ -633,6 +632,6 @@
  */
 UINT WINAPI MsiSourceListClearAllW( LPCWSTR szProduct, LPCWSTR szUserName, DWORD dwReserved )
 {
-    FIXME("(%s %s %ld) stub\n", debugstr_w(szProduct), debugstr_w(szUserName), dwReserved);
+    FIXME("(%s %s %d)\n", debugstr_w(szProduct), debugstr_w(szUserName), dwReserved);
     return ERROR_SUCCESS;
 }
diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c
index 7b54752..5d51e4f 100644
--- a/dlls/msi/suminfo.c
+++ b/dlls/msi/suminfo.c
@@ -163,7 +163,7 @@
         type = get_type( idofs[i].propid );
         if( type == VT_EMPTY )
         {
-            ERR("propid %ld has unknown type\n", idofs[i].propid);
+            ERR("propid %d has unknown type\n", idofs[i].propid);
             break;
         }
 
@@ -172,7 +172,7 @@
         /* check the type is the same as we expect */
         if( type != propdata->type )
         {
-            ERR("wrong type %d != %ld\n", type, propdata->type);
+            ERR("wrong type %d != %d\n", type, propdata->type);
             break;
         }
 
@@ -188,7 +188,7 @@
 
         if( idofs[i].propid >= MSI_MAX_PROPS )
         {
-            ERR("Unknown property ID %ld\n", idofs[i].propid );
+            ERR("Unknown property ID %d\n", idofs[i].propid );
             break;
         }
 
@@ -259,7 +259,7 @@
 
     if( section_hdr.cProperties > MSI_MAX_PROPS )
     {
-        ERR("too many properties %ld\n", section_hdr.cProperties);
+        ERR("too many properties %d\n", section_hdr.cProperties);
         return ret;
     }
 
@@ -275,7 +275,7 @@
     if( SUCCEEDED(r) && count == sz )
         read_properties_from_data( si->property, data, sz + SECT_HDR_SIZE );
     else
-        ERR("failed to read properties %ld %ld\n", count, sz);
+        ERR("failed to read properties %d %d\n", count, sz);
 
     msi_free( data );
     return ret;
@@ -506,7 +506,7 @@
 {
     MSISUMMARYINFO *si;
 
-    TRACE("%ld %p\n",hSummaryInfo, pCount);
+    TRACE("%ld %p\n", hSummaryInfo, pCount);
 
     si = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO );
     if( !si )
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 4eb3f52..455e362 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -208,7 +208,7 @@
         if( FAILED( r ) || !count )
             break;
         decode_streamname( stat.pwcsName, name );
-        TRACE("stream %2ld -> %s %s\n", n, 
+        TRACE("stream %2d -> %s %s\n", n,
               debugstr_w(stat.pwcsName), debugstr_w(name) );
         n++;
     }
@@ -236,14 +236,14 @@
     msi_free( encname );
     if( FAILED( r ) )
     {
-        WARN("open stream failed r = %08lx - empty table?\n",r);
+        WARN("open stream failed r = %08x - empty table?\n", r);
         return ret;
     }
 
     r = IStream_Stat(stm, &stat, STATFLAG_NONAME );
     if( FAILED( r ) )
     {
-        WARN("open stream failed r = %08lx!\n",r);
+        WARN("open stream failed r = %08x!\n", r);
         goto end;
     }
 
@@ -257,7 +257,7 @@
     data = msi_alloc( sz );
     if( !data )
     {
-        WARN("couldn't allocate memory r=%08lx!\n",r);
+        WARN("couldn't allocate memory r=%08x!\n", r);
         ret = ERROR_NOT_ENOUGH_MEMORY;
         goto end;
     }
@@ -266,7 +266,7 @@
     if( FAILED( r ) || ( count != sz ) )
     {
         msi_free( data );
-        WARN("read stream failed r = %08lx!\n",r);
+        WARN("read stream failed r = %08x!\n", r);
         goto end;
     }
 
@@ -326,7 +326,7 @@
     r = IStream_Stat(stm, &stat, STATFLAG_NONAME );
     if( FAILED( r ) )
     {
-        WARN("open stream failed r = %08lx!\n",r);
+        WARN("open stream failed r = %08x!\n", r);
         goto end;
     }
 
@@ -340,7 +340,7 @@
     data = msi_alloc( sz );
     if( !data )
     {
-        WARN("couldn't allocate memory r=%08lx!\n",r);
+        WARN("couldn't allocate memory r=%08x!\n", r);
         ret = ERROR_NOT_ENOUGH_MEMORY;
         goto end;
     }
@@ -349,7 +349,7 @@
     if( FAILED( r ) || ( count != sz ) )
     {
         msi_free( data );
-        WARN("read stream failed r = %08lx!\n",r);
+        WARN("read stream failed r = %08x!\n", r);
         goto end;
     }
 
@@ -385,7 +385,7 @@
     msi_free( encname );
     if( FAILED( r ) )
     {
-        WARN("open stream failed r = %08lx\n",r);
+        WARN("open stream failed r = %08x\n", r);
         return ret;
     }
 
@@ -746,15 +746,15 @@
 
         r = msi_addstring( st, n, data+offset, len, refs );
         if( r != n )
-            ERR("Failed to add string %ld\n", n );
+            ERR("Failed to add string %d\n", n );
         n++;
         offset += len;
     }
 
     if ( datasize != offset )
-        ERR("string table load failed! (%08x != %08lx), please report\n", datasize, offset );
+        ERR("string table load failed! (%08x != %08x), please report\n", datasize, offset );
 
-    TRACE("Loaded %ld strings\n", count);
+    TRACE("Loaded %d strings\n", count);
 
 end:
     msi_free( pool );
diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c
index 63b1d99..d941bc7 100644
--- a/dlls/msi/upgrade.c
+++ b/dlls/msi/upgrade.c
@@ -124,7 +124,7 @@
     while (rc == ERROR_SUCCESS)
     {
         rc = RegEnumValueW(hkey, index, product, &sz, NULL, NULL, NULL, NULL);
-        TRACE("Looking at (%li) %s\n",index,debugstr_w(product));
+        TRACE("Looking at (%i) %s\n",index,debugstr_w(product));
         if (rc == ERROR_SUCCESS)
         {
             WCHAR productid[GUID_SIZE];
@@ -179,7 +179,7 @@
                     (LPBYTE)&check, &sz);
             RegCloseKey(hukey);
             language = MSI_RecordGetString(rec,4);
-            TRACE("Checking languages 0x%lx and %s\n", check, 
+            TRACE("Checking languages %x and %s\n", check, 
                             debugstr_w(language));
             if (!check_language(check, language, attributes))
             {