Juan Lang : msi: Implement ACTION_AppSearchIni.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 20 06:20:24 CDT 2006


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

Author: Juan Lang <juan_lang at yahoo.com>
Date:   Wed Jul 19 10:42:50 2006 -0700

msi: Implement ACTION_AppSearchIni.

---

 dlls/msi/appsearch.c |   40 ++++++++++++++++++++++++++++++++++------
 1 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index 83f8e5b..598965e 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -444,7 +444,9 @@ static UINT ACTION_AppSearchIni(MSIPACKA
     if (rc == ERROR_SUCCESS)
     {
         MSIRECORD *row = 0;
-        LPWSTR fileName;
+        LPWSTR fileName, section, key;
+        int field, type;
+        WCHAR buf[MAX_PATH];
 
         rc = MSI_ViewExecute(view, 0);
         if (rc != ERROR_SUCCESS)
@@ -460,11 +462,37 @@ static UINT ACTION_AppSearchIni(MSIPACKA
             goto end;
         }
 
-        /* get file name */
-        fileName = msi_dup_record_field(row,2);
-        FIXME("AppSearch unimplemented for IniLocator (ini file name %s)\n",
-         debugstr_w(fileName));
-        msi_free( fileName);
+        fileName = msi_dup_record_field(row, 2);
+        section = msi_dup_record_field(row, 3);
+        key = msi_dup_record_field(row, 4);
+        if ((field = MSI_RecordGetInteger(row, 5)) == MSI_NULL_INTEGER)
+            field = 0;
+        if ((type = MSI_RecordGetInteger(row, 6)) == MSI_NULL_INTEGER)
+            type = 0;
+
+        GetPrivateProfileStringW(section, key, NULL, buf,
+         sizeof(buf) / sizeof(WCHAR), fileName);
+        if (buf[0])
+        {
+            switch (type & 0x0f)
+            {
+            case msidbLocatorTypeDirectory:
+                FIXME("unimplemented for type Directory (dir: %s)\n",
+                 debugstr_w(buf));
+                break;
+            case msidbLocatorTypeFileName:
+                FIXME("unimplemented for type File (file: %s)\n",
+                 debugstr_w(buf));
+                break;
+            case msidbLocatorTypeRawValue:
+                *appValue = strdupW(buf);
+                break;
+            }
+        }
+
+        msi_free(fileName);
+        msi_free(section);
+        msi_free(key);
 
 end:
         if (row)




More information about the wine-cvs mailing list