mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[WINESYNC] msi: Don't load a custom action DLL in the main process.
This has no effect anymore, and won't work if the architecture doesn't match. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id e355cb62775f7fd39a03458c62334a603dcb0c78 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
20260e3310
commit
d817f7cfa1
3 changed files with 6 additions and 13 deletions
|
@ -236,7 +236,7 @@ WCHAR *msi_create_temp_file( MSIDATABASE *db )
|
|||
return ret;
|
||||
}
|
||||
|
||||
static MSIBINARY *create_temp_binary( MSIPACKAGE *package, LPCWSTR source, BOOL dll )
|
||||
static MSIBINARY *create_temp_binary(MSIPACKAGE *package, LPCWSTR source)
|
||||
{
|
||||
static const WCHAR query[] = {
|
||||
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
|
||||
|
@ -273,11 +273,6 @@ static MSIBINARY *create_temp_binary( MSIPACKAGE *package, LPCWSTR source, BOOL
|
|||
CloseHandle( file );
|
||||
if (r != ERROR_SUCCESS) goto error;
|
||||
|
||||
/* keep a reference to prevent the dll from being unloaded */
|
||||
if (dll && !(binary->module = LoadLibraryW( tmpfile )))
|
||||
{
|
||||
ERR( "failed to load dll %s (%u)\n", debugstr_w( tmpfile ), GetLastError() );
|
||||
}
|
||||
binary->source = strdupW( source );
|
||||
binary->tmpfile = tmpfile;
|
||||
list_add_tail( &package->binaries, &binary->entry );
|
||||
|
@ -293,7 +288,7 @@ error:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static MSIBINARY *get_temp_binary( MSIPACKAGE *package, LPCWSTR source, BOOL dll )
|
||||
static MSIBINARY *get_temp_binary(MSIPACKAGE *package, LPCWSTR source)
|
||||
{
|
||||
MSIBINARY *binary;
|
||||
|
||||
|
@ -303,7 +298,7 @@ static MSIBINARY *get_temp_binary( MSIPACKAGE *package, LPCWSTR source, BOOL dll
|
|||
return binary;
|
||||
}
|
||||
|
||||
return create_temp_binary( package, source, dll );
|
||||
return create_temp_binary(package, source);
|
||||
}
|
||||
|
||||
static void file_running_action(MSIPACKAGE* package, HANDLE Handle,
|
||||
|
@ -693,7 +688,7 @@ static UINT HANDLE_CustomType1( MSIPACKAGE *package, const WCHAR *source, const
|
|||
msi_custom_action_info *info;
|
||||
MSIBINARY *binary;
|
||||
|
||||
if (!(binary = get_temp_binary( package, source, TRUE )))
|
||||
if (!(binary = get_temp_binary(package, source)))
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
TRACE("Calling function %s from %s\n", debugstr_w(target), debugstr_w(binary->tmpfile));
|
||||
|
@ -777,7 +772,8 @@ static UINT HANDLE_CustomType2( MSIPACKAGE *package, const WCHAR *source, const
|
|||
HANDLE handle;
|
||||
WCHAR *arg;
|
||||
|
||||
if (!(binary = get_temp_binary( package, source, FALSE ))) return ERROR_FUNCTION_FAILED;
|
||||
if (!(binary = get_temp_binary(package, source)))
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
deformat_string( package, target, &arg );
|
||||
TRACE("exe %s arg %s\n", debugstr_w(binary->tmpfile), debugstr_w(arg));
|
||||
|
|
|
@ -206,7 +206,6 @@ typedef struct tagMSIBINARY
|
|||
struct list entry;
|
||||
WCHAR *source;
|
||||
WCHAR *tmpfile;
|
||||
HMODULE module;
|
||||
} MSIBINARY;
|
||||
|
||||
typedef struct _column_info
|
||||
|
|
|
@ -290,8 +290,6 @@ static void free_package_structures( MSIPACKAGE *package )
|
|||
MSIBINARY *binary = LIST_ENTRY( item, MSIBINARY, entry );
|
||||
|
||||
list_remove( &binary->entry );
|
||||
if (binary->module)
|
||||
FreeLibrary( binary->module );
|
||||
if (!DeleteFileW( binary->tmpfile ))
|
||||
ERR("failed to delete %s (%u)\n", debugstr_w(binary->tmpfile), GetLastError());
|
||||
msi_free( binary->source );
|
||||
|
|
Loading…
Reference in a new issue