Commit a70ece68 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Initialize assembly caches before disabling redirection.

parent a5c79dc8
......@@ -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);
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment