aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.Native/Msi/Database.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/WixToolset.Core.Native/Msi/Database.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/WixToolset.Core.Native/Msi/Database.cs b/src/WixToolset.Core.Native/Msi/Database.cs
index a44e8cf9..b9c5c35b 100644
--- a/src/WixToolset.Core.Native/Msi/Database.cs
+++ b/src/WixToolset.Core.Native/Msi/Database.cs
@@ -3,7 +3,6 @@
3namespace WixToolset.Core.Native.Msi 3namespace WixToolset.Core.Native.Msi
4{ 4{
5 using System; 5 using System;
6 using System.Globalization;
7 using System.IO; 6 using System.IO;
8 using System.Threading; 7 using System.Threading;
9 8
@@ -44,10 +43,9 @@ namespace WixToolset.Core.Native.Msi
44 var conditions = TransformErrorConditions.None; 43 var conditions = TransformErrorConditions.None;
45 using (var summaryInfo = new SummaryInformation(transformFile)) 44 using (var summaryInfo = new SummaryInformation(transformFile))
46 { 45 {
47 var value = summaryInfo.GetProperty((int)SummaryInformation.Transform.ValidationFlags);
48 try 46 try
49 { 47 {
50 var validationFlags = Int32.Parse(value, CultureInfo.InvariantCulture); 48 var validationFlags = summaryInfo.GetNumericProperty(SummaryInformation.Transform.ValidationFlags);
51 conditions = (TransformErrorConditions)(validationFlags & 0xffff); 49 conditions = (TransformErrorConditions)(validationFlags & 0xffff);
52 } 50 }
53 catch (FormatException) 51 catch (FormatException)
@@ -192,13 +190,20 @@ namespace WixToolset.Core.Native.Msi
192 /// </summary> 190 /// </summary>
193 /// <param name="mergeDatabase">The database to merge into the base database.</param> 191 /// <param name="mergeDatabase">The database to merge into the base database.</param>
194 /// <param name="tableName">The name of the table to receive merge conflict information.</param> 192 /// <param name="tableName">The name of the table to receive merge conflict information.</param>
195 public void Merge(Database mergeDatabase, string tableName) 193 /// <returns>True if there were merge conflicts, otherwise false.</returns>
194 public bool Merge(Database mergeDatabase, string tableName)
196 { 195 {
197 var error = MsiInterop.MsiDatabaseMerge(this.Handle, mergeDatabase.Handle, tableName); 196 var error = MsiInterop.MsiDatabaseMerge(this.Handle, mergeDatabase.Handle, tableName);
198 if (0 != error) 197 if (error == 1627)
198 {
199 return true;
200 }
201 else if (error != 0)
199 { 202 {
200 throw new MsiException(error); 203 throw new MsiException(error);
201 } 204 }
205
206 return false;
202 } 207 }
203 208
204 /// <summary> 209 /// <summary>