* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include <stdarg.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "msi.h"
+#include <windef.h>
+//#include "winbase.h"
+#include <wingdi.h>
+//#include "winuser.h"
+//#include "winnls.h"
+//#include "msi.h"
#include "msipriv.h"
-#include "msidefs.h"
-#include "ocidl.h"
-#include "olectl.h"
-#include "richedit.h"
-#include "commctrl.h"
-#include "winreg.h"
-#include "shlwapi.h"
-#include "msiserver.h"
-
-#include "wine/debug.h"
-#include "wine/unicode.h"
+//#include "msidefs.h"
+//#include "ocidl.h"
+#include <olectl.h>
+#include <richedit.h>
+#include <commctrl.h>
+#include <winreg.h>
+#include <shlwapi.h>
+#include <msiserver.h>
+
+#include <wine/debug.h>
+#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(msi);
/* create a font and add it to the list */
name = MSI_RecordGetString( rec, 1 );
- font = msi_alloc( sizeof *font + strlenW( name )*sizeof (WCHAR) );
+ font = msi_alloc( FIELD_OFFSET( msi_font, name[strlenW( name ) + 1] ));
strcpyW( font->name, name );
list_add_head( &dialog->fonts, &font->entry );
style |= WS_CHILD;
- control = msi_alloc( sizeof *control + strlenW(name)*sizeof(WCHAR) );
+ control = msi_alloc( FIELD_OFFSET( msi_control, name[strlenW( name ) + 1] ));
if (!control)
return NULL;
static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value )
{
- UINT r = msi_set_property( package->db, property, value );
+ UINT r = msi_set_property( package->db, property, value, -1 );
if (r == ERROR_SUCCESS && !strcmpW( property, szSourceDir ))
msi_reset_folders( package, TRUE );
}
TRACE("progress: func %u val1 %u val2 %u\n", func, val1, val2);
+ units = val1 / 512;
switch (func)
{
case 0: /* init */
SendMessageW( ctrl->hwnd, PBM_SETRANGE, 0, MAKELPARAM(0,100) );
- units = val1 / 512;
if (val2)
{
ctrl->progress_max = units ? units : 100;
SendMessageW( ctrl->hwnd, PBM_SETPOS, 0, 0 );
}
break;
- case 1: /* FIXME: not sure what this is supposed to do */
+ case 1: /* action data increment */
+ if (val2) dialog->package->action_progress_increment = val1;
+ else dialog->package->action_progress_increment = 0;
break;
case 2: /* move */
- units = val1 / 512;
if (ctrl->progress_backwards)
{
if (units >= ctrl->progress_current) ctrl->progress_current -= units;
}
SendMessageW( ctrl->hwnd, PBM_SETPOS, MulDiv(100, ctrl->progress_current, ctrl->progress_max), 0 );
break;
+ case 3: /* add */
+ ctrl->progress_max += units;
+ break;
default:
FIXME("Unknown progress message %u\n", func);
break;
if ( !strcmpW( argument, error_abort ) || !strcmpW( argument, error_cancel ) ||
!strcmpW( argument, error_no ) )
{
- msi_set_property( package->db, result_prop, error_abort );
+ msi_set_property( package->db, result_prop, error_abort, -1 );
}
ControlEvent_CleanupSubscriptions(package);
'M','S','I','E','r','r','o','r','D','i','a','l','o','g','R','e','s','u','l','t',0
};
- if ( (msi_get_property_int( package->db, szUILevel, 0 ) & INSTALLUILEVEL_MASK) == INSTALLUILEVEL_NONE )
- return ERROR_SUCCESS;
+ if ((package->ui_level & INSTALLUILEVEL_MASK) == INSTALLUILEVEL_NONE) return ERROR_SUCCESS;
if ( !error_dialog )
{