setupapi: Create fakedlls before copying files.

Some files may come from dll resources.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-03-18 11:40:13 +01:00
parent 5d3d73f803
commit 1244b50145
1 changed files with 9 additions and 17 deletions

View File

@ -1085,6 +1085,13 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
if (!iterate_section_fields( hinf, section, L"WinePreInstall", registry_callback, &info ))
return FALSE;
}
if (flags & SPINST_REGSVR)
{
if (iterate_section_fields( hinf, section, L"WineFakeDlls", fake_dlls_callback, NULL ))
cleanup_fake_dlls();
else
return FALSE;
}
if (flags & SPINST_FILES)
{
struct files_callback_info info;
@ -1121,24 +1128,14 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
}
if (flags & SPINST_REGSVR)
{
struct register_dll_info info;
struct register_dll_info info = { .unregister = FALSE };
HRESULT hr;
info.unregister = FALSE;
info.modules_size = 0;
info.modules_count = 0;
info.modules = NULL;
if (flags & SPINST_REGISTERCALLBACKAWARE)
{
info.callback = callback;
info.callback_context = context;
}
else info.callback = NULL;
if (iterate_section_fields( hinf, section, L"WineFakeDlls", fake_dlls_callback, NULL ))
cleanup_fake_dlls();
else
return FALSE;
hr = CoInitialize(NULL);
@ -1153,19 +1150,14 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
}
if (flags & SPINST_UNREGSVR)
{
struct register_dll_info info;
struct register_dll_info info = { .unregister = TRUE };
HRESULT hr;
info.unregister = TRUE;
info.modules_size = 0;
info.modules_count = 0;
info.modules = NULL;
if (flags & SPINST_REGISTERCALLBACKAWARE)
{
info.callback = callback;
info.callback_context = context;
}
else info.callback = NULL;
hr = CoInitialize(NULL);