/* 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 );
}
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);