- Merge from trunk
[reactos.git] / dll / win32 / msi / suminfo.c
index df35c4d..2a9cd71 100644 (file)
@@ -86,9 +86,6 @@ static HRESULT (WINAPI *pPropVariantChangeType)
 
 #define SECT_HDR_SIZE (sizeof(PROPERTYSECTIONHEADER))
 
-static const WCHAR szSumInfo[] = { 5 ,'S','u','m','m','a','r','y',
-                       'I','n','f','o','r','m','a','t','i','o','n',0 };
-
 static void free_prop( PROPVARIANT *prop )
 {
     if (prop->vt == VT_LPSTR )
@@ -472,7 +469,7 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
     if( !pHandle )
         return ERROR_INVALID_PARAMETER;
 
-    if( szDatabase )
+    if( szDatabase && szDatabase[0] )
     {
         LPCWSTR persist = uiUpdateCount ? MSIDBOPEN_TRANSACT : MSIDBOPEN_READONLY;
 
@@ -647,6 +644,18 @@ LPWSTR msi_suminfo_dup_string( MSISUMMARYINFO *si, UINT uiProperty )
     return strdupAtoW( prop->u.pszVal );
 }
 
+INT msi_suminfo_get_int32( MSISUMMARYINFO *si, UINT uiProperty )
+{
+    PROPVARIANT *prop;
+
+    if ( uiProperty >= MSI_MAX_PROPS )
+        return -1;
+    prop = &si->property[uiProperty];
+    if( prop->vt != VT_I4 )
+        return -1;
+    return prop->u.lVal;
+}
+
 LPWSTR msi_get_suminfo_product( IStorage *stg )
 {
     MSISUMMARYINFO *si;