Author: cwittich
Date: Sun Dec 6 15:55:00 2009
New Revision: 44440
URL:
http://svn.reactos.org/svn/reactos?rev=44440&view=rev
Log:
sync msi with wine 1.1.34
Modified:
trunk/reactos/dll/win32/msi/action.c
trunk/reactos/dll/win32/msi/automation.c
trunk/reactos/dll/win32/msi/install.c
trunk/reactos/dll/win32/msi/package.c
trunk/reactos/dll/win32/msi/select.c
trunk/reactos/dll/win32/msi/storages.c
trunk/reactos/dll/win32/msi/streams.c
trunk/reactos/dll/win32/msi/table.c
trunk/reactos/include/psdk/msiquery.h
Modified: trunk/reactos/dll/win32/msi/action.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/action.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msi/action.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/action.c [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -716,7 +716,6 @@
package->Context = MSIINSTALLCONTEXT_MACHINE;
}
- MSI_SetPropertyW(package, szAllUsers, szOne);
return ERROR_SUCCESS;
}
Modified: trunk/reactos/dll/win32/msi/automation.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/automation.c…
==============================================================================
--- trunk/reactos/dll/win32/msi/automation.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/automation.c [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -1498,7 +1498,7 @@
case REG_EXPAND_SZ:
if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString,
dwNewSize)))
ERR("ExpandEnvironmentStrings returned error %d\n",
GetLastError());
- else if (!(szNewString = msi_alloc(dwNewSize)))
+ else if (!(szNewString = msi_alloc(dwNewSize * sizeof(WCHAR))))
ERR("Out of memory\n");
else if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString,
dwNewSize)))
ERR("ExpandEnvironmentStrings returned error %d\n",
GetLastError());
Modified: trunk/reactos/dll/win32/msi/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/install.c?re…
==============================================================================
--- trunk/reactos/dll/win32/msi/install.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/install.c [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -717,19 +717,10 @@
/***********************************************************************
* MsiSetMode (MSI.@)
*/
-BOOL WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState)
-{
- switch (iRunMode)
- {
- case MSIRUNMODE_RESERVED11:
- case MSIRUNMODE_WINDOWS9X:
- case MSIRUNMODE_RESERVED14:
- case MSIRUNMODE_RESERVED15:
- return FALSE;
- default:
- FIXME("%d %d %d\n", hInstall, iRunMode, fState);
- }
- return TRUE;
+UINT WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState)
+{
+ FIXME("%d %d %d\n", hInstall, iRunMode, fState);
+ return ERROR_SUCCESS;
}
/***********************************************************************
Modified: trunk/reactos/dll/win32/msi/package.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/package.c?re…
==============================================================================
--- trunk/reactos/dll/win32/msi/package.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/package.c [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -345,7 +345,7 @@
WCHAR *ptr;
OSVERSIONINFOEXW OSVersion;
MEMORYSTATUSEX msex;
- DWORD verval;
+ DWORD verval, len;
WCHAR verstr[10], bufstr[20];
HDC dc;
HKEY hkey;
@@ -445,11 +445,12 @@
static const WCHAR szUserLangID[] =
{'U','s','e','r','L','a','n','g','u','a','g','e','I','D',0};
static const WCHAR szSystemLangID[] =
{'S','y','s','t','e','m','L','a','n','g','u','a','g','e','I','D',0};
static const WCHAR szProductState[] =
{'P','r','o','d','u','c','t','S','t','a','t','e',0};
+ static const WCHAR szLogonUser[] =
{'L','o','g','o','n','U','s','e','r',0};
/*
* Other things that probably should be set:
*
- * ComputerName LogonUser VirtualMemory
+ * ComputerName VirtualMemory
* ShellAdvSupport DefaultUIFont PackagecodeChanging
* CaptionHeight BorderTop BorderSide TextHeight
* RedirectedDllSupport
@@ -653,6 +654,18 @@
sprintfW(bufstr, szIntFormat, MsiQueryProductStateW(package->ProductCode));
MSI_SetPropertyW( package, szProductState, bufstr );
+
+ len = 0;
+ if (!GetUserNameW( NULL, &len ) && GetLastError() == ERROR_MORE_DATA)
+ {
+ WCHAR *username;
+ if ((username = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
+ {
+ if (GetUserNameW( username, &len ))
+ MSI_SetPropertyW( package, szLogonUser, username );
+ HeapFree( GetProcessHeap(), 0, username );
+ }
+ }
}
static UINT msi_load_summary_properties( MSIPACKAGE *package )
Modified: trunk/reactos/dll/win32/msi/select.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/select.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msi/select.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/select.c [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -368,12 +368,14 @@
NULL,
};
-static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name )
+static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name,
+ LPCWSTR table_name )
{
UINT r, n=0;
MSIVIEW *table;
- TRACE("%p adding %s\n", sv, debugstr_w( name ) );
+ TRACE("%p adding %s.%s\n", sv, debugstr_w( table_name ),
+ debugstr_w( name ));
if( sv->view.ops != &select_ops )
return ERROR_FUNCTION_FAILED;
@@ -389,7 +391,7 @@
if( sv->num_cols >= sv->max_cols )
return ERROR_FUNCTION_FAILED;
- r = VIEW_find_column( table, name, NULL, &n );
+ r = VIEW_find_column( table, name, table_name, &n );
if( r != ERROR_SUCCESS )
return r;
@@ -433,7 +435,7 @@
while( columns )
{
- r = SELECT_AddColumn( sv, columns->column );
+ r = SELECT_AddColumn( sv, columns->column, columns->table );
if( r )
break;
columns = columns->next;
Modified: trunk/reactos/dll/win32/msi/storages.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/storages.c?r…
==============================================================================
--- trunk/reactos/dll/win32/msi/storages.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/storages.c [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -296,6 +296,7 @@
static const WCHAR Name[] = {'N','a','m','e',0};
static const WCHAR Data[] = {'D','a','t','a',0};
+ static const WCHAR _Storages[] =
{'_','S','t','o','r','a','g','e','s',0};
TRACE("(%p, %d, %p, %p, %p, %p)\n", view, n, name, type, temporary,
table_name);
@@ -320,6 +321,16 @@
{
*name = strdupW(name_ptr);
if (!*name) return ERROR_FUNCTION_FAILED;
+ }
+
+ if (table_name)
+ {
+ *table_name = strdupW(_Storages);
+ if (!*table_name)
+ {
+ msi_free(name);
+ return ERROR_FUNCTION_FAILED;
+ }
}
if (temporary)
Modified: trunk/reactos/dll/win32/msi/streams.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/streams.c?re…
==============================================================================
--- trunk/reactos/dll/win32/msi/streams.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/streams.c [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -262,6 +262,7 @@
static const WCHAR Name[] = {'N','a','m','e',0};
static const WCHAR Data[] = {'D','a','t','a',0};
+ static const WCHAR _Streams[] =
{'_','S','t','r','e','a','m','s',0};
TRACE("(%p, %d, %p, %p, %p, %p)\n", view, n, name, type, temporary,
table_name);
@@ -286,6 +287,16 @@
{
*name = strdupW(name_ptr);
if (!*name) return ERROR_FUNCTION_FAILED;
+ }
+
+ if (table_name)
+ {
+ *table_name = strdupW(_Streams);
+ if (!*table_name)
+ {
+ msi_free(name);
+ return ERROR_FUNCTION_FAILED;
+ }
}
if (temporary)
Modified: trunk/reactos/dll/win32/msi/table.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/table.c?rev=…
==============================================================================
--- trunk/reactos/dll/win32/msi/table.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/table.c [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -1201,7 +1201,7 @@
switch( n )
{
case 2:
- sprintfW( number, fmt, ival^0x8000 );
+ sprintfW( number, fmt, ival-0x8000 );
break;
case 4:
sprintfW( number, fmt, ival^0x80000000 );
@@ -2573,7 +2573,7 @@
case 2:
val = read_raw_int(rawdata, ofs, n);
if (val)
- MSI_RecordSetInteger( rec, i+1, val^0x8000 );
+ MSI_RecordSetInteger( rec, i+1, val-0x8000 );
TRACE(" field %d [0x%04x]\n", i+1, val );
break;
case 4:
Modified: trunk/reactos/include/psdk/msiquery.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msiquery.h?re…
==============================================================================
--- trunk/reactos/include/psdk/msiquery.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/msiquery.h [iso-8859-1] Sun Dec 6 15:55:00 2009
@@ -301,7 +301,7 @@
UINT WINAPI MsiEnableUIPreview(MSIHANDLE, MSIHANDLE*);
BOOL WINAPI MsiGetMode(MSIHANDLE, MSIRUNMODE);
-BOOL WINAPI MsiSetMode(MSIHANDLE, MSIRUNMODE, BOOL);
+UINT WINAPI MsiSetMode(MSIHANDLE, MSIRUNMODE, BOOL);
UINT WINAPI MsiViewModify(MSIHANDLE, MSIMODIFY, MSIHANDLE);