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

msi: Use a common function to validate a product ID.

parent ad4f747f
......@@ -6871,7 +6871,7 @@ static UINT ACTION_RemoveEnvironmentStrings( MSIPACKAGE *package )
return rc;
}
static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
UINT msi_validate_product_id( MSIPACKAGE *package )
{
LPWSTR key, template, id;
UINT r = ERROR_SUCCESS;
......@@ -6884,7 +6884,6 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
}
template = msi_dup_property( package->db, szPIDTemplate );
key = msi_dup_property( package->db, szPIDKEY );
if (key && template)
{
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
......@@ -6895,6 +6894,11 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
return r;
}
static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
{
return msi_validate_product_id( package );
}
static UINT ACTION_ScheduleReboot( MSIPACKAGE *package )
{
TRACE("\n");
......
......@@ -389,20 +389,7 @@ static UINT ControlEvent_Reinstall( MSIPACKAGE *package, LPCWSTR argument,
static UINT ControlEvent_ValidateProductID(MSIPACKAGE *package, LPCWSTR argument,
msi_dialog *dialog)
{
LPWSTR key, template;
UINT ret = ERROR_SUCCESS;
template = msi_dup_property( package->db, szPIDTemplate );
key = msi_dup_property( package->db, szPIDKEY );
if (key && template)
{
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
ret = msi_set_property( package->db, szProductID, key );
}
msi_free( template );
msi_free( key );
return ret;
return msi_validate_product_id( package );
}
static const WCHAR end_dialogW[] = {'E','n','d','D','i','a','l','o','g',0};
......
......@@ -786,6 +786,7 @@ extern INSTALLSTATE msi_get_component_action( MSIPACKAGE *package, MSICOMPONENT
extern INSTALLSTATE msi_get_feature_action( MSIPACKAGE *package, MSIFEATURE *feature ) DECLSPEC_HIDDEN;
extern UINT msi_load_all_components( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
extern UINT msi_load_all_features( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
extern UINT msi_validate_product_id( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
/* record internals */
extern void MSI_CloseRecord( MSIOBJECTHDR * ) DECLSPEC_HIDDEN;
......
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