msi: Initialize assembly caches before disabling redirection.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46638
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2019-02-15 10:32:30 +01:00 committed by Alexandre Julliard
parent a5c79dc8a9
commit a70ece68b7
2 changed files with 11 additions and 7 deletions

View File

@ -995,13 +995,6 @@ UINT msi_load_all_components( MSIPACKAGE *package )
if (r != ERROR_SUCCESS)
return r;
if (!msi_init_assembly_caches( package ))
{
ERR("can't initialize assembly caches\n");
msiobj_release( &view->hdr );
return ERROR_FUNCTION_FAILED;
}
r = MSI_IterateRecords(view, NULL, load_component, package);
msiobj_release(&view->hdr);
return r;
@ -8094,6 +8087,12 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action)
TRACE("Performing action (%s)\n", debugstr_w(action));
if (!msi_init_assembly_caches( package ))
{
ERR("can't initialize assembly caches\n");
return ERROR_FUNCTION_FAILED;
}
package->action_progress_increment = 0;
rc = ACTION_HandleStandardAction(package, action);

View File

@ -41,6 +41,7 @@ static HRESULT (WINAPI *pCreateAssemblyNameObject)( IAssemblyName **, LPCWSTR, D
static HRESULT (WINAPI *pCreateAssemblyEnum)( IAssemblyEnum **, IUnknown *, IAssemblyName *, DWORD, LPVOID );
static HMODULE hfusion10, hfusion11, hfusion20, hfusion40, hmscoree, hsxs;
static BOOL assembly_caches_initialized;
static BOOL init_function_pointers( void )
{
@ -91,12 +92,16 @@ static BOOL init_function_pointers( void )
BOOL msi_init_assembly_caches( MSIPACKAGE *package )
{
if (assembly_caches_initialized) return TRUE;
if (!init_function_pointers()) return FALSE;
if (pCreateAssemblyCacheSxs( &package->cache_sxs, 0 ) != S_OK) return FALSE;
if (pCreateAssemblyCacheNet10) pCreateAssemblyCacheNet10( &package->cache_net[CLR_VERSION_V10], 0 );
if (pCreateAssemblyCacheNet11) pCreateAssemblyCacheNet11( &package->cache_net[CLR_VERSION_V11], 0 );
if (pCreateAssemblyCacheNet20) pCreateAssemblyCacheNet20( &package->cache_net[CLR_VERSION_V20], 0 );
if (pCreateAssemblyCacheNet40) pCreateAssemblyCacheNet40( &package->cache_net[CLR_VERSION_V40], 0 );
assembly_caches_initialized = TRUE;
return TRUE;
}