* Sync with Wine 1.7.17.
CORE-8080
svn path=/trunk/; revision=62918
enum parse_state state = state_quote;
const WCHAR *p;
WCHAR *out = value;
- int ignore, in_quotes = 0, count = 0, len = 0;
+ BOOL ignore, in_quotes = FALSE;
+ int count = 0, len = 0;
for (p = str; *p; p++)
{
- ignore = 0;
+ ignore = FALSE;
switch (state)
{
case state_whitespace:
switch (*p)
{
case ' ':
- in_quotes = 1;
- ignore = 1;
+ in_quotes = TRUE;
+ ignore = TRUE;
len++;
break;
case '"':
break;
default:
state = state_token;
- in_quotes = 1;
+ in_quotes = TRUE;
len++;
break;
}
case ' ':
state = state_whitespace;
if (!count) goto done;
- in_quotes = 1;
+ in_quotes = TRUE;
len++;
break;
default:
- if (!count) in_quotes = 0;
- else in_quotes = 1;
+ if (!count) in_quotes = FALSE;
+ else in_quotes = TRUE;
len++;
break;
}
case ' ':
state = state_whitespace;
if (!count || (count > 1 && !len)) goto done;
- in_quotes = 1;
+ in_quotes = TRUE;
len++;
break;
default:
state = state_token;
- if (!count) in_quotes = 0;
- else in_quotes = 1;
+ if (!count) in_quotes = FALSE;
+ else in_quotes = TRUE;
len++;
break;
}
UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
{
- LPWSTR source, check;
+ WCHAR *source, *check, *p, *db;
+ DWORD len;
- if (msi_get_property_int( package->db, szInstalled, 0 ))
- {
- HKEY hkey;
+ if (!(db = msi_dup_property( package->db, szOriginalDatabase )))
+ return ERROR_OUTOFMEMORY;
- MSIREG_OpenInstallProps( package->ProductCode, package->Context, NULL, &hkey, FALSE );
- source = msi_reg_get_val_str( hkey, INSTALLPROPERTY_INSTALLSOURCEW );
- RegCloseKey( hkey );
- }
- else
+ if (!(p = strrchrW( db, '\\' )) && !(p = strrchrW( db, '/' )))
{
- LPWSTR p, db;
- DWORD len;
-
- db = msi_dup_property( package->db, szOriginalDatabase );
- if (!db)
- return ERROR_OUTOFMEMORY;
-
- p = strrchrW( db, '\\' );
- if (!p)
- {
- p = strrchrW( db, '/' );
- if (!p)
- {
- msi_free(db);
- return ERROR_SUCCESS;
- }
- }
-
- len = p - db + 2;
- source = msi_alloc( len * sizeof(WCHAR) );
- lstrcpynW( source, db, len );
- msi_free( db );
+ msi_free(db);
+ return ERROR_SUCCESS;
}
+ len = p - db + 2;
+ source = msi_alloc( len * sizeof(WCHAR) );
+ lstrcpynW( source, db, len );
+ msi_free( db );
check = msi_dup_property( package->db, szSourceDir );
if (!check || replace)
component->anyAbsent = 1;
break;
case INSTALLSTATE_ADVERTISED:
- component->hasAdvertiseFeature = 1;
+ component->hasAdvertisedFeature = 1;
break;
case INSTALLSTATE_SOURCE:
component->hasSourceFeature = 1;
break;
case INSTALLSTATE_DEFAULT:
if (feature->Attributes & msidbFeatureAttributesFavorAdvertise)
- component->hasAdvertiseFeature = 1;
+ component->hasAdvertisedFeature = 1;
else if (feature->Attributes & msidbFeatureAttributesFavorSource)
component->hasSourceFeature = 1;
else
component->ActionRequest = INSTALLSTATE_SOURCE;
continue;
}
- if (component->hasAdvertiseFeature)
+ if (component->hasAdvertisedFeature)
{
component->Action = INSTALLSTATE_ADVERTISED;
component->ActionRequest = INSTALLSTATE_ADVERTISED;
static UINT ACTION_InstallInitialize(MSIPACKAGE *package)
{
- package->script->CurrentlyScripting = TRUE;
-
return ERROR_SUCCESS;
}
if (comp->num_clients <= 0)
{
if (package->Context == MSIINSTALLCONTEXT_MACHINE)
- MSIREG_DeleteUserDataComponentKey( comp->ComponentId, szLocalSid );
+ rc = MSIREG_DeleteUserDataComponentKey( comp->ComponentId, szLocalSid );
else
- MSIREG_DeleteUserDataComponentKey( comp->ComponentId, NULL );
+ rc = MSIREG_DeleteUserDataComponentKey( comp->ComponentId, NULL );
+
+ if (rc != ERROR_SUCCESS) WARN( "failed to delete component key %u\n", rc );
+ }
+ else
+ {
+ LONG res;
+
+ if (package->Context == MSIINSTALLCONTEXT_MACHINE)
+ rc = MSIREG_OpenUserDataComponentKey( comp->ComponentId, szLocalSid, &hkey, FALSE );
+ else
+ rc = MSIREG_OpenUserDataComponentKey( comp->ComponentId, NULL, &hkey, FALSE );
+
+ if (rc != ERROR_SUCCESS)
+ {
+ WARN( "failed to open component key %u\n", rc );
+ continue;
+ }
+ res = RegDeleteValueW( hkey, squished_pc );
+ RegCloseKey(hkey);
+ if (res) WARN( "failed to delete component value %d\n", res );
}
}
filename = msi_dup_record_field( row, 3 );
msi_reduce_to_long_filename( filename );
- extension = strchrW( filename, '.' );
+ extension = strrchrW( filename, '.' );
if (!extension || strcmpiW( extension, szlnk ))
{
int len = strlenW( filename );
UINT rc;
WCHAR *remove;
- /* turn off scheduling */
- package->script->CurrentlyScripting= FALSE;
-
/* first do the same as an InstallExecute */
rc = ACTION_InstallExecute(package);
if (rc != ERROR_SUCCESS)
ERR("Query failed\n");
goto done;
}
- key = MSI_RecordGetString(row, 6);
+ if (!(key = MSI_RecordGetString(row, 6)))
+ {
+ msiobj_release(&row->hdr);
+ goto done;
+ }
file = msi_get_loaded_file(package, key);
msiobj_release(&row->hdr);
if (!file)
else
rc = ACTION_ProcessExecSequence(package, FALSE);
- package->script->CurrentlyScripting = FALSE;
-
/* process the ending type action */
if (rc == ERROR_SUCCESS)
ACTION_PerformActionSequence(package, -1);
cls->Feature = msi_get_loaded_feature(package, buffer);
cls->Attributes = MSI_RecordGetInteger(row,13);
-
+ cls->action = INSTALLSTATE_UNKNOWN;
return cls;
}
buffer = MSI_RecordGetString(row,5);
ext->Feature = msi_get_loaded_feature( package, buffer );
-
+ ext->action = INSTALLSTATE_UNKNOWN;
return ext;
}
return load_all_mimes( package );
}
-static void mark_progid_for_install( MSIPACKAGE* package, MSIPROGID *progid )
-{
- MSIPROGID *child;
-
- if (!progid)
- return;
-
- if (progid->InstallMe)
- return;
-
- progid->InstallMe = TRUE;
-
- /* all children if this is a parent also install */
- LIST_FOR_EACH_ENTRY( child, &package->progids, MSIPROGID, entry )
- {
- if (child->Parent == progid)
- mark_progid_for_install( package, child );
- }
-}
-
-static void mark_progid_for_uninstall( MSIPACKAGE *package, MSIPROGID *progid )
-{
- MSIPROGID *child;
-
- if (!progid)
- return;
-
- if (!progid->InstallMe)
- return;
-
- progid->InstallMe = FALSE;
-
- LIST_FOR_EACH_ENTRY( child, &package->progids, MSIPROGID, entry )
- {
- if (child->Parent == progid)
- mark_progid_for_uninstall( package, child );
- }
-}
-
-static void mark_mime_for_install( MSIMIME *mime )
-{
- if (!mime)
- return;
- mime->InstallMe = TRUE;
-}
-
-static void mark_mime_for_uninstall( MSIMIME *mime )
-{
- if (!mime)
- return;
- mime->InstallMe = FALSE;
-}
-
static UINT register_appid(const MSIAPPID *appid, LPCWSTR app )
{
static const WCHAR szRemoteServerName[] =
}
TRACE("Registering class %s (%p)\n", debugstr_w(cls->clsid), cls);
- cls->Installed = TRUE;
- mark_progid_for_install( package, cls->ProgID );
+ cls->action = INSTALLSTATE_LOCAL;
RegCreateKeyW( hkey, cls->clsid, &hkey2 );
}
TRACE("Unregistering class %s (%p)\n", debugstr_w(cls->clsid), cls);
- cls->Installed = FALSE;
- mark_progid_for_uninstall( package, cls->ProgID );
+ cls->action = INSTALLSTATE_ABSENT;
res = RegDeleteTreeW( hkey, cls->clsid );
if (res != ERROR_SUCCESS)
return rc;
}
+static const MSICLASS *get_progid_class( const MSIPROGID *progid )
+{
+ while (progid)
+ {
+ if (progid->Parent) progid = progid->Parent;
+ if (progid->Class) return progid->Class;
+ if (!progid->Parent || progid->Parent == progid) break;
+ }
+ return NULL;
+}
+
+static BOOL has_class_installed( const MSIPROGID *progid )
+{
+ const MSICLASS *class = get_progid_class( progid );
+ if (!class || !class->ProgID) return FALSE;
+ return (class->action == INSTALLSTATE_LOCAL);
+}
+
+static BOOL has_one_extension_installed( const MSIPACKAGE *package, const MSIPROGID *progid )
+{
+ const MSIEXTENSION *extension;
+ LIST_FOR_EACH_ENTRY( extension, &package->extensions, MSIEXTENSION, entry )
+ {
+ if (extension->ProgID == progid && !list_empty( &extension->verbs ) &&
+ extension->action == INSTALLSTATE_LOCAL) return TRUE;
+ }
+ return FALSE;
+}
+
UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
{
MSIPROGID *progid;
LIST_FOR_EACH_ENTRY( progid, &package->progids, MSIPROGID, entry )
{
- /* check if this progid is to be installed */
- if (progid->Class && progid->Class->Installed)
- progid->InstallMe = TRUE;
-
- if (!progid->InstallMe)
+ if (!has_class_installed( progid ) && !has_one_extension_installed( package, progid ))
{
- TRACE("progid %s not scheduled to be installed\n",
- debugstr_w(progid->ProgID));
+ TRACE("progid %s not scheduled to be installed\n", debugstr_w(progid->ProgID));
continue;
}
-
TRACE("Registering progid %s\n", debugstr_w(progid->ProgID));
register_progid( progid );
return ERROR_SUCCESS;
}
+static BOOL has_class_removed( const MSIPROGID *progid )
+{
+ const MSICLASS *class = get_progid_class( progid );
+ if (!class || !class->ProgID) return FALSE;
+ return (class->action == INSTALLSTATE_ABSENT);
+}
+
+static BOOL has_extensions( const MSIPACKAGE *package, const MSIPROGID *progid )
+{
+ const MSIEXTENSION *extension;
+ LIST_FOR_EACH_ENTRY( extension, &package->extensions, MSIEXTENSION, entry )
+ {
+ if (extension->ProgID == progid && !list_empty( &extension->verbs )) return TRUE;
+ }
+ return FALSE;
+}
+
+static BOOL has_all_extensions_removed( const MSIPACKAGE *package, const MSIPROGID *progid )
+{
+ BOOL ret = FALSE;
+ const MSIEXTENSION *extension;
+ LIST_FOR_EACH_ENTRY( extension, &package->extensions, MSIEXTENSION, entry )
+ {
+ if (extension->ProgID == progid && !list_empty( &extension->verbs ) &&
+ extension->action == INSTALLSTATE_ABSENT) ret = TRUE;
+ else ret = FALSE;
+ }
+ return ret;
+}
+
UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
{
MSIPROGID *progid;
LIST_FOR_EACH_ENTRY( progid, &package->progids, MSIPROGID, entry )
{
- /* check if this progid is to be removed */
- if (progid->Class && !progid->Class->Installed)
- progid->InstallMe = FALSE;
-
- if (progid->InstallMe)
+ if (!has_class_removed( progid ) ||
+ (has_extensions( package, progid ) && !has_all_extensions_removed( package, progid )))
{
TRACE("progid %s not scheduled to be removed\n", debugstr_w(progid->ProgID));
continue;
}
-
TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID));
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID );
}
TRACE("Registering extension %s (%p)\n", debugstr_w(ext->Extension), ext);
- ext->Installed = TRUE;
-
- /* this is only registered if the extension has at least 1 verb
- * according to MSDN
- */
- if (ext->ProgID && !list_empty( &ext->verbs ) )
- mark_progid_for_install( package, ext->ProgID );
-
- mark_mime_for_install(ext->Mime);
+ ext->action = INSTALLSTATE_LOCAL;
extension = msi_alloc( (strlenW( ext->Extension ) + 2) * sizeof(WCHAR) );
if (extension)
}
TRACE("Unregistering extension %s\n", debugstr_w(ext->Extension));
- ext->Installed = FALSE;
-
- if (ext->ProgID && !list_empty( &ext->verbs ))
- mark_progid_for_uninstall( package, ext->ProgID );
-
- mark_mime_for_uninstall( ext->Mime );
+ ext->action = INSTALLSTATE_ABSENT;
extension = msi_alloc( (strlenW( ext->Extension ) + 2) * sizeof(WCHAR) );
if (extension)
* check if the MIME is to be installed. Either as requested by an
* extension or Class
*/
- mt->InstallMe = (mt->InstallMe ||
- (mt->Class && mt->Class->Installed) ||
- (mt->Extension && mt->Extension->Installed));
-
- if (!mt->InstallMe)
+ if ((!mt->Class || mt->Class->action != INSTALLSTATE_LOCAL) &&
+ mt->Extension->action != INSTALLSTATE_LOCAL)
{
TRACE("MIME %s not scheduled to be installed\n", debugstr_w(mt->ContentType));
continue;
LONG res;
LPWSTR mime_key;
- mime->InstallMe = (mime->InstallMe ||
- (mime->Class && mime->Class->Installed) ||
- (mime->Extension && mime->Extension->Installed));
-
- if (mime->InstallMe)
+ if ((!mime->Class || mime->Class->action != INSTALLSTATE_ABSENT) &&
+ mime->Extension->action != INSTALLSTATE_ABSENT)
{
TRACE("MIME %s not scheduled to be removed\n", debugstr_w(mime->ContentType));
continue;
DWORD sz = MAX_PATH, write;
UINT r;
- if (msi_get_property(package->db, szTempFolder, fmt, &sz) != ERROR_SUCCESS)
- GetTempPathW(MAX_PATH, fmt);
+ if (msi_get_property(package->db, szTempFolder, fmt, &sz) != ERROR_SUCCESS ||
+ GetFileAttributesW(fmt) == INVALID_FILE_ATTRIBUTES) GetTempPathW(MAX_PATH, fmt);
if (!GetTempFileNameW( fmt, szMsi, 0, tmpfile ))
{
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','B','i' ,'n','a','r','y','`',' ','W','H','E','R','E',' ',
'`','N','a','m','e','`',' ','=',' ','\'','%','s','\'',0};
- MSIRECORD *row = 0;
+ MSIRECORD *row = NULL;
msi_custom_action_info *info;
CHAR *buffer = NULL;
WCHAR *bufferw = NULL;
return ERROR_FUNCTION_FAILED;
r = MSI_RecordReadStream(row, 2, NULL, &sz);
- if (r != ERROR_SUCCESS) return r;
+ if (r != ERROR_SUCCESS) goto done;
buffer = msi_alloc( sz + 1 );
- if (!buffer) return ERROR_FUNCTION_FAILED;
+ if (!buffer)
+ {
+ r = ERROR_FUNCTION_FAILED;
+ goto done;
+ }
r = MSI_RecordReadStream(row, 2, buffer, &sz);
if (r != ERROR_SUCCESS)
done:
msi_free(bufferw);
msi_free(buffer);
+ msiobj_release(&row->hdr);
return r;
}
MSIRECORD *rec, LPCWSTR szCls, DWORD style )
{
DWORD attributes;
- LPCWSTR text, name;
+ const WCHAR *text = NULL, *name, *control_type;
DWORD exstyle = 0;
name = MSI_RecordGetString( rec, 2 );
+ control_type = MSI_RecordGetString( rec, 3 );
attributes = MSI_RecordGetInteger( rec, 8 );
- text = MSI_RecordGetString( rec, 10 );
+ if (strcmpW( control_type, szScrollableText )) text = MSI_RecordGetString( rec, 10 );
TRACE("%s, %s, %08x, %s, %08x\n", debugstr_w(szCls), debugstr_w(name),
attributes, debugstr_w(text), style);
val = msi_alloc( (info->num_chars+1)*sizeof(WCHAR) );
for( i=0, n=0; i<info->num_groups; i++ )
{
- if( (info->group[i].len + n) > info->num_chars )
+ if (info->group[i].len == ~0u)
{
- ERR("can't fit control %d text into template\n",i);
- break;
- }
- if (!msi_mask_editable(info->group[i].type))
- {
- for(r=0; r<info->group[i].len; r++)
- val[n+r] = info->group[i].type;
- val[n+r] = 0;
+ UINT len = SendMessageW( info->group[i].hwnd, WM_GETTEXTLENGTH, 0, 0 );
+ val = msi_realloc( val, (len + 1) * sizeof(WCHAR) );
+ GetWindowTextW( info->group[i].hwnd, val, len + 1 );
}
else
{
- r = GetWindowTextW( info->group[i].hwnd, &val[n], info->group[i].len+1 );
- if( r != info->group[i].len )
+ if (info->group[i].len + n > info->num_chars)
+ {
+ ERR("can't fit control %d text into template\n",i);
break;
+ }
+ if (!msi_mask_editable(info->group[i].type))
+ {
+ for(r=0; r<info->group[i].len; r++)
+ val[n+r] = info->group[i].type;
+ val[n+r] = 0;
+ }
+ else
+ {
+ r = GetWindowTextW( info->group[i].hwnd, &val[n], info->group[i].len+1 );
+ if( r != info->group[i].len )
+ break;
+ }
+ n += r;
}
- n += r;
}
TRACE("%d/%d controls were good\n", i, info->num_groups);
static struct msi_maskedit_info * msi_dialog_parse_groups( LPCWSTR mask )
{
- struct msi_maskedit_info * info = NULL;
+ struct msi_maskedit_info *info;
int i = 0, n = 0, total = 0;
LPCWSTR p;
TRACE("masked control, template %s\n", debugstr_w(mask));
if( !mask )
- return info;
+ return NULL;
info = msi_alloc_zero( sizeof *info );
if( !info )
{
/* stop at the end of the string */
if( p[0] == 0 || p[0] == '>' )
+ {
+ if (!total)
+ {
+ /* create a group for the empty mask */
+ info->group[0].type = '&';
+ info->group[0].len = ~0u;
+ i = 1;
+ }
break;
+ }
/* count the number of the same identifier */
for( n=0; p[n] == p[0]; n++ )
{
if (!msi_mask_editable( info->group[i].type ))
continue;
- wx = (info->group[i].ofs * width) / info->num_chars;
- ww = (info->group[i].len * width) / info->num_chars;
-
+ if (info->num_chars)
+ {
+ wx = (info->group[i].ofs * width) / info->num_chars;
+ ww = (info->group[i].len * width) / info->num_chars;
+ }
+ else
+ {
+ wx = 0;
+ ww = width;
+ }
hwnd = CreateWindowW( szEdit, NULL, style, wx, 0, ww, height,
info->hwnd, NULL, NULL, NULL );
if( !hwnd )
FindClose( file );
}
-UINT msi_dialog_directorylist_up( msi_dialog *dialog )
+static UINT msi_dialog_directorylist_up( msi_dialog *dialog )
{
msi_control *control;
LPWSTR prop, path, ptr;
return r;
}
-UINT msi_dialog_reset( msi_dialog *dialog )
+static UINT msi_dialog_reset( msi_dialog *dialog )
{
/* FIXME: should restore the original values of any properties we changed */
return msi_dialog_evaluate_control_conditions( dialog );
return dialog;
}
-void msi_dialog_end_dialog( msi_dialog *dialog )
+static void msi_dialog_end_dialog( msi_dialog *dialog )
{
TRACE("%p\n", dialog);
dialog->finished = 1;
return;
}
- /* there's two choices for the UI thread */
+ /* there are two choices for the UI thread */
while (1)
{
process_pending_messages( NULL );
{
max_len = len;
buf = msi_realloc(buf, (max_len + 1) * sizeof(WCHAR));
- if (!buf) return NULL;
+ if (!buf)
+ {
+ msi_free(rc);
+ return NULL;
+ }
}
if (str)
format->n = n;
beg = format_replace( format, propfound, nonprop, oldsize, type, replaced, len );
+ msi_free(replaced);
if (!beg)
return ERROR_SUCCESS;
- msi_free(replaced);
format->n = beg->n + beg->len;
top = stack_peek(stack);
static INT_PTR CDECL cabinet_open(char *pszFile, int oflag, int pmode)
{
- HANDLE handle;
DWORD dwAccess = 0;
DWORD dwShareMode = 0;
DWORD dwCreateDisposition = OPEN_EXISTING;
else if (oflag & _O_CREAT)
dwCreateDisposition = CREATE_ALWAYS;
- handle = CreateFileA(pszFile, dwAccess, dwShareMode, NULL,
- dwCreateDisposition, 0, NULL);
- if (handle == INVALID_HANDLE_VALUE)
- return 0;
-
- return (INT_PTR)handle;
+ return (INT_PTR)CreateFileA(pszFile, dwAccess, dwShareMode, NULL,
+ dwCreateDisposition, 0, NULL);
}
static UINT CDECL cabinet_read(INT_PTR hf, void *pv, UINT cb)
if (!cab)
{
WARN("failed to get cabinet stream\n");
- return 0;
+ return -1;
}
if (!cab->stream[0] || !(encoded = encode_streamname( FALSE, cab->stream + 1 )))
{
WARN("failed to encode stream name\n");
- return 0;
+ return -1;
}
if (msi_clone_open_stream( package_disk.package->db, cab->storage, encoded, &stream ) != ERROR_SUCCESS)
{
{
WARN("failed to open stream 0x%08x\n", hr);
msi_free( encoded );
- return 0;
+ return -1;
}
}
msi_free( encoded );
BOOL succeeded = FALSE;
static const WCHAR fmt[] = {'%','s',' ','P','A','T','C','H','=','"','%','s','"',0};
- static WCHAR empty[] = {0};
+ static const WCHAR empty[] = {0};
if (!szPatchPackage || !szPatchPackage[0])
return ERROR_INVALID_PARAMETER;
context = MSIINSTALLCONTEXT_MACHINE;
}
- MSIREG_OpenInstallProps(szProduct, context, NULL, &userdata, FALSE);
-
if (!strcmpW( szAttribute, INSTALLPROPERTY_HELPLINKW ) ||
!strcmpW( szAttribute, INSTALLPROPERTY_HELPTELEPHONEW ) ||
!strcmpW( szAttribute, INSTALLPROPERTY_INSTALLDATEW ) ||
r = ERROR_UNKNOWN_PRODUCT;
goto done;
}
-
- if (!userdata)
- return ERROR_UNKNOWN_PROPERTY;
+ if (MSIREG_OpenInstallProps(szProduct, context, NULL, &userdata, FALSE))
+ {
+ r = ERROR_UNKNOWN_PROPERTY;
+ goto done;
+ }
if (!strcmpW( szAttribute, INSTALLPROPERTY_INSTALLEDPRODUCTNAMEW ))
szAttribute = display_name;
val = msi_reg_get_value(userdata, szAttribute, &type);
if (!val)
val = empty;
+ RegCloseKey(userdata);
}
else if (!strcmpW( szAttribute, INSTALLPROPERTY_INSTANCETYPEW ) ||
!strcmpW( szAttribute, INSTALLPROPERTY_TRANSFORMSW ) ||
done:
RegCloseKey(prodkey);
- RegCloseKey(userdata);
return r;
}
/* @makedep: msiserver.rgs */
2 WINE_REGISTRY msiserver.rgs
-3 WINE_REGISTRY "msi.rgs"
+3 WINE_REGISTRY msiserver_r.rgs
+
+4 WINE_REGISTRY msiserver_t.rgs
/* @makedep: instadvert.bmp */
0x1001 BITMAP instadvert.bmp
int num_clients;
unsigned int anyAbsent:1;
- unsigned int hasAdvertiseFeature:1;
+ unsigned int hasAdvertisedFeature:1;
unsigned int hasLocalFeature:1;
unsigned int hasSourceFeature:1;
} MSICOMPONENT;
MSIFEATURE *Feature;
INT Attributes;
/* not in the table, set during installation */
- BOOL Installed;
+ INSTALLSTATE action;
} MSICLASS;
typedef struct tagMSIMIME MSIMIME;
MSIMIME *Mime;
MSIFEATURE *Feature;
/* not in the table, set during installation */
- BOOL Installed;
+ INSTALLSTATE action;
struct list verbs;
} MSIEXTENSION;
LPWSTR Description;
LPWSTR IconPath;
/* not in the table, set during installation */
- BOOL InstallMe;
MSIPROGID *CurVer;
MSIPROGID *VersionInd;
};
LPWSTR suffix;
LPWSTR clsid;
MSICLASS *Class;
- /* not in the table, set during installation */
- BOOL InstallMe;
};
enum SCRIPTS
LPWSTR *Actions[SCRIPT_MAX];
UINT ActionCount[SCRIPT_MAX];
BOOL ExecuteSequenceRun;
- BOOL CurrentlyScripting;
UINT InWhatSequence;
LPWSTR *UniqueActions;
UINT UniqueActionsCount;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#pragma makedep ident
+#pragma makedep register
+#pragma makedep regtypelib
+
#include "msiserver_dispids.h"
import "unknwn.idl";
import "wtypes.idl";
]
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }
+[
+ helpstring("Microsoft Windows Installer"),
+ threading(apartment),
+ progid("WindowsInstaller.Installer"),
+ uuid(000c1090-0000-0000-c000-000000000046)
+]
+coclass MsiInstaller { interface Installer; }
+
[
uuid(000c1082-0000-0000-c000-000000000046)
]
]
coclass WineMsiRemotePackage { interface WineMsiRemotePackage; }
-
[ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ]
library WindowsInstaller
{
[id(DISPID_INSTALLER_OPENPACKAGE)]
Session* OpenPackage(
[in] VARIANT PackagePath,
- [in, optional, defaultvalue(0)] long Options);
+ [in, defaultvalue(0)] long Options);
[id(DISPID_INSTALLER_OPENPRODUCT)]
Session* OpenProduct(
[in] BSTR ProductCode);
[id(DISPID_INSTALLER_SUMMARYINFORMATION)]
SummaryInfo* SummaryInformation(
[in] BSTR PackagePath,
- [in, optional, defaultvalue(0)] long UpdateCount);
+ [in, defaultvalue(0)] long UpdateCount);
[id(DISPID_INSTALLER_OPENDATABASE)]
Database *OpenDatabase(
[in] BSTR DatabasePath,
[id(DISPID_INSTALLER_INSTALLPRODUCT)]
void InstallProduct(
[in] BSTR PackagePath,
- [in, optional, defaultvalue("0")] BSTR PropertyValues);
+ [in, defaultvalue("0")] BSTR PropertyValues);
[id(DISPID_INSTALLER_VERSION)]
BSTR Version();
[id(DISPID_INSTALLER_LASTERRORRECORD)]
properties:
methods:
[id(DISPID_VIEW_EXECUTE)]
- void Execute([in, optional, defaultvalue(0)] Record *Params);
+ void Execute([in, defaultvalue(0)] Record *Params);
[id(DISPID_VIEW_FETCH)]
Record* Fetch();
[id(DISPID_VIEW_MODIFY)]
[id(DISPID_DATABASE_OPENVIEW)]
View* OpenView([in] BSTR Sql);
[id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
- SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
+ SummaryInfo *SummaryInformation([in, defaultvalue(0)] long UpdateCount);
}
typedef enum {
properties:
methods:
}
-
- [
- helpstring("Microsoft Windows Installer"),
- threading(apartment),
- progid("WindowsInstaller.Installer"),
- uuid(000c1090-0000-0000-c000-000000000046)
- ]
- coclass MsiInstaller { interface Installer; }
}
{
NoRemove CLSID
{
- '{000C101D-0000-0000-C000-000000000046}' { DllVersion = s '3.1.4000' }
- '{000C1090-0000-0000-C000-000000000046}' { InProcHandler32 = s 'ole32.dll' }
+ '{000C101D-0000-0000-C000-000000000046}' { DllVersion = s '4.5.6001' }
+ '{000C1090-0000-0000-C000-000000000046}'
+ {
+ TypeLib = s '{000C1092-0000-0000-C000-000000000046}'
+ Version = s '1.0'
+ InProcHandler32 = s 'ole32.dll'
+ }
}
}
--- /dev/null
+HKCR
+{
+ NoRemove Interface
+ {
+ '{7BDE2046-D03B-4FFC-B84C-A098F38CFF0B}' = s 'IWineMsiRemoteDatabase'
+ {
+ NumMethods = s 8
+ ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
+ }
+ '{902B3592-9D08-4DFD-A593-D07C52546421}' = s 'IWineMsiRemotePackage'
+ {
+ NumMethods = s 25
+ ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
+ }
+ '{56D58B64-8780-4C22-A8BC-8B0B29E4A9F8}' = s 'IWineMsiRemoteCustomAction'
+ {
+ NumMethods = s 4
+ ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
+ }
+ '{000C101C-0000-0000-C000-000000000046}' = s 'IMsiServer'
+ {
+ NumMethods = s 3
+ ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
+ }
+ '{000C101D-0000-0000-C000-000000000046}' = s 'IMsiMessage'
+ {
+ NumMethods = s 3
+ ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
+ }
+ '{000C1025-0000-0000-C000-000000000046}' = s 'IMsiCustomAction'
+ {
+ NumMethods = s 3
+ ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
+ }
+ '{000C1033-0000-0000-C000-000000000046}' = s 'IMsiRemoteAPI'
+ {
+ NumMethods = s 3
+ ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
+ }
+ }
+ NoRemove CLSID
+ {
+ '{000C101C-0000-0000-C000-000000000046}' = s 'Msi install server'
+ {
+ ProgId = s 'IMsiServer'
+ }
+ '{000C101D-0000-0000-C000-000000000046}' = s 'Microsoft Windows Installer Message RPC'
+ {
+ ProgId = s 'WindowsInstaller.Message'
+ }
+ '{000C103E-0000-0000-C000-000000000046}' = s 'PSFactoryBuffer'
+ {
+ InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
+ }
+ '{000C1090-0000-0000-C000-000000000046}' = s 'Microsoft Windows Installer'
+ {
+ InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
+ ProgId = s 'WindowsInstaller.Installer'
+ }
+ '{000C1082-0000-0000-C000-000000000046}' = s 'MsiTransform'
+ {
+ }
+ '{000C1084-0000-0000-C000-000000000046}' = s 'MsiDatabase'
+ {
+ }
+ '{000C1086-0000-0000-C000-000000000046}' = s 'MsiPatch'
+ {
+ }
+ '{000C1094-0000-0000-C000-000000000046}' = s 'MsiServerX3'
+ {
+ InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
+ }
+ '{BA26E6FA-4F27-4F56-953A-3F90272018AA}' = s 'WineMsiRemoteCustomAction'
+ {
+ }
+ '{902B3592-9D08-4DFD-A593-D07C52546421}' = s 'WineMsiRemotePackage'
+ {
+ }
+ }
+ 'IMsiServer' = s 'Msi install server'
+ {
+ CLSID = s '{000C101C-0000-0000-C000-000000000046}'
+ }
+ 'WindowsInstaller.Message' = s 'Microsoft Windows Installer Message RPC'
+ {
+ CLSID = s '{000C101D-0000-0000-C000-000000000046}'
+ }
+ 'WindowsInstaller.Installer' = s 'Microsoft Windows Installer'
+ {
+ CLSID = s '{000C1090-0000-0000-C000-000000000046}'
+ }
+}
HKCR
{
- NoRemove Interface
- {
- '{7BDE2046-D03B-4FFC-B84C-A098F38CFF0B}' = s 'IWineMsiRemoteDatabase'
- {
- NumMethods = s 8
- ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
- }
- '{902B3592-9D08-4DFD-A593-D07C52546421}' = s 'IWineMsiRemotePackage'
- {
- NumMethods = s 25
- ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
- }
- '{56D58B64-8780-4C22-A8BC-8B0B29E4A9F8}' = s 'IWineMsiRemoteCustomAction'
- {
- NumMethods = s 4
- ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
- }
- '{000C101C-0000-0000-C000-000000000046}' = s 'IMsiServer'
- {
- NumMethods = s 3
- ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
- }
- '{000C101D-0000-0000-C000-000000000046}' = s 'IMsiMessage'
- {
- NumMethods = s 3
- ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
- }
- '{000C1025-0000-0000-C000-000000000046}' = s 'IMsiCustomAction'
- {
- NumMethods = s 3
- ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
- }
- '{000C1033-0000-0000-C000-000000000046}' = s 'IMsiRemoteAPI'
- {
- NumMethods = s 3
- ProxyStubClsid32 = s '{000C103E-0000-0000-C000-000000000046}'
- }
- }
- NoRemove CLSID
- {
- '{000C101C-0000-0000-C000-000000000046}' = s 'Msi install server'
- {
- ProgId = s 'IMsiServer'
- }
- '{000C101D-0000-0000-C000-000000000046}' = s 'Microsoft Windows Installer Message RPC'
- {
- ProgId = s 'WindowsInstaller.Message'
- }
- '{000C103E-0000-0000-C000-000000000046}' = s 'PSFactoryBuffer'
- {
- InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
- }
- '{000C1082-0000-0000-C000-000000000046}' = s 'MsiTransform'
- {
- }
- '{000C1084-0000-0000-C000-000000000046}' = s 'MsiDatabase'
- {
- }
- '{000C1086-0000-0000-C000-000000000046}' = s 'MsiPatch'
- {
- }
- '{000C1094-0000-0000-C000-000000000046}' = s 'MsiServerX3'
- {
- InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
- }
- '{BA26E6FA-4F27-4F56-953A-3F90272018AA}' = s 'WineMsiRemoteCustomAction'
- {
- }
- '{902B3592-9D08-4DFD-A593-D07C52546421}' = s 'WineMsiRemotePackage'
- {
- }
- }
- 'IMsiServer' = s 'Msi install server'
- {
- CLSID = s '{000C101C-0000-0000-C000-000000000046}'
- }
- 'WindowsInstaller.Message' = s 'Microsoft Windows Installer Message RPC'
- {
- CLSID = s '{000C101D-0000-0000-C000-000000000046}'
- }
-
NoRemove Typelib
{
NoRemove '{000C1092-0000-0000-C000-000000000046}'
}
NoRemove CLSID
{
- '{000C1090-0000-0000-C000-000000000046}' = s 'Microsoft Windows Installer'
- {
- InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
- ProgId = s 'WindowsInstaller.Installer'
- TypeLib = s '{000C1092-0000-0000-C000-000000000046}'
- Version = s '1.0'
- }
- }
- 'WindowsInstaller.Installer' = s 'Microsoft Windows Installer'
- {
- CLSID = s '{000C1090-0000-0000-C000-000000000046}'
}
}
if (rc != ERROR_SUCCESS)
{
WARN("Unable to query rev number: %d\n", rc);
+ msi_free( package_code );
goto done;
}
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
- return 0;
+ return FALSE;
msiobj_lock( &rec->hdr );
ret = MSI_RecordIsNull( rec, iField );
msiobj_unlock( &rec->hdr );
hGlob = GlobalAlloc(GMEM_FIXED, sz);
if( hGlob )
{
- BOOL r = ReadFile(handle, hGlob, sz, &read, NULL);
+ BOOL r = ReadFile(handle, hGlob, sz, &read, NULL) && read == sz;
if( !r )
{
GlobalFree(hGlob);
list_init(&sourcelist);
rc = fill_source_list(&sourcelist, typekey, &count);
if (rc != ERROR_NO_MORE_ITEMS)
- return rc;
+ goto done;
size = (lstrlenW(source) + 1) * sizeof(WCHAR);
( (p[0]=='\'') && (p[len-1]!='\'') ) )
return ERROR_FUNCTION_FAILED;
- /* if there's quotes, remove them */
+ /* if there are quotes, remove them */
if( ( (p[0]=='`') && (p[len-1]=='`') ) ||
( (p[0]=='\'') && (p[len-1]=='\'') ) )
{
*pcount = column_count;
- /* if there's no columns, there's no table */
+ /* if there are no columns, there's no table */
if (!column_count)
return ERROR_INVALID_PARAMETER;
{
UINT r, row, i;
- /* check there's no null values where they're not allowed */
+ /* check there are no null values where they're not allowed */
for( i = 0; i < tv->num_cols; i++ )
{
if ( tv->columns[i].type & MSITYPE_NULLABLE )
}
}
- /* check there's no duplicate keys */
+ /* check there are no duplicate keys */
r = msi_table_find_row( tv, rec, &row, column );
if (r == ERROR_SUCCESS)
return ERROR_FUNCTION_FAILED;
r = TABLE_CreateView(tv->db, szColumns, &columns);
if (r != ERROR_SUCCESS)
+ {
+ msiobj_release(&rec->hdr);
return r;
+ }
r = msi_table_find_row((MSITABLEVIEW *)columns, rec, &row, NULL);
if (r != ERROR_SUCCESS)
r = TABLE_CreateView(tv->db, szTables, &tables);
if (r != ERROR_SUCCESS)
+ {
+ msiobj_release(&rec->hdr);
return r;
+ }
r = msi_table_find_row((MSITABLEVIEW *)tables, rec, &row, NULL);
if (r != ERROR_SUCCESS)
UINT WINAPI MsiConfigureProductA(_In_ LPCSTR, _In_ int, _In_ INSTALLSTATE);
UINT WINAPI MsiConfigureProductW(_In_ LPCWSTR, _In_ int, _In_ INSTALLSTATE);
-#define MsiConfigureProduct WINELIB_NAME_AW(MsiConfigureProduct);
+#define MsiConfigureProduct WINELIB_NAME_AW(MsiConfigureProduct)
UINT
WINAPI
_In_ INSTALLSTATE,
_In_opt_ LPCWSTR);
-#define MsiConfigureProductEx WINELIB_NAME_AW(MsiConfigureProductEx);
+#define MsiConfigureProductEx WINELIB_NAME_AW(MsiConfigureProductEx)
UINT
WINAPI
_In_ LPCWSTR,
_In_ INSTALLSTATE);
-#define MsiConfigureFeature WINELIB_NAME_AW(MsiConfigureFeature);
+#define MsiConfigureFeature WINELIB_NAME_AW(MsiConfigureFeature)
UINT
WINAPI
reactos/dll/win32/msgsm32.acm # Synced to Wine-1.7.17
reactos/dll/win32/mshtml # Synced to Wine-1.7.1
reactos/dll/win32/mshtml.tlb # Synced to Wine-1.7.1
-reactos/dll/win32/msi # Synced to Wine-1.7.1
+reactos/dll/win32/msi # Synced to Wine-1.7.17
reactos/dll/win32/msimg32 # Synced to Wine-1.7.1
reactos/dll/win32/msimtf # Synced to Wine-1.7.1
reactos/dll/win32/msisip # Synced to Wine-1.7.1