James Hawkins : msi: Forward MsiApplyPatchA to MsiApplyPatchW.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 18 08:04:59 CDT 2007


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

Author: James Hawkins <truiken at gmail.com>
Date:   Fri Jun 15 14:04:04 2007 -0700

msi: Forward MsiApplyPatchA to MsiApplyPatchW.

---

 dlls/msi/msi.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index a09984e..ad9c5b4 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -226,9 +226,31 @@ UINT WINAPI MsiReinstallProductW(LPCWSTR szProduct, DWORD dwReinstallMode)
 UINT WINAPI MsiApplyPatchA(LPCSTR szPatchPackage, LPCSTR szInstallPackage,
         INSTALLTYPE eInstallType, LPCSTR szCommandLine)
 {
-    FIXME("%s %s %d %s\n", debugstr_a(szPatchPackage), debugstr_a(szInstallPackage),
+    LPWSTR patch_package = NULL;
+    LPWSTR install_package = NULL;
+    LPWSTR command_line = NULL;
+    UINT r = ERROR_OUTOFMEMORY;
+
+    TRACE("%s %s %d %s\n", debugstr_a(szPatchPackage), debugstr_a(szInstallPackage),
           eInstallType, debugstr_a(szCommandLine));
-    return ERROR_CALL_NOT_IMPLEMENTED;
+
+    if (szPatchPackage && !(patch_package = strdupAtoW(szPatchPackage)))
+        goto done;
+
+    if (szInstallPackage && !(install_package = strdupAtoW(szInstallPackage)))
+        goto done;
+
+    if (szCommandLine && !(command_line = strdupAtoW(szCommandLine)))
+        goto done;
+
+    r = MsiApplyPatchW(patch_package, install_package, eInstallType, command_line);
+
+done:
+    msi_free(patch_package);
+    msi_free(install_package);
+    msi_free(command_line);
+
+    return r;
 }
 
 UINT WINAPI MsiApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szInstallPackage,




More information about the wine-cvs mailing list