Roman Pišl : ntdll: Allow loading of native libraries for Win16.
Module: wine Branch: master Commit: a0425b9610a2925459141d466774fc10360833ed URL: https://source.winehq.org/git/wine.git/?a=commit;h=a0425b9610a2925459141d466... Author: Roman Pišl <rpisl(a)seznam.cz> Date: Sat Jun 5 21:52:06 2021 +0200 ntdll: Allow loading of native libraries for Win16. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51224 Signed-off-by: Roman Pišl <rpisl(a)seznam.cz> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index f3a37d4e8a6..e19b62cdaaf 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2828,12 +2828,6 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, con status = STATUS_SUCCESS; goto done; } - /* 16-bit files can't be loaded from the prefix */ - if (libname[0] && libname[1] && !wcscmp( libname + wcslen(libname) - 2, L"16" )) - { - status = find_builtin_without_file( libname, nt_name, pwm, mapping, image_info, id ); - goto done; - } } } @@ -2842,6 +2836,10 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, con else if (!(status = RtlDosPathNameToNtPathName_U_WithStatus( libname, nt_name, NULL, NULL ))) status = open_dll_file( nt_name, pwm, mapping, image_info, id ); + /* 16-bit files can't be loaded from the prefix */ + if (status && libname[0] && libname[1] && !wcscmp( libname + wcslen(libname) - 2, L"16" ) && !contains_path( libname )) + status = find_builtin_without_file( libname, nt_name, pwm, mapping, image_info, id ); + if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) status = STATUS_INVALID_IMAGE_FORMAT; done:
participants (1)
-
Alexandre Julliard