Mike McCormack : msi: Tidy up MsiCreateAndVerifyInstallerDirectory a bit.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 17 08:14:47 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 33ec7eb5e07c35d9d9806da9bf3aeb85269584de
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=33ec7eb5e07c35d9d9806da9bf3aeb85269584de

Author: Mike McCormack <mike at codeweavers.com>
Date:   Mon Jul 17 17:45:04 2006 +0900

msi: Tidy up MsiCreateAndVerifyInstallerDirectory a bit.

---

 dlls/msi/msi.c |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index d7741f5..241287c 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -1810,26 +1810,32 @@ UINT WINAPI MsiConfigureFeatureW(LPCWSTR
     return ERROR_SUCCESS;
 }
 
+/***********************************************************************
+ * MsiCreateAndVerifyInstallerDirectory [MSI.@]
+ *
+ * Notes: undocumented
+ */
 UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved)
 {
     WCHAR path[MAX_PATH];
 
-    if(dwReserved) {
-        FIXME("Don't know how to handle argument %ld\n", dwReserved);
-        return ERROR_CALL_NOT_IMPLEMENTED;
+    TRACE("%ld\n", dwReserved);
+
+    if (dwReserved)
+    {
+        FIXME("dwReserved=%ld\n", dwReserved);
+        return ERROR_INVALID_PARAMETER;
     }
 
-   if(!GetWindowsDirectoryW(path, MAX_PATH)) {
-        FIXME("GetWindowsDirectory failed unexpected! Error %ld\n",
-              GetLastError());
-        return ERROR_CALL_NOT_IMPLEMENTED;
-   }
+    if (!GetWindowsDirectoryW(path, MAX_PATH))
+        return ERROR_FUNCTION_FAILED;
 
-   strcatW(path, installerW);
+    lstrcatW(path, installerW);
 
-   CreateDirectoryW(path, NULL);
+    if (!CreateDirectoryW(path, NULL))
+        return ERROR_FUNCTION_FAILED;
 
-   return 0;
+    return ERROR_SUCCESS;
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list