MSI: MsiGetProperty should return empty strings on error

Mike McCormack mike at codeweavers.com
Sat Jul 3 20:36:25 CDT 2004


ChangeLog:
<aric at codeweavers.com>
* MsiGetProperty should return empty strings on error
-------------- next part --------------
diff -ur dlls/msi.old/package.c dlls/msi/package.c
--- dlls/msi.old/package.c	2004-07-03 20:33:42.000000000 -0500
+++ dlls/msi/package.c	2004-07-03 20:34:12.000000000 -0500
@@ -576,6 +576,12 @@
             goto end;
     }
 
+    if(  *pchValueBuf > 0 )
+    {
+        /* be sure to blank the string first */
+        szValueBuf[0]=0;      
+    }
+
     hr = MsiGetPropertyW( hInstall, szwName, szwValueBuf, pchValueBuf );
 
     if(  *pchValueBuf > 0 )
@@ -624,7 +630,11 @@
     {
         DWORD sz;
         WCHAR value[0x100];
-
+    
+        /* even on unsuccessful lookup native msi blanks this string */
+        if (*pchValueBuf > 0)
+            szValueBuf[0] = 0;
+            
         rc = MsiViewExecute(view, 0);
         if (rc != ERROR_SUCCESS)
         {


More information about the wine-patches mailing list