From 02f995b22e831fd8bc1e41bc1ce594ec4741f5e5 Mon Sep 17 00:00:00 2001 From: winesync Date: Mon, 14 Mar 2022 21:20:29 +0100 Subject: [PATCH] [WINESYNC] msi: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard wine commit id c3135c632f1df0091afd5d0d62855f3dc7abe247 by Hans Leidekker --- dll/win32/msi/action.c | 88 +++++----- dll/win32/msi/appsearch.c | 4 +- dll/win32/msi/assembly.c | 22 +-- dll/win32/msi/automation.c | 45 +++--- dll/win32/msi/classes.c | 16 +- dll/win32/msi/custom.c | 42 ++--- dll/win32/msi/database.c | 51 +++--- dll/win32/msi/dialog.c | 41 +++-- dll/win32/msi/files.c | 22 +-- dll/win32/msi/format.c | 7 +- dll/win32/msi/handle.c | 8 +- dll/win32/msi/insert.c | 2 +- dll/win32/msi/install.c | 64 ++++---- dll/win32/msi/media.c | 13 +- dll/win32/msi/msi.c | 323 ++++++++++++++++--------------------- dll/win32/msi/msiquery.c | 89 +++++----- dll/win32/msi/package.c | 29 ++-- dll/win32/msi/record.c | 54 +++---- dll/win32/msi/registry.c | 219 ++++++++++++------------- dll/win32/msi/script.c | 6 +- dll/win32/msi/source.c | 140 +++++++--------- dll/win32/msi/streams.c | 12 +- dll/win32/msi/string.c | 6 +- dll/win32/msi/suminfo.c | 72 ++++----- dll/win32/msi/table.c | 17 +- dll/win32/msi/upgrade.c | 2 +- 26 files changed, 641 insertions(+), 753 deletions(-) diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c index b3bfa26bea7..403643fa5c8 100644 --- a/dll/win32/msi/action.c +++ b/dll/win32/msi/action.c @@ -2083,7 +2083,7 @@ static UINT calculate_file_cost( MSIPACKAGE *package ) continue; } file_size = msi_get_disk_file_size( package, file->TargetPath ); - TRACE("%s (size %u)\n", debugstr_w(file->TargetPath), file_size); + TRACE("%s (size %lu)\n", debugstr_w(file->TargetPath), file_size); if (file->Version) { @@ -2389,7 +2389,7 @@ static BYTE *parse_value( MSIPACKAGE *package, const WCHAR *value, DWORD len, DW } msi_free(deformated); - TRACE("Data %i bytes(%i)\n",*size,count); + TRACE( "data %lu bytes(%u)\n", *size, count ); } else { @@ -2414,8 +2414,8 @@ static BYTE *parse_value( MSIPACKAGE *package, const WCHAR *value, DWORD len, DW } if (deformated[0] == '-') d = -d; - *(LPDWORD)data = d; - TRACE("DWORD %i\n",*(LPDWORD)data); + *(DWORD *)data = d; + TRACE( "DWORD %lu\n", *(DWORD *)data); msi_free(deformated); } @@ -2508,7 +2508,7 @@ static HKEY open_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path, BO res = RegOpenKeyExW( root, subkey, 0, access, &hkey ); if (res) { - TRACE("failed to open key %s (%d)\n", debugstr_w(subkey), res); + TRACE( "failed to open key %s (%ld)\n", debugstr_w(subkey), res ); msi_free( subkey ); return NULL; } @@ -2772,14 +2772,14 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param) } if (!check_first) { - TRACE("setting value %s of %s type %u\n", debugstr_w(deformated), debugstr_w(uikey), type); + TRACE( "setting value %s of %s type %lu\n", debugstr_w(deformated), debugstr_w(uikey), type ); RegSetValueExW( hkey, deformated, 0, type, new_value, new_size ); } else if (!old_value) { if (deformated || new_size) { - TRACE("setting value %s of %s type %u\n", debugstr_w(deformated), debugstr_w(uikey), type); + TRACE( "setting value %s of %s type %lu\n", debugstr_w(deformated), debugstr_w(uikey), type ); RegSetValueExW( hkey, deformated, 0, type, new_value, new_size ); } } @@ -2863,7 +2863,7 @@ static void delete_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path ) res = RegDeleteKeyExW( root, subkey, access, 0 ); if (res) { - TRACE("failed to delete key %s (%d)\n", debugstr_w(subkey), res); + TRACE( "failed to delete key %s (%ld)\n", debugstr_w(subkey), res ); break; } } while (p); @@ -2878,7 +2878,7 @@ static void delete_value( const MSICOMPONENT *comp, HKEY root, const WCHAR *path if ((hkey = open_key( comp, root, path, FALSE, KEY_SET_VALUE | KEY_QUERY_VALUE ))) { if ((res = RegDeleteValueW( hkey, value ))) - TRACE("failed to delete value %s (%d)\n", debugstr_w(value), res); + TRACE( "failed to delete value %s (%ld)\n", debugstr_w(value), res ); RegCloseKey( hkey ); if (is_key_empty(comp, root, path)) @@ -2896,7 +2896,7 @@ static void delete_tree( const MSICOMPONENT *comp, HKEY root, const WCHAR *path if (!(hkey = open_key( comp, root, path, FALSE, KEY_ALL_ACCESS ))) return; res = RegDeleteTreeW( hkey, NULL ); - if (res) TRACE("failed to delete subtree of %s (%d)\n", debugstr_w(path), res); + if (res) TRACE( "failed to delete subtree of %s (%ld)\n", debugstr_w(path), res ); delete_key( comp, root, path ); RegCloseKey( hkey ); } @@ -3424,7 +3424,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) } res = RegDeleteValueW( hkey, squashed_pc ); RegCloseKey(hkey); - if (res) WARN( "failed to delete component value %d\n", res ); + if (res) WARN( "failed to delete component value %ld\n", res ); } } @@ -3589,7 +3589,7 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param) hr = msi_load_typelib( package, file->TargetPath, REGKIND_REGISTER, &tlib ); if (FAILED(hr)) { - ERR("Failed to load type library: %08x\n", hr); + ERR( "failed to load type library: %#lx\n", hr ); return ERROR_INSTALL_FAILURE; } @@ -3654,7 +3654,7 @@ static UINT ITERATE_UnregisterTypeLibraries( MSIRECORD *row, LPVOID param ) hr = UnRegisterTypeLib( &libid, (version >> 8) & 0xffff, version & 0xff, language, syskind ); if (FAILED(hr)) { - WARN("Failed to unregister typelib: %08x\n", hr); + WARN( "failed to unregister typelib: %#lx\n", hr ); } return ERROR_SUCCESS; @@ -3888,7 +3888,7 @@ static UINT ITERATE_RemoveShortcuts( MSIRECORD *row, LPVOID param ) link_file = get_link_file( package, row ); TRACE("Removing shortcut file %s\n", debugstr_w( link_file )); - if (!msi_delete_file( package, link_file )) WARN("Failed to remove shortcut file %u\n", GetLastError()); + if (!msi_delete_file( package, link_file )) WARN( "failed to remove shortcut file %lu\n", GetLastError() ); msi_free( link_file ); return ERROR_SUCCESS; @@ -4193,7 +4193,7 @@ static UINT msi_publish_patches( MSIPACKAGE *package ) if (patch->filename && !CopyFileW( patch->filename, patch->localfile, FALSE )) { res = GetLastError(); - ERR("Unable to copy patch package %d\n", res); + ERR( "unable to copy patch package %lu\n", res ); goto done; } res = RegCreateKeyExW( product_patches_key, patch_squashed, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &patch_key, NULL ); @@ -4490,7 +4490,7 @@ static UINT ITERATE_RemoveIniValuesOnUninstall( MSIRECORD *row, LPVOID param ) if (!WritePrivateProfileStringW( deformated_section, deformated_key, NULL, filename )) { - WARN("Unable to remove key %u\n", GetLastError()); + WARN( "unable to remove key %lu\n", GetLastError() ); } msi_free( filename ); } @@ -4552,7 +4552,7 @@ static UINT ITERATE_RemoveIniValuesOnInstall( MSIRECORD *row, LPVOID param ) if (!WritePrivateProfileStringW( deformated_section, deformated_key, NULL, filename )) { - WARN("Unable to remove key %u\n", GetLastError()); + WARN( "unable to remove key %lu\n", GetLastError() ); } msi_free( filename ); } @@ -5648,7 +5648,7 @@ static UINT ITERATE_UnpublishComponent( MSIRECORD *rec, LPVOID param ) res = RegDeleteKeyW( HKEY_CURRENT_USER, keypath ); if (res != ERROR_SUCCESS) { - WARN("Unable to delete component key %d\n", res); + WARN( "unable to delete component key %ld\n", res ); } uirow = MSI_CreateRecord( 2 ); @@ -5776,7 +5776,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) { if (GetLastError() != ERROR_SERVICE_EXISTS) { - WARN("Failed to create service %s: %d\n", debugstr_w(name), GetLastError()); + WARN( "failed to create service %s (%lu)\n", debugstr_w(name), GetLastError() ); if (is_vital) ret = ERROR_INSTALL_FAILURE; @@ -5785,7 +5785,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) else if (sd.lpDescription) { if (!ChangeServiceConfig2W(service, SERVICE_CONFIG_DESCRIPTION, &sd)) - WARN("failed to set service description %u\n", GetLastError()); + WARN( "failed to set service description %lu\n", GetLastError() ); } if (image_path != file->TargetPath) msi_free(image_path); @@ -5914,7 +5914,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) service = OpenServiceW(scm, name, SERVICE_START|SERVICE_QUERY_STATUS); if (!service) { - ERR("Failed to open service %s (%u)\n", debugstr_w(name), GetLastError()); + ERR( "failed to open service %s (%lu)\n", debugstr_w(name), GetLastError() ); goto done; } @@ -5923,7 +5923,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) if (!StartServiceW(service, numargs, vector) && GetLastError() != ERROR_SERVICE_ALREADY_RUNNING) { - ERR("Failed to start service %s (%u)\n", debugstr_w(name), GetLastError()); + ERR( "failed to start service %s (%lu)\n", debugstr_w(name), GetLastError() ); goto done; } @@ -5934,7 +5934,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO, (BYTE *)&status, sizeof(SERVICE_STATUS_PROCESS), &dummy)) { - TRACE("failed to query service status (%u)\n", GetLastError()); + TRACE( "failed to query service status (%lu)\n", GetLastError() ); goto done; } start_time = GetTickCount64(); @@ -5945,13 +5945,13 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO, (BYTE *)&status, sizeof(SERVICE_STATUS_PROCESS), &dummy)) { - TRACE("failed to query service status (%u)\n", GetLastError()); + TRACE( "failed to query service status (%lu)\n", GetLastError() ); goto done; } } if (status.dwCurrentState != SERVICE_RUNNING) { - WARN("service failed to start %u\n", status.dwCurrentState); + WARN( "service failed to start %lu\n", status.dwCurrentState ); r = ERROR_FUNCTION_FAILED; } } @@ -6043,24 +6043,20 @@ static UINT stop_service( LPCWSTR name ) scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); if (!scm) { - WARN("Failed to open the SCM: %d\n", GetLastError()); + WARN( "failed to open the SCM (%lu)\n", GetLastError() ); goto done; } - service = OpenServiceW(scm, name, - SERVICE_STOP | - SERVICE_QUERY_STATUS | - SERVICE_ENUMERATE_DEPENDENTS); + service = OpenServiceW(scm, name, SERVICE_STOP | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS); if (!service) { - WARN("Failed to open service (%s): %d\n", debugstr_w(name), GetLastError()); + WARN( "failed to open service %s (%lu)\n", debugstr_w(name), GetLastError() ); goto done; } - if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO, (LPBYTE)&ssp, - sizeof(SERVICE_STATUS_PROCESS), &needed)) + if (!QueryServiceStatusEx( service, SC_STATUS_PROCESS_INFO, (BYTE *)&ssp, sizeof(ssp), &needed) ) { - WARN("Failed to query service status (%s): %d\n", debugstr_w(name), GetLastError()); + WARN( "failed to query service status %s (%lu)\n", debugstr_w(name), GetLastError() ); goto done; } @@ -6070,7 +6066,7 @@ static UINT stop_service( LPCWSTR name ) stop_service_dependents(scm, service); if (!ControlService(service, SERVICE_CONTROL_STOP, &status)) - WARN("Failed to stop service (%s): %d\n", debugstr_w(name), GetLastError()); + WARN( "failed to stop service %s (%lu)\n", debugstr_w(name), GetLastError() ); done: if (service) CloseServiceHandle(service); @@ -6182,7 +6178,7 @@ static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param ) scm = OpenSCManagerW( NULL, NULL, SC_MANAGER_ALL_ACCESS ); if (!scm) { - WARN("Failed to open the SCM: %d\n", GetLastError()); + WARN( "failed to open the SCM (%lu)\n", GetLastError() ); goto done; } @@ -6197,12 +6193,12 @@ static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param ) service = OpenServiceW( scm, name, DELETE ); if (!service) { - WARN("Failed to open service (%s): %u\n", debugstr_w(name), GetLastError()); + WARN( "failed to open service %s (%lu)\n", debugstr_w(name), GetLastError() ); goto done; } if (!DeleteService( service )) - WARN("Failed to delete service (%s): %u\n", debugstr_w(name), GetLastError()); + WARN( "failed to delete service %s (%lu)\n", debugstr_w(name), GetLastError() ); done: uirow = MSI_CreateRecord( 2 ); @@ -6749,7 +6745,7 @@ static UINT env_parse_flags( LPCWSTR *name, LPCWSTR *value, DWORD *flags ) check_flag_combo(*flags, ENV_ACT_REMOVEMATCH | ENV_ACT_SETALWAYS) || check_flag_combo(*flags, ENV_ACT_SETABSENT | ENV_MOD_MASK)) { - ERR("Invalid flags: %08x\n", *flags); + ERR( "invalid flags: %#lx\n", *flags ); return ERROR_FUNCTION_FAILED; } @@ -6779,7 +6775,7 @@ static UINT open_env_key( DWORD flags, HKEY *key ) res = RegOpenKeyExW( root, env, 0, KEY_ALL_ACCESS, key ); if (res != ERROR_SUCCESS) { - WARN("Failed to open key %s (%d)\n", debugstr_w(env), res); + WARN( "failed to open key %s (%ld)\n", debugstr_w(env), res ); return ERROR_FUNCTION_FAILED; } @@ -7107,7 +7103,7 @@ static UINT ITERATE_RemoveEnvironmentString( MSIRECORD *rec, LPVOID param ) TRACE("removing %s\n", debugstr_w(name)); res = RegDeleteValueW( env, name ); if (res != ERROR_SUCCESS) - WARN("failed to delete value %s (%d)\n", debugstr_w(name), res); + WARN( "failed to delete value %s (%ld)\n", debugstr_w(name), res ); } else { @@ -7115,7 +7111,7 @@ static UINT ITERATE_RemoveEnvironmentString( MSIRECORD *rec, LPVOID param ) size = (lstrlenW( new_value ) + 1) * sizeof(WCHAR); res = RegSetValueExW( env, name, 0, type, (BYTE *)new_value, size ); if (res != ERROR_SUCCESS) - WARN("failed to set %s to %s (%d)\n", debugstr_w(name), debugstr_w(new_value), res); + WARN( "failed to set %s to %s (%ld)\n", debugstr_w(name), debugstr_w(new_value), res ); } done: @@ -7231,7 +7227,7 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package ) msiobj_release( &view->hdr ); if (r != ERROR_SUCCESS) return r; - if (count) FIXME("ignored %u rows in ODBCDriver table\n", count); + if (count) FIXME( "ignored %lu rows in ODBCDriver table\n", count ); } r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCTranslator`", &view ); if (r == ERROR_SUCCESS) @@ -7241,7 +7237,7 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package ) msiobj_release( &view->hdr ); if (r != ERROR_SUCCESS) return r; - if (count) FIXME("ignored %u rows in ODBCTranslator table\n", count); + if (count) FIXME( "ignored %lu rows in ODBCTranslator table\n", count ); } return ERROR_SUCCESS; } @@ -7379,7 +7375,7 @@ static void bind_image( MSIPACKAGE *package, const char *filename, const char *p { if (!msi_bind_image( package, filename, path )) { - WARN("failed to bind image %u\n", GetLastError()); + WARN( "failed to bind image %lu\n", GetLastError() ); } } @@ -7449,7 +7445,7 @@ static UINT msi_unimplemented_action_stub( MSIPACKAGE *package, LPCSTR action, L if (r != ERROR_SUCCESS) return r; } - if (count) FIXME("%s: ignored %u rows from %s\n", action, count, debugstr_w(table)); + if (count) FIXME( "%s: ignored %lu rows from %s\n", action, count, debugstr_w(table) ); return ERROR_SUCCESS; } diff --git a/dll/win32/msi/appsearch.c b/dll/win32/msi/appsearch.c index d3a8ccc03f3..77b12156ca8 100644 --- a/dll/win32/msi/appsearch.c +++ b/dll/win32/msi/appsearch.c @@ -139,7 +139,7 @@ static UINT get_signature( MSIPACKAGE *package, MSISIGNATURE *sig, const WCHAR * TRACE("MaxVersion is %d.%d.%d.%d\n", HIWORD(sig->MaxVersionMS), LOWORD(sig->MaxVersionMS), HIWORD(sig->MaxVersionLS), LOWORD(sig->MaxVersionLS)); - TRACE("MinSize is %d, MaxSize is %d;\n", sig->MinSize, sig->MaxSize); + TRACE("MinSize is %lu, MaxSize is %lu\n", sig->MinSize, sig->MaxSize); TRACE("Languages is %s\n", debugstr_w(sig->Languages)); msiobj_release( &row->hdr ); @@ -336,7 +336,7 @@ static void convert_reg_value( DWORD regType, const BYTE *value, DWORD sz, WCHAR swprintf(ptr, 3, L"%02X", value[i]); break; default: - WARN("unimplemented for values of type %d\n", regType); + WARN( "unimplemented for values of type %lu\n", regType ); *appValue = NULL; } } diff --git a/dll/win32/msi/assembly.c b/dll/win32/msi/assembly.c index 9cddfd2e68d..9f75a9c0281 100644 --- a/dll/win32/msi/assembly.c +++ b/dll/win32/msi/assembly.c @@ -233,7 +233,7 @@ static BOOL is_assembly_installed( IAssemblyCache *cache, const WCHAR *display_n { return (info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED); } - TRACE("QueryAssemblyInfo returned 0x%08x\n", hr); + TRACE( "QueryAssemblyInfo returned %#lx\n", hr ); return FALSE; } @@ -337,7 +337,7 @@ MSIASSEMBLY *msi_load_assembly( MSIPACKAGE *package, MSICOMPONENT *comp ) TRACE("application %s\n", debugstr_w(a->application)); a->attributes = MSI_RecordGetInteger( rec, 5 ); - TRACE("attributes %u\n", a->attributes); + TRACE( "attributes %lu\n", a->attributes ); if (!(a->display_name = get_assembly_display_name( package->db, comp->Component, a ))) { @@ -445,7 +445,7 @@ UINT msi_install_assembly( MSIPACKAGE *package, MSICOMPONENT *comp ) hr = IAssemblyCache_InstallAssembly( cache, 0, manifest, NULL ); if (hr != S_OK) { - ERR("Failed to install assembly %s (0x%08x)\n", debugstr_w(manifest), hr); + ERR( "failed to install assembly %s (%#lx)\n", debugstr_w(manifest), hr ); return ERROR_FUNCTION_FAILED; } if (feature) feature->Action = INSTALLSTATE_LOCAL; @@ -474,7 +474,7 @@ UINT msi_uninstall_assembly( MSIPACKAGE *package, MSICOMPONENT *comp ) { cache = package->cache_sxs; hr = IAssemblyCache_UninstallAssembly( cache, 0, assembly->display_name, NULL, NULL ); - if (FAILED( hr )) WARN("failed to uninstall assembly 0x%08x\n", hr); + if (FAILED( hr )) WARN( "failed to uninstall assembly %#lx\n", hr ); } else { @@ -486,7 +486,7 @@ UINT msi_uninstall_assembly( MSIPACKAGE *package, MSICOMPONENT *comp ) if (cache) { hr = IAssemblyCache_UninstallAssembly( cache, 0, assembly->display_name, NULL, NULL ); - if (FAILED( hr )) WARN("failed to uninstall assembly 0x%08x\n", hr); + if (FAILED( hr )) WARN( "failed to uninstall assembly %#lx\n", hr ); } } } @@ -638,7 +638,7 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package ) } if ((res = open_local_assembly_key( package->Context, win32, file->TargetPath, &hkey ))) { - WARN("failed to open local assembly key %d\n", res); + WARN( "failed to open local assembly key %ld\n", res ); return ERROR_FUNCTION_FAILED; } } @@ -646,14 +646,14 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package ) { if ((res = open_global_assembly_key( package->Context, win32, &hkey ))) { - WARN("failed to open global assembly key %d\n", res); + WARN( "failed to open global assembly key %ld\n", res ); return ERROR_FUNCTION_FAILED; } } size = sizeof(buffer); if ((res = RegSetValueExW( hkey, assembly->display_name, 0, REG_MULTI_SZ, (const BYTE *)buffer, size ))) { - WARN("failed to set assembly value %d\n", res); + WARN( "failed to set assembly value %ld\n", res ); } RegCloseKey( hkey ); @@ -699,17 +699,17 @@ UINT ACTION_MsiUnpublishAssemblies( MSIPACKAGE *package ) continue; } if ((res = delete_local_assembly_key( package->Context, win32, file->TargetPath ))) - WARN("failed to delete local assembly key %d\n", res); + WARN( "failed to delete local assembly key %ld\n", res ); } else { HKEY hkey; if ((res = open_global_assembly_key( package->Context, win32, &hkey ))) - WARN("failed to delete global assembly key %d\n", res); + WARN( "failed to delete global assembly key %ld\n", res ); else { if ((res = RegDeleteValueW( hkey, assembly->display_name ))) - WARN("failed to delete global assembly value %d\n", res); + WARN( "failed to delete global assembly value %ld\n", res ); RegCloseKey( hkey ); } } diff --git a/dll/win32/msi/automation.c b/dll/win32/msi/automation.c index 80d6b8a66ba..f8fd8cc1449 100644 --- a/dll/win32/msi/automation.c +++ b/dll/win32/msi/automation.c @@ -265,7 +265,7 @@ static HRESULT WINAPI AutomationObject_GetTypeInfo( AutomationObject *This = impl_from_IDispatch(iface); HRESULT hr; - TRACE("(%p/%p)->(%d,%d,%p)\n", iface, This, iTInfo, lcid, ppTInfo); + TRACE( "(%p/%p)->(%u, %ld, %p)\n", iface, This, iTInfo, lcid, ppTInfo ); hr = get_typeinfo(This->tid, ppTInfo); if (FAILED(hr)) @@ -287,7 +287,7 @@ static HRESULT WINAPI AutomationObject_GetIDsOfNames( ITypeInfo *ti; HRESULT hr; - TRACE("(%p/%p)->(%s, %p, %d, %d, %p)\n", iface, This, + TRACE("(%p/%p)->(%s, %p, %u, %ld, %p)\n", iface, This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); if (!IsEqualGUID(riid, &IID_NULL)) return E_INVALIDARG; @@ -331,7 +331,7 @@ static HRESULT WINAPI AutomationObject_Invoke( BSTR bstrName = NULL; ITypeInfo *ti; - TRACE("(%p/%p)->(%d, %s, %d, %d, %p, %p, %p, %p)\n", iface, This, + TRACE("(%p/%p)->(%ld, %s, %ld, %d, %p, %p, %p, %p)\n", iface, This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); @@ -362,14 +362,14 @@ static HRESULT WINAPI AutomationObject_Invoke( if (TRACE_ON(msi)) { ITypeInfo_GetDocumentation(ti, dispIdMember, &bstrName, NULL, NULL, NULL); - TRACE("Method %d, %s\n", dispIdMember, debugstr_w(bstrName)); + TRACE("method %ld, %s\n", dispIdMember, debugstr_w(bstrName)); } hr = tid_ids[This->tid].fn_invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr); if (hr == DISP_E_MEMBERNOTFOUND) { if (bstrName == NULL) ITypeInfo_GetDocumentation(ti, dispIdMember, &bstrName, NULL, NULL, NULL); - FIXME("Method %d, %s wflags %d not implemented, clsid %s\n", dispIdMember, debugstr_w(bstrName), wFlags, + FIXME("method %ld, %s wflags %d not implemented, clsid %s\n", dispIdMember, debugstr_w(bstrName), wFlags, debugstr_guid(get_riid_from_tid(This->tid))); } else if (pExcepInfo && @@ -383,7 +383,7 @@ static HRESULT WINAPI AutomationObject_Invoke( if (FAILED(ITypeInfo_GetNames(ti, dispIdMember, bstrParamNames, MAX_FUNC_PARAMS, &namesNo))) { - TRACE("Failed to retrieve names for dispIdMember %d\n", dispIdMember); + TRACE("failed to retrieve names for dispIdMember %ld\n", dispIdMember); } else { @@ -412,7 +412,7 @@ static HRESULT WINAPI AutomationObject_Invoke( /* Free function name if we retrieved it */ SysFreeString(bstrName); - TRACE("Returning 0x%08x, %s\n", hr, SUCCEEDED(hr) ? "ok" : "not ok"); + TRACE("returning %#lx, %s\n", hr, SUCCEEDED(hr) ? "ok" : "not ok"); return hr; } @@ -470,7 +470,7 @@ static HRESULT WINAPI ProvideMultipleClassInfo_GetClassInfo(IProvideMultipleClas static HRESULT WINAPI ProvideMultipleClassInfo_GetGUID(IProvideMultipleClassInfo* iface, DWORD dwGuidKind, GUID* pGUID) { AutomationObject *This = impl_from_IProvideMultipleClassInfo(iface); - TRACE("(%p/%p)->(%d,%s)\n", iface, This, dwGuidKind, debugstr_guid(pGUID)); + TRACE("(%p/%p)->(%lu, %s)\n", iface, This, dwGuidKind, debugstr_guid(pGUID)); if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID) return E_INVALIDARG; @@ -500,7 +500,8 @@ static HRESULT WINAPI ProvideMultipleClassInfo_GetInfoOfIndex(IProvideMultipleCl { AutomationObject *This = impl_from_IProvideMultipleClassInfo(iface); - TRACE("(%p/%p)->(%d,%d,%p,%p,%p,%p,%p)\n", iface, This, iti, dwFlags, ti, pdwTIFlags, pcdispidReserved, piidPrimary, piidSource); + TRACE("(%p/%p)->(%lu, %#lx, %p, %p, %p, %p, %p)\n", iface, This, iti, dwFlags, ti, pdwTIFlags, pcdispidReserved, + piidPrimary, piidSource); if (iti != 0) return E_INVALIDARG; @@ -542,7 +543,7 @@ static const IProvideMultipleClassInfoVtbl ProvideMultipleClassInfoVtbl = static void init_automation_object(AutomationObject *This, MSIHANDLE msiHandle, tid_t tid) { - TRACE("(%p, %d, %s)\n", This, msiHandle, debugstr_guid(get_riid_from_tid(tid))); + TRACE("%p, %lu, %s\n", This, msiHandle, debugstr_guid(get_riid_from_tid(tid))); This->IDispatch_iface.lpVtbl = &AutomationObjectVtbl; This->IProvideMultipleClassInfo_iface.lpVtbl = &ProvideMultipleClassInfoVtbl; @@ -618,7 +619,7 @@ static HRESULT WINAPI ListEnumerator_Next(IEnumVARIANT* iface, ULONG celt, VARIA ListEnumerator *This = impl_from_IEnumVARIANT(iface); ULONG i, local; - TRACE("(%p, %uld, %p, %p)\n", iface, celt, rgVar, fetched); + TRACE("%p, %lu, %p, %p\n", iface, celt, rgVar, fetched); if (fetched) *fetched = 0; @@ -641,7 +642,7 @@ static HRESULT WINAPI ListEnumerator_Skip(IEnumVARIANT* iface, ULONG celt) { ListEnumerator *This = impl_from_IEnumVARIANT(iface); - TRACE("(%p,%uld)\n", iface, celt); + TRACE("%p, %lu\n", iface, celt); This->pos += celt; if (This->pos >= This->list->count) @@ -1030,7 +1031,7 @@ static HRESULT list_invoke( if (SUCCEEDED(hr = create_list_enumerator(list, (LPVOID *)&pUnk))) V_UNKNOWN(pVarResult) = pUnk; else - ERR("Failed to create IEnumVARIANT object, hresult 0x%08x\n", hr); + ERR("failed to create IEnumVARIANT object, hresult %#lx\n", hr); } else return DISP_E_MEMBERNOTFOUND; break; @@ -1189,7 +1190,7 @@ static HRESULT view_invoke( if ((ret = MsiViewFetch(This->msiHandle, &msiHandle)) == ERROR_SUCCESS) { if (FAILED(hr = create_record(msiHandle, &V_DISPATCH(pVarResult)))) - ERR("Failed to create Record object, hresult 0x%08x\n", hr); + ERR("failed to create Record object, hresult %#lx\n", hr); } else if (ret == ERROR_NO_MORE_ITEMS) V_DISPATCH(pVarResult) = NULL; @@ -1289,7 +1290,7 @@ HRESULT database_invoke( if (SUCCEEDED(hr)) V_DISPATCH(pVarResult) = dispatch; else - ERR("Failed to create SummaryInfo object: 0x%08x\n", hr); + ERR("failed to create SummaryInfo object: %#lx\n", hr); } else { @@ -1311,7 +1312,7 @@ HRESULT database_invoke( if (SUCCEEDED(hr = create_view(msiHandle, &dispatch))) V_DISPATCH(pVarResult) = dispatch; else - ERR("Failed to create View object, hresult 0x%08x\n", hr); + ERR("failed to create View object, hresult %#lx\n", hr); } else { @@ -1447,7 +1448,7 @@ static HRESULT session_invoke( if (SUCCEEDED(hr = create_database(msiHandle, &dispatch))) V_DISPATCH(pVarResult) = dispatch; else - ERR("Failed to create Database object, hresult 0x%08x\n", hr); + ERR("failed to create Database object, hresult %#lx\n", hr); } else { @@ -1617,11 +1618,11 @@ static void variant_from_registry_value(VARIANT *pVarResult, DWORD dwType, LPBYT case REG_EXPAND_SZ: if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString, dwNewSize))) - ERR("ExpandEnvironmentStrings returned error %d\n", GetLastError()); + ERR("ExpandEnvironmentStrings returned error %lu\n", GetLastError()); else if (!(szNewString = msi_alloc(dwNewSize * sizeof(WCHAR)))) ERR("Out of memory\n"); else if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString, dwNewSize))) - ERR("ExpandEnvironmentStrings returned error %d\n", GetLastError()); + ERR("ExpandEnvironmentStrings returned error %lu\n", GetLastError()); else { V_VT(pVarResult) = VT_BSTR; @@ -1650,7 +1651,7 @@ static void variant_from_registry_value(VARIANT *pVarResult, DWORD dwType, LPBYT break; default: - FIXME("Unhandled registry value type %d\n", dwType); + FIXME("Unhandled registry value type %lu\n", dwType); } } @@ -2455,7 +2456,7 @@ static HRESULT create_database(MSIHANDLE msiHandle, IDispatch **dispatch) { AutomationObject *database; - TRACE("(%d %p)\n", msiHandle, dispatch); + TRACE("%lu %p\n", msiHandle, dispatch); database = msi_alloc(sizeof(AutomationObject)); if (!database) return E_OUTOFMEMORY; @@ -2471,7 +2472,7 @@ static HRESULT create_view(MSIHANDLE msiHandle, IDispatch **dispatch) { AutomationObject *view; - TRACE("(%d %p)\n", msiHandle, dispatch); + TRACE("%lu %p\n", msiHandle, dispatch); view = msi_alloc(sizeof(AutomationObject)); if (!view) return E_OUTOFMEMORY; diff --git a/dll/win32/msi/classes.c b/dll/win32/msi/classes.c index 52a91b306f1..b2c94fa0ff5 100644 --- a/dll/win32/msi/classes.c +++ b/dll/win32/msi/classes.c @@ -911,7 +911,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package ) res = RegDeleteTreeW( hkey, cls->clsid ); if (res != ERROR_SUCCESS) - WARN("Failed to delete class key %d\n", res); + WARN("failed to delete class key %ld\n", res); if (cls->AppID) { @@ -920,7 +920,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package ) { res = RegDeleteKeyW( hkey2, cls->AppID->AppID ); if (res != ERROR_SUCCESS) - WARN("Failed to delete appid key %d\n", res); + WARN("failed to delete appid key %ld\n", res); RegCloseKey( hkey2 ); } } @@ -935,7 +935,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package ) msi_free( filetype ); if (res != ERROR_SUCCESS) - WARN("Failed to delete file type %d\n", res); + WARN("failed to delete file type %ld\n", res); } } @@ -1111,7 +1111,7 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package ) res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID ); if (res != ERROR_SUCCESS) - TRACE("Failed to delete progid key %d\n", res); + TRACE("failed to delete progid key %ld\n", res); uirow = MSI_CreateRecord( 1 ); MSI_RecordSetStringW( uirow, 1, progid->ProgID ); @@ -1256,7 +1256,7 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package) res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey ); msi_free( extension ); if (res != ERROR_SUCCESS) - WARN("Failed to create extension key %d\n", res); + WARN("failed to create extension key %ld\n", res); } if (ext->Mime) @@ -1355,7 +1355,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package ) res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension ); msi_free( extension ); if (res != ERROR_SUCCESS) - WARN("Failed to delete extension key %d\n", res); + WARN("failed to delete extension key %ld\n", res); } if (ext->ProgID || ext->ProgIDText) @@ -1376,7 +1376,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package ) res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell ); msi_free( progid_shell ); if (res != ERROR_SUCCESS) - WARN("Failed to delete shell key %d\n", res); + WARN("failed to delete shell key %ld\n", res); RegDeleteKeyW( HKEY_CLASSES_ROOT, progid ); } } @@ -1482,7 +1482,7 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package ) lstrcatW( mime_key, mime->ContentType ); res = RegDeleteKeyW( HKEY_CLASSES_ROOT, mime_key ); if (res != ERROR_SUCCESS) - WARN("Failed to delete MIME key %d\n", res); + WARN("failed to delete MIME key %ld\n", res); msi_free( mime_key ); } diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c index e33acad3005..143de262971 100644 --- a/dll/win32/msi/custom.c +++ b/dll/win32/msi/custom.c @@ -321,7 +321,7 @@ static UINT custom_get_process_return( HANDLE process ) DWORD rc = 0; GetExitCodeProcess( process, &rc ); - TRACE("exit code is %u\n", rc); + TRACE( "exit code is %lu\n", rc ); if (rc != 0) return ERROR_FUNCTION_FAILED; return ERROR_SUCCESS; @@ -346,7 +346,7 @@ static UINT custom_get_thread_return( MSIPACKAGE *package, HANDLE thread ) ACTION_ForceReboot( package ); return ERROR_SUCCESS; default: - ERR("Invalid Return Code %d\n",rc); + ERR( "invalid Return Code %lu\n", rc ); return ERROR_INSTALL_FAILURE; } } @@ -527,13 +527,13 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid) status = RpcStringBindingComposeW(NULL, (WCHAR *)L"ncalrpc", NULL, endpoint, NULL, &binding_str); if (status != RPC_S_OK) { - ERR("RpcStringBindingCompose failed: %#x\n", status); + ERR("RpcStringBindingCompose failed: %#lx\n", status); return status; } status = RpcBindingFromStringBindingW(binding_str, &rpc_handle); if (status != RPC_S_OK) { - ERR("RpcBindingFromStringBinding failed: %#x\n", status); + ERR("RpcBindingFromStringBinding failed: %#lx\n", status); return status; } RpcStringFreeW(&binding_str); @@ -546,7 +546,7 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid) hPackage = alloc_msi_remote_handle( remote_package ); if (!hPackage) { - ERR( "failed to create handle for %x\n", remote_package ); + ERR( "failed to create handle for %#lx\n", remote_package ); midl_user_free( action ); midl_user_free( dll ); midl_user_free( proc ); @@ -556,7 +556,7 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid) hModule = LoadLibraryW( dll ); if (!hModule) { - ERR( "failed to load dll %s (%u)\n", debugstr_w( dll ), GetLastError() ); + ERR( "failed to load dll %s (%lu)\n", debugstr_w( dll ), GetLastError() ); midl_user_free( action ); midl_user_free( dll ); midl_user_free( proc ); @@ -576,7 +576,7 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid) } __EXCEPT_PAGE_FAULT { - ERR( "Custom action (%s:%s) caused a page fault: %08x\n", + ERR( "Custom action (%s:%s) caused a page fault: %#lx\n", debugstr_w(dll), debugstr_a(proc), GetExceptionCode() ); r = ERROR_SUCCESS; } @@ -611,7 +611,7 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch) pipe = CreateNamedPipeW(buffer, PIPE_ACCESS_DUPLEX, 0, 1, sizeof(DWORD64), sizeof(GUID), 0, NULL); if (pipe == INVALID_HANDLE_VALUE) - ERR("Failed to create custom action client pipe: %u\n", GetLastError()); + ERR("failed to create custom action client pipe: %lu\n", GetLastError()); if ((sizeof(void *) == 8 || is_wow64) && arch == SCS_32BIT_BINARY) GetSystemWow64DirectoryW(path, MAX_PATH - ARRAY_SIZE(L"\\msiexec.exe")); @@ -644,7 +644,7 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch) if (!ConnectNamedPipe(pipe, NULL)) { - ERR("Failed to connect to custom action server: %u\n", GetLastError()); + ERR("failed to connect to custom action server: %lu\n", GetLastError()); return GetLastError(); } @@ -689,13 +689,13 @@ static DWORD WINAPI custom_client_thread(void *arg) if (!WriteFile(pipe, &info->guid, sizeof(info->guid), &size, NULL) || size != sizeof(info->guid)) { - ERR("Failed to write to custom action client pipe: %u\n", GetLastError()); + ERR("failed to write to custom action client pipe: %lu\n", GetLastError()); LeaveCriticalSection(&msi_custom_action_cs); return GetLastError(); } if (!ReadFile(pipe, &thread64, sizeof(thread64), &size, NULL) || size != sizeof(thread64)) { - ERR("Failed to read from custom action client pipe: %u\n", GetLastError()); + ERR("failed to read from custom action client pipe: %lu\n", GetLastError()); LeaveCriticalSection(&msi_custom_action_cs); return GetLastError(); } @@ -793,7 +793,7 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll( endpoint, NULL); if (status != RPC_S_OK) { - ERR("RpcServerUseProtseqEp failed: %#x\n", status); + ERR("RpcServerUseProtseqEp failed: %#lx\n", status); return NULL; } @@ -801,7 +801,7 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll( RPC_IF_AUTOLISTEN, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); if (status != RPC_S_OK) { - ERR("RpcServerRegisterIfEx failed: %#x\n", status); + ERR("RpcServerRegisterIfEx failed: %#lx\n", status); return NULL; } @@ -869,7 +869,7 @@ static HANDLE execute_command( const WCHAR *app, WCHAR *arg, const WCHAR *dir ) } if (!len_exe) { - ERR("can't find executable %u\n", GetLastError()); + ERR("can't find executable %lu\n", GetLastError()); msi_free( exe ); return INVALID_HANDLE_VALUE; } @@ -907,7 +907,7 @@ static HANDLE execute_command( const WCHAR *app, WCHAR *arg, const WCHAR *dir ) msi_free( exe ); if (!ret) { - ERR("unable to execute command %u\n", GetLastError()); + ERR("unable to execute command %lu\n", GetLastError()); return INVALID_HANDLE_VALUE; } CloseHandle( info.hThread ); @@ -1062,27 +1062,27 @@ static UINT write_substorage_to_file( MSIPACKAGE *package, const WCHAR *source, hr = StgCreateDocfile( filename, STGM_CREATE|STGM_TRANSACTED|STGM_WRITE|STGM_SHARE_EXCLUSIVE, 0, &dst ); if (FAILED( hr )) { - WARN( "can't open destination storage %s (%08x)\n", debugstr_w(filename), hr ); + WARN( "can't open destination storage %s (%#lx)\n", debugstr_w(filename), hr ); goto done; } hr = IStorage_OpenStorage( package->db->storage, source, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &src ); if (FAILED( hr )) { - WARN( "can't open source storage %s (%08x)\n", debugstr_w(source), hr ); + WARN( "can't open source storage %s (%#lx)\n", debugstr_w(source), hr ); goto done; } hr = IStorage_CopyTo( src, 0, NULL, NULL, dst ); if (FAILED( hr )) { - ERR( "failed to copy storage %s (%08x)\n", debugstr_w(source), hr ); + ERR( "failed to copy storage %s (%#lx)\n", debugstr_w(source), hr ); goto done; } hr = IStorage_Commit( dst, 0 ); if (FAILED( hr )) - ERR( "failed to commit storage (%08x)\n", hr ); + ERR( "failed to commit storage (%#lx)\n", hr ); else r = ERROR_SUCCESS; @@ -1200,11 +1200,11 @@ static DWORD WINAPI ScriptThread( LPVOID arg ) LPGUID guid = arg; DWORD rc; - TRACE("custom action (%x) started\n", GetCurrentThreadId() ); + TRACE("custom action (%#lx) started\n", GetCurrentThreadId() ); rc = ACTION_CallScript( guid ); - TRACE("custom action (%x) returned %i\n", GetCurrentThreadId(), rc ); + TRACE("custom action (%#lx) returned %lu\n", GetCurrentThreadId(), rc ); MsiCloseAllHandles(); return rc; diff --git a/dll/win32/msi/database.c b/dll/win32/msi/database.c index dd5a6977460..f7305e661ef 100644 --- a/dll/win32/msi/database.c +++ b/dll/win32/msi/database.c @@ -108,7 +108,7 @@ static HRESULT db_initialize( IStorage *stg, const GUID *clsid ) hr = IStorage_SetClass( stg, clsid ); if (FAILED( hr )) { - WARN("failed to set class id 0x%08x\n", hr); + WARN("failed to set class id %#lx\n", hr); return hr; } @@ -116,21 +116,21 @@ static HRESULT db_initialize( IStorage *stg, const GUID *clsid ) hr = write_stream_data( stg, L"_Tables", NULL, 0, TRUE ); if (FAILED( hr )) { - WARN("failed to create _Tables stream 0x%08x\n", hr); + WARN("failed to create _Tables stream %#lx\n", hr); return hr; } hr = msi_init_string_table( stg ); if (FAILED( hr )) { - WARN("failed to initialize string table 0x%08x\n", hr); + WARN("failed to initialize string table %#lx\n", hr); return hr; } hr = IStorage_Commit( stg, 0 ); if (FAILED( hr )) { - WARN("failed to commit changes 0x%08x\n", hr); + WARN("failed to commit changes %#lx\n", hr); return hr; } @@ -217,7 +217,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb) if( FAILED( r ) || !stg ) { - WARN("open failed r = %08x for %s\n", r, debugstr_w(szDBPath)); + WARN("open failed r = %#lx for %s\n", r, debugstr_w(szDBPath)); return ERROR_FUNCTION_FAILED; } @@ -513,7 +513,7 @@ static LPWSTR msi_build_createsql_columns(LPWSTR *columns_data, LPWSTR *types, D type = L"LONG"; else { - WARN("invalid int width %u\n", len); + WARN("invalid int width %lu\n", len); msi_free(columns); return NULL; } @@ -835,12 +835,12 @@ done: return r; } -UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFilename) +UINT WINAPI MsiDatabaseImportW( MSIHANDLE handle, const WCHAR *szFolder, const WCHAR *szFilename ) { MSIDATABASE *db; UINT r; - TRACE("%x %s %s\n",handle,debugstr_w(szFolder), debugstr_w(szFilename)); + TRACE( "%lu %s %s\n", handle, debugstr_w(szFolder), debugstr_w(szFilename) ); if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE))) return ERROR_INVALID_HANDLE; @@ -850,13 +850,12 @@ UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFil return r; } -UINT WINAPI MsiDatabaseImportA( MSIHANDLE handle, - LPCSTR szFolder, LPCSTR szFilename ) +UINT WINAPI MsiDatabaseImportA( MSIHANDLE handle, const char *szFolder, const char *szFilename ) { - LPWSTR path = NULL, file = NULL; + WCHAR *path = NULL, *file = NULL; UINT r = ERROR_OUTOFMEMORY; - TRACE("%x %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename)); + TRACE( "%lu %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename) ); if( szFolder ) { @@ -1141,14 +1140,12 @@ done: * * row4 : data data data ... data */ -UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable, - LPCWSTR szFolder, LPCWSTR szFilename ) +UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, const WCHAR *szTable, const WCHAR *szFolder, const WCHAR *szFilename ) { MSIDATABASE *db; UINT r; - TRACE("%x %s %s %s\n", handle, debugstr_w(szTable), - debugstr_w(szFolder), debugstr_w(szFilename)); + TRACE( "%lu %s %s %s\n", handle, debugstr_w(szTable), debugstr_w(szFolder), debugstr_w(szFilename) ); if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE))) return ERROR_INVALID_HANDLE; @@ -1158,14 +1155,12 @@ UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable, return r; } -UINT WINAPI MsiDatabaseExportA( MSIHANDLE handle, LPCSTR szTable, - LPCSTR szFolder, LPCSTR szFilename ) +UINT WINAPI MsiDatabaseExportA( MSIHANDLE handle, const char *szTable, const char *szFolder, const char *szFilename ) { - LPWSTR path = NULL, file = NULL, table = NULL; + WCHAR *path = NULL, *file = NULL, *table = NULL; UINT r = ERROR_OUTOFMEMORY; - TRACE("%x %s %s %s\n", handle, debugstr_a(szTable), - debugstr_a(szFolder), debugstr_a(szFilename)); + TRACE( "%lu %s %s %s\n", handle, debugstr_a(szTable), debugstr_a(szFolder), debugstr_a(szFilename) ); if( szTable ) { @@ -1198,14 +1193,12 @@ end: return r; } -UINT WINAPI MsiDatabaseMergeA(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, - LPCSTR szTableName) +UINT WINAPI MsiDatabaseMergeA( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, const char *szTableName ) { UINT r; - LPWSTR table; + WCHAR *table; - TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge, - debugstr_a(szTableName)); + TRACE("%lu, %lu, %s\n", hDatabase, hDatabaseMerge, debugstr_a(szTableName) ); table = strdupAtoW(szTableName); r = MsiDatabaseMergeW(hDatabase, hDatabaseMerge, table); @@ -1839,7 +1832,7 @@ static UINT update_merge_errors(MSIDATABASE *db, LPCWSTR error, return r; } -UINT WINAPI MsiDatabaseMergeW(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, LPCWSTR szTableName) +UINT WINAPI MsiDatabaseMergeW( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, const WCHAR *szTableName ) { struct list tabledata = LIST_INIT(tabledata); struct list *item, *cursor; @@ -1848,7 +1841,7 @@ UINT WINAPI MsiDatabaseMergeW(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, LPC BOOL conflicts; UINT r; - TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge, debugstr_w(szTableName)); + TRACE( "%lu, %lu, %s\n", hDatabase, hDatabaseMerge, debugstr_w(szTableName) ); if (szTableName && !*szTableName) return ERROR_INVALID_TABLE; @@ -1906,7 +1899,7 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle ) MSIDBSTATE ret = MSIDBSTATE_READ; MSIDATABASE *db; - TRACE("%d\n", handle); + TRACE( "%lu\n", handle ); if (!(db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ))) return MSIDBSTATE_ERROR; diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c index bc0c0fa3290..8e4c1511081 100644 --- a/dll/win32/msi/dialog.c +++ b/dll/win32/msi/dialog.c @@ -590,7 +590,7 @@ static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control, val1 = MSI_RecordGetInteger( rec, 2 ); val2 = MSI_RecordGetInteger( rec, 3 ); - TRACE("progress: func %u val1 %u val2 %u\n", func, val1, val2); + TRACE( "progress: func %lu val1 %lu val2 %lu\n", func, val1, val2 ); units = val1 / 512; switch (func) @@ -633,7 +633,7 @@ static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control, ctrl->progress_max += units; break; default: - FIXME("Unknown progress message %u\n", func); + FIXME( "unknown progress message %lu\n", func ); break; } } @@ -730,8 +730,7 @@ static msi_control *msi_dialog_add_control( msi_dialog *dialog, attributes = MSI_RecordGetInteger( rec, 8 ); if (wcscmp( control_type, L"ScrollableText" )) text = MSI_RecordGetString( rec, 10 ); - TRACE("%s, %s, %08x, %s, %08x\n", debugstr_w(szCls), debugstr_w(name), - attributes, debugstr_w(text), style); + TRACE( "%s, %s, %#lx, %s, %#lx\n", debugstr_w(szCls), debugstr_w(name), attributes, debugstr_w(text), style ); if( attributes & msidbControlAttributesVisible ) style |= WS_VISIBLE; @@ -773,7 +772,7 @@ MSIText_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) struct msi_text_info *info; LRESULT r = 0; - TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam); + TRACE( "%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam ); info = GetPropW(hWnd, L"MSIDATA"); @@ -1247,7 +1246,7 @@ MSIScrollText_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) struct msi_scrolltext_info *info; HRESULT r; - TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam); + TRACE( "%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam ); info = GetPropW( hWnd, L"MSIDATA" ); @@ -1287,7 +1286,7 @@ msi_richedit_stream_in( DWORD_PTR arg, LPBYTE buffer, LONG count, LONG *pcb ) *pcb = count; info->offset += count; - TRACE("%d/%d\n", info->offset, info->length); + TRACE( "%lu/%lu\n", info->offset, info->length ); return 0; } @@ -1428,7 +1427,7 @@ static LRESULT WINAPI MSIComboBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LP LRESULT r; DWORD j; - TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam); + TRACE( "%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam ); info = GetPropW( hWnd, L"MSIDATA" ); if (!info) @@ -1828,7 +1827,7 @@ MSIMaskedEdit_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) struct msi_maskedit_info *info; HRESULT r; - TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam); + TRACE("%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam); info = GetPropW(hWnd, L"MSIDATA"); @@ -2163,7 +2162,7 @@ static LRESULT WINAPI MSIPathEdit_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LP struct msi_pathedit_info *info = GetPropW(hWnd, L"MSIDATA"); LRESULT r = 0; - TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam); + TRACE("%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam); if ( msg == WM_KILLFOCUS ) { @@ -2262,7 +2261,7 @@ static LRESULT WINAPI MSIRadioGroup_WndProc( HWND hWnd, UINT msg, WPARAM wParam, WNDPROC oldproc = (WNDPROC)GetPropW( hWnd, L"MSIDATA" ); LRESULT r; - TRACE("hWnd %p msg %04x wParam 0x%08lx lParam 0x%08lx\n", hWnd, msg, wParam, lParam); + TRACE( "hWnd %p msg %04x wParam %#Ix lParam %#Ix\n", hWnd, msg, wParam, lParam ); if (msg == WM_COMMAND) /* Forward notifications to dialog */ SendMessageW( GetParent( hWnd ), msg, wParam, lParam ); @@ -2463,7 +2462,7 @@ MSISelectionTree_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) TVHITTESTINFO tvhti; HRESULT r; - TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam); + TRACE("%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam); info = GetPropW(hWnd, L"MSIDATA"); @@ -2714,7 +2713,7 @@ static LRESULT WINAPI MSIListBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPA LRESULT r; DWORD j; - TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam); + TRACE("%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam); info = GetPropW( hWnd, L"MSIDATA" ); if (!info) @@ -3792,7 +3791,7 @@ static LRESULT msi_dialog_oncommand( msi_dialog *dialog, WPARAM param, HWND hwnd { msi_control *control = NULL; - TRACE("%p %p %08lx\n", dialog, hwnd, param); + TRACE( "%p, %#Ix, %p\n", dialog, param, hwnd ); switch (param) { @@ -4214,7 +4213,7 @@ UINT WINAPI MsiEnableUIPreview( MSIHANDLE hdb, MSIHANDLE *phPreview ) MSIPREVIEW *preview; UINT r = ERROR_FUNCTION_FAILED; - TRACE("%d %p\n", hdb, phPreview); + TRACE( "%lu %p\n", hdb, phPreview ); if (!(db = msihandle2msiinfo(hdb, MSIHANDLETYPE_DATABASE))) return ERROR_INVALID_HANDLE; @@ -4264,7 +4263,7 @@ UINT WINAPI MsiPreviewDialogW( MSIHANDLE hPreview, LPCWSTR szDialogName ) MSIPREVIEW *preview; UINT r; - TRACE("%d %s\n", hPreview, debugstr_w(szDialogName)); + TRACE( "%lu %s\n", hPreview, debugstr_w(szDialogName) ); preview = msihandle2msiinfo( hPreview, MSIHANDLETYPE_PREVIEW ); if (!preview) @@ -4280,7 +4279,7 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName ) UINT r; LPWSTR strW = NULL; - TRACE("%d %s\n", hPreview, debugstr_a(szDialogName)); + TRACE( "%lu %s\n", hPreview, debugstr_a(szDialogName) ); if (szDialogName) { @@ -4293,15 +4292,15 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName ) return r; } -UINT WINAPI MsiPreviewBillboardW( MSIHANDLE hPreview, LPCWSTR szControlName, LPCWSTR szBillboard ) +UINT WINAPI MsiPreviewBillboardW( MSIHANDLE hPreview, const WCHAR *szControlName, const WCHAR *szBillboard ) { - FIXME("%d %s %s\n", hPreview, debugstr_w(szControlName), debugstr_w(szBillboard)); + FIXME( "%lu %s %s\n", hPreview, debugstr_w(szControlName), debugstr_w(szBillboard) ); return ERROR_CALL_NOT_IMPLEMENTED; } -UINT WINAPI MsiPreviewBillboardA( MSIHANDLE hPreview, LPCSTR szControlName, LPCSTR szBillboard ) +UINT WINAPI MsiPreviewBillboardA( MSIHANDLE hPreview, const char *szControlName, const char *szBillboard ) { - FIXME("%d %s %s\n", hPreview, debugstr_a(szControlName), debugstr_a(szBillboard)); + FIXME( "%lu %s %s\n", hPreview, debugstr_a(szControlName), debugstr_a(szBillboard) ); return ERROR_CALL_NOT_IMPLEMENTED; } diff --git a/dll/win32/msi/files.c b/dll/win32/msi/files.c index 8cb876b2468..1b8e4fd7d90 100644 --- a/dll/win32/msi/files.c +++ b/dll/win32/msi/files.c @@ -355,7 +355,7 @@ static msi_file_state calculate_install_state( MSIPACKAGE *package, MSIFILE *fil } if ((size = msi_get_disk_file_size( package, file->TargetPath )) != file->FileSize) { - TRACE("overwriting %s (old size %u new size %u)\n", debugstr_w(file->File), size, file->FileSize); + TRACE("overwriting %s (old size %lu new size %d)\n", debugstr_w(file->File), size, file->FileSize); return msifs_overwrite; } if (file->hash.dwFileHashInfoSize) @@ -722,7 +722,7 @@ static UINT patch_file( MSIPACKAGE *package, MSIFILEPATCH *patch ) } else { - WARN("failed to patch %s: %08x\n", debugstr_w(patch->File->TargetPath), GetLastError()); + WARN( "failed to patch %s: %#lx\n", debugstr_w(patch->File->TargetPath), GetLastError() ); r = ERROR_INSTALL_FAILURE; } DeleteFileW( patch->path ); @@ -761,8 +761,8 @@ static UINT patch_assembly( MSIPACKAGE *package, MSIASSEMBLY *assembly, MSIFILEP { if (!msi_copy_file( package, path, patch->File->TargetPath, FALSE )) { - ERR("Failed to copy file %s -> %s (%u)\n", debugstr_w(path), - debugstr_w(patch->File->TargetPath), GetLastError() ); + ERR( "failed to copy file %s -> %s (%lu)\n", debugstr_w(path), + debugstr_w(patch->File->TargetPath), GetLastError() ); msi_free( path ); msi_free( displayname ); IAssemblyName_Release( name ); @@ -898,7 +898,7 @@ static BOOL move_file( MSIPACKAGE *package, const WCHAR *source, const WCHAR *de ret = msi_move_file( package, source, dest, MOVEFILE_REPLACE_EXISTING ); if (!ret) { - WARN("msi_move_file failed: %u\n", GetLastError()); + WARN( "msi_move_file failed: %lu\n", GetLastError() ); return FALSE; } } @@ -908,7 +908,7 @@ static BOOL move_file( MSIPACKAGE *package, const WCHAR *source, const WCHAR *de ret = msi_copy_file( package, source, dest, FALSE ); if (!ret) { - WARN("msi_copy_file failed: %u\n", GetLastError()); + WARN( "msi_copy_file failed: %lu\n", GetLastError() ); return FALSE; } } @@ -1176,7 +1176,7 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param ) { if (!msi_create_full_path( package, destdir )) { - WARN("failed to create directory %u\n", GetLastError()); + WARN( "failed to create directory %lu\n", GetLastError() ); goto done; } } @@ -1317,8 +1317,8 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param) TRACE("Duplicating file %s to %s\n", debugstr_w(file->TargetPath), debugstr_w(dest)); if (!msi_copy_file( package, file->TargetPath, dest, TRUE )) { - WARN("Failed to copy file %s -> %s (%u)\n", - debugstr_w(file->TargetPath), debugstr_w(dest), GetLastError()); + WARN( "failed to copy file %s -> %s (%lu)\n", + debugstr_w(file->TargetPath), debugstr_w(dest), GetLastError() ); } FIXME("We should track these duplicate files as well\n"); @@ -1395,7 +1395,7 @@ static UINT ITERATE_RemoveDuplicateFiles( MSIRECORD *row, LPVOID param ) TRACE("Removing duplicate %s of %s\n", debugstr_w(dest), debugstr_w(file->TargetPath)); if (!msi_delete_file( package, dest )) { - WARN("Failed to delete duplicate file %s (%u)\n", debugstr_w(dest), GetLastError()); + WARN( "failed to delete duplicate file %s (%lu)\n", debugstr_w(dest), GetLastError() ); } uirow = MSI_CreateRecord( 9 ); @@ -1606,7 +1606,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package ) msi_set_file_attributes( package, file->TargetPath, FILE_ATTRIBUTE_NORMAL ); if (!msi_delete_file( package, file->TargetPath )) { - WARN("failed to delete %s (%u)\n", debugstr_w(file->TargetPath), GetLastError()); + WARN( "failed to delete %s (%lu)\n", debugstr_w(file->TargetPath), GetLastError() ); } file->state = msifs_missing; diff --git a/dll/win32/msi/format.c b/dll/win32/msi/format.c index cf81b3b0374..38bd187626b 100644 --- a/dll/win32/msi/format.c +++ b/dll/win32/msi/format.c @@ -897,14 +897,13 @@ end: return rc; } -UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord, - LPWSTR szResult, LPDWORD sz ) +UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord, WCHAR *szResult, DWORD *sz ) { UINT r = ERROR_INVALID_HANDLE; MSIPACKAGE *package; MSIRECORD *record; - TRACE("%d %d %p %p\n", hInstall, hRecord, szResult, sz); + TRACE( "%lu, %lu, %p, %p\n", hInstall, hRecord, szResult, sz ); record = msihandle2msiinfo(hRecord, MSIHANDLETYPE_RECORD); if (!record) @@ -961,7 +960,7 @@ UINT WINAPI MsiFormatRecordA(MSIHANDLE hinst, MSIHANDLE hrec, char *buf, DWORD * DWORD len; UINT r; - TRACE("%d %d %p %p\n", hinst, hrec, buf, sz); + TRACE( "%lu, %lu, %p, %p\n", hinst, hrec, buf, sz ); rec = msihandle2msiinfo(hrec, MSIHANDLETYPE_RECORD); if (!rec) diff --git a/dll/win32/msi/handle.c b/dll/win32/msi/handle.c index 29c5784c10e..c1f290652df 100644 --- a/dll/win32/msi/handle.c +++ b/dll/win32/msi/handle.c @@ -127,7 +127,7 @@ MSIHANDLE alloc_msihandle( MSIOBJECTHDR *obj ) LeaveCriticalSection( &MSI_handle_cs ); - TRACE("%p -> %d\n", obj, ret ); + TRACE( "%p -> %lu\n", obj, ret ); return ret; } @@ -150,7 +150,7 @@ MSIHANDLE alloc_msi_remote_handle(MSIHANDLE remote) LeaveCriticalSection( &MSI_handle_cs ); - TRACE("%d -> %d\n", remote, ret); + TRACE( "%lu -> %lu\n", remote, ret ); return ret; } @@ -271,7 +271,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle) MSIOBJECTHDR *info = NULL; UINT ret = ERROR_INVALID_HANDLE; - TRACE("%x\n",handle); + TRACE( "%lu\n", handle ); if (!handle) return ERROR_SUCCESS; @@ -305,7 +305,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle) ret = ERROR_SUCCESS; - TRACE("handle %x destroyed\n", handle+1); + TRACE( "handle %lu destroyed\n", handle + 1 ); out: LeaveCriticalSection( &MSI_handle_cs ); if( info ) diff --git a/dll/win32/msi/insert.c b/dll/win32/msi/insert.c index 098287d6039..3021fc88de8 100644 --- a/dll/win32/msi/insert.c +++ b/dll/win32/msi/insert.c @@ -79,7 +79,7 @@ MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD switch( vl->val->type ) { case EXPR_SVAL: - TRACE("field %d -> %s\n", i, debugstr_w(vl->val->u.sval)); + TRACE( "field %lu -> %s\n", i, debugstr_w(vl->val->u.sval) ); MSI_RecordSetStringW( merged, i, vl->val->u.sval ); break; case EXPR_IVAL: diff --git a/dll/win32/msi/install.c b/dll/win32/msi/install.c index 7aad6bffc07..997f3655556 100644 --- a/dll/win32/msi/install.c +++ b/dll/win32/msi/install.c @@ -672,7 +672,7 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode) MSIPACKAGE *package; BOOL r = FALSE; - TRACE("%d %d\n", hInstall, iRunMode); + TRACE( "%lu, %d\n", hInstall, iRunMode ); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); if (!package) @@ -765,7 +765,7 @@ UINT WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState) MSIPACKAGE *package; UINT r; - TRACE("%d %d %d\n", hInstall, iRunMode, fState); + TRACE( "%lu, %d, %d\n", hInstall, iRunMode, fState ); package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE ); if (!package) @@ -990,7 +990,7 @@ UINT WINAPI MsiSetFeatureAttributesA( MSIHANDLE handle, LPCSTR feature, DWORD at UINT r; WCHAR *featureW = NULL; - TRACE("%u, %s, 0x%08x\n", handle, debugstr_a(feature), attrs); + TRACE( "%lu, %s, %#lx\n", handle, debugstr_a(feature), attrs ); if (feature && !(featureW = strdupAtoW( feature ))) return ERROR_OUTOFMEMORY; @@ -1021,7 +1021,7 @@ UINT WINAPI MsiSetFeatureAttributesW( MSIHANDLE handle, LPCWSTR name, DWORD attr MSIFEATURE *feature; WCHAR *costing; - TRACE("%u, %s, 0x%08x\n", handle, debugstr_w(name), attrs); + TRACE( "%lu, %s, %#lx\n", handle, debugstr_w(name), attrs ); if (!name || !name[0]) return ERROR_UNKNOWN_FEATURE; @@ -1085,13 +1085,13 @@ UINT MSI_GetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature, /*********************************************************************** * MsiGetFeatureStateW (MSI.@) */ -UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall, LPCWSTR szFeature, - INSTALLSTATE *piInstalled, INSTALLSTATE *piAction) +UINT WINAPI MsiGetFeatureStateW( MSIHANDLE hInstall, const WCHAR *szFeature, INSTALLSTATE *piInstalled, + INSTALLSTATE *piAction ) { MSIPACKAGE* package; UINT ret; - TRACE("%d %s %p %p\n", hInstall, debugstr_w(szFeature), piInstalled, piAction); + TRACE( "%lu, %s, %p, %p\n", hInstall, debugstr_w(szFeature), piInstalled, piAction ); if (!szFeature) return ERROR_UNKNOWN_FEATURE; @@ -1204,15 +1204,14 @@ UINT MSI_GetFeatureCost( MSIPACKAGE *package, MSIFEATURE *feature, MSICOSTTREE t /*********************************************************************** * MsiGetFeatureCostW (MSI.@) */ -UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature, - MSICOSTTREE iCostTree, INSTALLSTATE iState, LPINT piCost) +UINT WINAPI MsiGetFeatureCostW( MSIHANDLE hInstall, const WCHAR *szFeature, MSICOSTTREE iCostTree, + INSTALLSTATE iState, INT *piCost ) { MSIPACKAGE *package; MSIFEATURE *feature; UINT ret; - TRACE("(%d %s %i %i %p)\n", hInstall, debugstr_w(szFeature), - iCostTree, iState, piCost); + TRACE( "%lu, %s, %d, %d, %p\n", hInstall, debugstr_w(szFeature), iCostTree, iState, piCost ); if (!szFeature) return ERROR_INVALID_PARAMETER; @@ -1258,14 +1257,14 @@ UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature, /*********************************************************************** * MsiGetFeatureInfoA (MSI.@) */ -UINT WINAPI MsiGetFeatureInfoA( MSIHANDLE handle, LPCSTR feature, LPDWORD attrs, - LPSTR title, LPDWORD title_len, LPSTR help, LPDWORD help_len ) +UINT WINAPI MsiGetFeatureInfoA( MSIHANDLE handle, const char *feature, DWORD *attrs, + char *title, DWORD *title_len, char *help, DWORD *help_len ) { UINT r; WCHAR *titleW = NULL, *helpW = NULL, *featureW = NULL; - TRACE("%u, %s, %p, %p, %p, %p, %p\n", handle, debugstr_a(feature), attrs, title, - title_len, help, help_len); + TRACE( "%lu, %s, %p, %p, %p, %p, %p\n", handle, debugstr_a(feature), attrs, title, + title_len, help, help_len ); if (feature && !(featureW = strdupAtoW( feature ))) return ERROR_OUTOFMEMORY; @@ -1352,14 +1351,14 @@ static UINT MSI_GetFeatureInfo( MSIPACKAGE *package, LPCWSTR name, LPDWORD attrs /*********************************************************************** * MsiGetFeatureInfoW (MSI.@) */ -UINT WINAPI MsiGetFeatureInfoW( MSIHANDLE handle, LPCWSTR feature, LPDWORD attrs, - LPWSTR title, LPDWORD title_len, LPWSTR help, LPDWORD help_len ) +UINT WINAPI MsiGetFeatureInfoW( MSIHANDLE handle, const WCHAR *feature, DWORD *attrs, + WCHAR *title, DWORD *title_len, WCHAR *help, DWORD *help_len ) { UINT r; MSIPACKAGE *package; - TRACE("%u, %s, %p, %p, %p, %p, %p\n", handle, debugstr_w(feature), attrs, title, - title_len, help, help_len); + TRACE( "%lu, %s, %p, %p, %p, %p, %p\n", handle, debugstr_w(feature), attrs, title, + title_len, help, help_len ); if (!feature) return ERROR_INVALID_PARAMETER; @@ -1499,14 +1498,13 @@ UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent, /*********************************************************************** * MsiGetComponentStateW (MSI.@) */ -UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent, - INSTALLSTATE *piInstalled, INSTALLSTATE *piAction) +UINT WINAPI MsiGetComponentStateW( MSIHANDLE hInstall, const WCHAR *szComponent, INSTALLSTATE *piInstalled, + INSTALLSTATE *piAction ) { MSIPACKAGE* package; UINT ret; - TRACE("%d %s %p %p\n", hInstall, debugstr_w(szComponent), - piInstalled, piAction); + TRACE( "%lu, %s, %p, %p\n", hInstall, debugstr_w(szComponent), piInstalled, piAction ); if (!szComponent) return ERROR_UNKNOWN_COMPONENT; @@ -1601,7 +1599,7 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel) MSIPACKAGE* package; UINT r; - TRACE("%d %i\n", hInstall, iInstallLevel); + TRACE( "%lu %d\n", hInstall, iInstallLevel ); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); if (!package) @@ -1634,28 +1632,22 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel) /*********************************************************************** * MsiGetFeatureValidStatesW (MSI.@) */ -UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE hInstall, LPCWSTR szFeature, - LPDWORD pInstallState) +UINT WINAPI MsiGetFeatureValidStatesW( MSIHANDLE hInstall, const WCHAR *szFeature, DWORD *pInstallState ) { - if(pInstallState) *pInstallState = 1<psz3) + 1 + strlen(next_cab) + 1; if (length > 256) { - WARN("Cannot update next cabinet filename with a string size %u > 256\n", length); + WARN( "cannot update next cabinet filename with a string size %lu > 256\n", length ); msi_free(next_cab); goto done; } @@ -441,7 +441,7 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, if (attrs2 == INVALID_FILE_ATTRIBUTES) { - ERR("failed to create %s (error %d)\n", debugstr_w(path), err); + ERR( "failed to create %s (error %lu)\n", debugstr_w(path), err ); goto done; } else if (err == ERROR_ACCESS_DENIED && (attrs2 & FILE_ATTRIBUTE_READONLY)) @@ -481,13 +481,12 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, } else { - WARN("failed to schedule rename operation %s (error %d)\n", debugstr_w(path), GetLastError()); + WARN( "failed to schedule rename operation %s (error %lu)\n", debugstr_w(path), GetLastError() ); DeleteFileW( tmpfileW ); } msi_free(tmpfileW); } - else - WARN("failed to create %s (error %d)\n", debugstr_w(path), err); + else WARN( "failed to create %s (error %lu)\n", debugstr_w(path), err ); } done: diff --git a/dll/win32/msi/msi.c b/dll/win32/msi/msi.c index a9e0fbeeda6..7f198f3fd2e 100644 --- a/dll/win32/msi/msi.c +++ b/dll/win32/msi/msi.c @@ -181,21 +181,19 @@ UINT WINAPI MsiAdvertiseProductW(LPCWSTR szPackagePath, LPCWSTR szScriptfilePath return ERROR_CALL_NOT_IMPLEMENTED; } -UINT WINAPI MsiAdvertiseProductExA(LPCSTR szPackagePath, LPCSTR szScriptfilePath, - LPCSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions) +UINT WINAPI MsiAdvertiseProductExA( const char *szPackagePath, const char *szScriptfilePath, + const char *szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions ) { - FIXME("%s %s %s %08x %08x %08x\n", debugstr_a(szPackagePath), - debugstr_a(szScriptfilePath), debugstr_a(szTransforms), - lgidLanguage, dwPlatform, dwOptions); + FIXME( "%s, %s, %s, %#x, %#lx, %#lx\n", debugstr_a(szPackagePath), debugstr_a(szScriptfilePath), + debugstr_a(szTransforms), lgidLanguage, dwPlatform, dwOptions ); return ERROR_CALL_NOT_IMPLEMENTED; } -UINT WINAPI MsiAdvertiseProductExW( LPCWSTR szPackagePath, LPCWSTR szScriptfilePath, - LPCWSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions) +UINT WINAPI MsiAdvertiseProductExW( const WCHAR *szPackagePath, const WCHAR *szScriptfilePath, + const WCHAR *szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions ) { - FIXME("%s %s %s %08x %08x %08x\n", debugstr_w(szPackagePath), - debugstr_w(szScriptfilePath), debugstr_w(szTransforms), - lgidLanguage, dwPlatform, dwOptions); + FIXME( "%s, %s, %s, %#x %#lx %#lx\n", debugstr_w(szPackagePath), debugstr_w(szScriptfilePath), + debugstr_w(szTransforms), lgidLanguage, dwPlatform, dwOptions ); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -267,24 +265,22 @@ UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine) return r; } -UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode) +UINT WINAPI MsiReinstallProductA( const char *szProduct, DWORD dwReinstallMode ) { - LPWSTR wszProduct; + WCHAR *wszProduct; UINT rc; - TRACE("%s %08x\n", debugstr_a(szProduct), dwReinstallMode); + TRACE( "%s, %#lx\n", debugstr_a(szProduct), dwReinstallMode ); wszProduct = strdupAtoW(szProduct); - rc = MsiReinstallProductW(wszProduct, dwReinstallMode); - msi_free(wszProduct); return rc; } -UINT WINAPI MsiReinstallProductW(LPCWSTR szProduct, DWORD dwReinstallMode) +UINT WINAPI MsiReinstallProductW( const WCHAR *szProduct, DWORD dwReinstallMode ) { - TRACE("%s %08x\n", debugstr_w(szProduct), dwReinstallMode); + TRACE( "%s, %#lx\n", debugstr_w(szProduct), dwReinstallMode ); return MsiReinstallFeatureW(szProduct, L"ALL", dwReinstallMode); } @@ -531,14 +527,14 @@ static MSIPATCHSEQUENCEINFOW *patchinfoAtoW( DWORD count, const MSIPATCHSEQUENCE return ret; } -UINT WINAPI MsiDetermineApplicablePatchesA(LPCSTR szProductPackagePath, - DWORD cPatchInfo, PMSIPATCHSEQUENCEINFOA pPatchInfo) +UINT WINAPI MsiDetermineApplicablePatchesA( const char *szProductPackagePath, DWORD cPatchInfo, + MSIPATCHSEQUENCEINFOA *pPatchInfo ) { UINT i, r; WCHAR *package_path = NULL; MSIPATCHSEQUENCEINFOW *psi; - TRACE("%s, %u, %p\n", debugstr_a(szProductPackagePath), cPatchInfo, pPatchInfo); + TRACE( "%s, %lu, %p\n", debugstr_a(szProductPackagePath), cPatchInfo, pPatchInfo ); if (szProductPackagePath && !(package_path = strdupAtoW( szProductPackagePath ))) return ERROR_OUTOFMEMORY; @@ -673,7 +669,7 @@ static UINT determine_patch_sequence( MSIPACKAGE *package, DWORD count, MSIPATCH &IID_IXMLDOMDocument, (void**)&desc ); if (hr != S_OK) { - ERR("failed to create DOMDocument30 instance, 0x%08x\n", hr); + ERR( "failed to create DOMDocument30 instance, %#lx\n", hr ); return ERROR_FUNCTION_FAILED; } } @@ -720,7 +716,7 @@ static UINT determine_patch_sequence( MSIPACKAGE *package, DWORD count, MSIPATCH TRACE("szPatchData: %s\n", debugstr_w(info[i].szPatchData)); TRACE("ePatchDataType: %u\n", info[i].ePatchDataType); - TRACE("dwOrder: %u\n", info[i].dwOrder); + TRACE("dwOrder: %lu\n", info[i].dwOrder); TRACE("uStatus: %u\n", info[i].uStatus); } @@ -729,13 +725,13 @@ static UINT determine_patch_sequence( MSIPACKAGE *package, DWORD count, MSIPATCH return ERROR_SUCCESS; } -UINT WINAPI MsiDetermineApplicablePatchesW(LPCWSTR szProductPackagePath, - DWORD cPatchInfo, PMSIPATCHSEQUENCEINFOW pPatchInfo) +UINT WINAPI MsiDetermineApplicablePatchesW( const WCHAR *szProductPackagePath, DWORD cPatchInfo, + MSIPATCHSEQUENCEINFOW *pPatchInfo ) { UINT r; MSIPACKAGE *package; - TRACE("%s, %u, %p\n", debugstr_w(szProductPackagePath), cPatchInfo, pPatchInfo); + TRACE( "%s, %lu, %p\n", debugstr_w(szProductPackagePath), cPatchInfo, pPatchInfo ); r = MSI_OpenPackageW( szProductPackagePath, 0, &package ); if (r != ERROR_SUCCESS) @@ -748,15 +744,14 @@ UINT WINAPI MsiDetermineApplicablePatchesW(LPCWSTR szProductPackagePath, return r; } -UINT WINAPI MsiDeterminePatchSequenceA( LPCSTR product, LPCSTR usersid, - MSIINSTALLCONTEXT context, DWORD count, PMSIPATCHSEQUENCEINFOA patchinfo ) +UINT WINAPI MsiDeterminePatchSequenceA( const char *product, const char *usersid, MSIINSTALLCONTEXT context, + DWORD count, MSIPATCHSEQUENCEINFOA *patchinfo ) { UINT i, r; WCHAR *productW, *usersidW = NULL; MSIPATCHSEQUENCEINFOW *patchinfoW; - TRACE("%s, %s, %d, %d, %p\n", debugstr_a(product), debugstr_a(usersid), - context, count, patchinfo); + TRACE( "%s, %s, %d, %lu, %p\n", debugstr_a(product), debugstr_a(usersid), context, count, patchinfo ); if (!product) return ERROR_INVALID_PARAMETER; if (!(productW = strdupAtoW( product ))) return ERROR_OUTOFMEMORY; @@ -818,14 +813,13 @@ static UINT open_package( const WCHAR *product, const WCHAR *usersid, return MSI_OpenPackageW( sourcepath, 0, package ); } -UINT WINAPI MsiDeterminePatchSequenceW( LPCWSTR product, LPCWSTR usersid, - MSIINSTALLCONTEXT context, DWORD count, PMSIPATCHSEQUENCEINFOW patchinfo ) +UINT WINAPI MsiDeterminePatchSequenceW( const WCHAR *product, const WCHAR *usersid, MSIINSTALLCONTEXT context, + DWORD count, MSIPATCHSEQUENCEINFOW *patchinfo ) { UINT r; MSIPACKAGE *package; - TRACE("%s, %s, %d, %d, %p\n", debugstr_w(product), debugstr_w(usersid), - context, count, patchinfo); + TRACE( "%s, %s, %d, %lu, %p\n", debugstr_w(product), debugstr_w(usersid), context, count, patchinfo ); if (!product) return ERROR_INVALID_PARAMETER; r = open_package( product, usersid, context, &package ); @@ -1089,7 +1083,7 @@ static WCHAR *reg_get_value( HKEY hkey, const WCHAR *name, DWORD *type ) return strdupW( temp ); } - ERR( "unhandled value type %u\n", *type ); + ERR( "unhandled value type %lu\n", *type ); return NULL; } @@ -1887,12 +1881,12 @@ UINT WINAPI MsiGetPatchInfoW( LPCWSTR patch, LPCWSTR attr, LPWSTR buffer, LPDWOR return ERROR_UNKNOWN_PRODUCT; } -UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes) +UINT WINAPI MsiEnableLogA( DWORD dwLogMode, const char *szLogFile, DWORD attributes ) { LPWSTR szwLogFile = NULL; UINT r; - TRACE("%08x %s %08x\n", dwLogMode, debugstr_a(szLogFile), attributes); + TRACE( "%#lx, %s, %#lx\n", dwLogMode, debugstr_a(szLogFile), attributes ); if( szLogFile ) { @@ -1905,9 +1899,9 @@ UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes) return r; } -UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes) +UINT WINAPI MsiEnableLogW( DWORD dwLogMode, const WCHAR *szLogFile, DWORD attributes ) { - TRACE("%08x %s %08x\n", dwLogMode, debugstr_w(szLogFile), attributes); + TRACE( "%#lx, %s, %#lx\n", dwLogMode, debugstr_w(szLogFile), attributes ); msi_free(gszLogFile); gszLogFile = NULL; @@ -1924,23 +1918,21 @@ UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes) gszLogFile = strdupW(szLogFile); CloseHandle(file); } - else - ERR("Unable to enable log %s (%u)\n", debugstr_w(szLogFile), GetLastError()); + else ERR( "unable to enable log %s (%lu)\n", debugstr_w(szLogFile), GetLastError() ); } return ERROR_SUCCESS; } -UINT WINAPI MsiEnumComponentCostsA( MSIHANDLE handle, LPCSTR component, DWORD index, - INSTALLSTATE state, LPSTR drive, DWORD *buflen, - int *cost, int *temp ) +UINT WINAPI MsiEnumComponentCostsA( MSIHANDLE handle, const char *component, DWORD index, INSTALLSTATE state, + char *drive, DWORD *buflen, int *cost, int *temp ) { UINT r; DWORD len; WCHAR *driveW, *componentW = NULL; - TRACE("%d, %s, %u, %d, %p, %p, %p %p\n", handle, debugstr_a(component), index, - state, drive, buflen, cost, temp); + TRACE( "%lu, %s, %lu, %d, %p, %p, %p, %p\n", handle, debugstr_a(component), index, state, drive, buflen, cost, + temp ); if (!drive || !buflen) return ERROR_INVALID_PARAMETER; if (component && !(componentW = strdupAtoW( component ))) return ERROR_OUTOFMEMORY; @@ -1969,9 +1961,8 @@ static UINT set_drive( WCHAR *buffer, WCHAR letter ) return 2; } -UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD index, - INSTALLSTATE state, LPWSTR drive, DWORD *buflen, - int *cost, int *temp ) +UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, const WCHAR *component, DWORD index, INSTALLSTATE state, + WCHAR *drive, DWORD *buflen, int *cost, int *temp ) { UINT r = ERROR_NO_MORE_ITEMS; MSICOMPONENT *comp = NULL; @@ -1980,8 +1971,8 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i STATSTG stat = {0}; WCHAR path[MAX_PATH]; - TRACE("%d, %s, %u, %d, %p, %p, %p %p\n", handle, debugstr_w(component), index, - state, drive, buflen, cost, temp); + TRACE( "%lu, %s, %lu, %d, %p, %p, %p, %p\n", handle, debugstr_w(component), index, state, drive, buflen, cost, + temp ); if (!drive || !buflen || !cost || !temp) return ERROR_INVALID_PARAMETER; if (!(package = msihandle2msiinfo( handle, MSIHANDLETYPE_PACKAGE ))) @@ -2315,12 +2306,11 @@ INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd) return old; } -INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler, - DWORD dwMessageFilter, LPVOID pvContext) +INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA( INSTALLUI_HANDLERA puiHandler, DWORD dwMessageFilter, void *pvContext ) { INSTALLUI_HANDLERA prev = gUIHandlerA; - TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext); + TRACE( "%p, %#lx, %p\n", puiHandler, dwMessageFilter, pvContext ); gUIHandlerA = puiHandler; gUIHandlerW = NULL; @@ -2330,12 +2320,11 @@ INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler, return prev; } -INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler, - DWORD dwMessageFilter, LPVOID pvContext) +INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW( INSTALLUI_HANDLERW puiHandler, DWORD dwMessageFilter, void *pvContext ) { INSTALLUI_HANDLERW prev = gUIHandlerW; - TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext); + TRACE( "%p, %#lx, %p\n", puiHandler, dwMessageFilter, pvContext ); gUIHandlerA = NULL; gUIHandlerW = puiHandler; @@ -2370,24 +2359,22 @@ INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler, * for starters, as -1 is an invalid MSI handle, but not an invalid module * handle. Maybe strings can be stored in an MSI database somehow. */ -LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, LPWSTR lpBuffer, - int nBufferMax, LANGID lang ) +LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, WCHAR *lpBuffer, int nBufferMax, LANGID lang ) { HRSRC hres; HGLOBAL hResData; LPWSTR p; DWORD i, len; - TRACE("%d %u %p %d %d\n", handle, id, lpBuffer, nBufferMax, lang); + TRACE( "%lu, %u, %p, %d, %#x\n", handle, id, lpBuffer, nBufferMax, lang ); if( handle != -1 ) - FIXME("don't know how to deal with handle = %08x\n", handle); + FIXME( "don't know how to deal with handle = %lu\n", handle ); if( !lang ) lang = GetUserDefaultLangID(); - hres = FindResourceExW( msi_hInstance, (LPCWSTR) RT_STRING, - (LPWSTR)1, lang ); + hres = FindResourceExW( msi_hInstance, (const WCHAR *)RT_STRING, (WCHAR *)1, lang ); if( !hres ) return 0; hResData = LoadResource( msi_hInstance, hres ); @@ -2464,55 +2451,49 @@ INSTALLSTATE WINAPI MsiLocateComponentW(LPCWSTR szComponent, LPWSTR lpPathBuf, return MsiGetComponentPathW( szProduct, szComponent, lpPathBuf, pcchBuf ); } -UINT WINAPI MsiMessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, - WORD wLanguageId, DWORD f) +UINT WINAPI MsiMessageBoxA( HWND hWnd, const char *lpText, const char *lpCaption, UINT uType, WORD wLanguageId, + DWORD 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); + FIXME( "%p, %s, %s, %u, %#x, %#lx\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) +UINT WINAPI MsiMessageBoxW( HWND hWnd, const WCHAR *lpText, const WCHAR *lpCaption, UINT uType, WORD wLanguageId, + DWORD 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); + FIXME( "%p, %s, %s, %u, %#x %#lx\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption), uType, wLanguageId, f ); + return MessageBoxExW( hWnd, lpText, lpCaption, uType, wLanguageId ); } -UINT WINAPI MsiMessageBoxExA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, - DWORD unknown, WORD wLanguageId, DWORD f) +UINT WINAPI MsiMessageBoxExA( HWND hWnd, const char *lpText, const char *lpCaption, UINT uType, DWORD unknown, + WORD wLanguageId, DWORD f ) { - FIXME("(%p, %s, %s, %u, 0x%08x, 0x%08x, 0x%08x): semi-stub\n", hWnd, debugstr_a(lpText), - debugstr_a(lpCaption), uType, unknown, wLanguageId, f); - return MessageBoxExA(hWnd, lpText, lpCaption, uType, wLanguageId); + FIXME( "%p, %s, %s, %u, %#lx, %#x, %#lx): semi-stub\n", hWnd, debugstr_a(lpText), debugstr_a(lpCaption), uType, + unknown, wLanguageId, f ); + return MessageBoxExA( hWnd, lpText, lpCaption, uType, wLanguageId ); } -UINT WINAPI MsiMessageBoxExW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType, - DWORD unknown, WORD wLanguageId, DWORD f) +UINT WINAPI MsiMessageBoxExW( HWND hWnd, const WCHAR *lpText, const WCHAR *lpCaption, UINT uType, DWORD unknown, + WORD wLanguageId, DWORD f ) { - FIXME("(%p, %s, %s, %u, 0x%08x, 0x%08x, 0x%08x): semi-stub\n", hWnd, debugstr_w(lpText), - debugstr_w(lpCaption), uType, unknown, wLanguageId, f); - return MessageBoxExW(hWnd, lpText, lpCaption, uType, wLanguageId); + FIXME( "%p, %s, %s, %u, %#lx, %#x, %#lx): semi-stub\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption), uType, + unknown, wLanguageId, f ); + return MessageBoxExW( hWnd, lpText, lpCaption, uType, wLanguageId ); } -UINT WINAPI MsiProvideAssemblyA( LPCSTR szAssemblyName, LPCSTR szAppContext, - DWORD dwInstallMode, DWORD dwAssemblyInfo, LPSTR lpPathBuf, - LPDWORD pcchPathBuf ) +UINT WINAPI MsiProvideAssemblyA( const char *szAssemblyName, const char *szAppContext, DWORD dwInstallMode, + DWORD dwAssemblyInfo, char *lpPathBuf, DWORD *pcchPathBuf ) { - FIXME("%s %s %08x %08x %p %p\n", debugstr_a(szAssemblyName), - debugstr_a(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf, - pcchPathBuf); + FIXME( "%s, %s, %#lx, %#lx, %p, %p\n", debugstr_a(szAssemblyName), debugstr_a(szAppContext), dwInstallMode, + dwAssemblyInfo, lpPathBuf, pcchPathBuf ); return ERROR_CALL_NOT_IMPLEMENTED; } -UINT WINAPI MsiProvideAssemblyW( LPCWSTR szAssemblyName, LPCWSTR szAppContext, - DWORD dwInstallMode, DWORD dwAssemblyInfo, LPWSTR lpPathBuf, - LPDWORD pcchPathBuf ) +UINT WINAPI MsiProvideAssemblyW( const WCHAR *szAssemblyName, const WCHAR *szAppContext, DWORD dwInstallMode, + DWORD dwAssemblyInfo, WCHAR *lpPathBuf, DWORD *pcchPathBuf ) { - FIXME("%s %s %08x %08x %p %p\n", debugstr_w(szAssemblyName), - debugstr_w(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf, - pcchPathBuf); + FIXME( "%s, %s, %#lx, %#lx, %p, %p\n", debugstr_w(szAssemblyName), debugstr_w(szAppContext), dwInstallMode, + dwAssemblyInfo, lpPathBuf, pcchPathBuf ); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -2530,13 +2511,13 @@ UINT WINAPI MsiProvideComponentFromDescriptorW( LPCWSTR szDescriptor, return ERROR_CALL_NOT_IMPLEMENTED; } -HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT_CONTEXT *cert, - LPBYTE hash, LPDWORD hashlen ) +HRESULT WINAPI MsiGetFileSignatureInformationA( const char *path, DWORD flags, PCCERT_CONTEXT *cert, BYTE *hash, + DWORD *hashlen ) { UINT r; WCHAR *pathW = NULL; - TRACE("%s %08x %p %p %p\n", debugstr_a(path), flags, cert, hash, hashlen); + TRACE( "%s, %#lx, %p, %p, %p\n", debugstr_a(path), flags, cert, hash, hashlen ); if (path && !(pathW = strdupAtoW( path ))) return E_OUTOFMEMORY; r = MsiGetFileSignatureInformationW( pathW, flags, cert, hash, hashlen ); @@ -2544,8 +2525,8 @@ HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT return r; } -HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCERT_CONTEXT *cert, - LPBYTE hash, LPDWORD hashlen ) +HRESULT WINAPI MsiGetFileSignatureInformationW( const WCHAR *path, DWORD flags, PCCERT_CONTEXT *cert, BYTE *hash, + DWORD *hashlen ) { static GUID generic_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2; HRESULT hr; @@ -2554,7 +2535,7 @@ HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCER CRYPT_PROVIDER_SGNR *signer; CRYPT_PROVIDER_CERT *provider; - TRACE("%s %08x %p %p %p\n", debugstr_w(path), flags, cert, hash, hashlen); + TRACE( "%s, %#lx, %p, %p, %p\n", debugstr_w(path), flags, cert, hash, hashlen ); if (!path || !cert) return E_INVALIDARG; @@ -2612,15 +2593,13 @@ done: /****************************************************************** * MsiGetProductPropertyA [MSI.@] */ -UINT WINAPI MsiGetProductPropertyA(MSIHANDLE hProduct, LPCSTR szProperty, - LPSTR szValue, LPDWORD pccbValue) +UINT WINAPI MsiGetProductPropertyA( MSIHANDLE hProduct, const char *szProperty, char *szValue, DWORD *pccbValue ) { LPWSTR prop = NULL, val = NULL; DWORD len; UINT r; - TRACE("(%d, %s, %p, %p)\n", hProduct, debugstr_a(szProperty), - szValue, pccbValue); + TRACE( "%lu, %s, %p, %p\n", hProduct, debugstr_a(szProperty), szValue, pccbValue ); if (szValue && !pccbValue) return ERROR_INVALID_PARAMETER; @@ -2674,8 +2653,7 @@ done: /****************************************************************** * MsiGetProductPropertyW [MSI.@] */ -UINT WINAPI MsiGetProductPropertyW(MSIHANDLE hProduct, LPCWSTR szProperty, - LPWSTR szValue, LPDWORD pccbValue) +UINT WINAPI MsiGetProductPropertyW( MSIHANDLE hProduct, const WCHAR *szProperty, WCHAR *szValue, DWORD *pccbValue ) { MSIPACKAGE *package; MSIQUERY *view = NULL; @@ -2683,8 +2661,7 @@ UINT WINAPI MsiGetProductPropertyW(MSIHANDLE hProduct, LPCWSTR szProperty, LPCWSTR val; UINT r; - TRACE("(%d, %s, %p, %p)\n", hProduct, debugstr_w(szProperty), - szValue, pccbValue); + TRACE( "%lu, %s, %p, %p)\n", hProduct, debugstr_w(szProperty), szValue, pccbValue ); if (!szProperty) return ERROR_INVALID_PARAMETER; @@ -3234,13 +3211,11 @@ static UINT get_file_version( const WCHAR *path, WCHAR *verbuf, DWORD *verlen, /****************************************************************** * MsiGetFileVersionW [MSI.@] */ -UINT WINAPI MsiGetFileVersionW( LPCWSTR path, LPWSTR verbuf, LPDWORD verlen, - LPWSTR langbuf, LPDWORD langlen ) +UINT WINAPI MsiGetFileVersionW( const WCHAR *path, WCHAR *verbuf, DWORD *verlen, WCHAR *langbuf, DWORD *langlen ) { UINT ret; - TRACE("%s %p %u %p %u\n", debugstr_w(path), verbuf, verlen ? *verlen : 0, - langbuf, langlen ? *langlen : 0); + TRACE( "%s, %p(%lu), %p(%lu)\n", debugstr_w(path), verbuf, verlen ? *verlen : 0, langbuf, langlen ? *langlen : 0 ); if ((verbuf && !verlen) || (langbuf && !langlen)) return ERROR_INVALID_PARAMETER; @@ -3307,13 +3282,12 @@ end: /*********************************************************************** * MsiUseFeatureExW [MSI.@] */ -INSTALLSTATE WINAPI MsiUseFeatureExW( LPCWSTR szProduct, LPCWSTR szFeature, - DWORD dwInstallMode, DWORD dwReserved ) +INSTALLSTATE WINAPI MsiUseFeatureExW( const WCHAR *szProduct, const WCHAR *szFeature, DWORD dwInstallMode, + DWORD dwReserved ) { INSTALLSTATE state; - TRACE("%s %s %i %i\n", debugstr_w(szProduct), debugstr_w(szFeature), - dwInstallMode, dwReserved); + TRACE( "%s, %s, %lu %#lx\n", debugstr_w(szProduct), debugstr_w(szFeature), dwInstallMode, dwReserved ); state = MsiQueryFeatureStateW( szProduct, szFeature ); @@ -3332,14 +3306,13 @@ INSTALLSTATE WINAPI MsiUseFeatureExW( LPCWSTR szProduct, LPCWSTR szFeature, /*********************************************************************** * MsiUseFeatureExA [MSI.@] */ -INSTALLSTATE WINAPI MsiUseFeatureExA( LPCSTR szProduct, LPCSTR szFeature, - DWORD dwInstallMode, DWORD dwReserved ) +INSTALLSTATE WINAPI MsiUseFeatureExA( const char *szProduct, const char *szFeature, DWORD dwInstallMode, + DWORD dwReserved ) { INSTALLSTATE ret = INSTALLSTATE_UNKNOWN; - LPWSTR prod = NULL, feat = NULL; + WCHAR *prod = NULL, *feat = NULL; - TRACE("%s %s %i %i\n", debugstr_a(szProduct), debugstr_a(szFeature), - dwInstallMode, dwReserved); + TRACE( "%s, %s, %lu, %#lx\n", debugstr_a(szProduct), debugstr_a(szFeature), dwInstallMode, dwReserved ); prod = strdupAtoW( szProduct ); if (szProduct && !prod) @@ -3456,39 +3429,35 @@ static UINT MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent, /*********************************************************************** * MsiProvideQualifiedComponentExW [MSI.@] */ -UINT WINAPI MsiProvideQualifiedComponentExW(LPCWSTR szComponent, - LPCWSTR szQualifier, DWORD dwInstallMode, LPCWSTR szProduct, - DWORD Unused1, DWORD Unused2, LPWSTR lpPathBuf, - LPDWORD pcchPathBuf) +UINT WINAPI MsiProvideQualifiedComponentExW( const WCHAR *szComponent, const WCHAR *szQualifier, DWORD dwInstallMode, + const WCHAR *szProduct, DWORD Unused1, DWORD Unused2, WCHAR *lpPathBuf, + DWORD *pcchPathBuf ) { awstring path; - TRACE("%s %s %u %s %u %u %p %p\n", debugstr_w(szComponent), - debugstr_w(szQualifier), dwInstallMode, debugstr_w(szProduct), - Unused1, Unused2, lpPathBuf, pcchPathBuf); + TRACE( "%s, %s, %lu, %s, %#lx, %#lx, %p, %p\n", debugstr_w(szComponent), debugstr_w(szQualifier), dwInstallMode, + debugstr_w(szProduct), Unused1, Unused2, lpPathBuf, pcchPathBuf ); path.unicode = TRUE; path.str.w = lpPathBuf; - return MSI_ProvideQualifiedComponentEx(szComponent, szQualifier, - dwInstallMode, szProduct, Unused1, Unused2, &path, pcchPathBuf); + return MSI_ProvideQualifiedComponentEx( szComponent, szQualifier, dwInstallMode, szProduct, Unused1, Unused2, + &path, pcchPathBuf ); } /*********************************************************************** * MsiProvideQualifiedComponentExA [MSI.@] */ -UINT WINAPI MsiProvideQualifiedComponentExA(LPCSTR szComponent, - LPCSTR szQualifier, DWORD dwInstallMode, LPCSTR szProduct, - DWORD Unused1, DWORD Unused2, LPSTR lpPathBuf, - LPDWORD pcchPathBuf) +UINT WINAPI MsiProvideQualifiedComponentExA( const char *szComponent, const char *szQualifier, DWORD dwInstallMode, + const char *szProduct, DWORD Unused1, DWORD Unused2, char *lpPathBuf, + DWORD *pcchPathBuf ) { - LPWSTR szwComponent, szwQualifier = NULL, szwProduct = NULL; + WCHAR *szwComponent, *szwQualifier = NULL, *szwProduct = NULL; UINT r = ERROR_OUTOFMEMORY; awstring path; - TRACE("%s %s %u %s %u %u %p %p\n", debugstr_a(szComponent), - debugstr_a(szQualifier), dwInstallMode, debugstr_a(szProduct), - Unused1, Unused2, lpPathBuf, pcchPathBuf); + TRACE( "%s, %s, %lu, %s, %#lx, %#lx, %p, %p\n", debugstr_a(szComponent), debugstr_a(szQualifier), dwInstallMode, + debugstr_a(szProduct), Unused1, Unused2, lpPathBuf, pcchPathBuf ); szwComponent = strdupAtoW( szComponent ); if (szComponent && !szwComponent) @@ -3848,11 +3817,11 @@ UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved) { WCHAR path[MAX_PATH]; - TRACE("%d\n", dwReserved); + TRACE( "%#lx\n", dwReserved ); if (dwReserved) { - FIXME("dwReserved=%d\n", dwReserved); + FIXME( "dwReserved = %#lx\n", dwReserved ); return ERROR_INVALID_PARAMETER; } @@ -3952,7 +3921,7 @@ UINT WINAPI MsiGetShortcutTargetW( LPCWSTR szShortcutTarget, return ERROR_FUNCTION_FAILED; } -UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, DWORD dwReinstallMode ) +UINT WINAPI MsiReinstallFeatureW( const WCHAR *szProduct, const WCHAR *szFeature, DWORD dwReinstallMode ) { MSIPACKAGE *package; MSIINSTALLCONTEXT context; @@ -3961,7 +3930,7 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, DWORD dw WCHAR *ptr, *cmdline; DWORD sz; - TRACE("%s, %s, 0x%08x\n", debugstr_w(szProduct), debugstr_w(szFeature), dwReinstallMode); + TRACE( "%s, %s, %#lx\n", debugstr_w(szProduct), debugstr_w(szFeature), dwReinstallMode ); r = msi_locate_product( szProduct, &context ); if (r != ERROR_SUCCESS) @@ -4023,15 +3992,12 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, DWORD dw return r; } -UINT WINAPI MsiReinstallFeatureA( LPCSTR szProduct, LPCSTR szFeature, - DWORD dwReinstallMode ) +UINT WINAPI MsiReinstallFeatureA( const char *szProduct, const char *szFeature, DWORD dwReinstallMode ) { - LPWSTR wszProduct; - LPWSTR wszFeature; + WCHAR *wszProduct, *wszFeature; UINT rc; - TRACE("%s %s %i\n", debugstr_a(szProduct), debugstr_a(szFeature), - dwReinstallMode); + TRACE( "%s, %s, %lu\n", debugstr_a(szProduct), debugstr_a(szFeature), dwReinstallMode ); wszProduct = strdupAtoW(szProduct); wszFeature = strdupAtoW(szFeature); @@ -4068,7 +4034,7 @@ UINT msi_get_filehash( MSIPACKAGE *package, const WCHAR *path, MSIFILEHASHINFO * handle = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL ); if (handle == INVALID_HANDLE_VALUE) { - WARN("can't open file %u\n", GetLastError()); + WARN( "can't open file %lu\n", GetLastError() ); return ERROR_FILE_NOT_FOUND; } if ((length = GetFileSize( handle, NULL ))) @@ -4104,10 +4070,9 @@ UINT msi_get_filehash( MSIPACKAGE *package, const WCHAR *path, MSIFILEHASHINFO * /*********************************************************************** * MsiGetFileHashW [MSI.@] */ -UINT WINAPI MsiGetFileHashW( LPCWSTR szFilePath, DWORD dwOptions, - PMSIFILEHASHINFO pHash ) +UINT WINAPI MsiGetFileHashW( const WCHAR *szFilePath, DWORD dwOptions, MSIFILEHASHINFO *pHash ) { - TRACE("%s %08x %p\n", debugstr_w(szFilePath), dwOptions, pHash ); + TRACE( "%s, %#lx, %p\n", debugstr_w(szFilePath), dwOptions, pHash ); if (!szFilePath) return ERROR_INVALID_PARAMETER; @@ -4128,13 +4093,12 @@ UINT WINAPI MsiGetFileHashW( LPCWSTR szFilePath, DWORD dwOptions, /*********************************************************************** * MsiGetFileHashA [MSI.@] */ -UINT WINAPI MsiGetFileHashA( LPCSTR szFilePath, DWORD dwOptions, - PMSIFILEHASHINFO pHash ) +UINT WINAPI MsiGetFileHashA( const char *szFilePath, DWORD dwOptions, MSIFILEHASHINFO *pHash ) { LPWSTR file; UINT r; - TRACE("%s %08x %p\n", debugstr_a(szFilePath), dwOptions, pHash ); + TRACE( "%s, %#lx, %p\n", debugstr_a(szFilePath), dwOptions, pHash ); file = strdupAtoW( szFilePath ); if (szFilePath && !file) @@ -4148,22 +4112,18 @@ UINT WINAPI MsiGetFileHashA( LPCSTR szFilePath, DWORD dwOptions, /*********************************************************************** * MsiAdvertiseScriptW [MSI.@] */ -UINT WINAPI MsiAdvertiseScriptW( LPCWSTR szScriptFile, DWORD dwFlags, - PHKEY phRegData, BOOL fRemoveItems ) +UINT WINAPI MsiAdvertiseScriptW( const WCHAR *szScriptFile, DWORD dwFlags, HKEY *phRegData, BOOL fRemoveItems ) { - FIXME("%s %08x %p %d\n", - debugstr_w( szScriptFile ), dwFlags, phRegData, fRemoveItems ); + FIXME( "%s, %#lx, %p, %d\n", debugstr_w(szScriptFile), dwFlags, phRegData, fRemoveItems ); return ERROR_CALL_NOT_IMPLEMENTED; } /*********************************************************************** * MsiAdvertiseScriptA [MSI.@] */ -UINT WINAPI MsiAdvertiseScriptA( LPCSTR szScriptFile, DWORD dwFlags, - PHKEY phRegData, BOOL fRemoveItems ) +UINT WINAPI MsiAdvertiseScriptA( const char *szScriptFile, DWORD dwFlags, HKEY *phRegData, BOOL fRemoveItems ) { - FIXME("%s %08x %p %d\n", - debugstr_a( szScriptFile ), dwFlags, phRegData, fRemoveItems ); + FIXME( "%s, %#lx, %p, %d\n", debugstr_a(szScriptFile), dwFlags, phRegData, fRemoveItems ); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -4192,11 +4152,10 @@ UINT WINAPI MsiIsProductElevatedA( LPCSTR szProduct, BOOL *pfElevated ) /*********************************************************************** * MsiSetExternalUIRecord [MSI.@] */ -UINT WINAPI MsiSetExternalUIRecord( INSTALLUI_HANDLER_RECORD handler, - DWORD filter, LPVOID context, - PINSTALLUI_HANDLER_RECORD prev ) +UINT WINAPI MsiSetExternalUIRecord( INSTALLUI_HANDLER_RECORD handler, DWORD filter, void *context, + INSTALLUI_HANDLER_RECORD *prev ) { - TRACE("%p %08x %p %p\n", handler, filter, context, prev); + TRACE( "%p, %#lx, %p, %p\n", handler, filter, context, prev ); if (prev) *prev = gUIHandlerRecord; @@ -4242,14 +4201,16 @@ UINT WINAPI MsiInstallMissingComponentW(LPCWSTR szProduct, LPCWSTR szComponent, return ERROR_SUCCESS; } -UINT WINAPI MsiProvideComponentA( LPCSTR product, LPCSTR feature, LPCSTR component, DWORD mode, LPSTR buf, LPDWORD buflen ) +UINT WINAPI MsiProvideComponentA( const char *product, const char *feature, const char *component, DWORD mode, + char *buf, DWORD *buflen ) { WCHAR *productW = NULL, *componentW = NULL, *featureW = NULL, *bufW = NULL; UINT r = ERROR_OUTOFMEMORY; DWORD lenW = 0; int len; - TRACE("%s, %s, %s, %x, %p, %p\n", debugstr_a(product), debugstr_a(component), debugstr_a(feature), mode, buf, buflen); + TRACE( "%s, %s, %s, %#lx, %p, %p\n", debugstr_a(product), debugstr_a(component), debugstr_a(feature), mode, + buf, buflen ); if (product && !(productW = strdupAtoW( product ))) goto done; if (feature && !(featureW = strdupAtoW( feature ))) goto done; @@ -4288,11 +4249,13 @@ done: return r; } -UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR component, DWORD mode, LPWSTR buf, LPDWORD buflen ) +UINT WINAPI MsiProvideComponentW( const WCHAR *product, const WCHAR *feature, const WCHAR *component, DWORD mode, + WCHAR *buf, DWORD *buflen ) { INSTALLSTATE state; - TRACE("%s, %s, %s, %x, %p, %p\n", debugstr_w(product), debugstr_w(component), debugstr_w(feature), mode, buf, buflen); + TRACE( "%s, %s, %s, %#lx, %p, %p\n", debugstr_w(product), debugstr_w(component), debugstr_w(feature), mode, + buf, buflen); state = MsiQueryFeatureStateW( product, feature ); TRACE("feature state: %d\n", state); @@ -4302,7 +4265,7 @@ UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR comp break; default: - FIXME("mode %x not implemented\n", mode); + FIXME( "mode %#lx not implemented\n", mode ); return ERROR_INSTALL_FAILURE; } @@ -4331,12 +4294,12 @@ UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR comp /*********************************************************************** * MsiBeginTransactionA [MSI.@] */ -UINT WINAPI MsiBeginTransactionA( LPCSTR name, DWORD attrs, MSIHANDLE *id, HANDLE *event ) +UINT WINAPI MsiBeginTransactionA( const char *name, DWORD attrs, MSIHANDLE *id, HANDLE *event ) { WCHAR *nameW; UINT r; - FIXME("%s %u %p %p\n", debugstr_a(name), attrs, id, event); + FIXME( "%s, %#lx, %p, %p\n", debugstr_a(name), attrs, id, event ); nameW = strdupAtoW( name ); if (name && !nameW) @@ -4350,9 +4313,9 @@ UINT WINAPI MsiBeginTransactionA( LPCSTR name, DWORD attrs, MSIHANDLE *id, HANDL /*********************************************************************** * MsiBeginTransactionW [MSI.@] */ -UINT WINAPI MsiBeginTransactionW( LPCWSTR name, DWORD attrs, MSIHANDLE *id, HANDLE *event ) +UINT WINAPI MsiBeginTransactionW( const WCHAR *name, DWORD attrs, MSIHANDLE *id, HANDLE *event ) { - FIXME("%s %u %p %p\n", debugstr_w(name), attrs, id, event); + FIXME( "%s, %#lx, %p, %p\n", debugstr_w(name), attrs, id, event ); *id = (MSIHANDLE)0xdeadbeef; *event = (HANDLE)0xdeadbeef; @@ -4365,7 +4328,7 @@ UINT WINAPI MsiBeginTransactionW( LPCWSTR name, DWORD attrs, MSIHANDLE *id, HAND */ UINT WINAPI MsiJoinTransaction( MSIHANDLE handle, DWORD attrs, HANDLE *event ) { - FIXME("%u %08x %p\n", handle, attrs, event); + FIXME( "%lu, %#lx, %p\n", handle, attrs, event ); *event = (HANDLE)0xdeadbeef; return ERROR_SUCCESS; @@ -4376,13 +4339,13 @@ UINT WINAPI MsiJoinTransaction( MSIHANDLE handle, DWORD attrs, HANDLE *event ) */ UINT WINAPI MsiEndTransaction( DWORD state ) { - FIXME("%u\n", state); + FIXME( "%#lx\n", state ); return ERROR_SUCCESS; } -UINT WINAPI Migrate10CachedPackagesW(void* a, void* b, void* c, DWORD d) +UINT WINAPI Migrate10CachedPackagesW( void *a, void *b, void *c, DWORD d ) { - FIXME("%p,%p,%p,%08x\n", a, b, c, d); + FIXME( "%p, %p, %p, %#lx\n", a, b, c, d ); return ERROR_SUCCESS; } diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index 39233c2bd0c..a8585f20af2 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -85,13 +85,12 @@ UINT VIEW_find_column( MSIVIEW *table, LPCWSTR name, LPCWSTR table_name, UINT *n return ERROR_INVALID_PARAMETER; } -UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb, - LPCSTR szQuery, MSIHANDLE *phView) +UINT WINAPI MsiDatabaseOpenViewA( MSIHANDLE hdb, const char *szQuery, MSIHANDLE *phView ) { UINT r; - LPWSTR szwQuery; + WCHAR *szwQuery; - TRACE("%d %s %p\n", hdb, debugstr_a(szQuery), phView); + TRACE( "%lu, %s, %p\n", hdb, debugstr_a(szQuery), phView ); if( szQuery ) { @@ -108,13 +107,12 @@ UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb, return r; } -UINT MSI_DatabaseOpenViewW(MSIDATABASE *db, - LPCWSTR szQuery, MSIQUERY **pView) +UINT MSI_DatabaseOpenViewW( MSIDATABASE *db, const WCHAR *szQuery, MSIQUERY **pView ) { MSIQUERY *query; UINT r; - TRACE("%s %p\n", debugstr_w(szQuery), pView); + TRACE( "%s, %p\n", debugstr_w(szQuery), pView ); /* pre allocate a handle to hold a pointer to the view */ query = alloc_msiobject( MSIHANDLETYPE_VIEW, sizeof (MSIQUERY), @@ -403,13 +401,13 @@ UINT MSI_ViewFetch(MSIQUERY *query, MSIRECORD **prec) return r; } -UINT WINAPI MsiViewFetch(MSIHANDLE hView, MSIHANDLE *record) +UINT WINAPI MsiViewFetch( MSIHANDLE hView, MSIHANDLE *record ) { MSIQUERY *query; MSIRECORD *rec = NULL; UINT ret; - TRACE("%d %p\n", hView, record); + TRACE( "%lu, %p\n", hView, record ); if( !record ) return ERROR_INVALID_PARAMETER; @@ -468,12 +466,12 @@ UINT MSI_ViewClose(MSIQUERY *query) return view->ops->close( view ); } -UINT WINAPI MsiViewClose(MSIHANDLE hView) +UINT WINAPI MsiViewClose( MSIHANDLE hView ) { MSIQUERY *query; UINT ret; - TRACE("%d\n", hView ); + TRACE( "%lu\n", hView ); query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW ); if (!query) @@ -517,13 +515,13 @@ UINT MSI_ViewExecute(MSIQUERY *query, MSIRECORD *rec ) return view->ops->execute( view, rec ); } -UINT WINAPI MsiViewExecute(MSIHANDLE hView, MSIHANDLE hRec) +UINT WINAPI MsiViewExecute( MSIHANDLE hView, MSIHANDLE hRec ) { MSIQUERY *query; MSIRECORD *rec = NULL; UINT ret; - TRACE("%d %d\n", hView, hRec); + TRACE( "%lu, %lu\n", hView, hRec ); if( hRec ) { @@ -641,13 +639,13 @@ UINT MSI_ViewGetColumnInfo( MSIQUERY *query, MSICOLINFO info, MSIRECORD **prec ) return ERROR_SUCCESS; } -UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hRec) +UINT WINAPI MsiViewGetColumnInfo( MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hRec ) { MSIQUERY *query = NULL; MSIRECORD *rec = NULL; UINT r; - TRACE("%d %d %p\n", hView, info, hRec); + TRACE( "%lu, %d, %p\n", hView, info, hRec ); if( !hRec ) return ERROR_INVALID_PARAMETER; @@ -719,14 +717,13 @@ UINT MSI_ViewModify( MSIQUERY *query, MSIMODIFY mode, MSIRECORD *rec ) return r; } -UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode, - MSIHANDLE hRecord) +UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode, MSIHANDLE hRecord ) { MSIQUERY *query = NULL; MSIRECORD *rec = NULL; UINT r = ERROR_FUNCTION_FAILED; - TRACE("%d %x %d\n", hView, eModifyMode, hRecord); + TRACE( "%lu, %#x, %lu\n", hView, eModifyMode, hRecord ); rec = msihandle2msiinfo( hRecord, MSIHANDLETYPE_RECORD ); @@ -770,13 +767,13 @@ UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode, return r; } -MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR buffer, LPDWORD buflen ) +MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, WCHAR *buffer, DWORD *buflen ) { MSIQUERY *query; const WCHAR *column; MSIDBERROR r; - TRACE("%u %p %p\n", handle, buffer, buflen); + TRACE( "%lu, %p, %p\n", handle, buffer, buflen ); if (!buflen) return MSIDBERROR_INVALIDARG; @@ -821,13 +818,13 @@ MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR buffer, LPDWORD buf return r; } -MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR buffer, LPDWORD buflen ) +MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, char *buffer, DWORD *buflen ) { MSIQUERY *query; const WCHAR *column; MSIDBERROR r; - TRACE("%u %p %p\n", handle, buffer, buflen); + TRACE( "%lu, %p, %p\n", handle, buffer, buflen ); if (!buflen) return MSIDBERROR_INVALIDARG; @@ -892,7 +889,7 @@ UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db, const WCHAR *transform, int e hr = IStorage_OpenStorage( db->storage, transform + 1, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &stg ); if (FAILED( hr )) { - WARN( "failed to open substorage transform 0x%08x\n", hr ); + WARN( "failed to open substorage transform %#lx\n", hr ); return ERROR_FUNCTION_FAILED; } } @@ -901,7 +898,7 @@ UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db, const WCHAR *transform, int e hr = StgOpenStorage( transform, NULL, STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg ); if (FAILED( hr )) { - WARN( "failed to open file transform 0x%08x\n", hr ); + WARN( "failed to open file transform %#lx\n", hr ); return ERROR_FUNCTION_FAILED; } } @@ -938,7 +935,7 @@ UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb, const char *transform, in WCHAR *wstr; UINT ret; - TRACE( "%d %s %08x\n", hdb, debugstr_a(transform), error_cond ); + TRACE( "%lu, %s, %#x\n", hdb, debugstr_a(transform), error_cond ); wstr = strdupAtoW( transform ); if (transform && !wstr) @@ -949,19 +946,17 @@ UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb, const char *transform, in return ret; } -UINT WINAPI MsiDatabaseGenerateTransformA( MSIHANDLE hdb, MSIHANDLE hdbref, - LPCSTR szTransformFile, int iReserved1, int iReserved2 ) +UINT WINAPI MsiDatabaseGenerateTransformA( MSIHANDLE hdb, MSIHANDLE hdbref, const char *szTransformFile, + int iReserved1, int iReserved2 ) { - FIXME("%d %d %s %d %d\n", hdb, hdbref, - debugstr_a(szTransformFile), iReserved1, iReserved2); + FIXME( "%lu, %lu, %s, %d, %d\n", hdb, hdbref, debugstr_a(szTransformFile), iReserved1, iReserved2 ); return ERROR_CALL_NOT_IMPLEMENTED; } -UINT WINAPI MsiDatabaseGenerateTransformW( MSIHANDLE hdb, MSIHANDLE hdbref, - LPCWSTR szTransformFile, int iReserved1, int iReserved2 ) +UINT WINAPI MsiDatabaseGenerateTransformW( MSIHANDLE hdb, MSIHANDLE hdbref, const WCHAR *szTransformFile, + int iReserved1, int iReserved2 ) { - FIXME("%d %d %s %d %d\n", hdb, hdbref, - debugstr_w(szTransformFile), iReserved1, iReserved2); + FIXME( "%lu, %lu, %s, %d, %d\n", hdb, hdbref, debugstr_w(szTransformFile), iReserved1, iReserved2 ); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -970,7 +965,7 @@ UINT WINAPI MsiDatabaseCommit( MSIHANDLE hdb ) MSIDATABASE *db; UINT r; - TRACE("%d\n", hdb); + TRACE( "%lu\n", hdb ); db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); if( !db ) @@ -1066,7 +1061,7 @@ UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *db, r = MSI_IterateRecords( query, 0, msi_primary_key_iterator, &info ); if( r == ERROR_SUCCESS ) { - TRACE("Found %d primary keys\n", info.n ); + TRACE( "found %lu primary keys\n", info.n ); /* allocate a record and fill in the names of the tables */ info.rec = MSI_CreateRecord( info.n ); @@ -1082,14 +1077,13 @@ UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *db, return r; } -UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb, - LPCWSTR table, MSIHANDLE* phRec ) +UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb, const WCHAR *table, MSIHANDLE *phRec ) { MSIRECORD *rec = NULL; MSIDATABASE *db; UINT r; - TRACE("%d %s %p\n", hdb, debugstr_w(table), phRec); + TRACE( "%lu, %s, %p\n", hdb, debugstr_w(table), phRec ); db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); if( !db ) @@ -1132,13 +1126,12 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb, return r; } -UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE hdb, - LPCSTR table, MSIHANDLE* phRec) +UINT WINAPI MsiDatabaseGetPrimaryKeysA( MSIHANDLE hdb, const char *table, MSIHANDLE *phRec ) { - LPWSTR szwTable = NULL; + WCHAR *szwTable = NULL; UINT r; - TRACE("%d %s %p\n", hdb, debugstr_a(table), phRec); + TRACE( "%lu, %s, %p\n", hdb, debugstr_a(table), phRec ); if( table ) { @@ -1152,13 +1145,12 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE hdb, return r; } -MSICONDITION WINAPI MsiDatabaseIsTablePersistentA( - MSIHANDLE hDatabase, LPCSTR szTableName) +MSICONDITION WINAPI MsiDatabaseIsTablePersistentA( MSIHANDLE hDatabase, const char *szTableName ) { - LPWSTR szwTableName = NULL; + WCHAR *szwTableName = NULL; MSICONDITION r; - TRACE("%x %s\n", hDatabase, debugstr_a(szTableName)); + TRACE( "%lu, %s\n", hDatabase, debugstr_a(szTableName) ); if( szTableName ) { @@ -1172,13 +1164,12 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentA( return r; } -MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( - MSIHANDLE hDatabase, LPCWSTR szTableName) +MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( MSIHANDLE hDatabase, const WCHAR *szTableName ) { MSIDATABASE *db; MSICONDITION r; - TRACE("%x %s\n", hDatabase, debugstr_w(szTableName)); + TRACE( "%lu, %s\n", hDatabase, debugstr_w(szTableName) ); db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE ); if( !db ) diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c index b65b9e98959..3095026003e 100644 --- a/dll/win32/msi/package.c +++ b/dll/win32/msi/package.c @@ -298,7 +298,7 @@ static void free_package_structures( MSIPACKAGE *package ) list_remove( &binary->entry ); if (!DeleteFileW( binary->tmpfile )) - ERR("failed to delete %s (%u)\n", debugstr_w(binary->tmpfile), GetLastError()); + ERR( "failed to delete %s (%lu)\n", debugstr_w(binary->tmpfile), GetLastError() ); msi_free( binary->source ); msi_free( binary->tmpfile ); msi_free( binary ); @@ -321,7 +321,7 @@ static void free_package_structures( MSIPACKAGE *package ) list_remove( &patch->entry ); if (patch->delete_on_close && !DeleteFileW( patch->localfile )) { - ERR("failed to delete %s (%u)\n", debugstr_w(patch->localfile), GetLastError()); + ERR( "failed to delete %s (%lu)\n", debugstr_w(patch->localfile), GetLastError() ); } msi_free_patchinfo( patch ); } @@ -1553,12 +1553,12 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage) return ERROR_SUCCESS; } -UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phPackage) +UINT WINAPI MsiOpenPackageExW( const WCHAR *szPackage, DWORD dwOptions, MSIHANDLE *phPackage ) { MSIPACKAGE *package = NULL; UINT ret; - TRACE("%s %08x %p\n", debugstr_w(szPackage), dwOptions, phPackage ); + TRACE( "%s, %#lx, %p\n", debugstr_w(szPackage), dwOptions, phPackage ); if( !szPackage || !phPackage ) return ERROR_INVALID_PARAMETER; @@ -1570,7 +1570,7 @@ UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phP } if( dwOptions ) - FIXME("dwOptions %08x not supported\n", dwOptions); + FIXME( "dwOptions %#lx not supported\n", dwOptions ); ret = MSI_OpenPackageW( szPackage, 0, &package ); if( ret == ERROR_SUCCESS ) @@ -1615,13 +1615,13 @@ UINT WINAPI MsiOpenPackageA(LPCSTR szPackage, MSIHANDLE *phPackage) return MsiOpenPackageExA( szPackage, 0, phPackage ); } -MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall) +MSIHANDLE WINAPI MsiGetActiveDatabase( MSIHANDLE hInstall ) { MSIPACKAGE *package; MSIHANDLE handle = 0; MSIHANDLE remote; - TRACE("(%d)\n",hInstall); + TRACE( "%lu\n", hInstall ); package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE); if( package) @@ -1821,21 +1821,21 @@ INT MSI_ProcessMessageVerbatim(MSIPACKAGE *package, INSTALLMESSAGE eMessageType, if (gUIHandlerRecord && (gUIFilterRecord & log_type)) { MSIHANDLE rec = alloc_msihandle(&record->hdr); - TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, hRecord=%u)\n", - gUIHandlerRecord, gUIContextRecord, eMessageType, rec); + TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, hRecord = %lu)\n", + gUIHandlerRecord, gUIContextRecord, eMessageType, rec ); rc = gUIHandlerRecord( gUIContextRecord, eMessageType, rec ); MsiCloseHandle( rec ); } if (!rc && gUIHandlerW && (gUIFilter & log_type)) { - TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, szMessage=%s)\n", - gUIHandlerW, gUIContext, eMessageType, debugstr_w(message)); + TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, szMessage = %s)\n", + gUIHandlerW, gUIContext, eMessageType, debugstr_w(message) ); rc = gUIHandlerW( gUIContext, eMessageType, message ); } else if (!rc && gUIHandlerA && (gUIFilter & log_type)) { - TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, szMessage=%s)\n", - gUIHandlerA, gUIContext, eMessageType, debugstr_a(msg)); + TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, szMessage = %s)\n", + gUIHandlerA, gUIContext, eMessageType, debugstr_a(msg) ); rc = gUIHandlerA( gUIContext, eMessageType, msg ); } @@ -2214,8 +2214,7 @@ UINT msi_get_property( MSIDATABASE *db, LPCWSTR szName, TRACE("returning %s for property %s\n", debugstr_wn(szValueBuf, *pchValueBuf), debugstr_w(szName)); else if (rc == ERROR_MORE_DATA) - TRACE("need %d sized buffer for %s\n", *pchValueBuf, - debugstr_w(szName)); + TRACE( "need %lu sized buffer for %s\n", *pchValueBuf, debugstr_w(szName) ); else { *pchValueBuf = 0; diff --git a/dll/win32/msi/record.c b/dll/win32/msi/record.c index 46c2d71f6f1..9e11752cc97 100644 --- a/dll/win32/msi/record.c +++ b/dll/win32/msi/record.c @@ -115,7 +115,7 @@ UINT WINAPI MsiRecordGetFieldCount( MSIHANDLE handle ) MSIRECORD *rec; UINT ret; - TRACE("%d\n", handle ); + TRACE( "%lu\n", handle ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -239,7 +239,7 @@ int WINAPI MsiRecordGetInteger( MSIHANDLE handle, UINT iField) MSIRECORD *rec; UINT ret; - TRACE("%d %d\n", handle, iField ); + TRACE( "%lu, %u\n", handle, iField ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -258,7 +258,7 @@ UINT WINAPI MsiRecordClearData( MSIHANDLE handle ) MSIRECORD *rec; UINT i; - TRACE("%d\n", handle ); + TRACE( "%lu\n", handle ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -305,7 +305,7 @@ UINT WINAPI MsiRecordSetInteger( MSIHANDLE handle, UINT iField, int iVal ) MSIRECORD *rec; UINT ret; - TRACE("%d %u %d\n", handle, iField, iVal); + TRACE( "%lu, %u, %d\n", handle, iField, iVal ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -335,7 +335,7 @@ BOOL WINAPI MsiRecordIsNull( MSIHANDLE handle, UINT iField ) MSIRECORD *rec; UINT ret; - TRACE("%d %d\n", handle, iField ); + TRACE( "%lu, %u\n", handle, iField ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -400,13 +400,12 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, UINT iField, return ret; } -UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, UINT iField, - LPSTR szValue, LPDWORD pcchValue) +UINT WINAPI MsiRecordGetStringA( MSIHANDLE handle, UINT iField, char *szValue, DWORD *pcchValue ) { MSIRECORD *rec; UINT ret; - TRACE("%d %d %p %p\n", handle, iField, szValue, pcchValue); + TRACE( "%lu, %d, %p, %p\n", handle, iField, szValue, pcchValue ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -436,13 +435,12 @@ const WCHAR *MSI_RecordGetString( const MSIRECORD *rec, UINT iField ) return msi_record_get_string( rec, iField, NULL ); } -UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField, - LPWSTR szValue, LPDWORD pcchValue) +UINT MSI_RecordGetStringW( MSIRECORD *rec, UINT iField, WCHAR *szValue, DWORD *pcchValue ) { UINT len = 0, ret = ERROR_SUCCESS; WCHAR buffer[16]; - TRACE("%p %d %p %p\n", rec, iField, szValue, pcchValue); + TRACE( "%p, %u, %p, %p\n", rec, iField, szValue, pcchValue ); if( iField > rec->count ) { @@ -481,13 +479,12 @@ UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField, return ret; } -UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, UINT iField, - LPWSTR szValue, LPDWORD pcchValue) +UINT WINAPI MsiRecordGetStringW( MSIHANDLE handle, UINT iField, WCHAR *szValue, DWORD *pcchValue ) { MSIRECORD *rec; UINT ret; - TRACE("%d %d %p %p\n", handle, iField, szValue, pcchValue); + TRACE( "%lu, %u, %p, %p\n", handle, iField, szValue, pcchValue ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -532,12 +529,12 @@ static UINT MSI_RecordDataSize(MSIRECORD *rec, UINT iField) return 0; } -UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField) +UINT WINAPI MsiRecordDataSize( MSIHANDLE handle, UINT iField ) { MSIRECORD *rec; UINT ret; - TRACE("%d %d\n", handle, iField); + TRACE( "%lu, %u\n", handle, iField ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -549,13 +546,13 @@ UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField) return ret; } -UINT WINAPI MsiRecordSetStringA( MSIHANDLE handle, UINT iField, LPCSTR szValue ) +UINT WINAPI MsiRecordSetStringA( MSIHANDLE handle, UINT iField, const char *szValue ) { WCHAR *valueW = NULL; MSIRECORD *rec; UINT ret; - TRACE("%d %d %s\n", handle, iField, debugstr_a(szValue)); + TRACE( "%lu, %u %s\n", handle, iField, debugstr_a(szValue) ); if (szValue && !(valueW = strdupAtoW( szValue ))) return ERROR_OUTOFMEMORY; @@ -604,12 +601,12 @@ UINT MSI_RecordSetStringW( MSIRECORD *rec, UINT iField, LPCWSTR szValue ) return msi_record_set_string( rec, iField, szValue, -1 ); } -UINT WINAPI MsiRecordSetStringW( MSIHANDLE handle, UINT iField, LPCWSTR szValue ) +UINT WINAPI MsiRecordSetStringW( MSIHANDLE handle, UINT iField, const WCHAR *szValue ) { MSIRECORD *rec; UINT ret; - TRACE("%d %d %s\n", handle, iField, debugstr_w(szValue)); + TRACE( "%lu, %u, %s\n", handle, iField, debugstr_w(szValue) ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -667,8 +664,7 @@ static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm) ulSize.QuadPart = sz; IStream_SetSize(*pstm, ulSize); - TRACE("read %s, %d bytes into IStream %p\n", debugstr_w(szFile), sz, *pstm); - + TRACE( "read %s, %lu bytes into IStream %p\n", debugstr_w(szFile), sz, *pstm ); return ERROR_SUCCESS; } @@ -725,12 +721,12 @@ UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilenam return ERROR_SUCCESS; } -UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, LPCSTR szFilename) +UINT WINAPI MsiRecordSetStreamA( MSIHANDLE hRecord, UINT iField, const char *szFilename ) { - LPWSTR wstr = NULL; + WCHAR *wstr = NULL; UINT ret; - TRACE("%d %d %s\n", hRecord, iField, debugstr_a(szFilename)); + TRACE( "%lu, %u, %s\n", hRecord, iField, debugstr_a(szFilename) ); if( szFilename ) { @@ -744,12 +740,12 @@ UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, LPCSTR szFilenam return ret; } -UINT WINAPI MsiRecordSetStreamW(MSIHANDLE handle, UINT iField, LPCWSTR szFilename) +UINT WINAPI MsiRecordSetStreamW( MSIHANDLE handle, UINT iField, const WCHAR *szFilename ) { MSIRECORD *rec; UINT ret; - TRACE("%d %d %s\n", handle, iField, debugstr_w(szFilename)); + TRACE( "%lu, %u, %s\n", handle, iField, debugstr_w(szFilename) ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -820,12 +816,12 @@ UINT MSI_RecordReadStream(MSIRECORD *rec, UINT iField, char *buf, LPDWORD sz) return ERROR_SUCCESS; } -UINT WINAPI MsiRecordReadStream(MSIHANDLE handle, UINT iField, char *buf, LPDWORD sz) +UINT WINAPI MsiRecordReadStream( MSIHANDLE handle, UINT iField, char *buf, DWORD *sz ) { MSIRECORD *rec; UINT ret; - TRACE("%d %d %p %p\n", handle, iField, buf, sz); + TRACE( "%lu, %u, %p, %p\n", handle, iField, buf, sz ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) diff --git a/dll/win32/msi/registry.c b/dll/win32/msi/registry.c index 5dc3c0a81c3..877b889ef42 100644 --- a/dll/win32/msi/registry.c +++ b/dll/win32/msi/registry.c @@ -1021,12 +1021,12 @@ UINT WINAPI MsiDecomposeDescriptorA( LPCSTR szDescriptor, LPSTR szProduct, return r; } -UINT WINAPI MsiEnumProductsA(DWORD index, LPSTR lpguid) +UINT WINAPI MsiEnumProductsA( DWORD index, char *lpguid ) { DWORD r; WCHAR szwGuid[GUID_SIZE]; - TRACE("%d %p\n", index, lpguid); + TRACE( "%lu, %p\n", index, lpguid ); if (NULL == lpguid) return ERROR_INVALID_PARAMETER; @@ -1037,9 +1037,9 @@ UINT WINAPI MsiEnumProductsA(DWORD index, LPSTR lpguid) return r; } -UINT WINAPI MsiEnumProductsW(DWORD index, LPWSTR lpguid) +UINT WINAPI MsiEnumProductsW( DWORD index, WCHAR *lpguid ) { - TRACE("%d %p\n", index, lpguid); + TRACE("%lu, %p\n", index, lpguid ); if (NULL == lpguid) return ERROR_INVALID_PARAMETER; @@ -1048,13 +1048,13 @@ UINT WINAPI MsiEnumProductsW(DWORD index, LPWSTR lpguid) NULL, NULL, NULL ); } -UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index, LPSTR szFeature, LPSTR szParent) +UINT WINAPI MsiEnumFeaturesA( const char *szProduct, DWORD index, char *szFeature, char *szParent ) { DWORD r; WCHAR szwFeature[GUID_SIZE], szwParent[GUID_SIZE]; - LPWSTR szwProduct = NULL; + WCHAR *szwProduct = NULL; - TRACE("%s %d %p %p\n", debugstr_a(szProduct), index, szFeature, szParent); + TRACE( "%s, %lu, %p, %p\n", debugstr_a(szProduct), index, szFeature, szParent ); if( szProduct ) { @@ -1066,10 +1066,8 @@ UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index, LPSTR szFeature, LPS r = MsiEnumFeaturesW(szwProduct, index, szwFeature, szwParent); if( r == ERROR_SUCCESS ) { - WideCharToMultiByte(CP_ACP, 0, szwFeature, -1, - szFeature, GUID_SIZE, NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, szwParent, -1, - szParent, GUID_SIZE, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, szwFeature, -1, szFeature, GUID_SIZE, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, szwParent, -1, szParent, GUID_SIZE, NULL, NULL); } msi_free( szwProduct); @@ -1077,12 +1075,12 @@ UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index, LPSTR szFeature, LPS return r; } -UINT WINAPI MsiEnumFeaturesW(LPCWSTR szProduct, DWORD index, LPWSTR szFeature, LPWSTR szParent) +UINT WINAPI MsiEnumFeaturesW( const WCHAR *szProduct, DWORD index, WCHAR *szFeature, WCHAR *szParent ) { HKEY hkeyProduct = 0; DWORD r, sz; - TRACE("%s %d %p %p\n", debugstr_w(szProduct), index, szFeature, szParent); + TRACE( "%s, %lu, %p, %p\n", debugstr_w(szProduct), index, szFeature, szParent ); if( !szProduct ) return ERROR_INVALID_PARAMETER; @@ -1098,12 +1096,12 @@ UINT WINAPI MsiEnumFeaturesW(LPCWSTR szProduct, DWORD index, LPWSTR szFeature, L return r; } -UINT WINAPI MsiEnumComponentsA(DWORD index, LPSTR lpguid) +UINT WINAPI MsiEnumComponentsA( DWORD index, char *lpguid ) { DWORD r; WCHAR szwGuid[GUID_SIZE]; - TRACE("%u, %p\n", index, lpguid); + TRACE( "%lu, %p\n", index, lpguid ); if (!lpguid) return ERROR_INVALID_PARAMETER; @@ -1114,23 +1112,23 @@ UINT WINAPI MsiEnumComponentsA(DWORD index, LPSTR lpguid) return r; } -UINT WINAPI MsiEnumComponentsW(DWORD index, LPWSTR lpguid) +UINT WINAPI MsiEnumComponentsW( DWORD index, WCHAR *lpguid ) { - TRACE("%u, %p\n", index, lpguid); + TRACE( "%lu, %p\n", index, lpguid ); if (!lpguid) return ERROR_INVALID_PARAMETER; return MsiEnumComponentsExW( L"S-1-1-0", MSIINSTALLCONTEXT_ALL, index, lpguid, NULL, NULL, NULL ); } -UINT WINAPI MsiEnumComponentsExA( LPCSTR user_sid, DWORD ctx, DWORD index, CHAR guid[39], - MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len ) +UINT WINAPI MsiEnumComponentsExA( const char *user_sid, DWORD ctx, DWORD index, CHAR guid[39], + MSIINSTALLCONTEXT *installed_ctx, char *sid, DWORD *sid_len ) { UINT r; WCHAR *user_sidW = NULL, *sidW = NULL, guidW[GUID_SIZE]; - TRACE("%s, %u, %u, %p, %p, %p, %p\n", debugstr_a(user_sid), ctx, index, guid, installed_ctx, - sid, sid_len); + TRACE( "%s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(user_sid), ctx, index, guid, installed_ctx, + sid, sid_len ); if (sid && !sid_len) return ERROR_INVALID_PARAMETER; if (user_sid && !(user_sidW = strdupAtoW( user_sid ))) return ERROR_OUTOFMEMORY; @@ -1300,15 +1298,15 @@ done: return r; } -UINT WINAPI MsiEnumComponentsExW( LPCWSTR user_sid, DWORD ctx, DWORD index, WCHAR guid[39], - MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len ) +UINT WINAPI MsiEnumComponentsExW( const WCHAR *user_sid, DWORD ctx, DWORD index, WCHAR guid[39], + MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid, DWORD *sid_len ) { UINT r; DWORD idx = 0; static DWORD last_index; - TRACE("%s, %u, %u, %p, %p, %p, %p\n", debugstr_w(user_sid), ctx, index, guid, installed_ctx, - sid, sid_len); + TRACE( "%s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(user_sid), ctx, index, guid, installed_ctx, + sid, sid_len ); if ((sid && !sid_len) || !ctx || (user_sid && ctx == MSIINSTALLCONTEXT_MACHINE)) return ERROR_INVALID_PARAMETER; @@ -1327,13 +1325,13 @@ UINT WINAPI MsiEnumComponentsExW( LPCWSTR user_sid, DWORD ctx, DWORD index, WCHA return r; } -UINT WINAPI MsiEnumClientsA(LPCSTR szComponent, DWORD index, LPSTR szProduct) +UINT WINAPI MsiEnumClientsA( const char *szComponent, DWORD index, char *szProduct ) { DWORD r; WCHAR szwProduct[GUID_SIZE]; - LPWSTR szwComponent = NULL; + WCHAR *szwComponent = NULL; - TRACE("%s %d %p\n", debugstr_a(szComponent), index, szProduct); + TRACE( "%s, %lu, %p\n", debugstr_a(szComponent), index, szProduct ); if ( !szProduct ) return ERROR_INVALID_PARAMETER; @@ -1347,23 +1345,20 @@ UINT WINAPI MsiEnumClientsA(LPCSTR szComponent, DWORD index, LPSTR szProduct) r = MsiEnumClientsW(szComponent?szwComponent:NULL, index, szwProduct); if( r == ERROR_SUCCESS ) - { - WideCharToMultiByte(CP_ACP, 0, szwProduct, -1, - szProduct, GUID_SIZE, NULL, NULL); - } + WideCharToMultiByte(CP_ACP, 0, szwProduct, -1, szProduct, GUID_SIZE, NULL, NULL); msi_free( szwComponent); return r; } -UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct) +UINT WINAPI MsiEnumClientsW( const WCHAR *szComponent, DWORD index, WCHAR *szProduct ) { HKEY hkeyComp = 0; DWORD r, sz; WCHAR szValName[SQUASHED_GUID_SIZE]; - TRACE("%s %d %p\n", debugstr_w(szComponent), index, szProduct); + TRACE( "%s, %lu, %p\n", debugstr_w(szComponent), index, szProduct ); if (!szComponent || !*szComponent || !szProduct) return ERROR_INVALID_PARAMETER; @@ -1396,35 +1391,33 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct) return r; } -UINT WINAPI MsiEnumClientsExA(LPCSTR component, LPCSTR usersid, DWORD ctx, DWORD index, - CHAR installed_product[GUID_SIZE], - MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len) +UINT WINAPI MsiEnumClientsExA( const char *component, const char *usersid, DWORD ctx, DWORD index, + char installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, char *sid, + DWORD *sid_len ) { - FIXME("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_a(component), debugstr_a(usersid), - ctx, index, installed_product, installed_ctx, sid, sid_len); + FIXME( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(component), debugstr_a(usersid), ctx, index, + installed_product, installed_ctx, sid, sid_len ); return ERROR_ACCESS_DENIED; } -UINT WINAPI MsiEnumClientsExW(LPCWSTR component, LPCWSTR usersid, DWORD ctx, DWORD index, - WCHAR installed_product[GUID_SIZE], - MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len) +UINT WINAPI MsiEnumClientsExW( const WCHAR *component, const WCHAR *usersid, DWORD ctx, DWORD index, + WCHAR installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid, + DWORD *sid_len ) { - FIXME("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_w(component), debugstr_w(usersid), - ctx, index, installed_product, installed_ctx, sid, sid_len); + FIXME( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(component), debugstr_w(usersid), ctx, index, + installed_product, installed_ctx, sid, sid_len ); return ERROR_ACCESS_DENIED; } -static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex, - awstring *lpQualBuf, LPDWORD pcchQual, - awstring *lpAppBuf, LPDWORD pcchAppBuf ) +static UINT MSI_EnumComponentQualifiers( const WCHAR *szComponent, DWORD iIndex, awstring *lpQualBuf, + DWORD *pcchQual, awstring *lpAppBuf, DWORD *pcchAppBuf ) { DWORD name_sz, val_sz, name_max, val_max, type, ofs; - LPWSTR name = NULL, val = NULL; + WCHAR *name = NULL, *val = NULL; UINT r, r2; HKEY key; - TRACE("%s %08x %p %p %p %p\n", debugstr_w(szComponent), iIndex, - lpQualBuf, pcchQual, lpAppBuf, pcchAppBuf); + TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_w(szComponent), iIndex, lpQualBuf, pcchQual, lpAppBuf, pcchAppBuf ); if (!szComponent) return ERROR_INVALID_PARAMETER; @@ -1451,8 +1444,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex, { name_sz = name_max; val_sz = val_max; - r = RegEnumValueW( key, iIndex, name, &name_sz, - NULL, &type, (LPBYTE)val, &val_sz ); + r = RegEnumValueW( key, iIndex, name, &name_sz, NULL, &type, (BYTE *)val, &val_sz ); if (r == ERROR_SUCCESS) break; if (r != ERROR_MORE_DATA) @@ -1460,7 +1452,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex, if (type != REG_MULTI_SZ) { - ERR("component data has wrong type (%d)\n", type); + ERR( "component data has wrong type (%lu)\n", type ); goto end; } @@ -1483,7 +1475,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex, goto end; continue; } - ERR("should be enough data, but isn't %d %d\n", name_sz, val_sz ); + ERR( "should be enough data, but isn't %lu %lu\n", name_sz, val_sz ); goto end; } @@ -1510,17 +1502,16 @@ end: /************************************************************************* * MsiEnumComponentQualifiersA [MSI.@] */ -UINT WINAPI MsiEnumComponentQualifiersA( LPCSTR szComponent, DWORD iIndex, - LPSTR lpQualifierBuf, LPDWORD pcchQualifierBuf, - LPSTR lpApplicationDataBuf, LPDWORD pcchApplicationDataBuf ) +UINT WINAPI MsiEnumComponentQualifiersA( const char *szComponent, DWORD iIndex, char *lpQualifierBuf, + DWORD *pcchQualifierBuf, char *lpApplicationDataBuf, + DWORD *pcchApplicationDataBuf ) { awstring qual, appdata; - LPWSTR comp; + WCHAR *comp; UINT r; - TRACE("%s %08x %p %p %p %p\n", debugstr_a(szComponent), iIndex, - lpQualifierBuf, pcchQualifierBuf, lpApplicationDataBuf, - pcchApplicationDataBuf); + TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_a(szComponent), iIndex, lpQualifierBuf, pcchQualifierBuf, + lpApplicationDataBuf, pcchApplicationDataBuf ); comp = strdupAtoW( szComponent ); if (szComponent && !comp) @@ -1541,15 +1532,14 @@ UINT WINAPI MsiEnumComponentQualifiersA( LPCSTR szComponent, DWORD iIndex, /************************************************************************* * MsiEnumComponentQualifiersW [MSI.@] */ -UINT WINAPI MsiEnumComponentQualifiersW( LPCWSTR szComponent, DWORD iIndex, - LPWSTR lpQualifierBuf, LPDWORD pcchQualifierBuf, - LPWSTR lpApplicationDataBuf, LPDWORD pcchApplicationDataBuf ) +UINT WINAPI MsiEnumComponentQualifiersW( const WCHAR *szComponent, DWORD iIndex, WCHAR *lpQualifierBuf, + DWORD *pcchQualifierBuf, WCHAR *lpApplicationDataBuf, + DWORD *pcchApplicationDataBuf ) { awstring qual, appdata; - TRACE("%s %08x %p %p %p %p\n", debugstr_w(szComponent), iIndex, - lpQualifierBuf, pcchQualifierBuf, lpApplicationDataBuf, - pcchApplicationDataBuf); + TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_w(szComponent), iIndex, lpQualifierBuf, pcchQualifierBuf, + lpApplicationDataBuf, pcchApplicationDataBuf ); qual.unicode = TRUE; qual.str.w = lpQualifierBuf; @@ -1557,24 +1547,22 @@ UINT WINAPI MsiEnumComponentQualifiersW( LPCWSTR szComponent, DWORD iIndex, appdata.unicode = TRUE; appdata.str.w = lpApplicationDataBuf; - return MSI_EnumComponentQualifiers( szComponent, iIndex, - &qual, pcchQualifierBuf, &appdata, pcchApplicationDataBuf ); + return MSI_EnumComponentQualifiers( szComponent, iIndex, &qual, pcchQualifierBuf, &appdata, pcchApplicationDataBuf ); } /************************************************************************* * MsiEnumRelatedProductsW [MSI.@] * */ -UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved, - DWORD iProductIndex, LPWSTR lpProductBuf) +UINT WINAPI MsiEnumRelatedProductsW( const WCHAR *szUpgradeCode, DWORD dwReserved, DWORD iProductIndex, + WCHAR *lpProductBuf ) { UINT r; HKEY hkey; WCHAR szKeyName[SQUASHED_GUID_SIZE]; DWORD dwSize = ARRAY_SIZE(szKeyName); - TRACE("%s %u %u %p\n", debugstr_w(szUpgradeCode), dwReserved, - iProductIndex, lpProductBuf); + TRACE( "%s, %#lx, %lu, %p\n", debugstr_w(szUpgradeCode), dwReserved, iProductIndex, lpProductBuf ); if (NULL == szUpgradeCode) return ERROR_INVALID_PARAMETER; @@ -1597,15 +1585,14 @@ UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved, * MsiEnumRelatedProductsA [MSI.@] * */ -UINT WINAPI MsiEnumRelatedProductsA(LPCSTR szUpgradeCode, DWORD dwReserved, - DWORD iProductIndex, LPSTR lpProductBuf) +UINT WINAPI MsiEnumRelatedProductsA( const char *szUpgradeCode, DWORD dwReserved, DWORD iProductIndex, + char *lpProductBuf ) { - LPWSTR szwUpgradeCode = NULL; + WCHAR *szwUpgradeCode = NULL; WCHAR productW[GUID_SIZE]; UINT r; - TRACE("%s %u %u %p\n", debugstr_a(szUpgradeCode), dwReserved, - iProductIndex, lpProductBuf); + TRACE( "%s, %#lx, %lu, %p\n", debugstr_a(szUpgradeCode), dwReserved, iProductIndex, lpProductBuf ); if (szUpgradeCode) { @@ -1628,23 +1615,19 @@ UINT WINAPI MsiEnumRelatedProductsA(LPCSTR szUpgradeCode, DWORD dwReserved, /*********************************************************************** * MsiEnumPatchesExA [MSI.@] */ -UINT WINAPI MsiEnumPatchesExA(LPCSTR szProductCode, LPCSTR szUserSid, - DWORD dwContext, DWORD dwFilter, DWORD dwIndex, LPSTR szPatchCode, - LPSTR szTargetProductCode, MSIINSTALLCONTEXT *pdwTargetProductContext, - LPSTR szTargetUserSid, LPDWORD pcchTargetUserSid) +UINT WINAPI MsiEnumPatchesExA( const char *szProductCode, const char *szUserSid, DWORD dwContext, DWORD dwFilter, + DWORD dwIndex, char *szPatchCode, char *szTargetProductCode, + MSIINSTALLCONTEXT *pdwTargetProductContext, char *szTargetUserSid, + DWORD *pcchTargetUserSid ) { - LPWSTR prodcode = NULL; - LPWSTR usersid = NULL; - LPWSTR targsid = NULL; - WCHAR patch[GUID_SIZE]; - WCHAR targprod[GUID_SIZE]; + WCHAR *prodcode = NULL, *usersid = NULL, *targsid = NULL; + WCHAR patch[GUID_SIZE], targprod[GUID_SIZE]; DWORD len; UINT r; - TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", - debugstr_a(szProductCode), debugstr_a(szUserSid), dwContext, dwFilter, - dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, - szTargetUserSid, pcchTargetUserSid); + TRACE( "%s, %s, %#lx, %lu, %lu, %p, %p, %p, %p, %p\n", debugstr_a(szProductCode), debugstr_a(szUserSid), + dwContext, dwFilter, dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, szTargetUserSid, + pcchTargetUserSid ); if (szTargetUserSid && !pcchTargetUserSid) return ERROR_INVALID_PARAMETER; @@ -1977,10 +1960,10 @@ done: /*********************************************************************** * MsiEnumPatchesExW [MSI.@] */ -UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid, - DWORD dwContext, DWORD dwFilter, DWORD dwIndex, LPWSTR szPatchCode, - LPWSTR szTargetProductCode, MSIINSTALLCONTEXT *pdwTargetProductContext, - LPWSTR szTargetUserSid, LPDWORD pcchTargetUserSid) +UINT WINAPI MsiEnumPatchesExW( const WCHAR *szProductCode, const WCHAR *szUserSid, DWORD dwContext, DWORD dwFilter, + DWORD dwIndex, WCHAR *szPatchCode, WCHAR *szTargetProductCode, + MSIINSTALLCONTEXT *pdwTargetProductContext, WCHAR *szTargetUserSid, + DWORD *pcchTargetUserSid ) { WCHAR squashed_pc[SQUASHED_GUID_SIZE]; DWORD idx = 0; @@ -1988,10 +1971,9 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid, static DWORD last_index; - TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", - debugstr_w(szProductCode), debugstr_w(szUserSid), dwContext, dwFilter, - dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, - szTargetUserSid, pcchTargetUserSid); + TRACE( "%s, %s, %#lx, %lu, %lu, %p, %p, %p, %p, %p)\n", debugstr_w(szProductCode), debugstr_w(szUserSid), + dwContext, dwFilter, dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, szTargetUserSid, + pcchTargetUserSid ); if (!szProductCode || !squash_guid( szProductCode, squashed_pc )) return ERROR_INVALID_PARAMETER; @@ -2031,16 +2013,15 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid, /*********************************************************************** * MsiEnumPatchesA [MSI.@] */ -UINT WINAPI MsiEnumPatchesA(LPCSTR szProduct, DWORD iPatchIndex, - LPSTR lpPatchBuf, LPSTR lpTransformsBuf, LPDWORD pcchTransformsBuf) +UINT WINAPI MsiEnumPatchesA( const char *szProduct, DWORD iPatchIndex, char *lpPatchBuf, char *lpTransformsBuf, + DWORD *pcchTransformsBuf ) { - LPWSTR product, transforms; - WCHAR patch[GUID_SIZE]; + WCHAR *product, *transforms, patch[GUID_SIZE]; DWORD len; UINT r; - TRACE("(%s %d %p %p %p)\n", debugstr_a(szProduct), iPatchIndex, - lpPatchBuf, lpTransformsBuf, pcchTransformsBuf); + TRACE( "%s, %lu, %p, %p, %p\n", debugstr_a(szProduct), iPatchIndex, lpPatchBuf, lpTransformsBuf, + pcchTransformsBuf ); if (!szProduct || !lpPatchBuf || !lpTransformsBuf || !pcchTransformsBuf) return ERROR_INVALID_PARAMETER; @@ -2086,16 +2067,16 @@ done: /*********************************************************************** * MsiEnumPatchesW [MSI.@] */ -UINT WINAPI MsiEnumPatchesW(LPCWSTR szProduct, DWORD iPatchIndex, - LPWSTR lpPatchBuf, LPWSTR lpTransformsBuf, LPDWORD pcchTransformsBuf) +UINT WINAPI MsiEnumPatchesW( const WCHAR *szProduct, DWORD iPatchIndex, WCHAR *lpPatchBuf, WCHAR *lpTransformsBuf, + DWORD *pcchTransformsBuf ) { WCHAR *transforms = NULL, squashed_pc[SQUASHED_GUID_SIZE]; HKEY prod; DWORD idx = 0; UINT r; - TRACE("(%s %d %p %p %p)\n", debugstr_w(szProduct), iPatchIndex, - lpPatchBuf, lpTransformsBuf, pcchTransformsBuf); + TRACE( "%s, %lu, %p, %p, %p)\n", debugstr_w(szProduct), iPatchIndex, lpPatchBuf, lpTransformsBuf, + pcchTransformsBuf ); if (!szProduct || !squash_guid( szProduct, squashed_pc )) return ERROR_INVALID_PARAMETER; @@ -2133,15 +2114,15 @@ done: return r; } -UINT WINAPI MsiEnumProductsExA( LPCSTR product, LPCSTR usersid, DWORD ctx, DWORD index, - CHAR installed_product[GUID_SIZE], - MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len ) +UINT WINAPI MsiEnumProductsExA( const char *product, const char *usersid, DWORD ctx, DWORD index, + char installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, char *sid, + DWORD *sid_len ) { UINT r; WCHAR installed_productW[GUID_SIZE], *productW = NULL, *usersidW = NULL, *sidW = NULL; - TRACE("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_a(product), debugstr_a(usersid), - ctx, index, installed_product, installed_ctx, sid, sid_len); + TRACE( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(product), debugstr_a(usersid), ctx, index, + installed_product, installed_ctx, sid, sid_len ); if (sid && !sid_len) return ERROR_INVALID_PARAMETER; if (product && !(productW = strdupAtoW( product ))) return ERROR_OUTOFMEMORY; @@ -2342,16 +2323,16 @@ done: return r; } -UINT WINAPI MsiEnumProductsExW( LPCWSTR product, LPCWSTR usersid, DWORD ctx, DWORD index, - WCHAR installed_product[GUID_SIZE], - MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len ) +UINT WINAPI MsiEnumProductsExW( const WCHAR *product, const WCHAR *usersid, DWORD ctx, DWORD index, + WCHAR installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid, + DWORD *sid_len ) { UINT r; DWORD idx = 0; static DWORD last_index; - TRACE("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_w(product), debugstr_w(usersid), - ctx, index, installed_product, installed_ctx, sid, sid_len); + TRACE( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(product), debugstr_w(usersid), ctx, index, + installed_product, installed_ctx, sid, sid_len ); if ((sid && !sid_len) || !ctx || (usersid && ctx == MSIINSTALLCONTEXT_MACHINE)) return ERROR_INVALID_PARAMETER; diff --git a/dll/win32/msi/script.c b/dll/win32/msi/script.c index 4585c2b5922..26dcddc041e 100644 --- a/dll/win32/msi/script.c +++ b/dll/win32/msi/script.c @@ -90,7 +90,7 @@ static ULONG WINAPI MsiActiveScriptSite_AddRef(IActiveScriptSite* iface) { MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)->(%d)\n", This, ref); + TRACE( "(%p)->(%lu)\n", This, ref ); return ref; } @@ -99,7 +99,7 @@ static ULONG WINAPI MsiActiveScriptSite_Release(IActiveScriptSite* iface) MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)->(%d)\n", This, ref); + TRACE( "(%p)->(%lu)\n", This, ref ); if (!ref) msi_free(This); @@ -118,7 +118,7 @@ static HRESULT WINAPI MsiActiveScriptSite_GetItemInfo(IActiveScriptSite* iface, { MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface); - TRACE("(%p)->(%p, %d, %p, %p)\n", This, pstrName, dwReturnMask, ppiunkItem, ppti); + TRACE( "(%p)->(%p, %lu, %p, %p)\n", This, pstrName, dwReturnMask, ppiunkItem, ppti ); /* Determine the kind of pointer that is requested, and make sure placeholder is valid */ if (dwReturnMask & SCRIPTINFO_ITYPEINFO) { diff --git a/dll/win32/msi/source.c b/dll/win32/msi/source.c index 0eed436774a..7ed0aabf142 100644 --- a/dll/win32/msi/source.c +++ b/dll/win32/msi/source.c @@ -141,21 +141,17 @@ static UINT OpenURLSubkey(HKEY rootkey, HKEY *key, BOOL create) /****************************************************************** * MsiSourceListEnumMediaDisksA (MSI.@) */ -UINT WINAPI MsiSourceListEnumMediaDisksA(LPCSTR szProductCodeOrPatchCode, - LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, - DWORD dwOptions, DWORD dwIndex, LPDWORD pdwDiskId, - LPSTR szVolumeLabel, LPDWORD pcchVolumeLabel, - LPSTR szDiskPrompt, LPDWORD pcchDiskPrompt) +UINT WINAPI MsiSourceListEnumMediaDisksA( const char *szProductCodeOrPatchCode, const char *szUserSid, + MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, + DWORD *pdwDiskId, char *szVolumeLabel, DWORD *pcchVolumeLabel, + char *szDiskPrompt, DWORD *pcchDiskPrompt ) { - LPWSTR product = NULL; - LPWSTR usersid = NULL; - LPWSTR volume = NULL; - LPWSTR prompt = NULL; + WCHAR *product = NULL, *usersid = NULL, *volume = NULL, *prompt = NULL; UINT r = ERROR_INVALID_PARAMETER; - TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", debugstr_a(szProductCodeOrPatchCode), - debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, pdwDiskId, - szVolumeLabel, pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt); + TRACE( "%s, %s, %d, %#lx, %lu, %p, %p, %p, %p, %p\n", debugstr_a(szProductCodeOrPatchCode), + debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, pdwDiskId, szVolumeLabel, pcchVolumeLabel, + szDiskPrompt, pcchDiskPrompt ); if (szDiskPrompt && !pcchDiskPrompt) return ERROR_INVALID_PARAMETER; @@ -199,11 +195,10 @@ done: /****************************************************************** * MsiSourceListEnumMediaDisksW (MSI.@) */ -UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode, - LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, - DWORD dwOptions, DWORD dwIndex, LPDWORD pdwDiskId, - LPWSTR szVolumeLabel, LPDWORD pcchVolumeLabel, - LPWSTR szDiskPrompt, LPDWORD pcchDiskPrompt) +UINT WINAPI MsiSourceListEnumMediaDisksW( const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid, + MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, + DWORD *pdwDiskId, WCHAR *szVolumeLabel, DWORD *pcchVolumeLabel, + WCHAR *szDiskPrompt, DWORD *pcchDiskPrompt ) { WCHAR squashed_pc[SQUASHED_GUID_SIZE], convert[11]; WCHAR *value = NULL, *data = NULL, *ptr, *ptr2; @@ -213,9 +208,9 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode, UINT r; static DWORD index = 0; - TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p)\n", debugstr_w(szProductCodeOrPatchCode), - debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel, - pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt); + TRACE( "%s, %s, %d, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(szProductCodeOrPatchCode), + debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel, pcchVolumeLabel, + szDiskPrompt, pcchDiskPrompt ); if (!szProductCodeOrPatchCode || !squash_guid( szProductCodeOrPatchCode, squashed_pc )) return ERROR_INVALID_PARAMETER; @@ -331,20 +326,17 @@ done: /****************************************************************** * MsiSourceListEnumSourcesA (MSI.@) */ -UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUserSid, - MSIINSTALLCONTEXT dwContext, - DWORD dwOptions, DWORD dwIndex, - LPSTR szSource, LPDWORD pcchSource) +UINT WINAPI MsiSourceListEnumSourcesA( const char *szProductCodeOrPatch, const char *szUserSid, + MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, char *szSource, + DWORD *pcchSource ) { - LPWSTR product = NULL; - LPWSTR usersid = NULL; - LPWSTR source = NULL; + WCHAR *product = NULL, *usersid = NULL, *source = NULL; DWORD len = 0; UINT r = ERROR_INVALID_PARAMETER; static DWORD index = 0; - TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_a(szProductCodeOrPatch), - debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource); + TRACE( "%s, %s, %d, %#lx, %lu, %p, %p)\n", debugstr_a(szProductCodeOrPatch), debugstr_a(szUserSid), dwContext, + dwOptions, dwIndex, szSource, pcchSource ); if (dwIndex == 0) index = 0; @@ -403,10 +395,9 @@ done: /****************************************************************** * MsiSourceListEnumSourcesW (MSI.@) */ -UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUserSid, - MSIINSTALLCONTEXT dwContext, - DWORD dwOptions, DWORD dwIndex, - LPWSTR szSource, LPDWORD pcchSource) +UINT WINAPI MsiSourceListEnumSourcesW( const WCHAR *szProductCodeOrPatch, const WCHAR *szUserSid, + MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, WCHAR *szSource, + DWORD *pcchSource ) { WCHAR squashed_pc[SQUASHED_GUID_SIZE], name[32]; HKEY source = NULL, subkey = NULL; @@ -414,8 +405,8 @@ UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUs UINT r = ERROR_INVALID_PARAMETER; static DWORD index = 0; - TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_w(szProductCodeOrPatch), - debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource); + TRACE( "%s, %s, %d, %#lx, %lu, %p, %p\n", debugstr_w(szProductCodeOrPatch), debugstr_w(szUserSid), dwContext, + dwOptions, dwIndex, szSource, pcchSource ); if (dwIndex == 0) index = 0; @@ -754,17 +745,16 @@ UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid, /****************************************************************** * MsiSourceListSetInfoW (MSI.@) */ -UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, - MSIINSTALLCONTEXT dwContext, DWORD dwOptions, - LPCWSTR szProperty, LPCWSTR szValue) +UINT WINAPI MsiSourceListSetInfoW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, + DWORD dwOptions, const WCHAR *szProperty, const WCHAR *szValue ) { WCHAR squashed_pc[SQUASHED_GUID_SIZE]; HKEY sourcekey, media; LPCWSTR property; UINT rc; - TRACE("%s %s %x %x %s %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), - dwContext, dwOptions, debugstr_w(szProperty), debugstr_w(szValue)); + TRACE( "%s, %s, %d, %#lx, %s, %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions, + debugstr_w(szProperty), debugstr_w(szValue) ); if (!szProduct || !squash_guid( szProduct, squashed_pc )) return ERROR_INVALID_PARAMETER; @@ -1041,9 +1031,8 @@ error: /****************************************************************** * MsiSourceListAddSourceExW (MSI.@) */ -UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid, - MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource, - DWORD dwIndex) +UINT WINAPI MsiSourceListAddSourceExW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, + DWORD dwOptions, const WCHAR *szSource, DWORD dwIndex ) { HKEY sourcekey, typekey; UINT rc; @@ -1053,8 +1042,8 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid, LPCWSTR postfix; DWORD size, count, index; - TRACE("%s %s %x %x %s %i\n", debugstr_w(szProduct), debugstr_w(szUserSid), - dwContext, dwOptions, debugstr_w(szSource), dwIndex); + TRACE( "%s, %s, %d, %#lx, %s, %lu\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions, + debugstr_w(szSource), dwIndex ); if (!szProduct || !squash_guid( szProduct, squashed_pc )) return ERROR_INVALID_PARAMETER; @@ -1086,7 +1075,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid, rc = OpenMediaSubkey(sourcekey, &typekey, TRUE); else { - ERR("unknown media type: %08x\n", dwOptions); + ERR( "unknown media type: %#lx\n", dwOptions ); RegCloseKey(sourcekey); return ERROR_FUNCTION_FAILED; } @@ -1194,18 +1183,17 @@ UINT WINAPI MsiSourceListAddMediaDiskA(LPCSTR szProduct, LPCSTR szUserSid, /****************************************************************** * MsiSourceListAddMediaDiskW (MSI.@) */ -UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid, - MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId, - LPCWSTR szVolumeLabel, LPCWSTR szDiskPrompt) +UINT WINAPI MsiSourceListAddMediaDiskW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, + DWORD dwOptions, DWORD dwDiskId, const WCHAR *szVolumeLabel, + const WCHAR *szDiskPrompt ) { HKEY sourcekey, mediakey; UINT rc; WCHAR *buffer, squashed_pc[SQUASHED_GUID_SIZE], szIndex[10]; DWORD size; - TRACE("%s %s %x %x %i %s %s\n", debugstr_w(szProduct), - debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId, - debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt)); + TRACE( "%s, %s, %d, %#lx, %lu, %s, %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions, + dwDiskId, debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt) ); if (!szProduct || !squash_guid( szProduct, squashed_pc )) return ERROR_INVALID_PARAMETER; @@ -1257,81 +1245,77 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid, /****************************************************************** * MsiSourceListClearAllA (MSI.@) */ -UINT WINAPI MsiSourceListClearAllA( LPCSTR szProduct, LPCSTR szUserName, DWORD dwReserved ) +UINT WINAPI MsiSourceListClearAllA( const char *szProduct, const char *szUserName, DWORD dwReserved ) { - FIXME("(%s %s %d)\n", debugstr_a(szProduct), debugstr_a(szUserName), dwReserved); + FIXME( "%s, %s, %#lx\n", debugstr_a(szProduct), debugstr_a(szUserName), dwReserved ); return ERROR_SUCCESS; } /****************************************************************** * MsiSourceListClearAllW (MSI.@) */ -UINT WINAPI MsiSourceListClearAllW( LPCWSTR szProduct, LPCWSTR szUserName, DWORD dwReserved ) +UINT WINAPI MsiSourceListClearAllW( const WCHAR *szProduct, const WCHAR *szUserName, DWORD dwReserved ) { - FIXME("(%s %s %d)\n", debugstr_w(szProduct), debugstr_w(szUserName), dwReserved); + FIXME( "%s, %s, %#lx\n", debugstr_w(szProduct), debugstr_w(szUserName), dwReserved ); return ERROR_SUCCESS; } /****************************************************************** * MsiSourceListClearAllExA (MSI.@) */ -UINT WINAPI MsiSourceListClearAllExA( LPCSTR szProduct, LPCSTR szUserSid, - MSIINSTALLCONTEXT dwContext, DWORD dwOptions ) +UINT WINAPI MsiSourceListClearAllExA( const char *szProduct, const char *szUserSid, MSIINSTALLCONTEXT dwContext, + DWORD dwOptions ) { - FIXME("(%s %s %d %08x)\n", debugstr_a(szProduct), debugstr_a(szUserSid), - dwContext, dwOptions); + FIXME( "%s, %s, %d, %#lx\n", debugstr_a(szProduct), debugstr_a(szUserSid), dwContext, dwOptions ); return ERROR_SUCCESS; } /****************************************************************** * MsiSourceListClearAllExW (MSI.@) */ -UINT WINAPI MsiSourceListClearAllExW( LPCWSTR szProduct, LPCWSTR szUserSid, - MSIINSTALLCONTEXT dwContext, DWORD dwOptions ) +UINT WINAPI MsiSourceListClearAllExW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, + DWORD dwOptions ) { - FIXME("(%s %s %d %08x)\n", debugstr_w(szProduct), debugstr_w(szUserSid), - dwContext, dwOptions); + FIXME( "%s, %s, %d, %#lx\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions ); return ERROR_SUCCESS; } /****************************************************************** * MsiSourceListClearSourceA (MSI.@) */ -UINT WINAPI MsiSourceListClearSourceA(LPCSTR szProductCodeOrPatchCode, LPCSTR szUserSid, - MSIINSTALLCONTEXT dwContext, DWORD dwOptions, - LPCSTR szSource) +UINT WINAPI MsiSourceListClearSourceA( const char *szProductCodeOrPatchCode, const char *szUserSid, + MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const char *szSource ) { - FIXME("(%s %s %x %x %s)\n", debugstr_a(szProductCodeOrPatchCode), debugstr_a(szUserSid), - dwContext, dwOptions, debugstr_a(szSource)); + FIXME( "%s, %s, %d, %#lx, %s\n", debugstr_a(szProductCodeOrPatchCode), debugstr_a(szUserSid), dwContext, + dwOptions, debugstr_a(szSource) ); return ERROR_SUCCESS; } /****************************************************************** * MsiSourceListClearSourceW (MSI.@) */ -UINT WINAPI MsiSourceListClearSourceW(LPCWSTR szProductCodeOrPatchCode, LPCWSTR szUserSid, - MSIINSTALLCONTEXT dwContext, DWORD dwOptions, - LPCWSTR szSource) +UINT WINAPI MsiSourceListClearSourceW( const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid, + MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource ) { - FIXME("(%s %s %x %x %s)\n", debugstr_w(szProductCodeOrPatchCode), debugstr_w(szUserSid), - dwContext, dwOptions, debugstr_w(szSource)); + FIXME( "%s, %s, %d, %#lx, %s\n", debugstr_w(szProductCodeOrPatchCode), debugstr_w(szUserSid), dwContext, + dwOptions, debugstr_w(szSource) ); return ERROR_SUCCESS; } /****************************************************************** * MsiSourceListForceResolutionA (MSI.@) */ -UINT WINAPI MsiSourceListForceResolutionA(const CHAR *product, const CHAR *user, DWORD reserved) +UINT WINAPI MsiSourceListForceResolutionA( const char *product, const char *user, DWORD reserved ) { - FIXME("(%s %s %x)\n", debugstr_a(product), debugstr_a(user), reserved); + FIXME( "%s, %s, %#lx\n", debugstr_a(product), debugstr_a(user), reserved ); return ERROR_SUCCESS; } /****************************************************************** * MsiSourceListForceResolutionW (MSI.@) */ -UINT WINAPI MsiSourceListForceResolutionW(const WCHAR *product, const WCHAR *user, DWORD reserved) +UINT WINAPI MsiSourceListForceResolutionW( const WCHAR *product, const WCHAR *user, DWORD reserved ) { - FIXME("(%s %s %x)\n", debugstr_w(product), debugstr_w(user), reserved); + FIXME( "%s, %s, %#lx\n", debugstr_w(product), debugstr_w(user), reserved ); return ERROR_SUCCESS; } diff --git a/dll/win32/msi/streams.c b/dll/win32/msi/streams.c index 53698f32872..faa9fe4333a 100644 --- a/dll/win32/msi/streams.c +++ b/dll/win32/msi/streams.c @@ -481,7 +481,7 @@ static UINT load_streams( MSIDATABASE *db ) CoTaskMemFree( stat.pwcsName ); if (FAILED( hr )) { - ERR("unable to open stream %08x\n", hr); + ERR( "unable to open stream %#lx\n", hr ); r = ERROR_FUNCTION_FAILED; break; } @@ -584,7 +584,7 @@ static HRESULT write_stream( IStream *dst, IStream *src ) hr = IStream_Read( src, buf, size, &count ); if (FAILED( hr ) || count != size) { - WARN("failed to read stream: %08x\n", hr); + WARN( "failed to read stream: %#lx\n", hr ); return E_INVALIDARG; } stat.cbSize.QuadPart -= count; @@ -594,7 +594,7 @@ static HRESULT write_stream( IStream *dst, IStream *src ) hr = IStream_Write( dst, buf, size, &count ); if (FAILED( hr ) || count != size) { - WARN("failed to write stream: %08x\n", hr); + WARN( "failed to write stream: %#lx\n", hr ); return E_INVALIDARG; } } @@ -628,7 +628,7 @@ UINT msi_commit_streams( MSIDATABASE *db ) hr = write_stream( stream, db->streams[i].stream ); if (FAILED( hr )) { - ERR("failed to write stream %s (hr = %08x)\n", debugstr_w(encname), hr); + ERR( "failed to write stream %s (hr = %#lx)\n", debugstr_w(encname), hr ); msi_free( encname ); IStream_Release( stream ); return ERROR_FUNCTION_FAILED; @@ -637,14 +637,14 @@ UINT msi_commit_streams( MSIDATABASE *db ) IStream_Release( stream ); if (FAILED( hr )) { - ERR("failed to commit stream %s (hr = %08x)\n", debugstr_w(encname), hr); + ERR( "failed to commit stream %s (hr = %#lx)\n", debugstr_w(encname), hr ); msi_free( encname ); return ERROR_FUNCTION_FAILED; } } else if (hr != STG_E_FILEALREADYEXISTS) { - ERR("failed to create stream %s (hr = %08x)\n", debugstr_w(encname), hr); + ERR( "failed to create stream %s (hr = %#lx)\n", debugstr_w(encname), hr ); msi_free( encname ); return ERROR_FUNCTION_FAILED; } diff --git a/dll/win32/msi/string.c b/dll/win32/msi/string.c index fb0134810b9..70c6873a331 100644 --- a/dll/win32/msi/string.c +++ b/dll/win32/msi/string.c @@ -544,15 +544,15 @@ string_table *msi_load_string_table( IStorage *stg, UINT *bytes_per_strref ) r = add_string( st, n, data+offset, len, refs, TRUE ); if( r != n ) - ERR("Failed to add string %d\n", n ); + ERR( "Failed to add string %lu\n", n ); n++; offset += len; } if ( datasize != offset ) - ERR("string table load failed! (%08x != %08x), please report\n", datasize, offset ); + ERR( "string table load failed! (%u != %lu), please report\n", datasize, offset ); - TRACE("Loaded %d strings\n", count); + TRACE( "loaded %lu strings\n", count ); end: msi_free( pool ); diff --git a/dll/win32/msi/suminfo.c b/dll/win32/msi/suminfo.c index 2337ac2bbdf..0280b036bda 100644 --- a/dll/win32/msi/suminfo.c +++ b/dll/win32/msi/suminfo.c @@ -197,14 +197,14 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz { if( idofs[i].propid >= MSI_MAX_PROPS ) { - ERR("Unknown property ID %d\n", idofs[i].propid ); + ERR( "unknown property ID %lu\n", idofs[i].propid ); break; } type = get_type( idofs[i].propid ); if( type == VT_EMPTY ) { - ERR("propid %d has unknown type\n", idofs[i].propid); + ERR( "propid %lu has unknown type\n", idofs[i].propid ); break; } @@ -295,7 +295,7 @@ static UINT load_summary_info( MSISUMMARYINFO *si, IStream *stm ) if( section_hdr.cProperties > MSI_MAX_PROPS ) { - ERR("too many properties %d\n", section_hdr.cProperties); + ERR( "too many properties %lu\n", section_hdr.cProperties ); return ERROR_FUNCTION_FAILED; } @@ -311,7 +311,7 @@ static UINT load_summary_info( MSISUMMARYINFO *si, IStream *stm ) if( SUCCEEDED(r) && count == sz ) read_properties_from_data( si->property, data, sz + SECT_HDR_SIZE ); else - ERR("failed to read properties %d %d\n", count, sz); + ERR( "failed to read properties %lu %lu\n", count, sz ); msi_free( data ); return ERROR_SUCCESS; @@ -511,15 +511,14 @@ UINT msi_get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **r return ERROR_SUCCESS; } -UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, - LPCWSTR szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle ) +UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, const WCHAR *szDatabase, UINT uiUpdateCount, + MSIHANDLE *pHandle ) { MSISUMMARYINFO *si; MSIDATABASE *db; UINT ret; - TRACE("%d %s %d %p\n", hDatabase, debugstr_w(szDatabase), - uiUpdateCount, pHandle); + TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_w(szDatabase), uiUpdateCount, pHandle ); if( !pHandle ) return ERROR_INVALID_PARAMETER; @@ -582,14 +581,13 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, return ret; } -UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, - LPCSTR szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle) +UINT WINAPI MsiGetSummaryInformationA( MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount, + MSIHANDLE *pHandle ) { - LPWSTR szwDatabase = NULL; + WCHAR *szwDatabase = NULL; UINT ret; - TRACE("%d %s %d %p\n", hDatabase, debugstr_a(szDatabase), - uiUpdateCount, pHandle); + TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_a(szDatabase), uiUpdateCount, pHandle ); if( szDatabase ) { @@ -605,11 +603,11 @@ UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, return ret; } -UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, PUINT pCount) +UINT WINAPI MsiSummaryInfoGetPropertyCount( MSIHANDLE hSummaryInfo, UINT *pCount ) { MSISUMMARYINFO *si; - TRACE("%d %p\n", hSummaryInfo, pCount); + TRACE( "%lu, %p\n", hSummaryInfo, pCount ); si = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO ); if( !si ) @@ -736,16 +734,15 @@ LPWSTR msi_get_suminfo_product( IStorage *stg ) return prod; } -UINT WINAPI MsiSummaryInfoGetPropertyA( - MSIHANDLE handle, UINT uiProperty, PUINT puiDataType, LPINT piValue, - FILETIME *pftValue, LPSTR szValueBuf, LPDWORD pcchValueBuf) +UINT WINAPI MsiSummaryInfoGetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue, + FILETIME *pftValue, char *szValueBuf, DWORD *pcchValueBuf ) { MSISUMMARYINFO *si; awstring str; UINT r; - TRACE("%u, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, - piValue, pftValue, szValueBuf, pcchValueBuf ); + TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf, + pcchValueBuf ); if (uiProperty >= MSI_MAX_PROPS) { @@ -788,16 +785,15 @@ UINT WINAPI MsiSummaryInfoGetPropertyA( return r; } -UINT WINAPI MsiSummaryInfoGetPropertyW( - MSIHANDLE handle, UINT uiProperty, PUINT puiDataType, LPINT piValue, - FILETIME *pftValue, LPWSTR szValueBuf, LPDWORD pcchValueBuf) +UINT WINAPI MsiSummaryInfoGetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue, + FILETIME *pftValue, WCHAR *szValueBuf, DWORD *pcchValueBuf ) { MSISUMMARYINFO *si; awstring str; UINT r; - TRACE("%u, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, - piValue, pftValue, szValueBuf, pcchValueBuf ); + TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf, + pcchValueBuf ); if (uiProperty >= MSI_MAX_PROPS) { @@ -908,15 +904,14 @@ static UINT msi_set_prop( MSISUMMARYINFO *si, UINT uiProperty, UINT uiDataType, return set_prop( si, uiProperty, type, iValue, pftValue, str ); } -UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, - INT iValue, FILETIME *pftValue, LPCWSTR szValue ) +UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, + FILETIME *pftValue, const WCHAR *szValue ) { awcstring str; MSISUMMARYINFO *si; UINT ret; - TRACE("%u, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, - debugstr_w(szValue) ); + TRACE( "%lu, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_w(szValue) ); if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO ))) { @@ -939,15 +934,14 @@ UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT return ret; } -UINT WINAPI MsiSummaryInfoSetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, - INT iValue, FILETIME *pftValue, LPCSTR szValue ) +UINT WINAPI MsiSummaryInfoSetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, + FILETIME *pftValue, const char *szValue ) { awcstring str; MSISUMMARYINFO *si; UINT ret; - TRACE("%u, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, - debugstr_a(szValue) ); + TRACE( "%lu, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_a(szValue) ); if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO ))) { @@ -1230,7 +1224,7 @@ UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle ) MSISUMMARYINFO *si; UINT ret; - TRACE("%d\n", handle ); + TRACE( "%lu\n", handle ); si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO ); if( !si ) @@ -1242,12 +1236,13 @@ UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle ) return ret; } -UINT WINAPI MsiCreateTransformSummaryInfoA( MSIHANDLE db, MSIHANDLE db_ref, LPCSTR transform, int error, int validation ) +UINT WINAPI MsiCreateTransformSummaryInfoA( MSIHANDLE db, MSIHANDLE db_ref, const char *transform, int error, + int validation ) { UINT r; WCHAR *transformW = NULL; - TRACE("%u, %u, %s, %d, %d\n", db, db_ref, debugstr_a(transform), error, validation); + TRACE( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_a(transform), error, validation ); if (transform && !(transformW = strdupAtoW( transform ))) return ERROR_OUTOFMEMORY; @@ -1257,9 +1252,10 @@ UINT WINAPI MsiCreateTransformSummaryInfoA( MSIHANDLE db, MSIHANDLE db_ref, LPCS return r; } -UINT WINAPI MsiCreateTransformSummaryInfoW( MSIHANDLE db, MSIHANDLE db_ref, LPCWSTR transform, int error, int validation ) +UINT WINAPI MsiCreateTransformSummaryInfoW( MSIHANDLE db, MSIHANDLE db_ref, const WCHAR *transform, int error, + int validation ) { - FIXME("%u, %u, %s, %d, %d\n", db, db_ref, debugstr_w(transform), error, validation); + FIXME( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_w(transform), error, validation ); return ERROR_FUNCTION_FAILED; } diff --git a/dll/win32/msi/table.c b/dll/win32/msi/table.c index abffe75a1c9..8168e2f837d 100644 --- a/dll/win32/msi/table.c +++ b/dll/win32/msi/table.c @@ -221,8 +221,7 @@ void enum_stream_names( IStorage *stg ) if( FAILED( r ) || !count ) break; decode_streamname( stat.pwcsName, name ); - TRACE("stream %2d -> %s %s\n", n, - debugstr_w(stat.pwcsName), debugstr_w(name) ); + TRACE( "stream %2lu -> %s %s\n", n, debugstr_w(stat.pwcsName), debugstr_w(name) ); CoTaskMemFree( stat.pwcsName ); n++; } @@ -250,14 +249,14 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table, msi_free( encname ); if( FAILED( r ) ) { - WARN("open stream failed r = %08x - empty table?\n", r); + WARN( "open stream failed r = %#lx - empty table?\n", r ); return ret; } r = IStream_Stat(stm, &stat, STATFLAG_NONAME ); if( FAILED( r ) ) { - WARN("open stream failed r = %08x!\n", r); + WARN( "open stream failed r = %#lx!\n", r ); goto end; } @@ -271,7 +270,7 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table, data = msi_alloc( sz ); if( !data ) { - WARN("couldn't allocate memory r=%08x!\n", r); + WARN( "couldn't allocate memory r = %#lx!\n", r ); ret = ERROR_NOT_ENOUGH_MEMORY; goto end; } @@ -280,7 +279,7 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table, if( FAILED( r ) || ( count != sz ) ) { msi_free( data ); - WARN("read stream failed r = %08x!\n", r); + WARN("read stream failed r = %#lx!\n", r); goto end; } @@ -316,7 +315,7 @@ UINT write_stream_data( IStorage *stg, LPCWSTR stname, msi_free( encname ); if( FAILED( r ) ) { - WARN("open stream failed r = %08x\n", r); + WARN( "open stream failed r = %#lx\n", r ); return ret; } @@ -1929,7 +1928,7 @@ static UINT TABLE_add_ref(struct tagMSIVIEW *view) { MSITABLEVIEW *tv = (MSITABLEVIEW*)view; - TRACE("%p %d\n", view, tv->table->ref_count); + TRACE( "%p, %ld\n", view, tv->table->ref_count ); return InterlockedIncrement(&tv->table->ref_count); } @@ -2914,7 +2913,7 @@ UINT MSI_CommitTables( MSIDATABASE *db ) hr = IStorage_Commit( db->storage, 0 ); if (FAILED( hr )) { - WARN("failed to commit changes 0x%08x\n", hr); + WARN( "failed to commit changes %#lx\n", hr ); r = ERROR_FUNCTION_FAILED; } return r; diff --git a/dll/win32/msi/upgrade.c b/dll/win32/msi/upgrade.c index 18649fced3d..c9744e51859 100644 --- a/dll/win32/msi/upgrade.c +++ b/dll/win32/msi/upgrade.c @@ -142,7 +142,7 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param) HKEY hukey; INT r; - TRACE("Looking at index %u product %s\n", index, debugstr_w(product)); + TRACE( "looking at index %lu product %s\n", index, debugstr_w(product) ); unsquash_guid(product, productid); if (MSIREG_OpenProductKey(productid, NULL, MSIINSTALLCONTEXT_USERMANAGED, &hukey, FALSE) &&