[WINESYNC] msi: Build without -DWINE_NO_LONG_TYPES.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id c3135c632f1df0091afd5d0d62855f3dc7abe247 by Hans Leidekker <hans@codeweavers.com>
This commit is contained in:
winesync 2022-03-14 21:20:29 +01:00 committed by Mark Jansen
parent 36bf554942
commit 02f995b22e
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
26 changed files with 641 additions and 753 deletions

View file

@ -2083,7 +2083,7 @@ static UINT calculate_file_cost( MSIPACKAGE *package )
continue; continue;
} }
file_size = msi_get_disk_file_size( package, file->TargetPath ); 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) if (file->Version)
{ {
@ -2389,7 +2389,7 @@ static BYTE *parse_value( MSIPACKAGE *package, const WCHAR *value, DWORD len, DW
} }
msi_free(deformated); msi_free(deformated);
TRACE("Data %i bytes(%i)\n",*size,count); TRACE( "data %lu bytes(%u)\n", *size, count );
} }
else else
{ {
@ -2414,8 +2414,8 @@ static BYTE *parse_value( MSIPACKAGE *package, const WCHAR *value, DWORD len, DW
} }
if (deformated[0] == '-') if (deformated[0] == '-')
d = -d; d = -d;
*(LPDWORD)data = d; *(DWORD *)data = d;
TRACE("DWORD %i\n",*(LPDWORD)data); TRACE( "DWORD %lu\n", *(DWORD *)data);
msi_free(deformated); 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 ); res = RegOpenKeyExW( root, subkey, 0, access, &hkey );
if (res) 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 ); msi_free( subkey );
return NULL; return NULL;
} }
@ -2772,14 +2772,14 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
} }
if (!check_first) 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 ); RegSetValueExW( hkey, deformated, 0, type, new_value, new_size );
} }
else if (!old_value) else if (!old_value)
{ {
if (deformated || new_size) 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 ); 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 ); res = RegDeleteKeyExW( root, subkey, access, 0 );
if (res) 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; break;
} }
} while (p); } 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 ((hkey = open_key( comp, root, path, FALSE, KEY_SET_VALUE | KEY_QUERY_VALUE )))
{ {
if ((res = RegDeleteValueW( hkey, 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 ); RegCloseKey( hkey );
if (is_key_empty(comp, root, path)) 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; if (!(hkey = open_key( comp, root, path, FALSE, KEY_ALL_ACCESS ))) return;
res = RegDeleteTreeW( hkey, NULL ); 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 ); delete_key( comp, root, path );
RegCloseKey( hkey ); RegCloseKey( hkey );
} }
@ -3424,7 +3424,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
} }
res = RegDeleteValueW( hkey, squashed_pc ); res = RegDeleteValueW( hkey, squashed_pc );
RegCloseKey(hkey); 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 ); hr = msi_load_typelib( package, file->TargetPath, REGKIND_REGISTER, &tlib );
if (FAILED(hr)) 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; 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 ); hr = UnRegisterTypeLib( &libid, (version >> 8) & 0xffff, version & 0xff, language, syskind );
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to unregister typelib: %08x\n", hr); WARN( "failed to unregister typelib: %#lx\n", hr );
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -3888,7 +3888,7 @@ static UINT ITERATE_RemoveShortcuts( MSIRECORD *row, LPVOID param )
link_file = get_link_file( package, row ); link_file = get_link_file( package, row );
TRACE("Removing shortcut file %s\n", debugstr_w( link_file )); 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 ); msi_free( link_file );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -4193,7 +4193,7 @@ static UINT msi_publish_patches( MSIPACKAGE *package )
if (patch->filename && !CopyFileW( patch->filename, patch->localfile, FALSE )) if (patch->filename && !CopyFileW( patch->filename, patch->localfile, FALSE ))
{ {
res = GetLastError(); res = GetLastError();
ERR("Unable to copy patch package %d\n", res); ERR( "unable to copy patch package %lu\n", res );
goto done; goto done;
} }
res = RegCreateKeyExW( product_patches_key, patch_squashed, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &patch_key, NULL ); 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 )) 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 ); msi_free( filename );
} }
@ -4552,7 +4552,7 @@ static UINT ITERATE_RemoveIniValuesOnInstall( MSIRECORD *row, LPVOID param )
if (!WritePrivateProfileStringW( deformated_section, deformated_key, NULL, filename )) 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 ); msi_free( filename );
} }
@ -5648,7 +5648,7 @@ static UINT ITERATE_UnpublishComponent( MSIRECORD *rec, LPVOID param )
res = RegDeleteKeyW( HKEY_CURRENT_USER, keypath ); res = RegDeleteKeyW( HKEY_CURRENT_USER, keypath );
if (res != ERROR_SUCCESS) 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 ); uirow = MSI_CreateRecord( 2 );
@ -5776,7 +5776,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
{ {
if (GetLastError() != ERROR_SERVICE_EXISTS) 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) if (is_vital)
ret = ERROR_INSTALL_FAILURE; ret = ERROR_INSTALL_FAILURE;
@ -5785,7 +5785,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
else if (sd.lpDescription) else if (sd.lpDescription)
{ {
if (!ChangeServiceConfig2W(service, SERVICE_CONFIG_DESCRIPTION, &sd)) 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); 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); service = OpenServiceW(scm, name, SERVICE_START|SERVICE_QUERY_STATUS);
if (!service) 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; goto done;
} }
@ -5923,7 +5923,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
if (!StartServiceW(service, numargs, vector) && if (!StartServiceW(service, numargs, vector) &&
GetLastError() != ERROR_SERVICE_ALREADY_RUNNING) 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; goto done;
} }
@ -5934,7 +5934,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO, if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO,
(BYTE *)&status, sizeof(SERVICE_STATUS_PROCESS), &dummy)) (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; goto done;
} }
start_time = GetTickCount64(); start_time = GetTickCount64();
@ -5945,13 +5945,13 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO, if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO,
(BYTE *)&status, sizeof(SERVICE_STATUS_PROCESS), &dummy)) (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; goto done;
} }
} }
if (status.dwCurrentState != SERVICE_RUNNING) 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; r = ERROR_FUNCTION_FAILED;
} }
} }
@ -6043,24 +6043,20 @@ static UINT stop_service( LPCWSTR name )
scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!scm) if (!scm)
{ {
WARN("Failed to open the SCM: %d\n", GetLastError()); WARN( "failed to open the SCM (%lu)\n", GetLastError() );
goto done; goto done;
} }
service = OpenServiceW(scm, name, service = OpenServiceW(scm, name, SERVICE_STOP | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS);
SERVICE_STOP |
SERVICE_QUERY_STATUS |
SERVICE_ENUMERATE_DEPENDENTS);
if (!service) 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; goto done;
} }
if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO, (LPBYTE)&ssp, if (!QueryServiceStatusEx( service, SC_STATUS_PROCESS_INFO, (BYTE *)&ssp, sizeof(ssp), &needed) )
sizeof(SERVICE_STATUS_PROCESS), &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; goto done;
} }
@ -6070,7 +6066,7 @@ static UINT stop_service( LPCWSTR name )
stop_service_dependents(scm, service); stop_service_dependents(scm, service);
if (!ControlService(service, SERVICE_CONTROL_STOP, &status)) 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: done:
if (service) CloseServiceHandle(service); if (service) CloseServiceHandle(service);
@ -6182,7 +6178,7 @@ static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param )
scm = OpenSCManagerW( NULL, NULL, SC_MANAGER_ALL_ACCESS ); scm = OpenSCManagerW( NULL, NULL, SC_MANAGER_ALL_ACCESS );
if (!scm) if (!scm)
{ {
WARN("Failed to open the SCM: %d\n", GetLastError()); WARN( "failed to open the SCM (%lu)\n", GetLastError() );
goto done; goto done;
} }
@ -6197,12 +6193,12 @@ static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param )
service = OpenServiceW( scm, name, DELETE ); service = OpenServiceW( scm, name, DELETE );
if (!service) 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; goto done;
} }
if (!DeleteService( service )) 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: done:
uirow = MSI_CreateRecord( 2 ); 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_REMOVEMATCH | ENV_ACT_SETALWAYS) ||
check_flag_combo(*flags, ENV_ACT_SETABSENT | ENV_MOD_MASK)) 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; 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 ); res = RegOpenKeyExW( root, env, 0, KEY_ALL_ACCESS, key );
if (res != ERROR_SUCCESS) 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; return ERROR_FUNCTION_FAILED;
} }
@ -7107,7 +7103,7 @@ static UINT ITERATE_RemoveEnvironmentString( MSIRECORD *rec, LPVOID param )
TRACE("removing %s\n", debugstr_w(name)); TRACE("removing %s\n", debugstr_w(name));
res = RegDeleteValueW( env, name ); res = RegDeleteValueW( env, name );
if (res != ERROR_SUCCESS) 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 else
{ {
@ -7115,7 +7111,7 @@ static UINT ITERATE_RemoveEnvironmentString( MSIRECORD *rec, LPVOID param )
size = (lstrlenW( new_value ) + 1) * sizeof(WCHAR); size = (lstrlenW( new_value ) + 1) * sizeof(WCHAR);
res = RegSetValueExW( env, name, 0, type, (BYTE *)new_value, size ); res = RegSetValueExW( env, name, 0, type, (BYTE *)new_value, size );
if (res != ERROR_SUCCESS) 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: done:
@ -7231,7 +7227,7 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
msiobj_release( &view->hdr ); msiobj_release( &view->hdr );
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
return r; 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 ); r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCTranslator`", &view );
if (r == ERROR_SUCCESS) if (r == ERROR_SUCCESS)
@ -7241,7 +7237,7 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
msiobj_release( &view->hdr ); msiobj_release( &view->hdr );
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
return r; 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; 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 )) 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) if (r != ERROR_SUCCESS)
return r; 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; return ERROR_SUCCESS;
} }

View file

@ -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), TRACE("MaxVersion is %d.%d.%d.%d\n", HIWORD(sig->MaxVersionMS),
LOWORD(sig->MaxVersionMS), HIWORD(sig->MaxVersionLS), LOWORD(sig->MaxVersionMS), HIWORD(sig->MaxVersionLS),
LOWORD(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)); TRACE("Languages is %s\n", debugstr_w(sig->Languages));
msiobj_release( &row->hdr ); 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]); swprintf(ptr, 3, L"%02X", value[i]);
break; break;
default: default:
WARN("unimplemented for values of type %d\n", regType); WARN( "unimplemented for values of type %lu\n", regType );
*appValue = NULL; *appValue = NULL;
} }
} }

View file

@ -233,7 +233,7 @@ static BOOL is_assembly_installed( IAssemblyCache *cache, const WCHAR *display_n
{ {
return (info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED); return (info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED);
} }
TRACE("QueryAssemblyInfo returned 0x%08x\n", hr); TRACE( "QueryAssemblyInfo returned %#lx\n", hr );
return FALSE; return FALSE;
} }
@ -337,7 +337,7 @@ MSIASSEMBLY *msi_load_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
TRACE("application %s\n", debugstr_w(a->application)); TRACE("application %s\n", debugstr_w(a->application));
a->attributes = MSI_RecordGetInteger( rec, 5 ); 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 ))) 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 ); hr = IAssemblyCache_InstallAssembly( cache, 0, manifest, NULL );
if (hr != S_OK) 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; return ERROR_FUNCTION_FAILED;
} }
if (feature) feature->Action = INSTALLSTATE_LOCAL; if (feature) feature->Action = INSTALLSTATE_LOCAL;
@ -474,7 +474,7 @@ UINT msi_uninstall_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
{ {
cache = package->cache_sxs; cache = package->cache_sxs;
hr = IAssemblyCache_UninstallAssembly( cache, 0, assembly->display_name, NULL, NULL ); 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 else
{ {
@ -486,7 +486,7 @@ UINT msi_uninstall_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
if (cache) if (cache)
{ {
hr = IAssemblyCache_UninstallAssembly( cache, 0, assembly->display_name, NULL, NULL ); 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 ))) 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; return ERROR_FUNCTION_FAILED;
} }
} }
@ -646,14 +646,14 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package )
{ {
if ((res = open_global_assembly_key( package->Context, win32, &hkey ))) 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; return ERROR_FUNCTION_FAILED;
} }
} }
size = sizeof(buffer); size = sizeof(buffer);
if ((res = RegSetValueExW( hkey, assembly->display_name, 0, REG_MULTI_SZ, (const BYTE *)buffer, size ))) 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 ); RegCloseKey( hkey );
@ -699,17 +699,17 @@ UINT ACTION_MsiUnpublishAssemblies( MSIPACKAGE *package )
continue; continue;
} }
if ((res = delete_local_assembly_key( package->Context, win32, file->TargetPath ))) 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 else
{ {
HKEY hkey; HKEY hkey;
if ((res = open_global_assembly_key( package->Context, win32, &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 else
{ {
if ((res = RegDeleteValueW( hkey, assembly->display_name ))) 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 ); RegCloseKey( hkey );
} }
} }

View file

@ -265,7 +265,7 @@ static HRESULT WINAPI AutomationObject_GetTypeInfo(
AutomationObject *This = impl_from_IDispatch(iface); AutomationObject *This = impl_from_IDispatch(iface);
HRESULT hr; 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); hr = get_typeinfo(This->tid, ppTInfo);
if (FAILED(hr)) if (FAILED(hr))
@ -287,7 +287,7 @@ static HRESULT WINAPI AutomationObject_GetIDsOfNames(
ITypeInfo *ti; ITypeInfo *ti;
HRESULT hr; 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); debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
if (!IsEqualGUID(riid, &IID_NULL)) return E_INVALIDARG; if (!IsEqualGUID(riid, &IID_NULL)) return E_INVALIDARG;
@ -331,7 +331,7 @@ static HRESULT WINAPI AutomationObject_Invoke(
BSTR bstrName = NULL; BSTR bstrName = NULL;
ITypeInfo *ti; 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, dispIdMember, debugstr_guid(riid), lcid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr); pDispParams, pVarResult, pExcepInfo, puArgErr);
@ -362,14 +362,14 @@ static HRESULT WINAPI AutomationObject_Invoke(
if (TRACE_ON(msi)) if (TRACE_ON(msi))
{ {
ITypeInfo_GetDocumentation(ti, dispIdMember, &bstrName, NULL, NULL, NULL); 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); hr = tid_ids[This->tid].fn_invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
if (hr == DISP_E_MEMBERNOTFOUND) { if (hr == DISP_E_MEMBERNOTFOUND) {
if (bstrName == NULL) ITypeInfo_GetDocumentation(ti, dispIdMember, &bstrName, NULL, NULL, NULL); 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))); debugstr_guid(get_riid_from_tid(This->tid)));
} }
else if (pExcepInfo && else if (pExcepInfo &&
@ -383,7 +383,7 @@ static HRESULT WINAPI AutomationObject_Invoke(
if (FAILED(ITypeInfo_GetNames(ti, dispIdMember, bstrParamNames, if (FAILED(ITypeInfo_GetNames(ti, dispIdMember, bstrParamNames,
MAX_FUNC_PARAMS, &namesNo))) 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 else
{ {
@ -412,7 +412,7 @@ static HRESULT WINAPI AutomationObject_Invoke(
/* Free function name if we retrieved it */ /* Free function name if we retrieved it */
SysFreeString(bstrName); 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; return hr;
} }
@ -470,7 +470,7 @@ static HRESULT WINAPI ProvideMultipleClassInfo_GetClassInfo(IProvideMultipleClas
static HRESULT WINAPI ProvideMultipleClassInfo_GetGUID(IProvideMultipleClassInfo* iface, DWORD dwGuidKind, GUID* pGUID) static HRESULT WINAPI ProvideMultipleClassInfo_GetGUID(IProvideMultipleClassInfo* iface, DWORD dwGuidKind, GUID* pGUID)
{ {
AutomationObject *This = impl_from_IProvideMultipleClassInfo(iface); 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) if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
return E_INVALIDARG; return E_INVALIDARG;
@ -500,7 +500,8 @@ static HRESULT WINAPI ProvideMultipleClassInfo_GetInfoOfIndex(IProvideMultipleCl
{ {
AutomationObject *This = impl_from_IProvideMultipleClassInfo(iface); 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) if (iti != 0)
return E_INVALIDARG; return E_INVALIDARG;
@ -542,7 +543,7 @@ static const IProvideMultipleClassInfoVtbl ProvideMultipleClassInfoVtbl =
static void init_automation_object(AutomationObject *This, MSIHANDLE msiHandle, tid_t tid) 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->IDispatch_iface.lpVtbl = &AutomationObjectVtbl;
This->IProvideMultipleClassInfo_iface.lpVtbl = &ProvideMultipleClassInfoVtbl; 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); ListEnumerator *This = impl_from_IEnumVARIANT(iface);
ULONG i, local; 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; if (fetched) *fetched = 0;
@ -641,7 +642,7 @@ static HRESULT WINAPI ListEnumerator_Skip(IEnumVARIANT* iface, ULONG celt)
{ {
ListEnumerator *This = impl_from_IEnumVARIANT(iface); ListEnumerator *This = impl_from_IEnumVARIANT(iface);
TRACE("(%p,%uld)\n", iface, celt); TRACE("%p, %lu\n", iface, celt);
This->pos += celt; This->pos += celt;
if (This->pos >= This->list->count) if (This->pos >= This->list->count)
@ -1030,7 +1031,7 @@ static HRESULT list_invoke(
if (SUCCEEDED(hr = create_list_enumerator(list, (LPVOID *)&pUnk))) if (SUCCEEDED(hr = create_list_enumerator(list, (LPVOID *)&pUnk)))
V_UNKNOWN(pVarResult) = pUnk; V_UNKNOWN(pVarResult) = pUnk;
else 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; else return DISP_E_MEMBERNOTFOUND;
break; break;
@ -1189,7 +1190,7 @@ static HRESULT view_invoke(
if ((ret = MsiViewFetch(This->msiHandle, &msiHandle)) == ERROR_SUCCESS) if ((ret = MsiViewFetch(This->msiHandle, &msiHandle)) == ERROR_SUCCESS)
{ {
if (FAILED(hr = create_record(msiHandle, &V_DISPATCH(pVarResult)))) 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) else if (ret == ERROR_NO_MORE_ITEMS)
V_DISPATCH(pVarResult) = NULL; V_DISPATCH(pVarResult) = NULL;
@ -1289,7 +1290,7 @@ HRESULT database_invoke(
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
V_DISPATCH(pVarResult) = dispatch; V_DISPATCH(pVarResult) = dispatch;
else else
ERR("Failed to create SummaryInfo object: 0x%08x\n", hr); ERR("failed to create SummaryInfo object: %#lx\n", hr);
} }
else else
{ {
@ -1311,7 +1312,7 @@ HRESULT database_invoke(
if (SUCCEEDED(hr = create_view(msiHandle, &dispatch))) if (SUCCEEDED(hr = create_view(msiHandle, &dispatch)))
V_DISPATCH(pVarResult) = dispatch; V_DISPATCH(pVarResult) = dispatch;
else else
ERR("Failed to create View object, hresult 0x%08x\n", hr); ERR("failed to create View object, hresult %#lx\n", hr);
} }
else else
{ {
@ -1447,7 +1448,7 @@ static HRESULT session_invoke(
if (SUCCEEDED(hr = create_database(msiHandle, &dispatch))) if (SUCCEEDED(hr = create_database(msiHandle, &dispatch)))
V_DISPATCH(pVarResult) = dispatch; V_DISPATCH(pVarResult) = dispatch;
else else
ERR("Failed to create Database object, hresult 0x%08x\n", hr); ERR("failed to create Database object, hresult %#lx\n", hr);
} }
else else
{ {
@ -1617,11 +1618,11 @@ static void variant_from_registry_value(VARIANT *pVarResult, DWORD dwType, LPBYT
case REG_EXPAND_SZ: case REG_EXPAND_SZ:
if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString, dwNewSize))) 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)))) else if (!(szNewString = msi_alloc(dwNewSize * sizeof(WCHAR))))
ERR("Out of memory\n"); ERR("Out of memory\n");
else if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString, dwNewSize))) else if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString, dwNewSize)))
ERR("ExpandEnvironmentStrings returned error %d\n", GetLastError()); ERR("ExpandEnvironmentStrings returned error %lu\n", GetLastError());
else else
{ {
V_VT(pVarResult) = VT_BSTR; V_VT(pVarResult) = VT_BSTR;
@ -1650,7 +1651,7 @@ static void variant_from_registry_value(VARIANT *pVarResult, DWORD dwType, LPBYT
break; break;
default: 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; AutomationObject *database;
TRACE("(%d %p)\n", msiHandle, dispatch); TRACE("%lu %p\n", msiHandle, dispatch);
database = msi_alloc(sizeof(AutomationObject)); database = msi_alloc(sizeof(AutomationObject));
if (!database) return E_OUTOFMEMORY; if (!database) return E_OUTOFMEMORY;
@ -2471,7 +2472,7 @@ static HRESULT create_view(MSIHANDLE msiHandle, IDispatch **dispatch)
{ {
AutomationObject *view; AutomationObject *view;
TRACE("(%d %p)\n", msiHandle, dispatch); TRACE("%lu %p\n", msiHandle, dispatch);
view = msi_alloc(sizeof(AutomationObject)); view = msi_alloc(sizeof(AutomationObject));
if (!view) return E_OUTOFMEMORY; if (!view) return E_OUTOFMEMORY;

View file

@ -911,7 +911,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
res = RegDeleteTreeW( hkey, cls->clsid ); res = RegDeleteTreeW( hkey, cls->clsid );
if (res != ERROR_SUCCESS) 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) if (cls->AppID)
{ {
@ -920,7 +920,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
{ {
res = RegDeleteKeyW( hkey2, cls->AppID->AppID ); res = RegDeleteKeyW( hkey2, cls->AppID->AppID );
if (res != ERROR_SUCCESS) if (res != ERROR_SUCCESS)
WARN("Failed to delete appid key %d\n", res); WARN("failed to delete appid key %ld\n", res);
RegCloseKey( hkey2 ); RegCloseKey( hkey2 );
} }
} }
@ -935,7 +935,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
msi_free( filetype ); msi_free( filetype );
if (res != ERROR_SUCCESS) 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 ); res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID );
if (res != ERROR_SUCCESS) 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 ); uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, progid->ProgID ); MSI_RecordSetStringW( uirow, 1, progid->ProgID );
@ -1256,7 +1256,7 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey ); res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey );
msi_free( extension ); msi_free( extension );
if (res != ERROR_SUCCESS) 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) if (ext->Mime)
@ -1355,7 +1355,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension ); res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension );
msi_free( extension ); msi_free( extension );
if (res != ERROR_SUCCESS) 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) if (ext->ProgID || ext->ProgIDText)
@ -1376,7 +1376,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell ); res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell );
msi_free( progid_shell ); msi_free( progid_shell );
if (res != ERROR_SUCCESS) 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 ); RegDeleteKeyW( HKEY_CLASSES_ROOT, progid );
} }
} }
@ -1482,7 +1482,7 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
lstrcatW( mime_key, mime->ContentType ); lstrcatW( mime_key, mime->ContentType );
res = RegDeleteKeyW( HKEY_CLASSES_ROOT, mime_key ); res = RegDeleteKeyW( HKEY_CLASSES_ROOT, mime_key );
if (res != ERROR_SUCCESS) 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 ); msi_free( mime_key );
} }

View file

@ -321,7 +321,7 @@ static UINT custom_get_process_return( HANDLE process )
DWORD rc = 0; DWORD rc = 0;
GetExitCodeProcess( process, &rc ); GetExitCodeProcess( process, &rc );
TRACE("exit code is %u\n", rc); TRACE( "exit code is %lu\n", rc );
if (rc != 0) if (rc != 0)
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -346,7 +346,7 @@ static UINT custom_get_thread_return( MSIPACKAGE *package, HANDLE thread )
ACTION_ForceReboot( package ); ACTION_ForceReboot( package );
return ERROR_SUCCESS; return ERROR_SUCCESS;
default: default:
ERR("Invalid Return Code %d\n",rc); ERR( "invalid Return Code %lu\n", rc );
return ERROR_INSTALL_FAILURE; 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); status = RpcStringBindingComposeW(NULL, (WCHAR *)L"ncalrpc", NULL, endpoint, NULL, &binding_str);
if (status != RPC_S_OK) if (status != RPC_S_OK)
{ {
ERR("RpcStringBindingCompose failed: %#x\n", status); ERR("RpcStringBindingCompose failed: %#lx\n", status);
return status; return status;
} }
status = RpcBindingFromStringBindingW(binding_str, &rpc_handle); status = RpcBindingFromStringBindingW(binding_str, &rpc_handle);
if (status != RPC_S_OK) if (status != RPC_S_OK)
{ {
ERR("RpcBindingFromStringBinding failed: %#x\n", status); ERR("RpcBindingFromStringBinding failed: %#lx\n", status);
return status; return status;
} }
RpcStringFreeW(&binding_str); 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 ); hPackage = alloc_msi_remote_handle( remote_package );
if (!hPackage) 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( action );
midl_user_free( dll ); midl_user_free( dll );
midl_user_free( proc ); midl_user_free( proc );
@ -556,7 +556,7 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid)
hModule = LoadLibraryW( dll ); hModule = LoadLibraryW( dll );
if (!hModule) 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( action );
midl_user_free( dll ); midl_user_free( dll );
midl_user_free( proc ); midl_user_free( proc );
@ -576,7 +576,7 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid)
} }
__EXCEPT_PAGE_FAULT __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() ); debugstr_w(dll), debugstr_a(proc), GetExceptionCode() );
r = ERROR_SUCCESS; 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), pipe = CreateNamedPipeW(buffer, PIPE_ACCESS_DUPLEX, 0, 1, sizeof(DWORD64),
sizeof(GUID), 0, NULL); sizeof(GUID), 0, NULL);
if (pipe == INVALID_HANDLE_VALUE) 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) if ((sizeof(void *) == 8 || is_wow64) && arch == SCS_32BIT_BINARY)
GetSystemWow64DirectoryW(path, MAX_PATH - ARRAY_SIZE(L"\\msiexec.exe")); 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)) 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(); return GetLastError();
} }
@ -689,13 +689,13 @@ static DWORD WINAPI custom_client_thread(void *arg)
if (!WriteFile(pipe, &info->guid, sizeof(info->guid), &size, NULL) || if (!WriteFile(pipe, &info->guid, sizeof(info->guid), &size, NULL) ||
size != sizeof(info->guid)) 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); LeaveCriticalSection(&msi_custom_action_cs);
return GetLastError(); return GetLastError();
} }
if (!ReadFile(pipe, &thread64, sizeof(thread64), &size, NULL) || size != sizeof(thread64)) 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); LeaveCriticalSection(&msi_custom_action_cs);
return GetLastError(); return GetLastError();
} }
@ -793,7 +793,7 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll(
endpoint, NULL); endpoint, NULL);
if (status != RPC_S_OK) if (status != RPC_S_OK)
{ {
ERR("RpcServerUseProtseqEp failed: %#x\n", status); ERR("RpcServerUseProtseqEp failed: %#lx\n", status);
return NULL; return NULL;
} }
@ -801,7 +801,7 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll(
RPC_IF_AUTOLISTEN, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); RPC_IF_AUTOLISTEN, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL);
if (status != RPC_S_OK) if (status != RPC_S_OK)
{ {
ERR("RpcServerRegisterIfEx failed: %#x\n", status); ERR("RpcServerRegisterIfEx failed: %#lx\n", status);
return NULL; return NULL;
} }
@ -869,7 +869,7 @@ static HANDLE execute_command( const WCHAR *app, WCHAR *arg, const WCHAR *dir )
} }
if (!len_exe) if (!len_exe)
{ {
ERR("can't find executable %u\n", GetLastError()); ERR("can't find executable %lu\n", GetLastError());
msi_free( exe ); msi_free( exe );
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
@ -907,7 +907,7 @@ static HANDLE execute_command( const WCHAR *app, WCHAR *arg, const WCHAR *dir )
msi_free( exe ); msi_free( exe );
if (!ret) if (!ret)
{ {
ERR("unable to execute command %u\n", GetLastError()); ERR("unable to execute command %lu\n", GetLastError());
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
CloseHandle( info.hThread ); 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 ); hr = StgCreateDocfile( filename, STGM_CREATE|STGM_TRANSACTED|STGM_WRITE|STGM_SHARE_EXCLUSIVE, 0, &dst );
if (FAILED( hr )) 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; goto done;
} }
hr = IStorage_OpenStorage( package->db->storage, source, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &src ); hr = IStorage_OpenStorage( package->db->storage, source, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &src );
if (FAILED( hr )) 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; goto done;
} }
hr = IStorage_CopyTo( src, 0, NULL, NULL, dst ); hr = IStorage_CopyTo( src, 0, NULL, NULL, dst );
if (FAILED( hr )) 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; goto done;
} }
hr = IStorage_Commit( dst, 0 ); hr = IStorage_Commit( dst, 0 );
if (FAILED( hr )) if (FAILED( hr ))
ERR( "failed to commit storage (%08x)\n", hr ); ERR( "failed to commit storage (%#lx)\n", hr );
else else
r = ERROR_SUCCESS; r = ERROR_SUCCESS;
@ -1200,11 +1200,11 @@ static DWORD WINAPI ScriptThread( LPVOID arg )
LPGUID guid = arg; LPGUID guid = arg;
DWORD rc; DWORD rc;
TRACE("custom action (%x) started\n", GetCurrentThreadId() ); TRACE("custom action (%#lx) started\n", GetCurrentThreadId() );
rc = ACTION_CallScript( guid ); rc = ACTION_CallScript( guid );
TRACE("custom action (%x) returned %i\n", GetCurrentThreadId(), rc ); TRACE("custom action (%#lx) returned %lu\n", GetCurrentThreadId(), rc );
MsiCloseAllHandles(); MsiCloseAllHandles();
return rc; return rc;

View file

@ -108,7 +108,7 @@ static HRESULT db_initialize( IStorage *stg, const GUID *clsid )
hr = IStorage_SetClass( stg, clsid ); hr = IStorage_SetClass( stg, clsid );
if (FAILED( hr )) if (FAILED( hr ))
{ {
WARN("failed to set class id 0x%08x\n", hr); WARN("failed to set class id %#lx\n", hr);
return 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 ); hr = write_stream_data( stg, L"_Tables", NULL, 0, TRUE );
if (FAILED( hr )) if (FAILED( hr ))
{ {
WARN("failed to create _Tables stream 0x%08x\n", hr); WARN("failed to create _Tables stream %#lx\n", hr);
return hr; return hr;
} }
hr = msi_init_string_table( stg ); hr = msi_init_string_table( stg );
if (FAILED( hr )) if (FAILED( hr ))
{ {
WARN("failed to initialize string table 0x%08x\n", hr); WARN("failed to initialize string table %#lx\n", hr);
return hr; return hr;
} }
hr = IStorage_Commit( stg, 0 ); hr = IStorage_Commit( stg, 0 );
if (FAILED( hr )) if (FAILED( hr ))
{ {
WARN("failed to commit changes 0x%08x\n", hr); WARN("failed to commit changes %#lx\n", hr);
return hr; return hr;
} }
@ -217,7 +217,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
if( FAILED( r ) || !stg ) 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; return ERROR_FUNCTION_FAILED;
} }
@ -513,7 +513,7 @@ static LPWSTR msi_build_createsql_columns(LPWSTR *columns_data, LPWSTR *types, D
type = L"LONG"; type = L"LONG";
else else
{ {
WARN("invalid int width %u\n", len); WARN("invalid int width %lu\n", len);
msi_free(columns); msi_free(columns);
return NULL; return NULL;
} }
@ -835,12 +835,12 @@ done:
return r; return r;
} }
UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFilename) UINT WINAPI MsiDatabaseImportW( MSIHANDLE handle, const WCHAR *szFolder, const WCHAR *szFilename )
{ {
MSIDATABASE *db; MSIDATABASE *db;
UINT r; 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))) if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE)))
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
@ -850,13 +850,12 @@ UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFil
return r; return r;
} }
UINT WINAPI MsiDatabaseImportA( MSIHANDLE handle, UINT WINAPI MsiDatabaseImportA( MSIHANDLE handle, const char *szFolder, const char *szFilename )
LPCSTR szFolder, LPCSTR szFilename )
{ {
LPWSTR path = NULL, file = NULL; WCHAR *path = NULL, *file = NULL;
UINT r = ERROR_OUTOFMEMORY; 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 ) if( szFolder )
{ {
@ -1141,14 +1140,12 @@ done:
* *
* row4 : data <tab> data <tab> data <tab> ... data <cr> <lf> * row4 : data <tab> data <tab> data <tab> ... data <cr> <lf>
*/ */
UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable, UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, const WCHAR *szTable, const WCHAR *szFolder, const WCHAR *szFilename )
LPCWSTR szFolder, LPCWSTR szFilename )
{ {
MSIDATABASE *db; MSIDATABASE *db;
UINT r; UINT r;
TRACE("%x %s %s %s\n", handle, debugstr_w(szTable), TRACE( "%lu %s %s %s\n", handle, debugstr_w(szTable), debugstr_w(szFolder), debugstr_w(szFilename) );
debugstr_w(szFolder), debugstr_w(szFilename));
if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE))) if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE)))
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
@ -1158,14 +1155,12 @@ UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable,
return r; return r;
} }
UINT WINAPI MsiDatabaseExportA( MSIHANDLE handle, LPCSTR szTable, UINT WINAPI MsiDatabaseExportA( MSIHANDLE handle, const char *szTable, const char *szFolder, const char *szFilename )
LPCSTR szFolder, LPCSTR szFilename )
{ {
LPWSTR path = NULL, file = NULL, table = NULL; WCHAR *path = NULL, *file = NULL, *table = NULL;
UINT r = ERROR_OUTOFMEMORY; UINT r = ERROR_OUTOFMEMORY;
TRACE("%x %s %s %s\n", handle, debugstr_a(szTable), TRACE( "%lu %s %s %s\n", handle, debugstr_a(szTable), debugstr_a(szFolder), debugstr_a(szFilename) );
debugstr_a(szFolder), debugstr_a(szFilename));
if( szTable ) if( szTable )
{ {
@ -1198,14 +1193,12 @@ end:
return r; return r;
} }
UINT WINAPI MsiDatabaseMergeA(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, UINT WINAPI MsiDatabaseMergeA( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, const char *szTableName )
LPCSTR szTableName)
{ {
UINT r; UINT r;
LPWSTR table; WCHAR *table;
TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge, TRACE("%lu, %lu, %s\n", hDatabase, hDatabaseMerge, debugstr_a(szTableName) );
debugstr_a(szTableName));
table = strdupAtoW(szTableName); table = strdupAtoW(szTableName);
r = MsiDatabaseMergeW(hDatabase, hDatabaseMerge, table); r = MsiDatabaseMergeW(hDatabase, hDatabaseMerge, table);
@ -1839,7 +1832,7 @@ static UINT update_merge_errors(MSIDATABASE *db, LPCWSTR error,
return r; 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 tabledata = LIST_INIT(tabledata);
struct list *item, *cursor; struct list *item, *cursor;
@ -1848,7 +1841,7 @@ UINT WINAPI MsiDatabaseMergeW(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, LPC
BOOL conflicts; BOOL conflicts;
UINT r; 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) if (szTableName && !*szTableName)
return ERROR_INVALID_TABLE; return ERROR_INVALID_TABLE;
@ -1906,7 +1899,7 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle )
MSIDBSTATE ret = MSIDBSTATE_READ; MSIDBSTATE ret = MSIDBSTATE_READ;
MSIDATABASE *db; MSIDATABASE *db;
TRACE("%d\n", handle); TRACE( "%lu\n", handle );
if (!(db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ))) if (!(db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE )))
return MSIDBSTATE_ERROR; return MSIDBSTATE_ERROR;

View file

@ -590,7 +590,7 @@ static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control,
val1 = MSI_RecordGetInteger( rec, 2 ); val1 = MSI_RecordGetInteger( rec, 2 );
val2 = MSI_RecordGetInteger( rec, 3 ); 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; units = val1 / 512;
switch (func) switch (func)
@ -633,7 +633,7 @@ static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control,
ctrl->progress_max += units; ctrl->progress_max += units;
break; break;
default: default:
FIXME("Unknown progress message %u\n", func); FIXME( "unknown progress message %lu\n", func );
break; break;
} }
} }
@ -730,8 +730,7 @@ static msi_control *msi_dialog_add_control( msi_dialog *dialog,
attributes = MSI_RecordGetInteger( rec, 8 ); attributes = MSI_RecordGetInteger( rec, 8 );
if (wcscmp( control_type, L"ScrollableText" )) text = MSI_RecordGetString( rec, 10 ); if (wcscmp( control_type, L"ScrollableText" )) text = MSI_RecordGetString( rec, 10 );
TRACE("%s, %s, %08x, %s, %08x\n", debugstr_w(szCls), debugstr_w(name), TRACE( "%s, %s, %#lx, %s, %#lx\n", debugstr_w(szCls), debugstr_w(name), attributes, debugstr_w(text), style );
attributes, debugstr_w(text), style);
if( attributes & msidbControlAttributesVisible ) if( attributes & msidbControlAttributesVisible )
style |= WS_VISIBLE; style |= WS_VISIBLE;
@ -773,7 +772,7 @@ MSIText_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
struct msi_text_info *info; struct msi_text_info *info;
LRESULT r = 0; 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"); info = GetPropW(hWnd, L"MSIDATA");
@ -1247,7 +1246,7 @@ MSIScrollText_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
struct msi_scrolltext_info *info; struct msi_scrolltext_info *info;
HRESULT r; 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" ); info = GetPropW( hWnd, L"MSIDATA" );
@ -1287,7 +1286,7 @@ msi_richedit_stream_in( DWORD_PTR arg, LPBYTE buffer, LONG count, LONG *pcb )
*pcb = count; *pcb = count;
info->offset += count; info->offset += count;
TRACE("%d/%d\n", info->offset, info->length); TRACE( "%lu/%lu\n", info->offset, info->length );
return 0; return 0;
} }
@ -1428,7 +1427,7 @@ static LRESULT WINAPI MSIComboBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LP
LRESULT r; LRESULT r;
DWORD j; 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" ); info = GetPropW( hWnd, L"MSIDATA" );
if (!info) if (!info)
@ -1828,7 +1827,7 @@ MSIMaskedEdit_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
struct msi_maskedit_info *info; struct msi_maskedit_info *info;
HRESULT r; 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"); 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"); struct msi_pathedit_info *info = GetPropW(hWnd, L"MSIDATA");
LRESULT r = 0; 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 ) 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" ); WNDPROC oldproc = (WNDPROC)GetPropW( hWnd, L"MSIDATA" );
LRESULT r; 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 */ if (msg == WM_COMMAND) /* Forward notifications to dialog */
SendMessageW( GetParent( hWnd ), msg, wParam, lParam ); SendMessageW( GetParent( hWnd ), msg, wParam, lParam );
@ -2463,7 +2462,7 @@ MSISelectionTree_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
TVHITTESTINFO tvhti; TVHITTESTINFO tvhti;
HRESULT r; 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"); info = GetPropW(hWnd, L"MSIDATA");
@ -2714,7 +2713,7 @@ static LRESULT WINAPI MSIListBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
LRESULT r; LRESULT r;
DWORD j; 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" ); info = GetPropW( hWnd, L"MSIDATA" );
if (!info) if (!info)
@ -3792,7 +3791,7 @@ static LRESULT msi_dialog_oncommand( msi_dialog *dialog, WPARAM param, HWND hwnd
{ {
msi_control *control = NULL; msi_control *control = NULL;
TRACE("%p %p %08lx\n", dialog, hwnd, param); TRACE( "%p, %#Ix, %p\n", dialog, param, hwnd );
switch (param) switch (param)
{ {
@ -4214,7 +4213,7 @@ UINT WINAPI MsiEnableUIPreview( MSIHANDLE hdb, MSIHANDLE *phPreview )
MSIPREVIEW *preview; MSIPREVIEW *preview;
UINT r = ERROR_FUNCTION_FAILED; UINT r = ERROR_FUNCTION_FAILED;
TRACE("%d %p\n", hdb, phPreview); TRACE( "%lu %p\n", hdb, phPreview );
if (!(db = msihandle2msiinfo(hdb, MSIHANDLETYPE_DATABASE))) if (!(db = msihandle2msiinfo(hdb, MSIHANDLETYPE_DATABASE)))
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
@ -4264,7 +4263,7 @@ UINT WINAPI MsiPreviewDialogW( MSIHANDLE hPreview, LPCWSTR szDialogName )
MSIPREVIEW *preview; MSIPREVIEW *preview;
UINT r; UINT r;
TRACE("%d %s\n", hPreview, debugstr_w(szDialogName)); TRACE( "%lu %s\n", hPreview, debugstr_w(szDialogName) );
preview = msihandle2msiinfo( hPreview, MSIHANDLETYPE_PREVIEW ); preview = msihandle2msiinfo( hPreview, MSIHANDLETYPE_PREVIEW );
if (!preview) if (!preview)
@ -4280,7 +4279,7 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName )
UINT r; UINT r;
LPWSTR strW = NULL; LPWSTR strW = NULL;
TRACE("%d %s\n", hPreview, debugstr_a(szDialogName)); TRACE( "%lu %s\n", hPreview, debugstr_a(szDialogName) );
if (szDialogName) if (szDialogName)
{ {
@ -4293,15 +4292,15 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName )
return r; 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; 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; return ERROR_CALL_NOT_IMPLEMENTED;
} }

View file

@ -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) 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; return msifs_overwrite;
} }
if (file->hash.dwFileHashInfoSize) if (file->hash.dwFileHashInfoSize)
@ -722,7 +722,7 @@ static UINT patch_file( MSIPACKAGE *package, MSIFILEPATCH *patch )
} }
else 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; r = ERROR_INSTALL_FAILURE;
} }
DeleteFileW( patch->path ); 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 )) if (!msi_copy_file( package, path, patch->File->TargetPath, FALSE ))
{ {
ERR("Failed to copy file %s -> %s (%u)\n", debugstr_w(path), ERR( "failed to copy file %s -> %s (%lu)\n", debugstr_w(path),
debugstr_w(patch->File->TargetPath), GetLastError() ); debugstr_w(patch->File->TargetPath), GetLastError() );
msi_free( path ); msi_free( path );
msi_free( displayname ); msi_free( displayname );
IAssemblyName_Release( name ); 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 ); ret = msi_move_file( package, source, dest, MOVEFILE_REPLACE_EXISTING );
if (!ret) if (!ret)
{ {
WARN("msi_move_file failed: %u\n", GetLastError()); WARN( "msi_move_file failed: %lu\n", GetLastError() );
return FALSE; 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 ); ret = msi_copy_file( package, source, dest, FALSE );
if (!ret) if (!ret)
{ {
WARN("msi_copy_file failed: %u\n", GetLastError()); WARN( "msi_copy_file failed: %lu\n", GetLastError() );
return FALSE; return FALSE;
} }
} }
@ -1176,7 +1176,7 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
{ {
if (!msi_create_full_path( package, destdir )) 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; 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)); TRACE("Duplicating file %s to %s\n", debugstr_w(file->TargetPath), debugstr_w(dest));
if (!msi_copy_file( package, file->TargetPath, dest, TRUE )) if (!msi_copy_file( package, file->TargetPath, dest, TRUE ))
{ {
WARN("Failed to copy file %s -> %s (%u)\n", WARN( "failed to copy file %s -> %s (%lu)\n",
debugstr_w(file->TargetPath), debugstr_w(dest), GetLastError()); debugstr_w(file->TargetPath), debugstr_w(dest), GetLastError() );
} }
FIXME("We should track these duplicate files as well\n"); 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)); TRACE("Removing duplicate %s of %s\n", debugstr_w(dest), debugstr_w(file->TargetPath));
if (!msi_delete_file( package, dest )) 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 ); uirow = MSI_CreateRecord( 9 );
@ -1606,7 +1606,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
msi_set_file_attributes( package, file->TargetPath, FILE_ATTRIBUTE_NORMAL ); msi_set_file_attributes( package, file->TargetPath, FILE_ATTRIBUTE_NORMAL );
if (!msi_delete_file( package, file->TargetPath )) 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; file->state = msifs_missing;

View file

@ -897,14 +897,13 @@ end:
return rc; return rc;
} }
UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord, UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord, WCHAR *szResult, DWORD *sz )
LPWSTR szResult, LPDWORD sz )
{ {
UINT r = ERROR_INVALID_HANDLE; UINT r = ERROR_INVALID_HANDLE;
MSIPACKAGE *package; MSIPACKAGE *package;
MSIRECORD *record; 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); record = msihandle2msiinfo(hRecord, MSIHANDLETYPE_RECORD);
if (!record) if (!record)
@ -961,7 +960,7 @@ UINT WINAPI MsiFormatRecordA(MSIHANDLE hinst, MSIHANDLE hrec, char *buf, DWORD *
DWORD len; DWORD len;
UINT r; 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); rec = msihandle2msiinfo(hrec, MSIHANDLETYPE_RECORD);
if (!rec) if (!rec)

View file

@ -127,7 +127,7 @@ MSIHANDLE alloc_msihandle( MSIOBJECTHDR *obj )
LeaveCriticalSection( &MSI_handle_cs ); LeaveCriticalSection( &MSI_handle_cs );
TRACE("%p -> %d\n", obj, ret ); TRACE( "%p -> %lu\n", obj, ret );
return ret; return ret;
} }
@ -150,7 +150,7 @@ MSIHANDLE alloc_msi_remote_handle(MSIHANDLE remote)
LeaveCriticalSection( &MSI_handle_cs ); LeaveCriticalSection( &MSI_handle_cs );
TRACE("%d -> %d\n", remote, ret); TRACE( "%lu -> %lu\n", remote, ret );
return ret; return ret;
} }
@ -271,7 +271,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
MSIOBJECTHDR *info = NULL; MSIOBJECTHDR *info = NULL;
UINT ret = ERROR_INVALID_HANDLE; UINT ret = ERROR_INVALID_HANDLE;
TRACE("%x\n",handle); TRACE( "%lu\n", handle );
if (!handle) if (!handle)
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -305,7 +305,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
ret = ERROR_SUCCESS; ret = ERROR_SUCCESS;
TRACE("handle %x destroyed\n", handle+1); TRACE( "handle %lu destroyed\n", handle + 1 );
out: out:
LeaveCriticalSection( &MSI_handle_cs ); LeaveCriticalSection( &MSI_handle_cs );
if( info ) if( info )

View file

@ -79,7 +79,7 @@ MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD
switch( vl->val->type ) switch( vl->val->type )
{ {
case EXPR_SVAL: 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 ); MSI_RecordSetStringW( merged, i, vl->val->u.sval );
break; break;
case EXPR_IVAL: case EXPR_IVAL:

View file

@ -672,7 +672,7 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
MSIPACKAGE *package; MSIPACKAGE *package;
BOOL r = FALSE; BOOL r = FALSE;
TRACE("%d %d\n", hInstall, iRunMode); TRACE( "%lu, %d\n", hInstall, iRunMode );
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package) if (!package)
@ -765,7 +765,7 @@ UINT WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState)
MSIPACKAGE *package; MSIPACKAGE *package;
UINT r; UINT r;
TRACE("%d %d %d\n", hInstall, iRunMode, fState); TRACE( "%lu, %d, %d\n", hInstall, iRunMode, fState );
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE ); package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE );
if (!package) if (!package)
@ -990,7 +990,7 @@ UINT WINAPI MsiSetFeatureAttributesA( MSIHANDLE handle, LPCSTR feature, DWORD at
UINT r; UINT r;
WCHAR *featureW = NULL; 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; if (feature && !(featureW = strdupAtoW( feature ))) return ERROR_OUTOFMEMORY;
@ -1021,7 +1021,7 @@ UINT WINAPI MsiSetFeatureAttributesW( MSIHANDLE handle, LPCWSTR name, DWORD attr
MSIFEATURE *feature; MSIFEATURE *feature;
WCHAR *costing; 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; if (!name || !name[0]) return ERROR_UNKNOWN_FEATURE;
@ -1085,13 +1085,13 @@ UINT MSI_GetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature,
/*********************************************************************** /***********************************************************************
* MsiGetFeatureStateW (MSI.@) * MsiGetFeatureStateW (MSI.@)
*/ */
UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall, LPCWSTR szFeature, UINT WINAPI MsiGetFeatureStateW( MSIHANDLE hInstall, const WCHAR *szFeature, INSTALLSTATE *piInstalled,
INSTALLSTATE *piInstalled, INSTALLSTATE *piAction) INSTALLSTATE *piAction )
{ {
MSIPACKAGE* package; MSIPACKAGE* package;
UINT ret; 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) if (!szFeature)
return ERROR_UNKNOWN_FEATURE; return ERROR_UNKNOWN_FEATURE;
@ -1204,15 +1204,14 @@ UINT MSI_GetFeatureCost( MSIPACKAGE *package, MSIFEATURE *feature, MSICOSTTREE t
/*********************************************************************** /***********************************************************************
* MsiGetFeatureCostW (MSI.@) * MsiGetFeatureCostW (MSI.@)
*/ */
UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature, UINT WINAPI MsiGetFeatureCostW( MSIHANDLE hInstall, const WCHAR *szFeature, MSICOSTTREE iCostTree,
MSICOSTTREE iCostTree, INSTALLSTATE iState, LPINT piCost) INSTALLSTATE iState, INT *piCost )
{ {
MSIPACKAGE *package; MSIPACKAGE *package;
MSIFEATURE *feature; MSIFEATURE *feature;
UINT ret; UINT ret;
TRACE("(%d %s %i %i %p)\n", hInstall, debugstr_w(szFeature), TRACE( "%lu, %s, %d, %d, %p\n", hInstall, debugstr_w(szFeature), iCostTree, iState, piCost );
iCostTree, iState, piCost);
if (!szFeature) if (!szFeature)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1258,14 +1257,14 @@ UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature,
/*********************************************************************** /***********************************************************************
* MsiGetFeatureInfoA (MSI.@) * MsiGetFeatureInfoA (MSI.@)
*/ */
UINT WINAPI MsiGetFeatureInfoA( MSIHANDLE handle, LPCSTR feature, LPDWORD attrs, UINT WINAPI MsiGetFeatureInfoA( MSIHANDLE handle, const char *feature, DWORD *attrs,
LPSTR title, LPDWORD title_len, LPSTR help, LPDWORD help_len ) char *title, DWORD *title_len, char *help, DWORD *help_len )
{ {
UINT r; UINT r;
WCHAR *titleW = NULL, *helpW = NULL, *featureW = NULL; WCHAR *titleW = NULL, *helpW = NULL, *featureW = NULL;
TRACE("%u, %s, %p, %p, %p, %p, %p\n", handle, debugstr_a(feature), attrs, title, TRACE( "%lu, %s, %p, %p, %p, %p, %p\n", handle, debugstr_a(feature), attrs, title,
title_len, help, help_len); title_len, help, help_len );
if (feature && !(featureW = strdupAtoW( feature ))) return ERROR_OUTOFMEMORY; if (feature && !(featureW = strdupAtoW( feature ))) return ERROR_OUTOFMEMORY;
@ -1352,14 +1351,14 @@ static UINT MSI_GetFeatureInfo( MSIPACKAGE *package, LPCWSTR name, LPDWORD attrs
/*********************************************************************** /***********************************************************************
* MsiGetFeatureInfoW (MSI.@) * MsiGetFeatureInfoW (MSI.@)
*/ */
UINT WINAPI MsiGetFeatureInfoW( MSIHANDLE handle, LPCWSTR feature, LPDWORD attrs, UINT WINAPI MsiGetFeatureInfoW( MSIHANDLE handle, const WCHAR *feature, DWORD *attrs,
LPWSTR title, LPDWORD title_len, LPWSTR help, LPDWORD help_len ) WCHAR *title, DWORD *title_len, WCHAR *help, DWORD *help_len )
{ {
UINT r; UINT r;
MSIPACKAGE *package; MSIPACKAGE *package;
TRACE("%u, %s, %p, %p, %p, %p, %p\n", handle, debugstr_w(feature), attrs, title, TRACE( "%lu, %s, %p, %p, %p, %p, %p\n", handle, debugstr_w(feature), attrs, title,
title_len, help, help_len); title_len, help, help_len );
if (!feature) return ERROR_INVALID_PARAMETER; if (!feature) return ERROR_INVALID_PARAMETER;
@ -1499,14 +1498,13 @@ UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent,
/*********************************************************************** /***********************************************************************
* MsiGetComponentStateW (MSI.@) * MsiGetComponentStateW (MSI.@)
*/ */
UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent, UINT WINAPI MsiGetComponentStateW( MSIHANDLE hInstall, const WCHAR *szComponent, INSTALLSTATE *piInstalled,
INSTALLSTATE *piInstalled, INSTALLSTATE *piAction) INSTALLSTATE *piAction )
{ {
MSIPACKAGE* package; MSIPACKAGE* package;
UINT ret; UINT ret;
TRACE("%d %s %p %p\n", hInstall, debugstr_w(szComponent), TRACE( "%lu, %s, %p, %p\n", hInstall, debugstr_w(szComponent), piInstalled, piAction );
piInstalled, piAction);
if (!szComponent) if (!szComponent)
return ERROR_UNKNOWN_COMPONENT; return ERROR_UNKNOWN_COMPONENT;
@ -1601,7 +1599,7 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel)
MSIPACKAGE* package; MSIPACKAGE* package;
UINT r; UINT r;
TRACE("%d %i\n", hInstall, iInstallLevel); TRACE( "%lu %d\n", hInstall, iInstallLevel );
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package) if (!package)
@ -1634,28 +1632,22 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel)
/*********************************************************************** /***********************************************************************
* MsiGetFeatureValidStatesW (MSI.@) * MsiGetFeatureValidStatesW (MSI.@)
*/ */
UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE hInstall, LPCWSTR szFeature, UINT WINAPI MsiGetFeatureValidStatesW( MSIHANDLE hInstall, const WCHAR *szFeature, DWORD *pInstallState )
LPDWORD pInstallState)
{ {
if(pInstallState) *pInstallState = 1<<INSTALLSTATE_LOCAL; if (pInstallState) *pInstallState = 1 << INSTALLSTATE_LOCAL;
FIXME("%d %s %p stub returning %d\n", FIXME( "%lu, %s, %p stub returning %lu\n", hInstall, debugstr_w(szFeature), pInstallState,
hInstall, debugstr_w(szFeature), pInstallState, pInstallState ? *pInstallState : 0); pInstallState ? *pInstallState : 0 );
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
/*********************************************************************** /***********************************************************************
* MsiGetFeatureValidStatesA (MSI.@) * MsiGetFeatureValidStatesA (MSI.@)
*/ */
UINT WINAPI MsiGetFeatureValidStatesA(MSIHANDLE hInstall, LPCSTR szFeature, UINT WINAPI MsiGetFeatureValidStatesA( MSIHANDLE hInstall, const char *szFeature, DWORD *pInstallState )
LPDWORD pInstallState)
{ {
UINT ret; UINT ret;
LPWSTR szwFeature = strdupAtoW(szFeature); WCHAR *szwFeature = strdupAtoW(szFeature);
ret = MsiGetFeatureValidStatesW(hInstall, szwFeature, pInstallState); ret = MsiGetFeatureValidStatesW(hInstall, szwFeature, pInstallState);
msi_free(szwFeature); msi_free(szwFeature);
return ret; return ret;
} }

View file

@ -64,7 +64,7 @@ static BOOL source_matches_volume(MSIMEDIAINFO *mi, LPCWSTR source_root)
if (!GetVolumeInformationW(root, volume_name, MAX_PATH + 1, NULL, NULL, NULL, NULL, 0)) if (!GetVolumeInformationW(root, volume_name, MAX_PATH + 1, NULL, NULL, NULL, NULL, 0))
{ {
WARN("failed to get volume information for %s (%u)\n", debugstr_w(root), GetLastError()); WARN( "failed to get volume information for %s (%lu)\n", debugstr_w(root), GetLastError() );
return FALSE; return FALSE;
} }
@ -227,7 +227,7 @@ static INT_PTR CDECL cabinet_open_stream( char *pszFile, int oflag, int pmode )
msi_free( encoded ); msi_free( encoded );
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("failed to open stream 0x%08x\n", hr); WARN( "failed to open stream %#lx\n", hr );
return -1; return -1;
} }
} }
@ -349,7 +349,7 @@ static INT_PTR cabinet_next_cabinet(FDINOTIFICATIONTYPE fdint,
length = strlen(pfdin->psz3) + 1 + strlen(next_cab) + 1; length = strlen(pfdin->psz3) + 1 + strlen(next_cab) + 1;
if (length > 256) 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); msi_free(next_cab);
goto done; goto done;
} }
@ -441,7 +441,7 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
if (attrs2 == INVALID_FILE_ATTRIBUTES) 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; goto done;
} }
else if (err == ERROR_ACCESS_DENIED && (attrs2 & FILE_ATTRIBUTE_READONLY)) else if (err == ERROR_ACCESS_DENIED && (attrs2 & FILE_ATTRIBUTE_READONLY))
@ -481,13 +481,12 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
} }
else 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 ); DeleteFileW( tmpfileW );
} }
msi_free(tmpfileW); msi_free(tmpfileW);
} }
else else WARN( "failed to create %s (error %lu)\n", debugstr_w(path), err );
WARN("failed to create %s (error %d)\n", debugstr_w(path), err);
} }
done: done:

View file

@ -181,21 +181,19 @@ UINT WINAPI MsiAdvertiseProductW(LPCWSTR szPackagePath, LPCWSTR szScriptfilePath
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
UINT WINAPI MsiAdvertiseProductExA(LPCSTR szPackagePath, LPCSTR szScriptfilePath, UINT WINAPI MsiAdvertiseProductExA( const char *szPackagePath, const char *szScriptfilePath,
LPCSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions) const char *szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions )
{ {
FIXME("%s %s %s %08x %08x %08x\n", debugstr_a(szPackagePath), FIXME( "%s, %s, %s, %#x, %#lx, %#lx\n", debugstr_a(szPackagePath), debugstr_a(szScriptfilePath),
debugstr_a(szScriptfilePath), debugstr_a(szTransforms), debugstr_a(szTransforms), lgidLanguage, dwPlatform, dwOptions );
lgidLanguage, dwPlatform, dwOptions);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
UINT WINAPI MsiAdvertiseProductExW( LPCWSTR szPackagePath, LPCWSTR szScriptfilePath, UINT WINAPI MsiAdvertiseProductExW( const WCHAR *szPackagePath, const WCHAR *szScriptfilePath,
LPCWSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions) const WCHAR *szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions )
{ {
FIXME("%s %s %s %08x %08x %08x\n", debugstr_w(szPackagePath), FIXME( "%s, %s, %s, %#x %#lx %#lx\n", debugstr_w(szPackagePath), debugstr_w(szScriptfilePath),
debugstr_w(szScriptfilePath), debugstr_w(szTransforms), debugstr_w(szTransforms), lgidLanguage, dwPlatform, dwOptions );
lgidLanguage, dwPlatform, dwOptions);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
@ -267,24 +265,22 @@ UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine)
return r; return r;
} }
UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode) UINT WINAPI MsiReinstallProductA( const char *szProduct, DWORD dwReinstallMode )
{ {
LPWSTR wszProduct; WCHAR *wszProduct;
UINT rc; UINT rc;
TRACE("%s %08x\n", debugstr_a(szProduct), dwReinstallMode); TRACE( "%s, %#lx\n", debugstr_a(szProduct), dwReinstallMode );
wszProduct = strdupAtoW(szProduct); wszProduct = strdupAtoW(szProduct);
rc = MsiReinstallProductW(wszProduct, dwReinstallMode); rc = MsiReinstallProductW(wszProduct, dwReinstallMode);
msi_free(wszProduct); msi_free(wszProduct);
return rc; 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); return MsiReinstallFeatureW(szProduct, L"ALL", dwReinstallMode);
} }
@ -531,14 +527,14 @@ static MSIPATCHSEQUENCEINFOW *patchinfoAtoW( DWORD count, const MSIPATCHSEQUENCE
return ret; return ret;
} }
UINT WINAPI MsiDetermineApplicablePatchesA(LPCSTR szProductPackagePath, UINT WINAPI MsiDetermineApplicablePatchesA( const char *szProductPackagePath, DWORD cPatchInfo,
DWORD cPatchInfo, PMSIPATCHSEQUENCEINFOA pPatchInfo) MSIPATCHSEQUENCEINFOA *pPatchInfo )
{ {
UINT i, r; UINT i, r;
WCHAR *package_path = NULL; WCHAR *package_path = NULL;
MSIPATCHSEQUENCEINFOW *psi; 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 ))) if (szProductPackagePath && !(package_path = strdupAtoW( szProductPackagePath )))
return ERROR_OUTOFMEMORY; return ERROR_OUTOFMEMORY;
@ -673,7 +669,7 @@ static UINT determine_patch_sequence( MSIPACKAGE *package, DWORD count, MSIPATCH
&IID_IXMLDOMDocument, (void**)&desc ); &IID_IXMLDOMDocument, (void**)&desc );
if (hr != S_OK) 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; 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("szPatchData: %s\n", debugstr_w(info[i].szPatchData));
TRACE("ePatchDataType: %u\n", info[i].ePatchDataType); 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); TRACE("uStatus: %u\n", info[i].uStatus);
} }
@ -729,13 +725,13 @@ static UINT determine_patch_sequence( MSIPACKAGE *package, DWORD count, MSIPATCH
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
UINT WINAPI MsiDetermineApplicablePatchesW(LPCWSTR szProductPackagePath, UINT WINAPI MsiDetermineApplicablePatchesW( const WCHAR *szProductPackagePath, DWORD cPatchInfo,
DWORD cPatchInfo, PMSIPATCHSEQUENCEINFOW pPatchInfo) MSIPATCHSEQUENCEINFOW *pPatchInfo )
{ {
UINT r; UINT r;
MSIPACKAGE *package; 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 ); r = MSI_OpenPackageW( szProductPackagePath, 0, &package );
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
@ -748,15 +744,14 @@ UINT WINAPI MsiDetermineApplicablePatchesW(LPCWSTR szProductPackagePath,
return r; return r;
} }
UINT WINAPI MsiDeterminePatchSequenceA( LPCSTR product, LPCSTR usersid, UINT WINAPI MsiDeterminePatchSequenceA( const char *product, const char *usersid, MSIINSTALLCONTEXT context,
MSIINSTALLCONTEXT context, DWORD count, PMSIPATCHSEQUENCEINFOA patchinfo ) DWORD count, MSIPATCHSEQUENCEINFOA *patchinfo )
{ {
UINT i, r; UINT i, r;
WCHAR *productW, *usersidW = NULL; WCHAR *productW, *usersidW = NULL;
MSIPATCHSEQUENCEINFOW *patchinfoW; MSIPATCHSEQUENCEINFOW *patchinfoW;
TRACE("%s, %s, %d, %d, %p\n", debugstr_a(product), debugstr_a(usersid), TRACE( "%s, %s, %d, %lu, %p\n", debugstr_a(product), debugstr_a(usersid), context, count, patchinfo );
context, count, patchinfo);
if (!product) return ERROR_INVALID_PARAMETER; if (!product) return ERROR_INVALID_PARAMETER;
if (!(productW = strdupAtoW( product ))) return ERROR_OUTOFMEMORY; 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 ); return MSI_OpenPackageW( sourcepath, 0, package );
} }
UINT WINAPI MsiDeterminePatchSequenceW( LPCWSTR product, LPCWSTR usersid, UINT WINAPI MsiDeterminePatchSequenceW( const WCHAR *product, const WCHAR *usersid, MSIINSTALLCONTEXT context,
MSIINSTALLCONTEXT context, DWORD count, PMSIPATCHSEQUENCEINFOW patchinfo ) DWORD count, MSIPATCHSEQUENCEINFOW *patchinfo )
{ {
UINT r; UINT r;
MSIPACKAGE *package; MSIPACKAGE *package;
TRACE("%s, %s, %d, %d, %p\n", debugstr_w(product), debugstr_w(usersid), TRACE( "%s, %s, %d, %lu, %p\n", debugstr_w(product), debugstr_w(usersid), context, count, patchinfo );
context, count, patchinfo);
if (!product) return ERROR_INVALID_PARAMETER; if (!product) return ERROR_INVALID_PARAMETER;
r = open_package( product, usersid, context, &package ); 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 ); return strdupW( temp );
} }
ERR( "unhandled value type %u\n", *type ); ERR( "unhandled value type %lu\n", *type );
return NULL; return NULL;
} }
@ -1887,12 +1881,12 @@ UINT WINAPI MsiGetPatchInfoW( LPCWSTR patch, LPCWSTR attr, LPWSTR buffer, LPDWOR
return ERROR_UNKNOWN_PRODUCT; 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; LPWSTR szwLogFile = NULL;
UINT r; UINT r;
TRACE("%08x %s %08x\n", dwLogMode, debugstr_a(szLogFile), attributes); TRACE( "%#lx, %s, %#lx\n", dwLogMode, debugstr_a(szLogFile), attributes );
if( szLogFile ) if( szLogFile )
{ {
@ -1905,9 +1899,9 @@ UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes)
return r; 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); msi_free(gszLogFile);
gszLogFile = NULL; gszLogFile = NULL;
@ -1924,23 +1918,21 @@ UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes)
gszLogFile = strdupW(szLogFile); gszLogFile = strdupW(szLogFile);
CloseHandle(file); CloseHandle(file);
} }
else else ERR( "unable to enable log %s (%lu)\n", debugstr_w(szLogFile), GetLastError() );
ERR("Unable to enable log %s (%u)\n", debugstr_w(szLogFile), GetLastError());
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
UINT WINAPI MsiEnumComponentCostsA( MSIHANDLE handle, LPCSTR component, DWORD index, UINT WINAPI MsiEnumComponentCostsA( MSIHANDLE handle, const char *component, DWORD index, INSTALLSTATE state,
INSTALLSTATE state, LPSTR drive, DWORD *buflen, char *drive, DWORD *buflen, int *cost, int *temp )
int *cost, int *temp )
{ {
UINT r; UINT r;
DWORD len; DWORD len;
WCHAR *driveW, *componentW = NULL; WCHAR *driveW, *componentW = NULL;
TRACE("%d, %s, %u, %d, %p, %p, %p %p\n", handle, debugstr_a(component), index, TRACE( "%lu, %s, %lu, %d, %p, %p, %p, %p\n", handle, debugstr_a(component), index, state, drive, buflen, cost,
state, drive, buflen, cost, temp); temp );
if (!drive || !buflen) return ERROR_INVALID_PARAMETER; if (!drive || !buflen) return ERROR_INVALID_PARAMETER;
if (component && !(componentW = strdupAtoW( component ))) return ERROR_OUTOFMEMORY; if (component && !(componentW = strdupAtoW( component ))) return ERROR_OUTOFMEMORY;
@ -1969,9 +1961,8 @@ static UINT set_drive( WCHAR *buffer, WCHAR letter )
return 2; return 2;
} }
UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD index, UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, const WCHAR *component, DWORD index, INSTALLSTATE state,
INSTALLSTATE state, LPWSTR drive, DWORD *buflen, WCHAR *drive, DWORD *buflen, int *cost, int *temp )
int *cost, int *temp )
{ {
UINT r = ERROR_NO_MORE_ITEMS; UINT r = ERROR_NO_MORE_ITEMS;
MSICOMPONENT *comp = NULL; MSICOMPONENT *comp = NULL;
@ -1980,8 +1971,8 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i
STATSTG stat = {0}; STATSTG stat = {0};
WCHAR path[MAX_PATH]; WCHAR path[MAX_PATH];
TRACE("%d, %s, %u, %d, %p, %p, %p %p\n", handle, debugstr_w(component), index, TRACE( "%lu, %s, %lu, %d, %p, %p, %p, %p\n", handle, debugstr_w(component), index, state, drive, buflen, cost,
state, drive, buflen, cost, temp); temp );
if (!drive || !buflen || !cost || !temp) return ERROR_INVALID_PARAMETER; if (!drive || !buflen || !cost || !temp) return ERROR_INVALID_PARAMETER;
if (!(package = msihandle2msiinfo( handle, MSIHANDLETYPE_PACKAGE ))) if (!(package = msihandle2msiinfo( handle, MSIHANDLETYPE_PACKAGE )))
@ -2315,12 +2306,11 @@ INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd)
return old; return old;
} }
INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler, INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA( INSTALLUI_HANDLERA puiHandler, DWORD dwMessageFilter, void *pvContext )
DWORD dwMessageFilter, LPVOID pvContext)
{ {
INSTALLUI_HANDLERA prev = gUIHandlerA; INSTALLUI_HANDLERA prev = gUIHandlerA;
TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext); TRACE( "%p, %#lx, %p\n", puiHandler, dwMessageFilter, pvContext );
gUIHandlerA = puiHandler; gUIHandlerA = puiHandler;
gUIHandlerW = NULL; gUIHandlerW = NULL;
@ -2330,12 +2320,11 @@ INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
return prev; return prev;
} }
INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler, INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW( INSTALLUI_HANDLERW puiHandler, DWORD dwMessageFilter, void *pvContext )
DWORD dwMessageFilter, LPVOID pvContext)
{ {
INSTALLUI_HANDLERW prev = gUIHandlerW; INSTALLUI_HANDLERW prev = gUIHandlerW;
TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext); TRACE( "%p, %#lx, %p\n", puiHandler, dwMessageFilter, pvContext );
gUIHandlerA = NULL; gUIHandlerA = NULL;
gUIHandlerW = puiHandler; 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 * 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. * handle. Maybe strings can be stored in an MSI database somehow.
*/ */
LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, LPWSTR lpBuffer, LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, WCHAR *lpBuffer, int nBufferMax, LANGID lang )
int nBufferMax, LANGID lang )
{ {
HRSRC hres; HRSRC hres;
HGLOBAL hResData; HGLOBAL hResData;
LPWSTR p; LPWSTR p;
DWORD i, len; 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 ) 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 ) if( !lang )
lang = GetUserDefaultLangID(); lang = GetUserDefaultLangID();
hres = FindResourceExW( msi_hInstance, (LPCWSTR) RT_STRING, hres = FindResourceExW( msi_hInstance, (const WCHAR *)RT_STRING, (WCHAR *)1, lang );
(LPWSTR)1, lang );
if( !hres ) if( !hres )
return 0; return 0;
hResData = LoadResource( msi_hInstance, hres ); hResData = LoadResource( msi_hInstance, hres );
@ -2464,55 +2451,49 @@ INSTALLSTATE WINAPI MsiLocateComponentW(LPCWSTR szComponent, LPWSTR lpPathBuf,
return MsiGetComponentPathW( szProduct, szComponent, lpPathBuf, pcchBuf ); return MsiGetComponentPathW( szProduct, szComponent, lpPathBuf, pcchBuf );
} }
UINT WINAPI MsiMessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, UINT WINAPI MsiMessageBoxA( HWND hWnd, const char *lpText, const char *lpCaption, UINT uType, WORD wLanguageId,
WORD wLanguageId, DWORD f) DWORD f )
{ {
FIXME("%p %s %s %u %08x %08x\n", hWnd, debugstr_a(lpText), debugstr_a(lpCaption), FIXME( "%p, %s, %s, %u, %#x, %#lx\n", hWnd, debugstr_a(lpText), debugstr_a(lpCaption), uType, wLanguageId, f );
uType, wLanguageId, f); return MessageBoxExA( hWnd, lpText, lpCaption, uType, wLanguageId );
return MessageBoxExA(hWnd,lpText,lpCaption,uType,wLanguageId);
} }
UINT WINAPI MsiMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType, UINT WINAPI MsiMessageBoxW( HWND hWnd, const WCHAR *lpText, const WCHAR *lpCaption, UINT uType, WORD wLanguageId,
WORD wLanguageId, DWORD f) DWORD f )
{ {
FIXME("%p %s %s %u %08x %08x\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption), FIXME( "%p, %s, %s, %u, %#x %#lx\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption), uType, wLanguageId, f );
uType, wLanguageId, f); return MessageBoxExW( hWnd, lpText, lpCaption, uType, wLanguageId );
return MessageBoxExW(hWnd,lpText,lpCaption,uType,wLanguageId);
} }
UINT WINAPI MsiMessageBoxExA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, UINT WINAPI MsiMessageBoxExA( HWND hWnd, const char *lpText, const char *lpCaption, UINT uType, DWORD unknown,
DWORD unknown, WORD wLanguageId, DWORD f) WORD wLanguageId, DWORD f )
{ {
FIXME("(%p, %s, %s, %u, 0x%08x, 0x%08x, 0x%08x): semi-stub\n", hWnd, debugstr_a(lpText), FIXME( "%p, %s, %s, %u, %#lx, %#x, %#lx): semi-stub\n", hWnd, debugstr_a(lpText), debugstr_a(lpCaption), uType,
debugstr_a(lpCaption), uType, unknown, wLanguageId, f); unknown, wLanguageId, f );
return MessageBoxExA(hWnd, lpText, lpCaption, uType, wLanguageId); return MessageBoxExA( hWnd, lpText, lpCaption, uType, wLanguageId );
} }
UINT WINAPI MsiMessageBoxExW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType, UINT WINAPI MsiMessageBoxExW( HWND hWnd, const WCHAR *lpText, const WCHAR *lpCaption, UINT uType, DWORD unknown,
DWORD unknown, WORD wLanguageId, DWORD f) WORD wLanguageId, DWORD f )
{ {
FIXME("(%p, %s, %s, %u, 0x%08x, 0x%08x, 0x%08x): semi-stub\n", hWnd, debugstr_w(lpText), FIXME( "%p, %s, %s, %u, %#lx, %#x, %#lx): semi-stub\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption), uType,
debugstr_w(lpCaption), uType, unknown, wLanguageId, f); unknown, wLanguageId, f );
return MessageBoxExW(hWnd, lpText, lpCaption, uType, wLanguageId); return MessageBoxExW( hWnd, lpText, lpCaption, uType, wLanguageId );
} }
UINT WINAPI MsiProvideAssemblyA( LPCSTR szAssemblyName, LPCSTR szAppContext, UINT WINAPI MsiProvideAssemblyA( const char *szAssemblyName, const char *szAppContext, DWORD dwInstallMode,
DWORD dwInstallMode, DWORD dwAssemblyInfo, LPSTR lpPathBuf, DWORD dwAssemblyInfo, char *lpPathBuf, DWORD *pcchPathBuf )
LPDWORD pcchPathBuf )
{ {
FIXME("%s %s %08x %08x %p %p\n", debugstr_a(szAssemblyName), FIXME( "%s, %s, %#lx, %#lx, %p, %p\n", debugstr_a(szAssemblyName), debugstr_a(szAppContext), dwInstallMode,
debugstr_a(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf, dwAssemblyInfo, lpPathBuf, pcchPathBuf );
pcchPathBuf);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
UINT WINAPI MsiProvideAssemblyW( LPCWSTR szAssemblyName, LPCWSTR szAppContext, UINT WINAPI MsiProvideAssemblyW( const WCHAR *szAssemblyName, const WCHAR *szAppContext, DWORD dwInstallMode,
DWORD dwInstallMode, DWORD dwAssemblyInfo, LPWSTR lpPathBuf, DWORD dwAssemblyInfo, WCHAR *lpPathBuf, DWORD *pcchPathBuf )
LPDWORD pcchPathBuf )
{ {
FIXME("%s %s %08x %08x %p %p\n", debugstr_w(szAssemblyName), FIXME( "%s, %s, %#lx, %#lx, %p, %p\n", debugstr_w(szAssemblyName), debugstr_w(szAppContext), dwInstallMode,
debugstr_w(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf, dwAssemblyInfo, lpPathBuf, pcchPathBuf );
pcchPathBuf);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
@ -2530,13 +2511,13 @@ UINT WINAPI MsiProvideComponentFromDescriptorW( LPCWSTR szDescriptor,
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT_CONTEXT *cert, HRESULT WINAPI MsiGetFileSignatureInformationA( const char *path, DWORD flags, PCCERT_CONTEXT *cert, BYTE *hash,
LPBYTE hash, LPDWORD hashlen ) DWORD *hashlen )
{ {
UINT r; UINT r;
WCHAR *pathW = NULL; 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; if (path && !(pathW = strdupAtoW( path ))) return E_OUTOFMEMORY;
r = MsiGetFileSignatureInformationW( pathW, flags, cert, hash, hashlen ); r = MsiGetFileSignatureInformationW( pathW, flags, cert, hash, hashlen );
@ -2544,8 +2525,8 @@ HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT
return r; return r;
} }
HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCERT_CONTEXT *cert, HRESULT WINAPI MsiGetFileSignatureInformationW( const WCHAR *path, DWORD flags, PCCERT_CONTEXT *cert, BYTE *hash,
LPBYTE hash, LPDWORD hashlen ) DWORD *hashlen )
{ {
static GUID generic_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2; static GUID generic_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2;
HRESULT hr; HRESULT hr;
@ -2554,7 +2535,7 @@ HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCER
CRYPT_PROVIDER_SGNR *signer; CRYPT_PROVIDER_SGNR *signer;
CRYPT_PROVIDER_CERT *provider; 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; if (!path || !cert) return E_INVALIDARG;
@ -2612,15 +2593,13 @@ done:
/****************************************************************** /******************************************************************
* MsiGetProductPropertyA [MSI.@] * MsiGetProductPropertyA [MSI.@]
*/ */
UINT WINAPI MsiGetProductPropertyA(MSIHANDLE hProduct, LPCSTR szProperty, UINT WINAPI MsiGetProductPropertyA( MSIHANDLE hProduct, const char *szProperty, char *szValue, DWORD *pccbValue )
LPSTR szValue, LPDWORD pccbValue)
{ {
LPWSTR prop = NULL, val = NULL; LPWSTR prop = NULL, val = NULL;
DWORD len; DWORD len;
UINT r; UINT r;
TRACE("(%d, %s, %p, %p)\n", hProduct, debugstr_a(szProperty), TRACE( "%lu, %s, %p, %p\n", hProduct, debugstr_a(szProperty), szValue, pccbValue );
szValue, pccbValue);
if (szValue && !pccbValue) if (szValue && !pccbValue)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -2674,8 +2653,7 @@ done:
/****************************************************************** /******************************************************************
* MsiGetProductPropertyW [MSI.@] * MsiGetProductPropertyW [MSI.@]
*/ */
UINT WINAPI MsiGetProductPropertyW(MSIHANDLE hProduct, LPCWSTR szProperty, UINT WINAPI MsiGetProductPropertyW( MSIHANDLE hProduct, const WCHAR *szProperty, WCHAR *szValue, DWORD *pccbValue )
LPWSTR szValue, LPDWORD pccbValue)
{ {
MSIPACKAGE *package; MSIPACKAGE *package;
MSIQUERY *view = NULL; MSIQUERY *view = NULL;
@ -2683,8 +2661,7 @@ UINT WINAPI MsiGetProductPropertyW(MSIHANDLE hProduct, LPCWSTR szProperty,
LPCWSTR val; LPCWSTR val;
UINT r; UINT r;
TRACE("(%d, %s, %p, %p)\n", hProduct, debugstr_w(szProperty), TRACE( "%lu, %s, %p, %p)\n", hProduct, debugstr_w(szProperty), szValue, pccbValue );
szValue, pccbValue);
if (!szProperty) if (!szProperty)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -3234,13 +3211,11 @@ static UINT get_file_version( const WCHAR *path, WCHAR *verbuf, DWORD *verlen,
/****************************************************************** /******************************************************************
* MsiGetFileVersionW [MSI.@] * MsiGetFileVersionW [MSI.@]
*/ */
UINT WINAPI MsiGetFileVersionW( LPCWSTR path, LPWSTR verbuf, LPDWORD verlen, UINT WINAPI MsiGetFileVersionW( const WCHAR *path, WCHAR *verbuf, DWORD *verlen, WCHAR *langbuf, DWORD *langlen )
LPWSTR langbuf, LPDWORD langlen )
{ {
UINT ret; UINT ret;
TRACE("%s %p %u %p %u\n", debugstr_w(path), verbuf, verlen ? *verlen : 0, TRACE( "%s, %p(%lu), %p(%lu)\n", debugstr_w(path), verbuf, verlen ? *verlen : 0, langbuf, langlen ? *langlen : 0 );
langbuf, langlen ? *langlen : 0);
if ((verbuf && !verlen) || (langbuf && !langlen)) if ((verbuf && !verlen) || (langbuf && !langlen))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -3307,13 +3282,12 @@ end:
/*********************************************************************** /***********************************************************************
* MsiUseFeatureExW [MSI.@] * MsiUseFeatureExW [MSI.@]
*/ */
INSTALLSTATE WINAPI MsiUseFeatureExW( LPCWSTR szProduct, LPCWSTR szFeature, INSTALLSTATE WINAPI MsiUseFeatureExW( const WCHAR *szProduct, const WCHAR *szFeature, DWORD dwInstallMode,
DWORD dwInstallMode, DWORD dwReserved ) DWORD dwReserved )
{ {
INSTALLSTATE state; INSTALLSTATE state;
TRACE("%s %s %i %i\n", debugstr_w(szProduct), debugstr_w(szFeature), TRACE( "%s, %s, %lu %#lx\n", debugstr_w(szProduct), debugstr_w(szFeature), dwInstallMode, dwReserved );
dwInstallMode, dwReserved);
state = MsiQueryFeatureStateW( szProduct, szFeature ); state = MsiQueryFeatureStateW( szProduct, szFeature );
@ -3332,14 +3306,13 @@ INSTALLSTATE WINAPI MsiUseFeatureExW( LPCWSTR szProduct, LPCWSTR szFeature,
/*********************************************************************** /***********************************************************************
* MsiUseFeatureExA [MSI.@] * MsiUseFeatureExA [MSI.@]
*/ */
INSTALLSTATE WINAPI MsiUseFeatureExA( LPCSTR szProduct, LPCSTR szFeature, INSTALLSTATE WINAPI MsiUseFeatureExA( const char *szProduct, const char *szFeature, DWORD dwInstallMode,
DWORD dwInstallMode, DWORD dwReserved ) DWORD dwReserved )
{ {
INSTALLSTATE ret = INSTALLSTATE_UNKNOWN; 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), TRACE( "%s, %s, %lu, %#lx\n", debugstr_a(szProduct), debugstr_a(szFeature), dwInstallMode, dwReserved );
dwInstallMode, dwReserved);
prod = strdupAtoW( szProduct ); prod = strdupAtoW( szProduct );
if (szProduct && !prod) if (szProduct && !prod)
@ -3456,39 +3429,35 @@ static UINT MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent,
/*********************************************************************** /***********************************************************************
* MsiProvideQualifiedComponentExW [MSI.@] * MsiProvideQualifiedComponentExW [MSI.@]
*/ */
UINT WINAPI MsiProvideQualifiedComponentExW(LPCWSTR szComponent, UINT WINAPI MsiProvideQualifiedComponentExW( const WCHAR *szComponent, const WCHAR *szQualifier, DWORD dwInstallMode,
LPCWSTR szQualifier, DWORD dwInstallMode, LPCWSTR szProduct, const WCHAR *szProduct, DWORD Unused1, DWORD Unused2, WCHAR *lpPathBuf,
DWORD Unused1, DWORD Unused2, LPWSTR lpPathBuf, DWORD *pcchPathBuf )
LPDWORD pcchPathBuf)
{ {
awstring path; awstring path;
TRACE("%s %s %u %s %u %u %p %p\n", debugstr_w(szComponent), TRACE( "%s, %s, %lu, %s, %#lx, %#lx, %p, %p\n", debugstr_w(szComponent), debugstr_w(szQualifier), dwInstallMode,
debugstr_w(szQualifier), dwInstallMode, debugstr_w(szProduct), debugstr_w(szProduct), Unused1, Unused2, lpPathBuf, pcchPathBuf );
Unused1, Unused2, lpPathBuf, pcchPathBuf);
path.unicode = TRUE; path.unicode = TRUE;
path.str.w = lpPathBuf; path.str.w = lpPathBuf;
return MSI_ProvideQualifiedComponentEx(szComponent, szQualifier, return MSI_ProvideQualifiedComponentEx( szComponent, szQualifier, dwInstallMode, szProduct, Unused1, Unused2,
dwInstallMode, szProduct, Unused1, Unused2, &path, pcchPathBuf); &path, pcchPathBuf );
} }
/*********************************************************************** /***********************************************************************
* MsiProvideQualifiedComponentExA [MSI.@] * MsiProvideQualifiedComponentExA [MSI.@]
*/ */
UINT WINAPI MsiProvideQualifiedComponentExA(LPCSTR szComponent, UINT WINAPI MsiProvideQualifiedComponentExA( const char *szComponent, const char *szQualifier, DWORD dwInstallMode,
LPCSTR szQualifier, DWORD dwInstallMode, LPCSTR szProduct, const char *szProduct, DWORD Unused1, DWORD Unused2, char *lpPathBuf,
DWORD Unused1, DWORD Unused2, LPSTR lpPathBuf, DWORD *pcchPathBuf )
LPDWORD pcchPathBuf)
{ {
LPWSTR szwComponent, szwQualifier = NULL, szwProduct = NULL; WCHAR *szwComponent, *szwQualifier = NULL, *szwProduct = NULL;
UINT r = ERROR_OUTOFMEMORY; UINT r = ERROR_OUTOFMEMORY;
awstring path; awstring path;
TRACE("%s %s %u %s %u %u %p %p\n", debugstr_a(szComponent), TRACE( "%s, %s, %lu, %s, %#lx, %#lx, %p, %p\n", debugstr_a(szComponent), debugstr_a(szQualifier), dwInstallMode,
debugstr_a(szQualifier), dwInstallMode, debugstr_a(szProduct), debugstr_a(szProduct), Unused1, Unused2, lpPathBuf, pcchPathBuf );
Unused1, Unused2, lpPathBuf, pcchPathBuf);
szwComponent = strdupAtoW( szComponent ); szwComponent = strdupAtoW( szComponent );
if (szComponent && !szwComponent) if (szComponent && !szwComponent)
@ -3848,11 +3817,11 @@ UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved)
{ {
WCHAR path[MAX_PATH]; WCHAR path[MAX_PATH];
TRACE("%d\n", dwReserved); TRACE( "%#lx\n", dwReserved );
if (dwReserved) if (dwReserved)
{ {
FIXME("dwReserved=%d\n", dwReserved); FIXME( "dwReserved = %#lx\n", dwReserved );
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
} }
@ -3952,7 +3921,7 @@ UINT WINAPI MsiGetShortcutTargetW( LPCWSTR szShortcutTarget,
return ERROR_FUNCTION_FAILED; 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; MSIPACKAGE *package;
MSIINSTALLCONTEXT context; MSIINSTALLCONTEXT context;
@ -3961,7 +3930,7 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, DWORD dw
WCHAR *ptr, *cmdline; WCHAR *ptr, *cmdline;
DWORD sz; 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 ); r = msi_locate_product( szProduct, &context );
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
@ -4023,15 +3992,12 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, DWORD dw
return r; return r;
} }
UINT WINAPI MsiReinstallFeatureA( LPCSTR szProduct, LPCSTR szFeature, UINT WINAPI MsiReinstallFeatureA( const char *szProduct, const char *szFeature, DWORD dwReinstallMode )
DWORD dwReinstallMode )
{ {
LPWSTR wszProduct; WCHAR *wszProduct, *wszFeature;
LPWSTR wszFeature;
UINT rc; UINT rc;
TRACE("%s %s %i\n", debugstr_a(szProduct), debugstr_a(szFeature), TRACE( "%s, %s, %lu\n", debugstr_a(szProduct), debugstr_a(szFeature), dwReinstallMode );
dwReinstallMode);
wszProduct = strdupAtoW(szProduct); wszProduct = strdupAtoW(szProduct);
wszFeature = strdupAtoW(szFeature); 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 ); handle = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL );
if (handle == INVALID_HANDLE_VALUE) 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; return ERROR_FILE_NOT_FOUND;
} }
if ((length = GetFileSize( handle, NULL ))) if ((length = GetFileSize( handle, NULL )))
@ -4104,10 +4070,9 @@ UINT msi_get_filehash( MSIPACKAGE *package, const WCHAR *path, MSIFILEHASHINFO *
/*********************************************************************** /***********************************************************************
* MsiGetFileHashW [MSI.@] * MsiGetFileHashW [MSI.@]
*/ */
UINT WINAPI MsiGetFileHashW( LPCWSTR szFilePath, DWORD dwOptions, UINT WINAPI MsiGetFileHashW( const WCHAR *szFilePath, DWORD dwOptions, MSIFILEHASHINFO *pHash )
PMSIFILEHASHINFO pHash )
{ {
TRACE("%s %08x %p\n", debugstr_w(szFilePath), dwOptions, pHash ); TRACE( "%s, %#lx, %p\n", debugstr_w(szFilePath), dwOptions, pHash );
if (!szFilePath) if (!szFilePath)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -4128,13 +4093,12 @@ UINT WINAPI MsiGetFileHashW( LPCWSTR szFilePath, DWORD dwOptions,
/*********************************************************************** /***********************************************************************
* MsiGetFileHashA [MSI.@] * MsiGetFileHashA [MSI.@]
*/ */
UINT WINAPI MsiGetFileHashA( LPCSTR szFilePath, DWORD dwOptions, UINT WINAPI MsiGetFileHashA( const char *szFilePath, DWORD dwOptions, MSIFILEHASHINFO *pHash )
PMSIFILEHASHINFO pHash )
{ {
LPWSTR file; LPWSTR file;
UINT r; 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 ); file = strdupAtoW( szFilePath );
if (szFilePath && !file) if (szFilePath && !file)
@ -4148,22 +4112,18 @@ UINT WINAPI MsiGetFileHashA( LPCSTR szFilePath, DWORD dwOptions,
/*********************************************************************** /***********************************************************************
* MsiAdvertiseScriptW [MSI.@] * MsiAdvertiseScriptW [MSI.@]
*/ */
UINT WINAPI MsiAdvertiseScriptW( LPCWSTR szScriptFile, DWORD dwFlags, UINT WINAPI MsiAdvertiseScriptW( const WCHAR *szScriptFile, DWORD dwFlags, HKEY *phRegData, BOOL fRemoveItems )
PHKEY phRegData, BOOL fRemoveItems )
{ {
FIXME("%s %08x %p %d\n", FIXME( "%s, %#lx, %p, %d\n", debugstr_w(szScriptFile), dwFlags, phRegData, fRemoveItems );
debugstr_w( szScriptFile ), dwFlags, phRegData, fRemoveItems );
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
/*********************************************************************** /***********************************************************************
* MsiAdvertiseScriptA [MSI.@] * MsiAdvertiseScriptA [MSI.@]
*/ */
UINT WINAPI MsiAdvertiseScriptA( LPCSTR szScriptFile, DWORD dwFlags, UINT WINAPI MsiAdvertiseScriptA( const char *szScriptFile, DWORD dwFlags, HKEY *phRegData, BOOL fRemoveItems )
PHKEY phRegData, BOOL fRemoveItems )
{ {
FIXME("%s %08x %p %d\n", FIXME( "%s, %#lx, %p, %d\n", debugstr_a(szScriptFile), dwFlags, phRegData, fRemoveItems );
debugstr_a( szScriptFile ), dwFlags, phRegData, fRemoveItems );
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
@ -4192,11 +4152,10 @@ UINT WINAPI MsiIsProductElevatedA( LPCSTR szProduct, BOOL *pfElevated )
/*********************************************************************** /***********************************************************************
* MsiSetExternalUIRecord [MSI.@] * MsiSetExternalUIRecord [MSI.@]
*/ */
UINT WINAPI MsiSetExternalUIRecord( INSTALLUI_HANDLER_RECORD handler, UINT WINAPI MsiSetExternalUIRecord( INSTALLUI_HANDLER_RECORD handler, DWORD filter, void *context,
DWORD filter, LPVOID context, INSTALLUI_HANDLER_RECORD *prev )
PINSTALLUI_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) if (prev)
*prev = gUIHandlerRecord; *prev = gUIHandlerRecord;
@ -4242,14 +4201,16 @@ UINT WINAPI MsiInstallMissingComponentW(LPCWSTR szProduct, LPCWSTR szComponent,
return ERROR_SUCCESS; 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; WCHAR *productW = NULL, *componentW = NULL, *featureW = NULL, *bufW = NULL;
UINT r = ERROR_OUTOFMEMORY; UINT r = ERROR_OUTOFMEMORY;
DWORD lenW = 0; DWORD lenW = 0;
int len; 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 (product && !(productW = strdupAtoW( product ))) goto done;
if (feature && !(featureW = strdupAtoW( feature ))) goto done; if (feature && !(featureW = strdupAtoW( feature ))) goto done;
@ -4288,11 +4249,13 @@ done:
return r; 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; 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 ); state = MsiQueryFeatureStateW( product, feature );
TRACE("feature state: %d\n", state); TRACE("feature state: %d\n", state);
@ -4302,7 +4265,7 @@ UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR comp
break; break;
default: default:
FIXME("mode %x not implemented\n", mode); FIXME( "mode %#lx not implemented\n", mode );
return ERROR_INSTALL_FAILURE; return ERROR_INSTALL_FAILURE;
} }
@ -4331,12 +4294,12 @@ UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR comp
/*********************************************************************** /***********************************************************************
* MsiBeginTransactionA [MSI.@] * 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; WCHAR *nameW;
UINT r; 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 ); nameW = strdupAtoW( name );
if (name && !nameW) if (name && !nameW)
@ -4350,9 +4313,9 @@ UINT WINAPI MsiBeginTransactionA( LPCSTR name, DWORD attrs, MSIHANDLE *id, HANDL
/*********************************************************************** /***********************************************************************
* MsiBeginTransactionW [MSI.@] * 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; *id = (MSIHANDLE)0xdeadbeef;
*event = (HANDLE)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 ) 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; *event = (HANDLE)0xdeadbeef;
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -4376,13 +4339,13 @@ UINT WINAPI MsiJoinTransaction( MSIHANDLE handle, DWORD attrs, HANDLE *event )
*/ */
UINT WINAPI MsiEndTransaction( DWORD state ) UINT WINAPI MsiEndTransaction( DWORD state )
{ {
FIXME("%u\n", state); FIXME( "%#lx\n", state );
return ERROR_SUCCESS; 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; return ERROR_SUCCESS;
} }

View file

@ -85,13 +85,12 @@ UINT VIEW_find_column( MSIVIEW *table, LPCWSTR name, LPCWSTR table_name, UINT *n
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
} }
UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb, UINT WINAPI MsiDatabaseOpenViewA( MSIHANDLE hdb, const char *szQuery, MSIHANDLE *phView )
LPCSTR szQuery, MSIHANDLE *phView)
{ {
UINT r; 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 ) if( szQuery )
{ {
@ -108,13 +107,12 @@ UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb,
return r; return r;
} }
UINT MSI_DatabaseOpenViewW(MSIDATABASE *db, UINT MSI_DatabaseOpenViewW( MSIDATABASE *db, const WCHAR *szQuery, MSIQUERY **pView )
LPCWSTR szQuery, MSIQUERY **pView)
{ {
MSIQUERY *query; MSIQUERY *query;
UINT r; 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 */ /* pre allocate a handle to hold a pointer to the view */
query = alloc_msiobject( MSIHANDLETYPE_VIEW, sizeof (MSIQUERY), query = alloc_msiobject( MSIHANDLETYPE_VIEW, sizeof (MSIQUERY),
@ -403,13 +401,13 @@ UINT MSI_ViewFetch(MSIQUERY *query, MSIRECORD **prec)
return r; return r;
} }
UINT WINAPI MsiViewFetch(MSIHANDLE hView, MSIHANDLE *record) UINT WINAPI MsiViewFetch( MSIHANDLE hView, MSIHANDLE *record )
{ {
MSIQUERY *query; MSIQUERY *query;
MSIRECORD *rec = NULL; MSIRECORD *rec = NULL;
UINT ret; UINT ret;
TRACE("%d %p\n", hView, record); TRACE( "%lu, %p\n", hView, record );
if( !record ) if( !record )
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -468,12 +466,12 @@ UINT MSI_ViewClose(MSIQUERY *query)
return view->ops->close( view ); return view->ops->close( view );
} }
UINT WINAPI MsiViewClose(MSIHANDLE hView) UINT WINAPI MsiViewClose( MSIHANDLE hView )
{ {
MSIQUERY *query; MSIQUERY *query;
UINT ret; UINT ret;
TRACE("%d\n", hView ); TRACE( "%lu\n", hView );
query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW ); query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW );
if (!query) if (!query)
@ -517,13 +515,13 @@ UINT MSI_ViewExecute(MSIQUERY *query, MSIRECORD *rec )
return view->ops->execute( view, rec ); return view->ops->execute( view, rec );
} }
UINT WINAPI MsiViewExecute(MSIHANDLE hView, MSIHANDLE hRec) UINT WINAPI MsiViewExecute( MSIHANDLE hView, MSIHANDLE hRec )
{ {
MSIQUERY *query; MSIQUERY *query;
MSIRECORD *rec = NULL; MSIRECORD *rec = NULL;
UINT ret; UINT ret;
TRACE("%d %d\n", hView, hRec); TRACE( "%lu, %lu\n", hView, hRec );
if( hRec ) if( hRec )
{ {
@ -641,13 +639,13 @@ UINT MSI_ViewGetColumnInfo( MSIQUERY *query, MSICOLINFO info, MSIRECORD **prec )
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hRec) UINT WINAPI MsiViewGetColumnInfo( MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hRec )
{ {
MSIQUERY *query = NULL; MSIQUERY *query = NULL;
MSIRECORD *rec = NULL; MSIRECORD *rec = NULL;
UINT r; UINT r;
TRACE("%d %d %p\n", hView, info, hRec); TRACE( "%lu, %d, %p\n", hView, info, hRec );
if( !hRec ) if( !hRec )
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -719,14 +717,13 @@ UINT MSI_ViewModify( MSIQUERY *query, MSIMODIFY mode, MSIRECORD *rec )
return r; return r;
} }
UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode, UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode, MSIHANDLE hRecord )
MSIHANDLE hRecord)
{ {
MSIQUERY *query = NULL; MSIQUERY *query = NULL;
MSIRECORD *rec = NULL; MSIRECORD *rec = NULL;
UINT r = ERROR_FUNCTION_FAILED; 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 ); rec = msihandle2msiinfo( hRecord, MSIHANDLETYPE_RECORD );
@ -770,13 +767,13 @@ UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode,
return r; return r;
} }
MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR buffer, LPDWORD buflen ) MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, WCHAR *buffer, DWORD *buflen )
{ {
MSIQUERY *query; MSIQUERY *query;
const WCHAR *column; const WCHAR *column;
MSIDBERROR r; MSIDBERROR r;
TRACE("%u %p %p\n", handle, buffer, buflen); TRACE( "%lu, %p, %p\n", handle, buffer, buflen );
if (!buflen) if (!buflen)
return MSIDBERROR_INVALIDARG; return MSIDBERROR_INVALIDARG;
@ -821,13 +818,13 @@ MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR buffer, LPDWORD buf
return r; return r;
} }
MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR buffer, LPDWORD buflen ) MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, char *buffer, DWORD *buflen )
{ {
MSIQUERY *query; MSIQUERY *query;
const WCHAR *column; const WCHAR *column;
MSIDBERROR r; MSIDBERROR r;
TRACE("%u %p %p\n", handle, buffer, buflen); TRACE( "%lu, %p, %p\n", handle, buffer, buflen );
if (!buflen) if (!buflen)
return MSIDBERROR_INVALIDARG; 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 ); hr = IStorage_OpenStorage( db->storage, transform + 1, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &stg );
if (FAILED( hr )) 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; 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 ); hr = StgOpenStorage( transform, NULL, STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg );
if (FAILED( hr )) 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; return ERROR_FUNCTION_FAILED;
} }
} }
@ -938,7 +935,7 @@ UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb, const char *transform, in
WCHAR *wstr; WCHAR *wstr;
UINT ret; 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 ); wstr = strdupAtoW( transform );
if (transform && !wstr) if (transform && !wstr)
@ -949,19 +946,17 @@ UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb, const char *transform, in
return ret; return ret;
} }
UINT WINAPI MsiDatabaseGenerateTransformA( MSIHANDLE hdb, MSIHANDLE hdbref, UINT WINAPI MsiDatabaseGenerateTransformA( MSIHANDLE hdb, MSIHANDLE hdbref, const char *szTransformFile,
LPCSTR szTransformFile, int iReserved1, int iReserved2 ) int iReserved1, int iReserved2 )
{ {
FIXME("%d %d %s %d %d\n", hdb, hdbref, FIXME( "%lu, %lu, %s, %d, %d\n", hdb, hdbref, debugstr_a(szTransformFile), iReserved1, iReserved2 );
debugstr_a(szTransformFile), iReserved1, iReserved2);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
UINT WINAPI MsiDatabaseGenerateTransformW( MSIHANDLE hdb, MSIHANDLE hdbref, UINT WINAPI MsiDatabaseGenerateTransformW( MSIHANDLE hdb, MSIHANDLE hdbref, const WCHAR *szTransformFile,
LPCWSTR szTransformFile, int iReserved1, int iReserved2 ) int iReserved1, int iReserved2 )
{ {
FIXME("%d %d %s %d %d\n", hdb, hdbref, FIXME( "%lu, %lu, %s, %d, %d\n", hdb, hdbref, debugstr_w(szTransformFile), iReserved1, iReserved2 );
debugstr_w(szTransformFile), iReserved1, iReserved2);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
@ -970,7 +965,7 @@ UINT WINAPI MsiDatabaseCommit( MSIHANDLE hdb )
MSIDATABASE *db; MSIDATABASE *db;
UINT r; UINT r;
TRACE("%d\n", hdb); TRACE( "%lu\n", hdb );
db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE );
if( !db ) if( !db )
@ -1066,7 +1061,7 @@ UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *db,
r = MSI_IterateRecords( query, 0, msi_primary_key_iterator, &info ); r = MSI_IterateRecords( query, 0, msi_primary_key_iterator, &info );
if( r == ERROR_SUCCESS ) 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 */ /* allocate a record and fill in the names of the tables */
info.rec = MSI_CreateRecord( info.n ); info.rec = MSI_CreateRecord( info.n );
@ -1082,14 +1077,13 @@ UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *db,
return r; return r;
} }
UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb, UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb, const WCHAR *table, MSIHANDLE *phRec )
LPCWSTR table, MSIHANDLE* phRec )
{ {
MSIRECORD *rec = NULL; MSIRECORD *rec = NULL;
MSIDATABASE *db; MSIDATABASE *db;
UINT r; 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 ); db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE );
if( !db ) if( !db )
@ -1132,13 +1126,12 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb,
return r; return r;
} }
UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE hdb, UINT WINAPI MsiDatabaseGetPrimaryKeysA( MSIHANDLE hdb, const char *table, MSIHANDLE *phRec )
LPCSTR table, MSIHANDLE* phRec)
{ {
LPWSTR szwTable = NULL; WCHAR *szwTable = NULL;
UINT r; UINT r;
TRACE("%d %s %p\n", hdb, debugstr_a(table), phRec); TRACE( "%lu, %s, %p\n", hdb, debugstr_a(table), phRec );
if( table ) if( table )
{ {
@ -1152,13 +1145,12 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE hdb,
return r; return r;
} }
MSICONDITION WINAPI MsiDatabaseIsTablePersistentA( MSICONDITION WINAPI MsiDatabaseIsTablePersistentA( MSIHANDLE hDatabase, const char *szTableName )
MSIHANDLE hDatabase, LPCSTR szTableName)
{ {
LPWSTR szwTableName = NULL; WCHAR *szwTableName = NULL;
MSICONDITION r; MSICONDITION r;
TRACE("%x %s\n", hDatabase, debugstr_a(szTableName)); TRACE( "%lu, %s\n", hDatabase, debugstr_a(szTableName) );
if( szTableName ) if( szTableName )
{ {
@ -1172,13 +1164,12 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentA(
return r; return r;
} }
MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( MSIHANDLE hDatabase, const WCHAR *szTableName )
MSIHANDLE hDatabase, LPCWSTR szTableName)
{ {
MSIDATABASE *db; MSIDATABASE *db;
MSICONDITION r; MSICONDITION r;
TRACE("%x %s\n", hDatabase, debugstr_w(szTableName)); TRACE( "%lu, %s\n", hDatabase, debugstr_w(szTableName) );
db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE ); db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE );
if( !db ) if( !db )

View file

@ -298,7 +298,7 @@ static void free_package_structures( MSIPACKAGE *package )
list_remove( &binary->entry ); list_remove( &binary->entry );
if (!DeleteFileW( binary->tmpfile )) 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->source );
msi_free( binary->tmpfile ); msi_free( binary->tmpfile );
msi_free( binary ); msi_free( binary );
@ -321,7 +321,7 @@ static void free_package_structures( MSIPACKAGE *package )
list_remove( &patch->entry ); list_remove( &patch->entry );
if (patch->delete_on_close && !DeleteFileW( patch->localfile )) 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 ); msi_free_patchinfo( patch );
} }
@ -1553,12 +1553,12 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage)
return ERROR_SUCCESS; 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; MSIPACKAGE *package = NULL;
UINT ret; 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 ) if( !szPackage || !phPackage )
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1570,7 +1570,7 @@ UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phP
} }
if( dwOptions ) if( dwOptions )
FIXME("dwOptions %08x not supported\n", dwOptions); FIXME( "dwOptions %#lx not supported\n", dwOptions );
ret = MSI_OpenPackageW( szPackage, 0, &package ); ret = MSI_OpenPackageW( szPackage, 0, &package );
if( ret == ERROR_SUCCESS ) if( ret == ERROR_SUCCESS )
@ -1615,13 +1615,13 @@ UINT WINAPI MsiOpenPackageA(LPCSTR szPackage, MSIHANDLE *phPackage)
return MsiOpenPackageExA( szPackage, 0, phPackage ); return MsiOpenPackageExA( szPackage, 0, phPackage );
} }
MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall) MSIHANDLE WINAPI MsiGetActiveDatabase( MSIHANDLE hInstall )
{ {
MSIPACKAGE *package; MSIPACKAGE *package;
MSIHANDLE handle = 0; MSIHANDLE handle = 0;
MSIHANDLE remote; MSIHANDLE remote;
TRACE("(%d)\n",hInstall); TRACE( "%lu\n", hInstall );
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE); package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE);
if( package) if( package)
@ -1821,21 +1821,21 @@ INT MSI_ProcessMessageVerbatim(MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
if (gUIHandlerRecord && (gUIFilterRecord & log_type)) if (gUIHandlerRecord && (gUIFilterRecord & log_type))
{ {
MSIHANDLE rec = alloc_msihandle(&record->hdr); MSIHANDLE rec = alloc_msihandle(&record->hdr);
TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, hRecord=%u)\n", TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, hRecord = %lu)\n",
gUIHandlerRecord, gUIContextRecord, eMessageType, rec); gUIHandlerRecord, gUIContextRecord, eMessageType, rec );
rc = gUIHandlerRecord( gUIContextRecord, eMessageType, rec ); rc = gUIHandlerRecord( gUIContextRecord, eMessageType, rec );
MsiCloseHandle( rec ); MsiCloseHandle( rec );
} }
if (!rc && gUIHandlerW && (gUIFilter & log_type)) if (!rc && gUIHandlerW && (gUIFilter & log_type))
{ {
TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, szMessage=%s)\n", TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, szMessage = %s)\n",
gUIHandlerW, gUIContext, eMessageType, debugstr_w(message)); gUIHandlerW, gUIContext, eMessageType, debugstr_w(message) );
rc = gUIHandlerW( gUIContext, eMessageType, message ); rc = gUIHandlerW( gUIContext, eMessageType, message );
} }
else if (!rc && gUIHandlerA && (gUIFilter & log_type)) else if (!rc && gUIHandlerA && (gUIFilter & log_type))
{ {
TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, szMessage=%s)\n", TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, szMessage = %s)\n",
gUIHandlerA, gUIContext, eMessageType, debugstr_a(msg)); gUIHandlerA, gUIContext, eMessageType, debugstr_a(msg) );
rc = gUIHandlerA( gUIContext, eMessageType, 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), TRACE("returning %s for property %s\n", debugstr_wn(szValueBuf, *pchValueBuf),
debugstr_w(szName)); debugstr_w(szName));
else if (rc == ERROR_MORE_DATA) else if (rc == ERROR_MORE_DATA)
TRACE("need %d sized buffer for %s\n", *pchValueBuf, TRACE( "need %lu sized buffer for %s\n", *pchValueBuf, debugstr_w(szName) );
debugstr_w(szName));
else else
{ {
*pchValueBuf = 0; *pchValueBuf = 0;

View file

@ -115,7 +115,7 @@ UINT WINAPI MsiRecordGetFieldCount( MSIHANDLE handle )
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; UINT ret;
TRACE("%d\n", handle ); TRACE( "%lu\n", handle );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -239,7 +239,7 @@ int WINAPI MsiRecordGetInteger( MSIHANDLE handle, UINT iField)
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; UINT ret;
TRACE("%d %d\n", handle, iField ); TRACE( "%lu, %u\n", handle, iField );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -258,7 +258,7 @@ UINT WINAPI MsiRecordClearData( MSIHANDLE handle )
MSIRECORD *rec; MSIRECORD *rec;
UINT i; UINT i;
TRACE("%d\n", handle ); TRACE( "%lu\n", handle );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -305,7 +305,7 @@ UINT WINAPI MsiRecordSetInteger( MSIHANDLE handle, UINT iField, int iVal )
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; UINT ret;
TRACE("%d %u %d\n", handle, iField, iVal); TRACE( "%lu, %u, %d\n", handle, iField, iVal );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -335,7 +335,7 @@ BOOL WINAPI MsiRecordIsNull( MSIHANDLE handle, UINT iField )
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; UINT ret;
TRACE("%d %d\n", handle, iField ); TRACE( "%lu, %u\n", handle, iField );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -400,13 +400,12 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, UINT iField,
return ret; return ret;
} }
UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, UINT iField, UINT WINAPI MsiRecordGetStringA( MSIHANDLE handle, UINT iField, char *szValue, DWORD *pcchValue )
LPSTR szValue, LPDWORD pcchValue)
{ {
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; 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 ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -436,13 +435,12 @@ const WCHAR *MSI_RecordGetString( const MSIRECORD *rec, UINT iField )
return msi_record_get_string( rec, iField, NULL ); return msi_record_get_string( rec, iField, NULL );
} }
UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField, UINT MSI_RecordGetStringW( MSIRECORD *rec, UINT iField, WCHAR *szValue, DWORD *pcchValue )
LPWSTR szValue, LPDWORD pcchValue)
{ {
UINT len = 0, ret = ERROR_SUCCESS; UINT len = 0, ret = ERROR_SUCCESS;
WCHAR buffer[16]; 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 ) if( iField > rec->count )
{ {
@ -481,13 +479,12 @@ UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField,
return ret; return ret;
} }
UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, UINT iField, UINT WINAPI MsiRecordGetStringW( MSIHANDLE handle, UINT iField, WCHAR *szValue, DWORD *pcchValue )
LPWSTR szValue, LPDWORD pcchValue)
{ {
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; 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 ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -532,12 +529,12 @@ static UINT MSI_RecordDataSize(MSIRECORD *rec, UINT iField)
return 0; return 0;
} }
UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField) UINT WINAPI MsiRecordDataSize( MSIHANDLE handle, UINT iField )
{ {
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; UINT ret;
TRACE("%d %d\n", handle, iField); TRACE( "%lu, %u\n", handle, iField );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -549,13 +546,13 @@ UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField)
return ret; return ret;
} }
UINT WINAPI MsiRecordSetStringA( MSIHANDLE handle, UINT iField, LPCSTR szValue ) UINT WINAPI MsiRecordSetStringA( MSIHANDLE handle, UINT iField, const char *szValue )
{ {
WCHAR *valueW = NULL; WCHAR *valueW = NULL;
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; 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; 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 ); 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; MSIRECORD *rec;
UINT ret; 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 ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -667,8 +664,7 @@ static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm)
ulSize.QuadPart = sz; ulSize.QuadPart = sz;
IStream_SetSize(*pstm, ulSize); 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; return ERROR_SUCCESS;
} }
@ -725,12 +721,12 @@ UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilenam
return ERROR_SUCCESS; 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; UINT ret;
TRACE("%d %d %s\n", hRecord, iField, debugstr_a(szFilename)); TRACE( "%lu, %u, %s\n", hRecord, iField, debugstr_a(szFilename) );
if( szFilename ) if( szFilename )
{ {
@ -744,12 +740,12 @@ UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, LPCSTR szFilenam
return ret; return ret;
} }
UINT WINAPI MsiRecordSetStreamW(MSIHANDLE handle, UINT iField, LPCWSTR szFilename) UINT WINAPI MsiRecordSetStreamW( MSIHANDLE handle, UINT iField, const WCHAR *szFilename )
{ {
MSIRECORD *rec; MSIRECORD *rec;
UINT ret; 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 ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )
@ -820,12 +816,12 @@ UINT MSI_RecordReadStream(MSIRECORD *rec, UINT iField, char *buf, LPDWORD sz)
return ERROR_SUCCESS; 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; MSIRECORD *rec;
UINT ret; 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 ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec ) if( !rec )

View file

@ -1021,12 +1021,12 @@ UINT WINAPI MsiDecomposeDescriptorA( LPCSTR szDescriptor, LPSTR szProduct,
return r; return r;
} }
UINT WINAPI MsiEnumProductsA(DWORD index, LPSTR lpguid) UINT WINAPI MsiEnumProductsA( DWORD index, char *lpguid )
{ {
DWORD r; DWORD r;
WCHAR szwGuid[GUID_SIZE]; WCHAR szwGuid[GUID_SIZE];
TRACE("%d %p\n", index, lpguid); TRACE( "%lu, %p\n", index, lpguid );
if (NULL == lpguid) if (NULL == lpguid)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1037,9 +1037,9 @@ UINT WINAPI MsiEnumProductsA(DWORD index, LPSTR lpguid)
return r; 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) if (NULL == lpguid)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1048,13 +1048,13 @@ UINT WINAPI MsiEnumProductsW(DWORD index, LPWSTR lpguid)
NULL, NULL, NULL ); 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; DWORD r;
WCHAR szwFeature[GUID_SIZE], szwParent[GUID_SIZE]; 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 ) if( szProduct )
{ {
@ -1066,10 +1066,8 @@ UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index, LPSTR szFeature, LPS
r = MsiEnumFeaturesW(szwProduct, index, szwFeature, szwParent); r = MsiEnumFeaturesW(szwProduct, index, szwFeature, szwParent);
if( r == ERROR_SUCCESS ) if( r == ERROR_SUCCESS )
{ {
WideCharToMultiByte(CP_ACP, 0, szwFeature, -1, WideCharToMultiByte(CP_ACP, 0, szwFeature, -1, szFeature, GUID_SIZE, NULL, NULL);
szFeature, GUID_SIZE, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, szwParent, -1, szParent, GUID_SIZE, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, szwParent, -1,
szParent, GUID_SIZE, NULL, NULL);
} }
msi_free( szwProduct); msi_free( szwProduct);
@ -1077,12 +1075,12 @@ UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index, LPSTR szFeature, LPS
return r; 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; HKEY hkeyProduct = 0;
DWORD r, sz; 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 ) if( !szProduct )
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1098,12 +1096,12 @@ UINT WINAPI MsiEnumFeaturesW(LPCWSTR szProduct, DWORD index, LPWSTR szFeature, L
return r; return r;
} }
UINT WINAPI MsiEnumComponentsA(DWORD index, LPSTR lpguid) UINT WINAPI MsiEnumComponentsA( DWORD index, char *lpguid )
{ {
DWORD r; DWORD r;
WCHAR szwGuid[GUID_SIZE]; WCHAR szwGuid[GUID_SIZE];
TRACE("%u, %p\n", index, lpguid); TRACE( "%lu, %p\n", index, lpguid );
if (!lpguid) return ERROR_INVALID_PARAMETER; if (!lpguid) return ERROR_INVALID_PARAMETER;
@ -1114,23 +1112,23 @@ UINT WINAPI MsiEnumComponentsA(DWORD index, LPSTR lpguid)
return r; 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; if (!lpguid) return ERROR_INVALID_PARAMETER;
return MsiEnumComponentsExW( L"S-1-1-0", MSIINSTALLCONTEXT_ALL, index, lpguid, NULL, NULL, NULL ); 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], UINT WINAPI MsiEnumComponentsExA( const char *user_sid, DWORD ctx, DWORD index, CHAR guid[39],
MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len ) MSIINSTALLCONTEXT *installed_ctx, char *sid, DWORD *sid_len )
{ {
UINT r; UINT r;
WCHAR *user_sidW = NULL, *sidW = NULL, guidW[GUID_SIZE]; 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, TRACE( "%s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(user_sid), ctx, index, guid, installed_ctx,
sid, sid_len); sid, sid_len );
if (sid && !sid_len) return ERROR_INVALID_PARAMETER; if (sid && !sid_len) return ERROR_INVALID_PARAMETER;
if (user_sid && !(user_sidW = strdupAtoW( user_sid ))) return ERROR_OUTOFMEMORY; if (user_sid && !(user_sidW = strdupAtoW( user_sid ))) return ERROR_OUTOFMEMORY;
@ -1300,15 +1298,15 @@ done:
return r; return r;
} }
UINT WINAPI MsiEnumComponentsExW( LPCWSTR user_sid, DWORD ctx, DWORD index, WCHAR guid[39], UINT WINAPI MsiEnumComponentsExW( const WCHAR *user_sid, DWORD ctx, DWORD index, WCHAR guid[39],
MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len ) MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid, DWORD *sid_len )
{ {
UINT r; UINT r;
DWORD idx = 0; DWORD idx = 0;
static DWORD last_index; static DWORD last_index;
TRACE("%s, %u, %u, %p, %p, %p, %p\n", debugstr_w(user_sid), ctx, index, guid, installed_ctx, TRACE( "%s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(user_sid), ctx, index, guid, installed_ctx,
sid, sid_len); sid, sid_len );
if ((sid && !sid_len) || !ctx || (user_sid && ctx == MSIINSTALLCONTEXT_MACHINE)) if ((sid && !sid_len) || !ctx || (user_sid && ctx == MSIINSTALLCONTEXT_MACHINE))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1327,13 +1325,13 @@ UINT WINAPI MsiEnumComponentsExW( LPCWSTR user_sid, DWORD ctx, DWORD index, WCHA
return r; return r;
} }
UINT WINAPI MsiEnumClientsA(LPCSTR szComponent, DWORD index, LPSTR szProduct) UINT WINAPI MsiEnumClientsA( const char *szComponent, DWORD index, char *szProduct )
{ {
DWORD r; DWORD r;
WCHAR szwProduct[GUID_SIZE]; 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 ) if ( !szProduct )
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1347,23 +1345,20 @@ UINT WINAPI MsiEnumClientsA(LPCSTR szComponent, DWORD index, LPSTR szProduct)
r = MsiEnumClientsW(szComponent?szwComponent:NULL, index, szwProduct); r = MsiEnumClientsW(szComponent?szwComponent:NULL, index, szwProduct);
if( r == ERROR_SUCCESS ) 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); msi_free( szwComponent);
return r; return r;
} }
UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct) UINT WINAPI MsiEnumClientsW( const WCHAR *szComponent, DWORD index, WCHAR *szProduct )
{ {
HKEY hkeyComp = 0; HKEY hkeyComp = 0;
DWORD r, sz; DWORD r, sz;
WCHAR szValName[SQUASHED_GUID_SIZE]; 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) if (!szComponent || !*szComponent || !szProduct)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1396,35 +1391,33 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
return r; return r;
} }
UINT WINAPI MsiEnumClientsExA(LPCSTR component, LPCSTR usersid, DWORD ctx, DWORD index, UINT WINAPI MsiEnumClientsExA( const char *component, const char *usersid, DWORD ctx, DWORD index,
CHAR installed_product[GUID_SIZE], char installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, char *sid,
MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len) DWORD *sid_len )
{ {
FIXME("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_a(component), debugstr_a(usersid), FIXME( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(component), debugstr_a(usersid), ctx, index,
ctx, index, installed_product, installed_ctx, sid, sid_len); installed_product, installed_ctx, sid, sid_len );
return ERROR_ACCESS_DENIED; return ERROR_ACCESS_DENIED;
} }
UINT WINAPI MsiEnumClientsExW(LPCWSTR component, LPCWSTR usersid, DWORD ctx, DWORD index, UINT WINAPI MsiEnumClientsExW( const WCHAR *component, const WCHAR *usersid, DWORD ctx, DWORD index,
WCHAR installed_product[GUID_SIZE], WCHAR installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid,
MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len) DWORD *sid_len )
{ {
FIXME("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_w(component), debugstr_w(usersid), FIXME( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(component), debugstr_w(usersid), ctx, index,
ctx, index, installed_product, installed_ctx, sid, sid_len); installed_product, installed_ctx, sid, sid_len );
return ERROR_ACCESS_DENIED; return ERROR_ACCESS_DENIED;
} }
static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex, static UINT MSI_EnumComponentQualifiers( const WCHAR *szComponent, DWORD iIndex, awstring *lpQualBuf,
awstring *lpQualBuf, LPDWORD pcchQual, DWORD *pcchQual, awstring *lpAppBuf, DWORD *pcchAppBuf )
awstring *lpAppBuf, LPDWORD pcchAppBuf )
{ {
DWORD name_sz, val_sz, name_max, val_max, type, ofs; DWORD name_sz, val_sz, name_max, val_max, type, ofs;
LPWSTR name = NULL, val = NULL; WCHAR *name = NULL, *val = NULL;
UINT r, r2; UINT r, r2;
HKEY key; HKEY key;
TRACE("%s %08x %p %p %p %p\n", debugstr_w(szComponent), iIndex, TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_w(szComponent), iIndex, lpQualBuf, pcchQual, lpAppBuf, pcchAppBuf );
lpQualBuf, pcchQual, lpAppBuf, pcchAppBuf);
if (!szComponent) if (!szComponent)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1451,8 +1444,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex,
{ {
name_sz = name_max; name_sz = name_max;
val_sz = val_max; val_sz = val_max;
r = RegEnumValueW( key, iIndex, name, &name_sz, r = RegEnumValueW( key, iIndex, name, &name_sz, NULL, &type, (BYTE *)val, &val_sz );
NULL, &type, (LPBYTE)val, &val_sz );
if (r == ERROR_SUCCESS) if (r == ERROR_SUCCESS)
break; break;
if (r != ERROR_MORE_DATA) if (r != ERROR_MORE_DATA)
@ -1460,7 +1452,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex,
if (type != REG_MULTI_SZ) 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; goto end;
} }
@ -1483,7 +1475,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex,
goto end; goto end;
continue; 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; goto end;
} }
@ -1510,17 +1502,16 @@ end:
/************************************************************************* /*************************************************************************
* MsiEnumComponentQualifiersA [MSI.@] * MsiEnumComponentQualifiersA [MSI.@]
*/ */
UINT WINAPI MsiEnumComponentQualifiersA( LPCSTR szComponent, DWORD iIndex, UINT WINAPI MsiEnumComponentQualifiersA( const char *szComponent, DWORD iIndex, char *lpQualifierBuf,
LPSTR lpQualifierBuf, LPDWORD pcchQualifierBuf, DWORD *pcchQualifierBuf, char *lpApplicationDataBuf,
LPSTR lpApplicationDataBuf, LPDWORD pcchApplicationDataBuf ) DWORD *pcchApplicationDataBuf )
{ {
awstring qual, appdata; awstring qual, appdata;
LPWSTR comp; WCHAR *comp;
UINT r; UINT r;
TRACE("%s %08x %p %p %p %p\n", debugstr_a(szComponent), iIndex, TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_a(szComponent), iIndex, lpQualifierBuf, pcchQualifierBuf,
lpQualifierBuf, pcchQualifierBuf, lpApplicationDataBuf, lpApplicationDataBuf, pcchApplicationDataBuf );
pcchApplicationDataBuf);
comp = strdupAtoW( szComponent ); comp = strdupAtoW( szComponent );
if (szComponent && !comp) if (szComponent && !comp)
@ -1541,15 +1532,14 @@ UINT WINAPI MsiEnumComponentQualifiersA( LPCSTR szComponent, DWORD iIndex,
/************************************************************************* /*************************************************************************
* MsiEnumComponentQualifiersW [MSI.@] * MsiEnumComponentQualifiersW [MSI.@]
*/ */
UINT WINAPI MsiEnumComponentQualifiersW( LPCWSTR szComponent, DWORD iIndex, UINT WINAPI MsiEnumComponentQualifiersW( const WCHAR *szComponent, DWORD iIndex, WCHAR *lpQualifierBuf,
LPWSTR lpQualifierBuf, LPDWORD pcchQualifierBuf, DWORD *pcchQualifierBuf, WCHAR *lpApplicationDataBuf,
LPWSTR lpApplicationDataBuf, LPDWORD pcchApplicationDataBuf ) DWORD *pcchApplicationDataBuf )
{ {
awstring qual, appdata; awstring qual, appdata;
TRACE("%s %08x %p %p %p %p\n", debugstr_w(szComponent), iIndex, TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_w(szComponent), iIndex, lpQualifierBuf, pcchQualifierBuf,
lpQualifierBuf, pcchQualifierBuf, lpApplicationDataBuf, lpApplicationDataBuf, pcchApplicationDataBuf );
pcchApplicationDataBuf);
qual.unicode = TRUE; qual.unicode = TRUE;
qual.str.w = lpQualifierBuf; qual.str.w = lpQualifierBuf;
@ -1557,24 +1547,22 @@ UINT WINAPI MsiEnumComponentQualifiersW( LPCWSTR szComponent, DWORD iIndex,
appdata.unicode = TRUE; appdata.unicode = TRUE;
appdata.str.w = lpApplicationDataBuf; appdata.str.w = lpApplicationDataBuf;
return MSI_EnumComponentQualifiers( szComponent, iIndex, return MSI_EnumComponentQualifiers( szComponent, iIndex, &qual, pcchQualifierBuf, &appdata, pcchApplicationDataBuf );
&qual, pcchQualifierBuf, &appdata, pcchApplicationDataBuf );
} }
/************************************************************************* /*************************************************************************
* MsiEnumRelatedProductsW [MSI.@] * MsiEnumRelatedProductsW [MSI.@]
* *
*/ */
UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved, UINT WINAPI MsiEnumRelatedProductsW( const WCHAR *szUpgradeCode, DWORD dwReserved, DWORD iProductIndex,
DWORD iProductIndex, LPWSTR lpProductBuf) WCHAR *lpProductBuf )
{ {
UINT r; UINT r;
HKEY hkey; HKEY hkey;
WCHAR szKeyName[SQUASHED_GUID_SIZE]; WCHAR szKeyName[SQUASHED_GUID_SIZE];
DWORD dwSize = ARRAY_SIZE(szKeyName); DWORD dwSize = ARRAY_SIZE(szKeyName);
TRACE("%s %u %u %p\n", debugstr_w(szUpgradeCode), dwReserved, TRACE( "%s, %#lx, %lu, %p\n", debugstr_w(szUpgradeCode), dwReserved, iProductIndex, lpProductBuf );
iProductIndex, lpProductBuf);
if (NULL == szUpgradeCode) if (NULL == szUpgradeCode)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1597,15 +1585,14 @@ UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved,
* MsiEnumRelatedProductsA [MSI.@] * MsiEnumRelatedProductsA [MSI.@]
* *
*/ */
UINT WINAPI MsiEnumRelatedProductsA(LPCSTR szUpgradeCode, DWORD dwReserved, UINT WINAPI MsiEnumRelatedProductsA( const char *szUpgradeCode, DWORD dwReserved, DWORD iProductIndex,
DWORD iProductIndex, LPSTR lpProductBuf) char *lpProductBuf )
{ {
LPWSTR szwUpgradeCode = NULL; WCHAR *szwUpgradeCode = NULL;
WCHAR productW[GUID_SIZE]; WCHAR productW[GUID_SIZE];
UINT r; UINT r;
TRACE("%s %u %u %p\n", debugstr_a(szUpgradeCode), dwReserved, TRACE( "%s, %#lx, %lu, %p\n", debugstr_a(szUpgradeCode), dwReserved, iProductIndex, lpProductBuf );
iProductIndex, lpProductBuf);
if (szUpgradeCode) if (szUpgradeCode)
{ {
@ -1628,23 +1615,19 @@ UINT WINAPI MsiEnumRelatedProductsA(LPCSTR szUpgradeCode, DWORD dwReserved,
/*********************************************************************** /***********************************************************************
* MsiEnumPatchesExA [MSI.@] * MsiEnumPatchesExA [MSI.@]
*/ */
UINT WINAPI MsiEnumPatchesExA(LPCSTR szProductCode, LPCSTR szUserSid, UINT WINAPI MsiEnumPatchesExA( const char *szProductCode, const char *szUserSid, DWORD dwContext, DWORD dwFilter,
DWORD dwContext, DWORD dwFilter, DWORD dwIndex, LPSTR szPatchCode, DWORD dwIndex, char *szPatchCode, char *szTargetProductCode,
LPSTR szTargetProductCode, MSIINSTALLCONTEXT *pdwTargetProductContext, MSIINSTALLCONTEXT *pdwTargetProductContext, char *szTargetUserSid,
LPSTR szTargetUserSid, LPDWORD pcchTargetUserSid) DWORD *pcchTargetUserSid )
{ {
LPWSTR prodcode = NULL; WCHAR *prodcode = NULL, *usersid = NULL, *targsid = NULL;
LPWSTR usersid = NULL; WCHAR patch[GUID_SIZE], targprod[GUID_SIZE];
LPWSTR targsid = NULL;
WCHAR patch[GUID_SIZE];
WCHAR targprod[GUID_SIZE];
DWORD len; DWORD len;
UINT r; UINT r;
TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", TRACE( "%s, %s, %#lx, %lu, %lu, %p, %p, %p, %p, %p\n", debugstr_a(szProductCode), debugstr_a(szUserSid),
debugstr_a(szProductCode), debugstr_a(szUserSid), dwContext, dwFilter, dwContext, dwFilter, dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, szTargetUserSid,
dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, pcchTargetUserSid );
szTargetUserSid, pcchTargetUserSid);
if (szTargetUserSid && !pcchTargetUserSid) if (szTargetUserSid && !pcchTargetUserSid)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1977,10 +1960,10 @@ done:
/*********************************************************************** /***********************************************************************
* MsiEnumPatchesExW [MSI.@] * MsiEnumPatchesExW [MSI.@]
*/ */
UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid, UINT WINAPI MsiEnumPatchesExW( const WCHAR *szProductCode, const WCHAR *szUserSid, DWORD dwContext, DWORD dwFilter,
DWORD dwContext, DWORD dwFilter, DWORD dwIndex, LPWSTR szPatchCode, DWORD dwIndex, WCHAR *szPatchCode, WCHAR *szTargetProductCode,
LPWSTR szTargetProductCode, MSIINSTALLCONTEXT *pdwTargetProductContext, MSIINSTALLCONTEXT *pdwTargetProductContext, WCHAR *szTargetUserSid,
LPWSTR szTargetUserSid, LPDWORD pcchTargetUserSid) DWORD *pcchTargetUserSid )
{ {
WCHAR squashed_pc[SQUASHED_GUID_SIZE]; WCHAR squashed_pc[SQUASHED_GUID_SIZE];
DWORD idx = 0; DWORD idx = 0;
@ -1988,10 +1971,9 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
static DWORD last_index; static DWORD last_index;
TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", TRACE( "%s, %s, %#lx, %lu, %lu, %p, %p, %p, %p, %p)\n", debugstr_w(szProductCode), debugstr_w(szUserSid),
debugstr_w(szProductCode), debugstr_w(szUserSid), dwContext, dwFilter, dwContext, dwFilter, dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, szTargetUserSid,
dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, pcchTargetUserSid );
szTargetUserSid, pcchTargetUserSid);
if (!szProductCode || !squash_guid( szProductCode, squashed_pc )) if (!szProductCode || !squash_guid( szProductCode, squashed_pc ))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -2031,16 +2013,15 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
/*********************************************************************** /***********************************************************************
* MsiEnumPatchesA [MSI.@] * MsiEnumPatchesA [MSI.@]
*/ */
UINT WINAPI MsiEnumPatchesA(LPCSTR szProduct, DWORD iPatchIndex, UINT WINAPI MsiEnumPatchesA( const char *szProduct, DWORD iPatchIndex, char *lpPatchBuf, char *lpTransformsBuf,
LPSTR lpPatchBuf, LPSTR lpTransformsBuf, LPDWORD pcchTransformsBuf) DWORD *pcchTransformsBuf )
{ {
LPWSTR product, transforms; WCHAR *product, *transforms, patch[GUID_SIZE];
WCHAR patch[GUID_SIZE];
DWORD len; DWORD len;
UINT r; UINT r;
TRACE("(%s %d %p %p %p)\n", debugstr_a(szProduct), iPatchIndex, TRACE( "%s, %lu, %p, %p, %p\n", debugstr_a(szProduct), iPatchIndex, lpPatchBuf, lpTransformsBuf,
lpPatchBuf, lpTransformsBuf, pcchTransformsBuf); pcchTransformsBuf );
if (!szProduct || !lpPatchBuf || !lpTransformsBuf || !pcchTransformsBuf) if (!szProduct || !lpPatchBuf || !lpTransformsBuf || !pcchTransformsBuf)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -2086,16 +2067,16 @@ done:
/*********************************************************************** /***********************************************************************
* MsiEnumPatchesW [MSI.@] * MsiEnumPatchesW [MSI.@]
*/ */
UINT WINAPI MsiEnumPatchesW(LPCWSTR szProduct, DWORD iPatchIndex, UINT WINAPI MsiEnumPatchesW( const WCHAR *szProduct, DWORD iPatchIndex, WCHAR *lpPatchBuf, WCHAR *lpTransformsBuf,
LPWSTR lpPatchBuf, LPWSTR lpTransformsBuf, LPDWORD pcchTransformsBuf) DWORD *pcchTransformsBuf )
{ {
WCHAR *transforms = NULL, squashed_pc[SQUASHED_GUID_SIZE]; WCHAR *transforms = NULL, squashed_pc[SQUASHED_GUID_SIZE];
HKEY prod; HKEY prod;
DWORD idx = 0; DWORD idx = 0;
UINT r; UINT r;
TRACE("(%s %d %p %p %p)\n", debugstr_w(szProduct), iPatchIndex, TRACE( "%s, %lu, %p, %p, %p)\n", debugstr_w(szProduct), iPatchIndex, lpPatchBuf, lpTransformsBuf,
lpPatchBuf, lpTransformsBuf, pcchTransformsBuf); pcchTransformsBuf );
if (!szProduct || !squash_guid( szProduct, squashed_pc )) if (!szProduct || !squash_guid( szProduct, squashed_pc ))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -2133,15 +2114,15 @@ done:
return r; return r;
} }
UINT WINAPI MsiEnumProductsExA( LPCSTR product, LPCSTR usersid, DWORD ctx, DWORD index, UINT WINAPI MsiEnumProductsExA( const char *product, const char *usersid, DWORD ctx, DWORD index,
CHAR installed_product[GUID_SIZE], char installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, char *sid,
MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len ) DWORD *sid_len )
{ {
UINT r; UINT r;
WCHAR installed_productW[GUID_SIZE], *productW = NULL, *usersidW = NULL, *sidW = NULL; 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), TRACE( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(product), debugstr_a(usersid), ctx, index,
ctx, index, installed_product, installed_ctx, sid, sid_len); installed_product, installed_ctx, sid, sid_len );
if (sid && !sid_len) return ERROR_INVALID_PARAMETER; if (sid && !sid_len) return ERROR_INVALID_PARAMETER;
if (product && !(productW = strdupAtoW( product ))) return ERROR_OUTOFMEMORY; if (product && !(productW = strdupAtoW( product ))) return ERROR_OUTOFMEMORY;
@ -2342,16 +2323,16 @@ done:
return r; return r;
} }
UINT WINAPI MsiEnumProductsExW( LPCWSTR product, LPCWSTR usersid, DWORD ctx, DWORD index, UINT WINAPI MsiEnumProductsExW( const WCHAR *product, const WCHAR *usersid, DWORD ctx, DWORD index,
WCHAR installed_product[GUID_SIZE], WCHAR installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid,
MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len ) DWORD *sid_len )
{ {
UINT r; UINT r;
DWORD idx = 0; DWORD idx = 0;
static DWORD last_index; static DWORD last_index;
TRACE("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_w(product), debugstr_w(usersid), TRACE( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(product), debugstr_w(usersid), ctx, index,
ctx, index, installed_product, installed_ctx, sid, sid_len); installed_product, installed_ctx, sid, sid_len );
if ((sid && !sid_len) || !ctx || (usersid && ctx == MSIINSTALLCONTEXT_MACHINE)) if ((sid && !sid_len) || !ctx || (usersid && ctx == MSIINSTALLCONTEXT_MACHINE))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;

View file

@ -90,7 +90,7 @@ static ULONG WINAPI MsiActiveScriptSite_AddRef(IActiveScriptSite* iface)
{ {
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface); MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(%d)\n", This, ref); TRACE( "(%p)->(%lu)\n", This, ref );
return ref; return ref;
} }
@ -99,7 +99,7 @@ static ULONG WINAPI MsiActiveScriptSite_Release(IActiveScriptSite* iface)
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface); MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(%d)\n", This, ref); TRACE( "(%p)->(%lu)\n", This, ref );
if (!ref) if (!ref)
msi_free(This); msi_free(This);
@ -118,7 +118,7 @@ static HRESULT WINAPI MsiActiveScriptSite_GetItemInfo(IActiveScriptSite* iface,
{ {
MsiActiveScriptSite *This = impl_from_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 */ /* Determine the kind of pointer that is requested, and make sure placeholder is valid */
if (dwReturnMask & SCRIPTINFO_ITYPEINFO) { if (dwReturnMask & SCRIPTINFO_ITYPEINFO) {

View file

@ -141,21 +141,17 @@ static UINT OpenURLSubkey(HKEY rootkey, HKEY *key, BOOL create)
/****************************************************************** /******************************************************************
* MsiSourceListEnumMediaDisksA (MSI.@) * MsiSourceListEnumMediaDisksA (MSI.@)
*/ */
UINT WINAPI MsiSourceListEnumMediaDisksA(LPCSTR szProductCodeOrPatchCode, UINT WINAPI MsiSourceListEnumMediaDisksA( const char *szProductCodeOrPatchCode, const char *szUserSid,
LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex,
DWORD dwOptions, DWORD dwIndex, LPDWORD pdwDiskId, DWORD *pdwDiskId, char *szVolumeLabel, DWORD *pcchVolumeLabel,
LPSTR szVolumeLabel, LPDWORD pcchVolumeLabel, char *szDiskPrompt, DWORD *pcchDiskPrompt )
LPSTR szDiskPrompt, LPDWORD pcchDiskPrompt)
{ {
LPWSTR product = NULL; WCHAR *product = NULL, *usersid = NULL, *volume = NULL, *prompt = NULL;
LPWSTR usersid = NULL;
LPWSTR volume = NULL;
LPWSTR prompt = NULL;
UINT r = ERROR_INVALID_PARAMETER; UINT r = ERROR_INVALID_PARAMETER;
TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", debugstr_a(szProductCodeOrPatchCode), TRACE( "%s, %s, %d, %#lx, %lu, %p, %p, %p, %p, %p\n", debugstr_a(szProductCodeOrPatchCode),
debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, pdwDiskId, debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, pdwDiskId, szVolumeLabel, pcchVolumeLabel,
szVolumeLabel, pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt); szDiskPrompt, pcchDiskPrompt );
if (szDiskPrompt && !pcchDiskPrompt) if (szDiskPrompt && !pcchDiskPrompt)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -199,11 +195,10 @@ done:
/****************************************************************** /******************************************************************
* MsiSourceListEnumMediaDisksW (MSI.@) * MsiSourceListEnumMediaDisksW (MSI.@)
*/ */
UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode, UINT WINAPI MsiSourceListEnumMediaDisksW( const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid,
LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex,
DWORD dwOptions, DWORD dwIndex, LPDWORD pdwDiskId, DWORD *pdwDiskId, WCHAR *szVolumeLabel, DWORD *pcchVolumeLabel,
LPWSTR szVolumeLabel, LPDWORD pcchVolumeLabel, WCHAR *szDiskPrompt, DWORD *pcchDiskPrompt )
LPWSTR szDiskPrompt, LPDWORD pcchDiskPrompt)
{ {
WCHAR squashed_pc[SQUASHED_GUID_SIZE], convert[11]; WCHAR squashed_pc[SQUASHED_GUID_SIZE], convert[11];
WCHAR *value = NULL, *data = NULL, *ptr, *ptr2; WCHAR *value = NULL, *data = NULL, *ptr, *ptr2;
@ -213,9 +208,9 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
UINT r; UINT r;
static DWORD index = 0; static DWORD index = 0;
TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p)\n", debugstr_w(szProductCodeOrPatchCode), TRACE( "%s, %s, %d, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(szProductCodeOrPatchCode),
debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel, debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel, pcchVolumeLabel,
pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt); szDiskPrompt, pcchDiskPrompt );
if (!szProductCodeOrPatchCode || !squash_guid( szProductCodeOrPatchCode, squashed_pc )) if (!szProductCodeOrPatchCode || !squash_guid( szProductCodeOrPatchCode, squashed_pc ))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -331,20 +326,17 @@ done:
/****************************************************************** /******************************************************************
* MsiSourceListEnumSourcesA (MSI.@) * MsiSourceListEnumSourcesA (MSI.@)
*/ */
UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUserSid, UINT WINAPI MsiSourceListEnumSourcesA( const char *szProductCodeOrPatch, const char *szUserSid,
MSIINSTALLCONTEXT dwContext, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, char *szSource,
DWORD dwOptions, DWORD dwIndex, DWORD *pcchSource )
LPSTR szSource, LPDWORD pcchSource)
{ {
LPWSTR product = NULL; WCHAR *product = NULL, *usersid = NULL, *source = NULL;
LPWSTR usersid = NULL;
LPWSTR source = NULL;
DWORD len = 0; DWORD len = 0;
UINT r = ERROR_INVALID_PARAMETER; UINT r = ERROR_INVALID_PARAMETER;
static DWORD index = 0; static DWORD index = 0;
TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_a(szProductCodeOrPatch), TRACE( "%s, %s, %d, %#lx, %lu, %p, %p)\n", debugstr_a(szProductCodeOrPatch), debugstr_a(szUserSid), dwContext,
debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource); dwOptions, dwIndex, szSource, pcchSource );
if (dwIndex == 0) if (dwIndex == 0)
index = 0; index = 0;
@ -403,10 +395,9 @@ done:
/****************************************************************** /******************************************************************
* MsiSourceListEnumSourcesW (MSI.@) * MsiSourceListEnumSourcesW (MSI.@)
*/ */
UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUserSid, UINT WINAPI MsiSourceListEnumSourcesW( const WCHAR *szProductCodeOrPatch, const WCHAR *szUserSid,
MSIINSTALLCONTEXT dwContext, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, WCHAR *szSource,
DWORD dwOptions, DWORD dwIndex, DWORD *pcchSource )
LPWSTR szSource, LPDWORD pcchSource)
{ {
WCHAR squashed_pc[SQUASHED_GUID_SIZE], name[32]; WCHAR squashed_pc[SQUASHED_GUID_SIZE], name[32];
HKEY source = NULL, subkey = NULL; HKEY source = NULL, subkey = NULL;
@ -414,8 +405,8 @@ UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUs
UINT r = ERROR_INVALID_PARAMETER; UINT r = ERROR_INVALID_PARAMETER;
static DWORD index = 0; static DWORD index = 0;
TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_w(szProductCodeOrPatch), TRACE( "%s, %s, %d, %#lx, %lu, %p, %p\n", debugstr_w(szProductCodeOrPatch), debugstr_w(szUserSid), dwContext,
debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource); dwOptions, dwIndex, szSource, pcchSource );
if (dwIndex == 0) if (dwIndex == 0)
index = 0; index = 0;
@ -754,17 +745,16 @@ UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
/****************************************************************** /******************************************************************
* MsiSourceListSetInfoW (MSI.@) * MsiSourceListSetInfoW (MSI.@)
*/ */
UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, UINT WINAPI MsiSourceListSetInfoW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext,
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwOptions, const WCHAR *szProperty, const WCHAR *szValue )
LPCWSTR szProperty, LPCWSTR szValue)
{ {
WCHAR squashed_pc[SQUASHED_GUID_SIZE]; WCHAR squashed_pc[SQUASHED_GUID_SIZE];
HKEY sourcekey, media; HKEY sourcekey, media;
LPCWSTR property; LPCWSTR property;
UINT rc; UINT rc;
TRACE("%s %s %x %x %s %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), TRACE( "%s, %s, %d, %#lx, %s, %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions,
dwContext, dwOptions, debugstr_w(szProperty), debugstr_w(szValue)); debugstr_w(szProperty), debugstr_w(szValue) );
if (!szProduct || !squash_guid( szProduct, squashed_pc )) if (!szProduct || !squash_guid( szProduct, squashed_pc ))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1041,9 +1031,8 @@ error:
/****************************************************************** /******************************************************************
* MsiSourceListAddSourceExW (MSI.@) * MsiSourceListAddSourceExW (MSI.@)
*/ */
UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid, UINT WINAPI MsiSourceListAddSourceExW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext,
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource, DWORD dwOptions, const WCHAR *szSource, DWORD dwIndex )
DWORD dwIndex)
{ {
HKEY sourcekey, typekey; HKEY sourcekey, typekey;
UINT rc; UINT rc;
@ -1053,8 +1042,8 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
LPCWSTR postfix; LPCWSTR postfix;
DWORD size, count, index; DWORD size, count, index;
TRACE("%s %s %x %x %s %i\n", debugstr_w(szProduct), debugstr_w(szUserSid), TRACE( "%s, %s, %d, %#lx, %s, %lu\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions,
dwContext, dwOptions, debugstr_w(szSource), dwIndex); debugstr_w(szSource), dwIndex );
if (!szProduct || !squash_guid( szProduct, squashed_pc )) if (!szProduct || !squash_guid( szProduct, squashed_pc ))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1086,7 +1075,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
rc = OpenMediaSubkey(sourcekey, &typekey, TRUE); rc = OpenMediaSubkey(sourcekey, &typekey, TRUE);
else else
{ {
ERR("unknown media type: %08x\n", dwOptions); ERR( "unknown media type: %#lx\n", dwOptions );
RegCloseKey(sourcekey); RegCloseKey(sourcekey);
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
} }
@ -1194,18 +1183,17 @@ UINT WINAPI MsiSourceListAddMediaDiskA(LPCSTR szProduct, LPCSTR szUserSid,
/****************************************************************** /******************************************************************
* MsiSourceListAddMediaDiskW (MSI.@) * MsiSourceListAddMediaDiskW (MSI.@)
*/ */
UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid, UINT WINAPI MsiSourceListAddMediaDiskW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext,
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId, DWORD dwOptions, DWORD dwDiskId, const WCHAR *szVolumeLabel,
LPCWSTR szVolumeLabel, LPCWSTR szDiskPrompt) const WCHAR *szDiskPrompt )
{ {
HKEY sourcekey, mediakey; HKEY sourcekey, mediakey;
UINT rc; UINT rc;
WCHAR *buffer, squashed_pc[SQUASHED_GUID_SIZE], szIndex[10]; WCHAR *buffer, squashed_pc[SQUASHED_GUID_SIZE], szIndex[10];
DWORD size; DWORD size;
TRACE("%s %s %x %x %i %s %s\n", debugstr_w(szProduct), TRACE( "%s, %s, %d, %#lx, %lu, %s, %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions,
debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId, dwDiskId, debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt) );
debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt));
if (!szProduct || !squash_guid( szProduct, squashed_pc )) if (!szProduct || !squash_guid( szProduct, squashed_pc ))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -1257,81 +1245,77 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
/****************************************************************** /******************************************************************
* MsiSourceListClearAllA (MSI.@) * 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; return ERROR_SUCCESS;
} }
/****************************************************************** /******************************************************************
* MsiSourceListClearAllW (MSI.@) * 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; return ERROR_SUCCESS;
} }
/****************************************************************** /******************************************************************
* MsiSourceListClearAllExA (MSI.@) * MsiSourceListClearAllExA (MSI.@)
*/ */
UINT WINAPI MsiSourceListClearAllExA( LPCSTR szProduct, LPCSTR szUserSid, UINT WINAPI MsiSourceListClearAllExA( const char *szProduct, const char *szUserSid, MSIINSTALLCONTEXT dwContext,
MSIINSTALLCONTEXT dwContext, DWORD dwOptions ) DWORD dwOptions )
{ {
FIXME("(%s %s %d %08x)\n", debugstr_a(szProduct), debugstr_a(szUserSid), FIXME( "%s, %s, %d, %#lx\n", debugstr_a(szProduct), debugstr_a(szUserSid), dwContext, dwOptions );
dwContext, dwOptions);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
/****************************************************************** /******************************************************************
* MsiSourceListClearAllExW (MSI.@) * MsiSourceListClearAllExW (MSI.@)
*/ */
UINT WINAPI MsiSourceListClearAllExW( LPCWSTR szProduct, LPCWSTR szUserSid, UINT WINAPI MsiSourceListClearAllExW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext,
MSIINSTALLCONTEXT dwContext, DWORD dwOptions ) DWORD dwOptions )
{ {
FIXME("(%s %s %d %08x)\n", debugstr_w(szProduct), debugstr_w(szUserSid), FIXME( "%s, %s, %d, %#lx\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions );
dwContext, dwOptions);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
/****************************************************************** /******************************************************************
* MsiSourceListClearSourceA (MSI.@) * MsiSourceListClearSourceA (MSI.@)
*/ */
UINT WINAPI MsiSourceListClearSourceA(LPCSTR szProductCodeOrPatchCode, LPCSTR szUserSid, UINT WINAPI MsiSourceListClearSourceA( const char *szProductCodeOrPatchCode, const char *szUserSid,
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const char *szSource )
LPCSTR szSource)
{ {
FIXME("(%s %s %x %x %s)\n", debugstr_a(szProductCodeOrPatchCode), debugstr_a(szUserSid), FIXME( "%s, %s, %d, %#lx, %s\n", debugstr_a(szProductCodeOrPatchCode), debugstr_a(szUserSid), dwContext,
dwContext, dwOptions, debugstr_a(szSource)); dwOptions, debugstr_a(szSource) );
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
/****************************************************************** /******************************************************************
* MsiSourceListClearSourceW (MSI.@) * MsiSourceListClearSourceW (MSI.@)
*/ */
UINT WINAPI MsiSourceListClearSourceW(LPCWSTR szProductCodeOrPatchCode, LPCWSTR szUserSid, UINT WINAPI MsiSourceListClearSourceW( const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid,
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource )
LPCWSTR szSource)
{ {
FIXME("(%s %s %x %x %s)\n", debugstr_w(szProductCodeOrPatchCode), debugstr_w(szUserSid), FIXME( "%s, %s, %d, %#lx, %s\n", debugstr_w(szProductCodeOrPatchCode), debugstr_w(szUserSid), dwContext,
dwContext, dwOptions, debugstr_w(szSource)); dwOptions, debugstr_w(szSource) );
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
/****************************************************************** /******************************************************************
* MsiSourceListForceResolutionA (MSI.@) * 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; return ERROR_SUCCESS;
} }
/****************************************************************** /******************************************************************
* MsiSourceListForceResolutionW (MSI.@) * 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; return ERROR_SUCCESS;
} }

View file

@ -481,7 +481,7 @@ static UINT load_streams( MSIDATABASE *db )
CoTaskMemFree( stat.pwcsName ); CoTaskMemFree( stat.pwcsName );
if (FAILED( hr )) if (FAILED( hr ))
{ {
ERR("unable to open stream %08x\n", hr); ERR( "unable to open stream %#lx\n", hr );
r = ERROR_FUNCTION_FAILED; r = ERROR_FUNCTION_FAILED;
break; break;
} }
@ -584,7 +584,7 @@ static HRESULT write_stream( IStream *dst, IStream *src )
hr = IStream_Read( src, buf, size, &count ); hr = IStream_Read( src, buf, size, &count );
if (FAILED( hr ) || count != size) if (FAILED( hr ) || count != size)
{ {
WARN("failed to read stream: %08x\n", hr); WARN( "failed to read stream: %#lx\n", hr );
return E_INVALIDARG; return E_INVALIDARG;
} }
stat.cbSize.QuadPart -= count; stat.cbSize.QuadPart -= count;
@ -594,7 +594,7 @@ static HRESULT write_stream( IStream *dst, IStream *src )
hr = IStream_Write( dst, buf, size, &count ); hr = IStream_Write( dst, buf, size, &count );
if (FAILED( hr ) || count != size) if (FAILED( hr ) || count != size)
{ {
WARN("failed to write stream: %08x\n", hr); WARN( "failed to write stream: %#lx\n", hr );
return E_INVALIDARG; return E_INVALIDARG;
} }
} }
@ -628,7 +628,7 @@ UINT msi_commit_streams( MSIDATABASE *db )
hr = write_stream( stream, db->streams[i].stream ); hr = write_stream( stream, db->streams[i].stream );
if (FAILED( hr )) 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 ); msi_free( encname );
IStream_Release( stream ); IStream_Release( stream );
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
@ -637,14 +637,14 @@ UINT msi_commit_streams( MSIDATABASE *db )
IStream_Release( stream ); IStream_Release( stream );
if (FAILED( hr )) 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 ); msi_free( encname );
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
} }
} }
else if (hr != STG_E_FILEALREADYEXISTS) 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 ); msi_free( encname );
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
} }

View file

@ -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 ); r = add_string( st, n, data+offset, len, refs, TRUE );
if( r != n ) if( r != n )
ERR("Failed to add string %d\n", n ); ERR( "Failed to add string %lu\n", n );
n++; n++;
offset += len; offset += len;
} }
if ( datasize != offset ) 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: end:
msi_free( pool ); msi_free( pool );

View file

@ -197,14 +197,14 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz
{ {
if( idofs[i].propid >= MSI_MAX_PROPS ) 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; break;
} }
type = get_type( idofs[i].propid ); type = get_type( idofs[i].propid );
if( type == VT_EMPTY ) 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; break;
} }
@ -295,7 +295,7 @@ static UINT load_summary_info( MSISUMMARYINFO *si, IStream *stm )
if( section_hdr.cProperties > MSI_MAX_PROPS ) 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; return ERROR_FUNCTION_FAILED;
} }
@ -311,7 +311,7 @@ static UINT load_summary_info( MSISUMMARYINFO *si, IStream *stm )
if( SUCCEEDED(r) && count == sz ) if( SUCCEEDED(r) && count == sz )
read_properties_from_data( si->property, data, sz + SECT_HDR_SIZE ); read_properties_from_data( si->property, data, sz + SECT_HDR_SIZE );
else else
ERR("failed to read properties %d %d\n", count, sz); ERR( "failed to read properties %lu %lu\n", count, sz );
msi_free( data ); msi_free( data );
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -511,15 +511,14 @@ UINT msi_get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **r
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, const WCHAR *szDatabase, UINT uiUpdateCount,
LPCWSTR szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle ) MSIHANDLE *pHandle )
{ {
MSISUMMARYINFO *si; MSISUMMARYINFO *si;
MSIDATABASE *db; MSIDATABASE *db;
UINT ret; UINT ret;
TRACE("%d %s %d %p\n", hDatabase, debugstr_w(szDatabase), TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_w(szDatabase), uiUpdateCount, pHandle );
uiUpdateCount, pHandle);
if( !pHandle ) if( !pHandle )
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -582,14 +581,13 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
return ret; return ret;
} }
UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, UINT WINAPI MsiGetSummaryInformationA( MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount,
LPCSTR szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle) MSIHANDLE *pHandle )
{ {
LPWSTR szwDatabase = NULL; WCHAR *szwDatabase = NULL;
UINT ret; UINT ret;
TRACE("%d %s %d %p\n", hDatabase, debugstr_a(szDatabase), TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_a(szDatabase), uiUpdateCount, pHandle );
uiUpdateCount, pHandle);
if( szDatabase ) if( szDatabase )
{ {
@ -605,11 +603,11 @@ UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase,
return ret; return ret;
} }
UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, PUINT pCount) UINT WINAPI MsiSummaryInfoGetPropertyCount( MSIHANDLE hSummaryInfo, UINT *pCount )
{ {
MSISUMMARYINFO *si; MSISUMMARYINFO *si;
TRACE("%d %p\n", hSummaryInfo, pCount); TRACE( "%lu, %p\n", hSummaryInfo, pCount );
si = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO ); si = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO );
if( !si ) if( !si )
@ -736,16 +734,15 @@ LPWSTR msi_get_suminfo_product( IStorage *stg )
return prod; return prod;
} }
UINT WINAPI MsiSummaryInfoGetPropertyA( UINT WINAPI MsiSummaryInfoGetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue,
MSIHANDLE handle, UINT uiProperty, PUINT puiDataType, LPINT piValue, FILETIME *pftValue, char *szValueBuf, DWORD *pcchValueBuf )
FILETIME *pftValue, LPSTR szValueBuf, LPDWORD pcchValueBuf)
{ {
MSISUMMARYINFO *si; MSISUMMARYINFO *si;
awstring str; awstring str;
UINT r; UINT r;
TRACE("%u, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf,
piValue, pftValue, szValueBuf, pcchValueBuf ); pcchValueBuf );
if (uiProperty >= MSI_MAX_PROPS) if (uiProperty >= MSI_MAX_PROPS)
{ {
@ -788,16 +785,15 @@ UINT WINAPI MsiSummaryInfoGetPropertyA(
return r; return r;
} }
UINT WINAPI MsiSummaryInfoGetPropertyW( UINT WINAPI MsiSummaryInfoGetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue,
MSIHANDLE handle, UINT uiProperty, PUINT puiDataType, LPINT piValue, FILETIME *pftValue, WCHAR *szValueBuf, DWORD *pcchValueBuf )
FILETIME *pftValue, LPWSTR szValueBuf, LPDWORD pcchValueBuf)
{ {
MSISUMMARYINFO *si; MSISUMMARYINFO *si;
awstring str; awstring str;
UINT r; UINT r;
TRACE("%u, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf,
piValue, pftValue, szValueBuf, pcchValueBuf ); pcchValueBuf );
if (uiProperty >= MSI_MAX_PROPS) 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 ); return set_prop( si, uiProperty, type, iValue, pftValue, str );
} }
UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue,
INT iValue, FILETIME *pftValue, LPCWSTR szValue ) FILETIME *pftValue, const WCHAR *szValue )
{ {
awcstring str; awcstring str;
MSISUMMARYINFO *si; MSISUMMARYINFO *si;
UINT ret; UINT ret;
TRACE("%u, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, TRACE( "%lu, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_w(szValue) );
debugstr_w(szValue) );
if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO ))) if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO )))
{ {
@ -939,15 +934,14 @@ UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT
return ret; return ret;
} }
UINT WINAPI MsiSummaryInfoSetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, UINT WINAPI MsiSummaryInfoSetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue,
INT iValue, FILETIME *pftValue, LPCSTR szValue ) FILETIME *pftValue, const char *szValue )
{ {
awcstring str; awcstring str;
MSISUMMARYINFO *si; MSISUMMARYINFO *si;
UINT ret; UINT ret;
TRACE("%u, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, TRACE( "%lu, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_a(szValue) );
debugstr_a(szValue) );
if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO ))) if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO )))
{ {
@ -1230,7 +1224,7 @@ UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle )
MSISUMMARYINFO *si; MSISUMMARYINFO *si;
UINT ret; UINT ret;
TRACE("%d\n", handle ); TRACE( "%lu\n", handle );
si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO ); si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO );
if( !si ) if( !si )
@ -1242,12 +1236,13 @@ UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle )
return ret; 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; UINT r;
WCHAR *transformW = NULL; 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 ))) if (transform && !(transformW = strdupAtoW( transform )))
return ERROR_OUTOFMEMORY; return ERROR_OUTOFMEMORY;
@ -1257,9 +1252,10 @@ UINT WINAPI MsiCreateTransformSummaryInfoA( MSIHANDLE db, MSIHANDLE db_ref, LPCS
return r; 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; return ERROR_FUNCTION_FAILED;
} }

View file

@ -221,8 +221,7 @@ void enum_stream_names( IStorage *stg )
if( FAILED( r ) || !count ) if( FAILED( r ) || !count )
break; break;
decode_streamname( stat.pwcsName, name ); decode_streamname( stat.pwcsName, name );
TRACE("stream %2d -> %s %s\n", n, TRACE( "stream %2lu -> %s %s\n", n, debugstr_w(stat.pwcsName), debugstr_w(name) );
debugstr_w(stat.pwcsName), debugstr_w(name) );
CoTaskMemFree( stat.pwcsName ); CoTaskMemFree( stat.pwcsName );
n++; n++;
} }
@ -250,14 +249,14 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table,
msi_free( encname ); msi_free( encname );
if( FAILED( r ) ) 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; return ret;
} }
r = IStream_Stat(stm, &stat, STATFLAG_NONAME ); r = IStream_Stat(stm, &stat, STATFLAG_NONAME );
if( FAILED( r ) ) if( FAILED( r ) )
{ {
WARN("open stream failed r = %08x!\n", r); WARN( "open stream failed r = %#lx!\n", r );
goto end; goto end;
} }
@ -271,7 +270,7 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table,
data = msi_alloc( sz ); data = msi_alloc( sz );
if( !data ) 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; ret = ERROR_NOT_ENOUGH_MEMORY;
goto end; goto end;
} }
@ -280,7 +279,7 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table,
if( FAILED( r ) || ( count != sz ) ) if( FAILED( r ) || ( count != sz ) )
{ {
msi_free( data ); msi_free( data );
WARN("read stream failed r = %08x!\n", r); WARN("read stream failed r = %#lx!\n", r);
goto end; goto end;
} }
@ -316,7 +315,7 @@ UINT write_stream_data( IStorage *stg, LPCWSTR stname,
msi_free( encname ); msi_free( encname );
if( FAILED( r ) ) if( FAILED( r ) )
{ {
WARN("open stream failed r = %08x\n", r); WARN( "open stream failed r = %#lx\n", r );
return ret; return ret;
} }
@ -1929,7 +1928,7 @@ static UINT TABLE_add_ref(struct tagMSIVIEW *view)
{ {
MSITABLEVIEW *tv = (MSITABLEVIEW*)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); return InterlockedIncrement(&tv->table->ref_count);
} }
@ -2914,7 +2913,7 @@ UINT MSI_CommitTables( MSIDATABASE *db )
hr = IStorage_Commit( db->storage, 0 ); hr = IStorage_Commit( db->storage, 0 );
if (FAILED( hr )) if (FAILED( hr ))
{ {
WARN("failed to commit changes 0x%08x\n", hr); WARN( "failed to commit changes %#lx\n", hr );
r = ERROR_FUNCTION_FAILED; r = ERROR_FUNCTION_FAILED;
} }
return r; return r;

View file

@ -142,7 +142,7 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
HKEY hukey; HKEY hukey;
INT r; 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); unsquash_guid(product, productid);
if (MSIREG_OpenProductKey(productid, NULL, MSIINSTALLCONTEXT_USERMANAGED, &hukey, FALSE) && if (MSIREG_OpenProductKey(productid, NULL, MSIINSTALLCONTEXT_USERMANAGED, &hukey, FALSE) &&