Author: akhaldi Date: Wed Apr 23 14:48:52 2014 New Revision: 62918
URL: http://svn.reactos.org/svn/reactos?rev=62918&view=rev Log: [MSI] * Sync with Wine 1.7.17. CORE-8080
Added: trunk/reactos/dll/win32/msi/msiserver_r.rgs - copied, changed from r62887, trunk/reactos/dll/win32/msi/msi.rgs trunk/reactos/dll/win32/msi/msiserver_t.rgs (with props) Removed: trunk/reactos/dll/win32/msi/msi.rgs Modified: trunk/reactos/dll/win32/msi/action.c trunk/reactos/dll/win32/msi/classes.c trunk/reactos/dll/win32/msi/custom.c trunk/reactos/dll/win32/msi/dialog.c trunk/reactos/dll/win32/msi/format.c trunk/reactos/dll/win32/msi/media.c trunk/reactos/dll/win32/msi/msi.c trunk/reactos/dll/win32/msi/msi.rc trunk/reactos/dll/win32/msi/msipriv.h trunk/reactos/dll/win32/msi/msiserver.idl trunk/reactos/dll/win32/msi/msiserver.rgs trunk/reactos/dll/win32/msi/package.c trunk/reactos/dll/win32/msi/record.c trunk/reactos/dll/win32/msi/source.c trunk/reactos/dll/win32/msi/sql.y trunk/reactos/dll/win32/msi/table.c trunk/reactos/include/psdk/msi.h trunk/reactos/media/doc/README.WINE
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] Wed Apr 23 14:48:52 2014 @@ -195,19 +195,20 @@ 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 '"': @@ -217,7 +218,7 @@ break; default: state = state_token; - in_quotes = 1; + in_quotes = TRUE; len++; break; } @@ -234,12 +235,12 @@ 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; } @@ -255,13 +256,13 @@ 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; } @@ -407,41 +408,21 @@
UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace) { - LPWSTR source, check; - - if (msi_get_property_int( package->db, szInstalled, 0 )) - { - HKEY hkey; - - MSIREG_OpenInstallProps( package->ProductCode, package->Context, NULL, &hkey, FALSE ); - source = msi_reg_get_val_str( hkey, INSTALLPROPERTY_INSTALLSOURCEW ); - RegCloseKey( hkey ); - } - else - { - 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 ); - } + WCHAR *source, *check, *p, *db; + DWORD len; + + if (!(db = msi_dup_property( package->db, szOriginalDatabase ))) + return ERROR_OUTOFMEMORY; + + if (!(p = strrchrW( db, '\' )) && !(p = strrchrW( 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) @@ -1890,7 +1871,7 @@ component->anyAbsent = 1; break; case INSTALLSTATE_ADVERTISED: - component->hasAdvertiseFeature = 1; + component->hasAdvertisedFeature = 1; break; case INSTALLSTATE_SOURCE: component->hasSourceFeature = 1; @@ -1900,7 +1881,7 @@ break; case INSTALLSTATE_DEFAULT: if (feature->Attributes & msidbFeatureAttributesFavorAdvertise) - component->hasAdvertiseFeature = 1; + component->hasAdvertisedFeature = 1; else if (feature->Attributes & msidbFeatureAttributesFavorSource) component->hasSourceFeature = 1; else @@ -1945,7 +1926,7 @@ component->ActionRequest = INSTALLSTATE_SOURCE; continue; } - if (component->hasAdvertiseFeature) + if (component->hasAdvertisedFeature) { component->Action = INSTALLSTATE_ADVERTISED; component->ActionRequest = INSTALLSTATE_ADVERTISED; @@ -3181,8 +3162,6 @@
static UINT ACTION_InstallInitialize(MSIPACKAGE *package) { - package->script->CurrentlyScripting = TRUE; - return ERROR_SUCCESS; }
@@ -3569,9 +3548,29 @@ 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 ); } }
@@ -3823,7 +3822,7 @@ 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 ); @@ -5294,9 +5293,6 @@ 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) @@ -5801,7 +5797,11 @@ 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) @@ -7823,8 +7823,6 @@ else rc = ACTION_ProcessExecSequence(package, FALSE);
- package->script->CurrentlyScripting = FALSE; - /* process the ending type action */ if (rc == ERROR_SUCCESS) ACTION_PerformActionSequence(package, -1);
Modified: trunk/reactos/dll/win32/msi/classes.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/classes.c?rev... ============================================================================== --- trunk/reactos/dll/win32/msi/classes.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/classes.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -287,7 +287,7 @@ cls->Feature = msi_get_loaded_feature(package, buffer);
cls->Attributes = MSI_RecordGetInteger(row,13); - + cls->action = INSTALLSTATE_UNKNOWN; return cls; }
@@ -416,7 +416,7 @@
buffer = MSI_RecordGetString(row,5); ext->Feature = msi_get_loaded_feature( package, buffer ); - + ext->action = INSTALLSTATE_UNKNOWN; return ext; }
@@ -687,59 +687,6 @@ if (r != ERROR_SUCCESS) return r;
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 ) @@ -847,8 +794,7 @@ } 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 );
@@ -1005,8 +951,7 @@ } 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) @@ -1094,6 +1039,35 @@ 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; @@ -1106,17 +1080,11 @@
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) - { - TRACE("progid %s not scheduled to be installed\n", - debugstr_w(progid->ProgID)); - continue; - } - + if (!has_class_installed( progid ) && !has_one_extension_installed( package, 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 ); @@ -1129,6 +1097,36 @@ 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; @@ -1142,16 +1140,12 @@
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 ); @@ -1293,15 +1287,7 @@ } 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) @@ -1399,12 +1385,7 @@ } 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) @@ -1468,11 +1449,8 @@ * 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; @@ -1522,11 +1500,8 @@ 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;
Modified: trunk/reactos/dll/win32/msi/custom.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/custom.c?rev=... ============================================================================== --- trunk/reactos/dll/win32/msi/custom.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/custom.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -203,8 +203,8 @@ 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 )) { @@ -991,7 +991,7 @@ '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; @@ -1005,10 +1005,14 @@ 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) @@ -1028,6 +1032,7 @@ done: msi_free(bufferw); msi_free(buffer); + msiobj_release(&row->hdr); return r; }
Modified: trunk/reactos/dll/win32/msi/dialog.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/dialog.c?rev=... ============================================================================== --- trunk/reactos/dll/win32/msi/dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/dialog.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -763,12 +763,13 @@ 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); @@ -1802,24 +1803,33 @@ 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); @@ -1914,14 +1924,14 @@
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 ) @@ -1937,7 +1947,16 @@ { /* 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++ ) @@ -1983,9 +2002,16 @@ { 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 ) @@ -2969,7 +2995,7 @@ 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; @@ -3472,7 +3498,7 @@ 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 ); @@ -3906,7 +3932,7 @@ 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; @@ -3933,7 +3959,7 @@ return; }
- /* there's two choices for the UI thread */ + /* there are two choices for the UI thread */ while (1) { process_pending_messages( NULL );
Modified: trunk/reactos/dll/win32/msi/format.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/format.c?rev=... ============================================================================== --- trunk/reactos/dll/win32/msi/format.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/format.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -354,7 +354,11 @@ { 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) @@ -715,10 +719,10 @@
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);
Modified: trunk/reactos/dll/win32/msi/media.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/media.c?rev=6... ============================================================================== --- trunk/reactos/dll/win32/msi/media.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/media.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -126,7 +126,6 @@
static INT_PTR CDECL cabinet_open(char *pszFile, int oflag, int pmode) { - HANDLE handle; DWORD dwAccess = 0; DWORD dwShareMode = 0; DWORD dwCreateDisposition = OPEN_EXISTING; @@ -152,12 +151,8 @@ 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) @@ -214,12 +209,12 @@ 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) { @@ -228,7 +223,7 @@ { WARN("failed to open stream 0x%08x\n", hr); msi_free( encoded ); - return 0; + return -1; } } msi_free( encoded );
Modified: trunk/reactos/dll/win32/msi/msi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.c?rev=629... ============================================================================== --- trunk/reactos/dll/win32/msi/msi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msi.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -335,7 +335,7 @@ 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; @@ -1113,8 +1113,6 @@ { context = MSIINSTALLCONTEXT_MACHINE; } - - MSIREG_OpenInstallProps(szProduct, context, NULL, &userdata, FALSE);
if (!strcmpW( szAttribute, INSTALLPROPERTY_HELPLINKW ) || !strcmpW( szAttribute, INSTALLPROPERTY_HELPTELEPHONEW ) || @@ -1138,9 +1136,11 @@ 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; @@ -1150,6 +1150,7 @@ val = msi_reg_get_value(userdata, szAttribute, &type); if (!val) val = empty; + RegCloseKey(userdata); } else if (!strcmpW( szAttribute, INSTALLPROPERTY_INSTANCETYPEW ) || !strcmpW( szAttribute, INSTALLPROPERTY_TRANSFORMSW ) || @@ -1242,7 +1243,6 @@
done: RegCloseKey(prodkey); - RegCloseKey(userdata); return r; }
Modified: trunk/reactos/dll/win32/msi/msi.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.rc?rev=62... ============================================================================== --- trunk/reactos/dll/win32/msi/msi.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msi.rc [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -69,7 +69,9 @@ /* @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
Removed: trunk/reactos/dll/win32/msi/msi.rgs URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.rgs?rev=6... ============================================================================== --- trunk/reactos/dll/win32/msi/msi.rgs [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msi.rgs (removed) @@ -1,184 +0,0 @@ -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}' - { - '1.0' = s 'WindowsInstaller' - { - '0' { win32 = s '%MODULE%' } - FLAGS = s '0' - } - } - } - NoRemove Interface - { - '{000C1090-0000-0000-C000-000000000046}' = s 'Installer' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C1093-0000-0000-C000-000000000046}' = s 'Record' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C1095-0000-0000-C000-000000000046}' = s 'StringList' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C1096-0000-0000-C000-000000000046}' = s 'RecordList' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109A-0000-0000-C000-000000000046}' = s 'UIPreview' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109B-0000-0000-C000-000000000046}' = s 'SummaryInfo' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109C-0000-0000-C000-000000000046}' = s 'View' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109D-0000-0000-C000-000000000046}' = s 'Database' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109E-0000-0000-C000-000000000046}' = s 'Session' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109F-0000-0000-C000-000000000046}' = s 'FeatureInfo' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C10A0-0000-0000-C000-000000000046}' = s 'Product' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C10A1-0000-0000-C000-000000000046}' = s 'Patch' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - } - 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}' - } -}
Modified: trunk/reactos/dll/win32/msi/msipriv.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msipriv.h?rev... ============================================================================== --- trunk/reactos/dll/win32/msi/msipriv.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msipriv.h [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -501,7 +501,7 @@ int num_clients;
unsigned int anyAbsent:1; - unsigned int hasAdvertiseFeature:1; + unsigned int hasAdvertisedFeature:1; unsigned int hasLocalFeature:1; unsigned int hasSourceFeature:1; } MSICOMPONENT; @@ -628,7 +628,7 @@ MSIFEATURE *Feature; INT Attributes; /* not in the table, set during installation */ - BOOL Installed; + INSTALLSTATE action; } MSICLASS;
typedef struct tagMSIMIME MSIMIME; @@ -643,7 +643,7 @@ MSIMIME *Mime; MSIFEATURE *Feature; /* not in the table, set during installation */ - BOOL Installed; + INSTALLSTATE action; struct list verbs; } MSIEXTENSION;
@@ -656,7 +656,6 @@ LPWSTR Description; LPWSTR IconPath; /* not in the table, set during installation */ - BOOL InstallMe; MSIPROGID *CurVer; MSIPROGID *VersionInd; }; @@ -678,8 +677,6 @@ LPWSTR suffix; LPWSTR clsid; MSICLASS *Class; - /* not in the table, set during installation */ - BOOL InstallMe; };
enum SCRIPTS @@ -700,7 +697,6 @@ LPWSTR *Actions[SCRIPT_MAX]; UINT ActionCount[SCRIPT_MAX]; BOOL ExecuteSequenceRun; - BOOL CurrentlyScripting; UINT InWhatSequence; LPWSTR *UniqueActions; UINT UniqueActionsCount;
Modified: trunk/reactos/dll/win32/msi/msiserver.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msiserver.idl... ============================================================================== --- trunk/reactos/dll/win32/msi/msiserver.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msiserver.idl [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -16,6 +16,10 @@ * License along with this library; if not, write to the Free Software * 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"; @@ -149,6 +153,14 @@ 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 MsiTransform { } @@ -179,7 +191,6 @@ uuid(902b3592-9d08-4dfd-a593-d07c52546421) ] coclass WineMsiRemotePackage { interface WineMsiRemotePackage; } -
[ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ] library WindowsInstaller @@ -247,14 +258,14 @@ [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, @@ -266,7 +277,7 @@ [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)] @@ -389,7 +400,7 @@ 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)] @@ -408,7 +419,7 @@ [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 { @@ -547,12 +558,4 @@ properties: methods: } - - [ - helpstring("Microsoft Windows Installer"), - threading(apartment), - progid("WindowsInstaller.Installer"), - uuid(000c1090-0000-0000-c000-000000000046) - ] - coclass MsiInstaller { interface Installer; } -} +}
Modified: trunk/reactos/dll/win32/msi/msiserver.rgs URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msiserver.rgs... ============================================================================== --- trunk/reactos/dll/win32/msi/msiserver.rgs [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msiserver.rgs [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -2,7 +2,12 @@ { 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' + } } }
Copied: trunk/reactos/dll/win32/msi/msiserver_r.rgs (from r62887, trunk/reactos/dll/win32/msi/msi.rgs) URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msiserver_r.r... ============================================================================== --- trunk/reactos/dll/win32/msi/msi.rgs [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msiserver_r.rgs [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -52,6 +52,11 @@ { 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' { } @@ -80,103 +85,6 @@ { CLSID = s '{000C101D-0000-0000-C000-000000000046}' } - - NoRemove Typelib - { - NoRemove '{000C1092-0000-0000-C000-000000000046}' - { - '1.0' = s 'WindowsInstaller' - { - '0' { win32 = s '%MODULE%' } - FLAGS = s '0' - } - } - } - NoRemove Interface - { - '{000C1090-0000-0000-C000-000000000046}' = s 'Installer' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C1093-0000-0000-C000-000000000046}' = s 'Record' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C1095-0000-0000-C000-000000000046}' = s 'StringList' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C1096-0000-0000-C000-000000000046}' = s 'RecordList' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109A-0000-0000-C000-000000000046}' = s 'UIPreview' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109B-0000-0000-C000-000000000046}' = s 'SummaryInfo' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109C-0000-0000-C000-000000000046}' = s 'View' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109D-0000-0000-C000-000000000046}' = s 'Database' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109E-0000-0000-C000-000000000046}' = s 'Session' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C109F-0000-0000-C000-000000000046}' = s 'FeatureInfo' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C10A0-0000-0000-C000-000000000046}' = s 'Product' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - '{000C10A1-0000-0000-C000-000000000046}' = s 'Patch' - { - ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' - ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' - TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } - } - } - 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}'
Added: trunk/reactos/dll/win32/msi/msiserver_t.rgs URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msiserver_t.r... ============================================================================== --- trunk/reactos/dll/win32/msi/msiserver_t.rgs (added) +++ trunk/reactos/dll/win32/msi/msiserver_t.rgs [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -0,0 +1,92 @@ +HKCR +{ + NoRemove Typelib + { + NoRemove '{000C1092-0000-0000-C000-000000000046}' + { + '1.0' = s 'WindowsInstaller' + { + '0' { win32 = s '%MODULE%' } + FLAGS = s '0' + } + } + } + NoRemove Interface + { + '{000C1090-0000-0000-C000-000000000046}' = s 'Installer' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C1093-0000-0000-C000-000000000046}' = s 'Record' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C1095-0000-0000-C000-000000000046}' = s 'StringList' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C1096-0000-0000-C000-000000000046}' = s 'RecordList' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C109A-0000-0000-C000-000000000046}' = s 'UIPreview' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C109B-0000-0000-C000-000000000046}' = s 'SummaryInfo' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C109C-0000-0000-C000-000000000046}' = s 'View' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C109D-0000-0000-C000-000000000046}' = s 'Database' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C109E-0000-0000-C000-000000000046}' = s 'Session' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C109F-0000-0000-C000-000000000046}' = s 'FeatureInfo' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C10A0-0000-0000-C000-000000000046}' = s 'Product' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + '{000C10A1-0000-0000-C000-000000000046}' = s 'Patch' + { + ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}' + ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}' + TypeLib = s '{000C1092-0000-0000-C000-000000000046}' { val Version = s '1.0' } + } + } + NoRemove CLSID + { + } +}
Propchange: trunk/reactos/dll/win32/msi/msiserver_t.rgs ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/dll/win32/msi/package.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/package.c?rev... ============================================================================== --- trunk/reactos/dll/win32/msi/package.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/package.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -1052,6 +1052,7 @@ if (rc != ERROR_SUCCESS) { WARN("Unable to query rev number: %d\n", rc); + msi_free( package_code ); goto done; }
Modified: trunk/reactos/dll/win32/msi/record.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/record.c?rev=... ============================================================================== --- trunk/reactos/dll/win32/msi/record.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/record.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -358,7 +358,7 @@
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) - return 0; + return FALSE; msiobj_lock( &rec->hdr ); ret = MSI_RecordIsNull( rec, iField ); msiobj_unlock( &rec->hdr ); @@ -663,7 +663,7 @@ 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);
Modified: trunk/reactos/dll/win32/msi/source.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/source.c?rev=... ============================================================================== --- trunk/reactos/dll/win32/msi/source.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/source.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -1135,7 +1135,7 @@ 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);
Modified: trunk/reactos/dll/win32/msi/sql.y URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/sql.y?rev=629... ============================================================================== --- trunk/reactos/dll/win32/msi/sql.y [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/sql.y [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -816,7 +816,7 @@ ( (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]==''') ) ) {
Modified: trunk/reactos/dll/win32/msi/table.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/table.c?rev=6... ============================================================================== --- trunk/reactos/dll/win32/msi/table.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/table.c [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -545,7 +545,7 @@
*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;
@@ -1509,7 +1509,7 @@ { 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 ) @@ -1541,7 +1541,7 @@ } }
- /* 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; @@ -1951,7 +1951,10 @@
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) @@ -2073,7 +2076,10 @@
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)
Modified: trunk/reactos/include/psdk/msi.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msi.h?rev=6291... ============================================================================== --- trunk/reactos/include/psdk/msi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/msi.h [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -657,7 +657,7 @@
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 @@ -675,7 +675,7 @@ _In_ INSTALLSTATE, _In_opt_ LPCWSTR);
-#define MsiConfigureProductEx WINELIB_NAME_AW(MsiConfigureProductEx); +#define MsiConfigureProductEx WINELIB_NAME_AW(MsiConfigureProductEx)
UINT WINAPI @@ -691,7 +691,7 @@ _In_ LPCWSTR, _In_ INSTALLSTATE);
-#define MsiConfigureFeature WINELIB_NAME_AW(MsiConfigureFeature); +#define MsiConfigureFeature WINELIB_NAME_AW(MsiConfigureFeature)
UINT WINAPI
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=6... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Wed Apr 23 14:48:52 2014 @@ -119,7 +119,7 @@ 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