[2/5] msi: Store the patch state in the registry.

Hans Leidekker hans at codeweavers.com
Tue Jul 20 07:54:34 CDT 2010


---
 dlls/msi/action.c  |    5 +++++
 dlls/msi/msipriv.h |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 7ae8286..1300c65 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -567,6 +567,7 @@ UINT msi_apply_patch_db( MSIPACKAGE *package, MSIDATABASE *patch_db, MSIPATCHINF
      */
     append_storage_to_db( package->db, patch_db->storage );
 
+    patch->state = MSIPATCHSTATE_APPLIED;
     list_add_tail( &package->patches, &patch->entry );
     return ERROR_SUCCESS;
 }
@@ -3879,6 +3880,10 @@ static UINT msi_publish_patches( MSIPACKAGE *package, HKEY prodkey )
             goto done;
 
         res = RegCreateKeyExW( product_patches_key, patch_squashed, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &patch_key, NULL );
+        if (res != ERROR_SUCCESS)
+            goto done;
+
+        res = RegSetValueExW( patch_key, szState, 0, REG_DWORD, (const BYTE *)&patch->state, sizeof(patch->state) );
         RegCloseKey( patch_key );
         if (res != ERROR_SUCCESS)
             goto done;
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index d1e8113..8e978cc 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -153,6 +153,7 @@ typedef struct tagMSIPATCHINFO
     LPWSTR patchcode;
     LPWSTR transforms;
     LPWSTR localfile;
+    MSIPATCHSTATE state;
 } MSIPATCHINFO;
 
 typedef struct _column_info
-- 
1.7.0.4







More information about the wine-patches mailing list