James Hawkins : msi: Enumerate the current user' s patches if szUserSid is NULL.

Alexandre Julliard julliard at winehq.org
Mon Mar 23 12:34:54 CDT 2009


Module: wine
Branch: master
Commit: f7c615b188d5a9839746b709e8558d3334bf6f5b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f7c615b188d5a9839746b709e8558d3334bf6f5b

Author: James Hawkins <truiken at gmail.com>
Date:   Sun Mar 22 14:30:03 2009 -0700

msi: Enumerate the current user's patches if szUserSid is NULL.

---

 dlls/msi/registry.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index 57d30d7..ff0eee1 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -1883,8 +1883,15 @@ static UINT msi_enum_patches(LPCWSTR szProductCode, LPCWSTR szUserSid,
         MSIINSTALLCONTEXT *pdwTargetProductContext, LPWSTR szTargetUserSid,
         LPDWORD pcchTargetUserSid, LPWSTR *szTransforms)
 {
+    LPWSTR usersid = NULL;
     UINT r = ERROR_INVALID_PARAMETER;
 
+    if (!szUserSid)
+    {
+        get_user_sid(&usersid);
+        szUserSid = usersid;
+    }
+
     if (dwContext & MSIINSTALLCONTEXT_USERMANAGED)
     {
         r = msi_check_product_patches(szProductCode, szUserSid,
@@ -1922,6 +1929,7 @@ static UINT msi_enum_patches(LPCWSTR szProductCode, LPCWSTR szUserSid,
     }
 
 done:
+    LocalFree(usersid);
     return r;
 }
 




More information about the wine-cvs mailing list