Commit e31ee69f authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Rename MSI_GetPropertyW and MSI_SetPropertyW.

For consistency with related functions msi_dup_property and msi_get_property_int and because there is no ANSI version of these functions.
parent 44b79839
......@@ -277,7 +277,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
if (lstrlenW(prop) > 0)
{
UINT r = MSI_SetPropertyW( package->db, prop, val );
UINT r = msi_set_property( package->db, prop, val );
TRACE("Found commandline property (%s) = (%s)\n",
debugstr_w(prop), debugstr_w(val));
......@@ -481,7 +481,7 @@ static UINT msi_set_media_source_prop(MSIPACKAGE *package)
{
prop = MSI_RecordGetString(rec, 1);
patch = msi_dup_property(package->db, szPatch);
MSI_SetPropertyW(package->db, prop, patch);
msi_set_property(package->db, prop, patch);
msi_free(patch);
}
......@@ -673,7 +673,7 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
check = msi_dup_property( package->db, cszSourceDir );
if (!check || replace)
{
UINT r = MSI_SetPropertyW( package->db, cszSourceDir, source );
UINT r = msi_set_property( package->db, cszSourceDir, source );
if (r == ERROR_SUCCESS)
msi_reset_folders( package, TRUE );
}
......@@ -681,7 +681,7 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
check = msi_dup_property( package->db, cszSOURCEDIR );
if (!check || replace)
MSI_SetPropertyW( package->db, cszSOURCEDIR, source );
msi_set_property( package->db, cszSOURCEDIR, source );
msi_free( check );
msi_free( source );
......@@ -705,7 +705,7 @@ static UINT msi_set_context(MSIPACKAGE *package)
package->Context = MSIINSTALLCONTEXT_USERUNMANAGED;
r = MSI_GetPropertyW(package->db, szAllUsers, val, &sz);
r = msi_get_property(package->db, szAllUsers, val, &sz);
if (r == ERROR_SUCCESS)
{
num = atolW(val);
......@@ -1520,8 +1520,8 @@ static UINT ACTION_CostInitialize(MSIPACKAGE *package)
static const WCHAR szCosting[] =
{'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0 };
MSI_SetPropertyW( package->db, szCosting, szZero );
MSI_SetPropertyW( package->db, cszRootDrive, c_colon );
msi_set_property( package->db, szCosting, szZero );
msi_set_property( package->db, cszRootDrive, c_colon );
load_all_folders( package );
load_all_components( package );
......@@ -1691,7 +1691,7 @@ static BOOL process_overrides( MSIPACKAGE *package, int level )
ret |= process_state_property( package, level, szAdvertise, INSTALLSTATE_ADVERTISED );
if (ret)
MSI_SetPropertyW( package->db, szPreselected, szOne );
msi_set_property( package->db, szPreselected, szOne );
return ret;
}
......@@ -2084,15 +2084,15 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
}
}
MSI_SetPropertyW( package->db, szCosting, szOne );
msi_set_property( package->db, szCosting, szOne );
/* set default run level if not set */
level = msi_dup_property( package->db, szlevel );
if (!level)
MSI_SetPropertyW( package->db, szlevel, szOne );
msi_set_property( package->db, szlevel, szOne );
msi_free(level);
/* FIXME: check volume disk space */
MSI_SetPropertyW( package->db, szOutOfDiskSpace, szZero );
msi_set_property( package->db, szOutOfDiskSpace, szZero );
return MSI_SetFeatureStates(package);
}
......@@ -6802,7 +6802,7 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
if (key && template)
{
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
r = MSI_SetPropertyW( package->db, szProductID, key );
r = msi_set_property( package->db, szProductID, key );
}
msi_free( template );
msi_free( key );
......@@ -7216,7 +7216,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
static const WCHAR szAction[] = {'A','C','T','I','O','N',0};
static const WCHAR szInstall[] = {'I','N','S','T','A','L','L',0};
MSI_SetPropertyW( package->db, szAction, szInstall );
msi_set_property( package->db, szAction, szInstall );
package->script->InWhatSequence = SEQUENCE_INSTALL;
......@@ -7264,7 +7264,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
if (!szCommandLine && msi_get_property_int( package->db, szInstalled, 0 ))
{
TRACE("setting reinstall property\n");
MSI_SetPropertyW( package->db, szReinstall, szAll );
msi_set_property( package->db, szReinstall, szAll );
}
/* properties may have been added by a transform */
......
......@@ -1041,7 +1041,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
r = ACTION_AppSearchSigName(package, sigName, &sig, &value);
if (value)
{
r = MSI_SetPropertyW( package->db, propName, value );
r = msi_set_property( package->db, propName, value );
if (r == ERROR_SUCCESS && !strcmpW( propName, cszSourceDir ))
msi_reset_folders( package, TRUE );
......@@ -1103,7 +1103,7 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
if (value)
{
TRACE("Found signature %s\n", debugstr_w(signature));
MSI_SetPropertyW(package->db, success, szOne);
msi_set_property(package->db, success, szOne);
msi_free(value);
r = ERROR_NO_MORE_ITEMS;
}
......
......@@ -163,17 +163,17 @@ static void set_deferred_action_props(MSIPACKAGE *package, LPWSTR deferred_data)
end = strstrW(beg, sep);
*end = '\0';
MSI_SetPropertyW(package->db, szCustomActionData, beg);
msi_set_property(package->db, szCustomActionData, beg);
beg = end + 3;
end = strstrW(beg, sep);
*end = '\0';
MSI_SetPropertyW(package->db, szUserSID, beg);
msi_set_property(package->db, szUserSID, beg);
beg = end + 3;
end = strchrW(beg, ']');
*end = '\0';
MSI_SetPropertyW(package->db, szProductCode, beg);
msi_set_property(package->db, szProductCode, beg);
}
UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL execute)
......@@ -276,9 +276,9 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
if (deferred_data)
set_deferred_action_props(package, deferred_data);
else if (actiondata)
MSI_SetPropertyW(package->db, szCustomActionData, actiondata);
msi_set_property(package->db, szCustomActionData, actiondata);
else
MSI_SetPropertyW(package->db, szCustomActionData, szEmpty);
msi_set_property(package->db, szCustomActionData, szEmpty);
msi_free(actiondata);
}
......@@ -327,7 +327,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
break;
deformat_string(package,target,&deformated);
rc = MSI_SetPropertyW( package->db, source, deformated );
rc = msi_set_property( package->db, source, deformated );
if (rc == ERROR_SUCCESS && !strcmpW( source, cszSourceDir ))
msi_reset_folders( package, TRUE );
msi_free(deformated);
......@@ -378,7 +378,7 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
DWORD sz = MAX_PATH;
UINT r;
if (MSI_GetPropertyW(package->db, cszTempFolder, fmt, &sz) != ERROR_SUCCESS)
if (msi_get_property(package->db, cszTempFolder, fmt, &sz) != ERROR_SUCCESS)
GetTempPathW(MAX_PATH, fmt);
if (GetTempFileNameW(fmt, szMsi, 0, tmp_file) == 0)
......@@ -866,7 +866,7 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source,
UINT r;
size = MAX_PATH;
MSI_GetPropertyW(package->db, cszSourceDir, package_path, &size);
msi_get_property(package->db, cszSourceDir, package_path, &size);
lstrcatW(package_path, szBackSlash);
lstrcatW(package_path, source);
......
......@@ -585,7 +585,7 @@ static void msi_dialog_update_controls( msi_dialog *dialog, LPCWSTR property )
static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value )
{
UINT r = MSI_SetPropertyW( package->db, property, value );
UINT r = msi_set_property( package->db, property, value );
if (r == ERROR_SUCCESS && !strcmpW( property, cszSourceDir ))
msi_reset_folders( package, TRUE );
}
......@@ -3556,7 +3556,7 @@ static UINT msi_dialog_get_checkbox_state( msi_dialog *dialog,
WCHAR state[2] = { 0 };
DWORD sz = 2;
MSI_GetPropertyW( dialog->package->db, control->property, state, &sz );
msi_get_property( dialog->package->db, control->property, state, &sz );
return state[0] ? 1 : 0;
}
......@@ -4024,7 +4024,7 @@ static UINT error_dialog_handler(MSIPACKAGE *package, LPCWSTR event,
if ( !lstrcmpW( argument, error_abort ) || !lstrcmpW( argument, error_cancel ) ||
!lstrcmpW( argument, error_no ) )
{
MSI_SetPropertyW( package->db, result_prop, error_abort );
msi_set_property( package->db, result_prop, error_abort );
}
ControlEvent_CleanupSubscriptions(package);
......@@ -4100,7 +4100,7 @@ UINT msi_spawn_error_dialog( MSIPACKAGE *package, LPWSTR error_dialog, LPWSTR er
if ( r != ERROR_SUCCESS )
goto done;
r = MSI_GetPropertyW( package->db, result_prop, result, &size );
r = msi_get_property( package->db, result_prop, result, &size );
if ( r != ERROR_SUCCESS)
r = ERROR_SUCCESS;
......
......@@ -380,7 +380,7 @@ static UINT ControlEvent_DirectoryListUp(MSIPACKAGE *package, LPCWSTR argument,
static UINT ControlEvent_ReinstallMode(MSIPACKAGE *package, LPCWSTR argument,
msi_dialog *dialog)
{
return MSI_SetPropertyW( package->db, szReinstallMode, argument );
return msi_set_property( package->db, szReinstallMode, argument );
}
static UINT ControlEvent_Reinstall( MSIPACKAGE *package, LPCWSTR argument,
......@@ -413,7 +413,7 @@ static UINT ControlEvent_ValidateProductID(MSIPACKAGE *package, LPCWSTR argument
if (key && template)
{
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
ret = MSI_SetPropertyW( package->db, szProductID, key );
ret = msi_set_property( package->db, szProductID, key );
}
msi_free( template );
msi_free( key );
......
......@@ -270,14 +270,14 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
{
check_path = msi_dup_property( package->db, cszRootDrive );
if (set_prop)
MSI_SetPropertyW( package->db, cszTargetDir, check_path );
msi_set_property( package->db, cszTargetDir, check_path );
}
/* correct misbuilt target dir */
path = build_directory_name(2, check_path, NULL);
clean_spaces_from_path( path );
if (strcmpiW(path,check_path)!=0)
MSI_SetPropertyW( package->db, cszTargetDir, path );
msi_set_property( package->db, cszTargetDir, path );
msi_free(check_path);
f->ResolvedTarget = path;
......@@ -310,7 +310,7 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
TRACE(" internally set to %s\n",debugstr_w(path));
if (set_prop)
MSI_SetPropertyW( package->db, name, path );
msi_set_property( package->db, name, path );
return path;
}
......@@ -338,7 +338,7 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
f->ResolvedTarget = strdupW( path );
TRACE("target -> %s\n", debugstr_w(path));
if (set_prop)
MSI_SetPropertyW( package->db, name, path );
msi_set_property( package->db, name, path );
}
else
{
......
......@@ -1284,7 +1284,7 @@ UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel )
return MSI_SetFeatureStates( package );
sprintfW( level, fmt, iInstallLevel );
r = MSI_SetPropertyW( package->db, szInstallLevel, level );
r = msi_set_property( package->db, szInstallLevel, level );
if ( r == ERROR_SUCCESS )
r = MSI_SetFeatureStates( package );
......
......@@ -3535,10 +3535,10 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
if (r != ERROR_SUCCESS)
return r;
MSI_SetPropertyW( package->db, szReinstallMode, reinstallmode );
MSI_SetPropertyW( package->db, szInstalled, szOne );
MSI_SetPropertyW( package->db, szLogVerbose, szOne );
MSI_SetPropertyW( package->db, szReinstall, szFeature );
msi_set_property( package->db, szReinstallMode, reinstallmode );
msi_set_property( package->db, szInstalled, szOne );
msi_set_property( package->db, szLogVerbose, szOne );
msi_set_property( package->db, szReinstall, szFeature );
r = MSI_InstallPackage( package, sourcepath, NULL );
......
......@@ -746,9 +746,7 @@ extern UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel );
extern MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *, LPCWSTR );
extern UINT MSI_OpenPackageW( LPCWSTR szPackage, MSIPACKAGE **pPackage );
extern UINT MSI_SetTargetPathW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
extern UINT MSI_SetPropertyW( MSIDATABASE *, LPCWSTR, LPCWSTR );
extern INT MSI_ProcessMessage( MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD * );
extern UINT MSI_GetPropertyW( MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD );
extern MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *, LPCWSTR );
extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * );
extern UINT MSI_GetFeatureStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * );
......@@ -970,6 +968,8 @@ extern UINT ACTION_UnregisterProgIdInfo(MSIPACKAGE *package);
extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data );
extern LPWSTR msi_dup_record_field(MSIRECORD *row, INT index);
extern LPWSTR msi_dup_property( MSIDATABASE *db, LPCWSTR prop );
extern UINT msi_set_property( MSIDATABASE *, LPCWSTR, LPCWSTR );
extern UINT msi_get_property( MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD );
extern int msi_get_property_int( MSIDATABASE *package, LPCWSTR prop, int def );
extern LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
BOOL set_prop, BOOL load_prop, MSIFOLDER **folder);
......
......@@ -88,7 +88,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
newprop[0] = 0;
strcatW(newprop,productid);
r = MSI_SetPropertyW( package->db, action_property, newprop );
r = msi_set_property( package->db, action_property, newprop );
if (r == ERROR_SUCCESS && !strcmpW( action_property, cszSourceDir ))
msi_reset_folders( package, TRUE );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment