MSI: add Language to MsiGetProductInfo

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

MSI: add Language to MsiGetProductInfo

Aric Stewart
add Language to the values we can query with MsiGetProductInfo


Index: dlls/msi/msi.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/msi.c,v
retrieving revision 1.86
diff -u -r1.86 msi.c
--- dlls/msi/msi.c 7 Jun 2005 20:02:07 -0000 1.86
+++ dlls/msi/msi.c 8 Jun 2005 16:23:06 -0000
@@ -517,6 +517,10 @@
         {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
     static const WCHAR szAssignmentType[] =
         {'A','s','s','i','g','n','m','e','n','t','T','y','p','e',0};
+    static const WCHAR szLanguage[] =
+        {'L','a','n','g','u','a','g','e',0};
+    static const WCHAR szProductLanguage[] =
+        {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
 
     FIXME("%s %s %p %p\n",debugstr_w(szProduct), debugstr_w(szAttribute),
           szBuffer, pcchValueBuf);
@@ -576,6 +580,15 @@
         if (pcchValueBuf)
             *pcchValueBuf = 1;
         r = ERROR_SUCCESS;
+    }
+    else if (strcmpW(szAttribute, szLanguage)==0)
+    {
+        r = MsiOpenProductW(szProduct, &hProduct);
+        if (ERROR_SUCCESS != r)
+            return r;
+
+        r = MsiGetPropertyW(hProduct, szProductLanguage, szBuffer, pcchValueBuf);
+        MsiCloseHandle(hProduct);
     }
     else
     {