msi: Import mspatcha instead of loading it dynamically.
This commit is contained in:
parent
9e0045e167
commit
2acc11c215
|
@ -17372,7 +17372,7 @@ wine_fn_config_dll msisip enable_msisip
|
|||
wine_fn_config_dll msisys.ocx enable_msisys_ocx
|
||||
wine_fn_config_dll msls31 enable_msls31
|
||||
wine_fn_config_dll msnet32 enable_msnet32
|
||||
wine_fn_config_dll mspatcha enable_mspatcha
|
||||
wine_fn_config_dll mspatcha enable_mspatcha implib
|
||||
wine_fn_config_dll msrle32 enable_msrle32 po
|
||||
wine_fn_config_test dlls/msrle32/tests msrle32_test
|
||||
wine_fn_config_dll mssign32 enable_mssign32
|
||||
|
|
|
@ -3074,7 +3074,7 @@ WINE_CONFIG_DLL(msisip)
|
|||
WINE_CONFIG_DLL(msisys.ocx)
|
||||
WINE_CONFIG_DLL(msls31)
|
||||
WINE_CONFIG_DLL(msnet32)
|
||||
WINE_CONFIG_DLL(mspatcha)
|
||||
WINE_CONFIG_DLL(mspatcha,,[implib])
|
||||
WINE_CONFIG_DLL(msrle32,,[po])
|
||||
WINE_CONFIG_TEST(dlls/msrle32/tests)
|
||||
WINE_CONFIG_DLL(mssign32)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
MODULE = msi.dll
|
||||
IMPORTLIB = msi
|
||||
IMPORTS = uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32
|
||||
DELAYIMPORTS = odbccp32 wintrust crypt32 imagehlp
|
||||
DELAYIMPORTS = odbccp32 wintrust crypt32 imagehlp mspatcha
|
||||
|
||||
C_SRCS = \
|
||||
action.c \
|
||||
|
|
|
@ -43,13 +43,11 @@
|
|||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
#include "patchapi.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
static HMODULE hmspatcha;
|
||||
static BOOL (WINAPI *ApplyPatchToFileW)(LPCWSTR, LPCWSTR, LPCWSTR, ULONG);
|
||||
|
||||
static void msi_file_update_ui( MSIPACKAGE *package, MSIFILE *f, const WCHAR *action )
|
||||
{
|
||||
MSIRECORD *uirow;
|
||||
|
@ -438,30 +436,6 @@ done:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static BOOL load_mspatcha(void)
|
||||
{
|
||||
hmspatcha = LoadLibraryA("mspatcha.dll");
|
||||
if (!hmspatcha)
|
||||
{
|
||||
ERR("Failed to load mspatcha.dll: %d\n", GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ApplyPatchToFileW = (void*)GetProcAddress(hmspatcha, "ApplyPatchToFileW");
|
||||
if(!ApplyPatchToFileW)
|
||||
{
|
||||
ERR("GetProcAddress(ApplyPatchToFileW) failed: %d.\n", GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void unload_mspatch(void)
|
||||
{
|
||||
FreeLibrary(hmspatcha);
|
||||
}
|
||||
|
||||
static MSIFILEPATCH *get_next_filepatch( MSIPACKAGE *package, const WCHAR *key )
|
||||
{
|
||||
MSIFILEPATCH *patch;
|
||||
|
@ -525,7 +499,6 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package )
|
|||
MSIFILEPATCH *patch;
|
||||
MSIMEDIAINFO *mi;
|
||||
UINT rc = ERROR_SUCCESS;
|
||||
BOOL mspatcha_loaded = FALSE;
|
||||
|
||||
TRACE("%p\n", package);
|
||||
|
||||
|
@ -557,13 +530,6 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package )
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (!mspatcha_loaded && !load_mspatcha())
|
||||
{
|
||||
rc = ERROR_FUNCTION_FAILED;
|
||||
goto done;
|
||||
}
|
||||
mspatcha_loaded = TRUE;
|
||||
|
||||
data.mi = mi;
|
||||
data.package = package;
|
||||
data.cb = patchfiles_cb;
|
||||
|
@ -587,8 +553,6 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package )
|
|||
|
||||
done:
|
||||
msi_free_media_info(mi);
|
||||
if (mspatcha_loaded)
|
||||
unload_mspatch();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
MODULE = mspatcha.dll
|
||||
MODULE = mspatcha.dll
|
||||
IMPORTLIB = mspatcha
|
||||
|
||||
C_SRCS = \
|
||||
mspatcha_main.c
|
||||
|
|
Loading…
Reference in New Issue