winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
951 discussions
Start a n
N
ew thread
Huw Davies : winecoreaudio: Release the critical section in the no interface case.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 31f088d487d6ab99e5b6b1e7e5e30b6453a1fbcb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=31f088d487d6ab99e5b6b1e7…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 24 11:26:42 2021 +0000 winecoreaudio: Release the critical section in the no interface case. This fixes an error introduced in 8e90b2569c4 which was incorrectly fixed in b5b77ed6aca. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winecoreaudio.drv/mmdevdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 717e64b2283..aa051cb3d61 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -1114,7 +1114,7 @@ static HRESULT WINAPI AudioClient_GetService(IAudioClient3 *iface, REFIID riid, if(*ppv) hr = S_OK; else{ FIXME("stub %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; + hr = E_NOINTERFACE; } end:
1
0
0
0
Alexandre Julliard : wnaspi32: Build with msvcrt.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: b089dc16bfdd0b1832b470c34bfb5658ef9f4f2e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b089dc16bfdd0b1832b470c3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 24 17:23:14 2021 +0100 wnaspi32: Build with msvcrt. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wnaspi32/Makefile.in | 2 -- dlls/wnaspi32/aspi.c | 8 ++------ dlls/wnaspi32/aspi.h | 8 -------- dlls/wnaspi32/winaspi32.c | 2 -- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/dlls/wnaspi32/Makefile.in b/dlls/wnaspi32/Makefile.in index 7b19b1bd1e4..5c3fa66e9d0 100644 --- a/dlls/wnaspi32/Makefile.in +++ b/dlls/wnaspi32/Makefile.in @@ -2,8 +2,6 @@ MODULE = wnaspi32.dll IMPORTLIB = wnaspi32 IMPORTS = advapi32 -EXTRADLLFLAGS = -mcygwin - C_SRCS = \ aspi.c \ winaspi32.c diff --git a/dlls/wnaspi32/aspi.c b/dlls/wnaspi32/aspi.c index 73ef6f59950..903c618f9ba 100644 --- a/dlls/wnaspi32/aspi.c +++ b/dlls/wnaspi32/aspi.c @@ -29,14 +29,11 @@ * aspi controllers, e-mail me if you need help. */ - -#include "config.h" -#include "wine/port.h" - #include <stdio.h> #include <stdarg.h> #include <sys/types.h> #include <string.h> +#include <stdlib.h> #include "windef.h" #include "winbase.h" @@ -45,7 +42,6 @@ #include "winescsi.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(aspi); @@ -132,5 +128,5 @@ DWORD ASPI_GetHCforController( int controller ) } RegCloseKey(hkeyPort); - return (atoiW(&wPortName[9]) << 16) + atoiW(&wBusName[9]); + return (wcstol(&wPortName[9], NULL, 10) << 16) + wcstol(&wBusName[9], NULL, 10); } diff --git a/dlls/wnaspi32/aspi.h b/dlls/wnaspi32/aspi.h index a9912ffc9e4..617dd00faf0 100644 --- a/dlls/wnaspi32/aspi.h +++ b/dlls/wnaspi32/aspi.h @@ -26,11 +26,6 @@ #include "winbase.h" #include "pshpack1.h" -#ifdef __cplusplus -extern "C" { -#endif /* #ifdef __cplusplus */ - -/*********** OLD ****************/ /* Target status codes */ #define STATUS_GOOD 0x00 @@ -76,9 +71,6 @@ extern "C" { #define SENSE_BUFFER(prb) (&prb->CDBByte[prb->SRB_CDBLen]) -#ifdef __cplusplus -} -#endif /* #ifdef __cplusplus */ #include "poppack.h" #endif diff --git a/dlls/wnaspi32/winaspi32.c b/dlls/wnaspi32/winaspi32.c index ea6d6d82e9a..d8dfd1a2e3f 100644 --- a/dlls/wnaspi32/winaspi32.c +++ b/dlls/wnaspi32/winaspi32.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <assert.h> #include <stdlib.h> #include <stdarg.h>
1
0
0
0
Alexandre Julliard : wnaspi32: Remove Linux-specific SCSI ioctls.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: d373c1a16fc55768f5bd48dfc8368190350b147b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d373c1a16fc55768f5bd48df…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 24 17:19:34 2021 +0100 wnaspi32: Remove Linux-specific SCSI ioctls. This has been broken at least since 19549d11a72f63efe0d689374446a56a68264a1f. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wnaspi32/aspi.c | 223 ------------------- dlls/wnaspi32/winaspi32.c | 534 +--------------------------------------------- dlls/wnaspi32/winescsi.h | 96 --------- 3 files changed, 2 insertions(+), 851 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d373c1a16fc55768f5bd…
1
0
0
0
Paul Gofman : kernelbase: Add stub for PrefetchVirtualMemory().
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: bf8b185b91222ddfc5828727516013486ba18e65 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf8b185b91222ddfc5828727…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Nov 24 15:09:20 2021 +0300 kernelbase: Add stub for PrefetchVirtualMemory(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-memory-l1-1-1.spec | 2 +- .../api-ms-win-core-memory-l1-1-2.spec | 2 +- dlls/kernel32/kernel32.spec | 1 + dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/memory.c | 11 +++++++++++ include/winnt.h | 6 ++++++ 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec b/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec index 3d5dea93aa5..9c1edb2e761 100644 --- a/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec +++ b/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec @@ -11,7 +11,7 @@ @ stdcall MapViewOfFileEx(long long long long long ptr) kernel32.MapViewOfFileEx @ stub MapViewOfFileFromApp @ stdcall OpenFileMappingW(long long wstr) kernel32.OpenFileMappingW -@ stub PrefetchVirtualMemory +@ stdcall PrefetchVirtualMemory(ptr ptr ptr long) kernel32.PrefetchVirtualMemory @ stdcall QueryMemoryResourceNotification(ptr ptr) kernel32.QueryMemoryResourceNotification @ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory @ stdcall ResetWriteWatch(ptr long) kernel32.ResetWriteWatch diff --git a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec index cb305f228ab..735c6ee8b54 100644 --- a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec +++ b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec @@ -16,7 +16,7 @@ @ stdcall MapViewOfFileEx(long long long long long ptr) kernel32.MapViewOfFileEx @ stub MapViewOfFileFromApp @ stdcall OpenFileMappingW(long long wstr) kernel32.OpenFileMappingW -@ stub PrefetchVirtualMemory +@ stdcall PrefetchVirtualMemory(ptr ptr ptr long) kernel32.PrefetchVirtualMemory @ stdcall QueryMemoryResourceNotification(ptr ptr) kernel32.QueryMemoryResourceNotification @ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory @ stub RegisterBadMemoryNotification diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 9667f82a5da..fbaf9443934 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1157,6 +1157,7 @@ @ stdcall PowerClearRequest(long long) @ stdcall PowerCreateRequest(ptr) @ stdcall PowerSetRequest(long long) +@ stdcall -import PrefetchVirtualMemory(ptr ptr ptr long) @ stdcall PrepareTape(ptr long long) @ stub PrivCopyFileExW @ stub PrivMoveFileIdentityW diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 55208889c35..be40e425783 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1164,7 +1164,7 @@ @ stdcall PerfStopProvider(long) # @ stub PoolPerAppKeyStateInternal @ stdcall PostQueuedCompletionStatus(long long ptr ptr) -# @ stub PrefetchVirtualMemory +@ stdcall PrefetchVirtualMemory(ptr ptr ptr long) @ stub PrivCopyFileExW @ stdcall PrivilegeCheck(ptr ptr ptr) @ stdcall PrivilegedServiceAuditAlarmW(wstr wstr long ptr long) diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c index 847005e8abe..7844b571e51 100644 --- a/dlls/kernelbase/memory.c +++ b/dlls/kernelbase/memory.c @@ -343,6 +343,17 @@ LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAllocFromApp( void *addr, SIZE_T size, } +/*********************************************************************** + * PrefetchVirtualMemory (kernelbase.@) + */ +BOOL WINAPI /* DECLSPEC_HOTPATCH */ PrefetchVirtualMemory( HANDLE process, ULONG_PTR count, + WIN32_MEMORY_RANGE_ENTRY *addresses, ULONG flags ) +{ + FIXME( "process %p, count %p, addresses %p, flags %#x stub.\n", process, (void *)count, addresses, flags ); + return TRUE; +} + + /*********************************************************************** * VirtualFree (kernelbase.@) */ diff --git a/include/winnt.h b/include/winnt.h index 3e8a92fc063..2ab74ab123c 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -776,6 +776,12 @@ typedef struct DECLSPEC_ALIGN(8) MEM_EXTENDED_PARAMETER { } DUMMYUNIONNAME; } MEM_EXTENDED_PARAMETER, *PMEM_EXTENDED_PARAMETER; +typedef struct _WIN32_MEMORY_RANGE_ENTRY +{ + PVOID VirtualAddress; + SIZE_T NumberOfBytes; +} WIN32_MEMORY_RANGE_ENTRY, *PWIN32_MEMORY_RANGE_ENTRY; + #define PAGE_NOACCESS 0x01 #define PAGE_READONLY 0x02 #define PAGE_READWRITE 0x04
1
0
0
0
Zebediah Figura : ddraw/tests: Pass the correct size to VirtualQuery().
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 2292e5fb5d5aae2789d67f204d85c02f891eddca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2292e5fb5d5aae2789d67f20…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Nov 23 16:16:23 2021 -0600 ddraw/tests: Pass the correct size to VirtualQuery(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index f9c3634c03e..c9f2aead75c 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -14119,14 +14119,14 @@ done: DestroyWindow(window); } -static void check_vtbl_protection_(int line, const void *vtbl, SIZE_T size) +static void check_vtbl_protection_(int line, const void *vtbl) { MEMORY_BASIC_INFORMATION info; - SIZE_T ret = VirtualQuery(vtbl, &info, size); + SIZE_T ret = VirtualQuery(vtbl, &info, sizeof(info)); ok_(__FILE__, line)(ret == sizeof(info), "Failed to query memory.\n"); ok_(__FILE__, line)(info.Protect & (PAGE_READWRITE | PAGE_WRITECOPY), "Got protection %#x.\n", info.Protect); } -#define check_vtbl_protection(a) check_vtbl_protection_(__LINE__, a, sizeof(*(a))) +#define check_vtbl_protection(a) check_vtbl_protection_(__LINE__, a) static void test_vtbl_protection(void) {
1
0
0
0
Henri Verbeet : wined3d: Do not add the BO address offset when calling glFlushMappedBufferRange().
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 052dbb427d6d1097babb346b9eb3768d3ad05cc9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=052dbb427d6d1097babb346b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Nov 23 21:17:08 2021 -0600 wined3d: Do not add the BO address offset when calling glFlushMappedBufferRange(). Fixes: c2f0ae50b4dd70aa9d364ec6a7dd728e65370d8b Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context_gl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 3c57bcbe249..0b0d594b4b1 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2759,8 +2759,9 @@ static void flush_bo_ranges(struct wined3d_context_gl *context_gl, const struct { for (i = 0; i < range_count; ++i) { - GL_EXTCALL(glFlushMappedBufferRange(bo->binding, - (UINT_PTR)data->addr + ranges[i].offset, ranges[i].size)); + /* The offset passed to glFlushMappedBufferRange() is relative to + * the mapped range, so don't add data->addr in this case. */ + GL_EXTCALL(glFlushMappedBufferRange(bo->binding, ranges[i].offset, ranges[i].size)); } } else if (gl_info->supported[APPLE_FLUSH_BUFFER_RANGE])
1
0
0
0
Henri Verbeet : wined3d: Respect the BO buffer offset in wined3d_context_gl_copy_bo_address().
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 0e501c00c496b246e81c2a0a7817c4390610210b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0e501c00c496b246e81c2a0a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Nov 23 21:17:07 2021 -0600 wined3d: Respect the BO buffer offset in wined3d_context_gl_copy_bo_address(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context_gl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index b327b7bba8e..3c57bcbe249 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2828,7 +2828,8 @@ void wined3d_context_gl_copy_bo_address(struct wined3d_context_gl *context_gl, GL_EXTCALL(glBindBuffer(GL_COPY_READ_BUFFER, src_bo->id)); GL_EXTCALL(glBindBuffer(GL_COPY_WRITE_BUFFER, dst_bo->id)); GL_EXTCALL(glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, - (GLintptr)src->addr, (GLintptr)dst->addr, size)); + src_bo->b.buffer_offset + (GLintptr)src->addr, + dst_bo->b.buffer_offset + (GLintptr)dst->addr, size)); checkGLcall("direct buffer copy"); wined3d_context_gl_reference_bo(context_gl, src_bo); @@ -2850,7 +2851,7 @@ void wined3d_context_gl_copy_bo_address(struct wined3d_context_gl *context_gl, else if (!dst_bo && src_bo) { wined3d_context_gl_bind_bo(context_gl, src_bo->binding, src_bo->id); - GL_EXTCALL(glGetBufferSubData(src_bo->binding, (GLintptr)src->addr, size, dst->addr)); + GL_EXTCALL(glGetBufferSubData(src_bo->binding, src_bo->b.buffer_offset + (GLintptr)src->addr, size, dst->addr)); checkGLcall("buffer download"); wined3d_context_gl_reference_bo(context_gl, src_bo); @@ -2858,7 +2859,7 @@ void wined3d_context_gl_copy_bo_address(struct wined3d_context_gl *context_gl, else if (dst_bo && !src_bo) { wined3d_context_gl_bind_bo(context_gl, dst_bo->binding, dst_bo->id); - GL_EXTCALL(glBufferSubData(dst_bo->binding, (GLintptr)dst->addr, size, src->addr)); + GL_EXTCALL(glBufferSubData(dst_bo->binding, dst_bo->b.buffer_offset + (GLintptr)dst->addr, size, src->addr)); checkGLcall("buffer upload"); wined3d_context_gl_reference_bo(context_gl, dst_bo);
1
0
0
0
Zebediah Figura : ntdll: Prevent loading Wine system dependencies in place of identically named application DLLs.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: bfbccf1a038eb92b8bea977b3cf38a88217579d2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfbccf1a038eb92b8bea977b…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Nov 12 11:55:38 2021 -0600 ntdll: Prevent loading Wine system dependencies in place of identically named application DLLs. That is, load Wine system dependencies only when they are imported from Wine builtins or other system dependencies, and do not match a Wine system dependency by its base name when looking for already-loaded modules. The reasoning is that it is possible for an application to ship, and expect to use, a newer version of a MinGW-compiled library, or one with custom patches, or possibly an unrelated library with the same name. We don't want to offer Wine's system dependencies in place of the application's, or vice versa. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 49 ++++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index aec404f8c9b..3cc522af4d8 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -135,6 +135,7 @@ typedef struct _wine_modref LDR_DATA_TABLE_ENTRY ldr; struct file_id id; ULONG CheckSum; + BOOL system; } WINE_MODREF; static UINT tls_module_count; /* number of modules with TLS directory */ @@ -185,7 +186,7 @@ static WINE_MODREF *last_failed_modref; static LDR_DDAG_NODE *node_ntdll, *node_kernel32; -static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, DWORD flags, WINE_MODREF** pwm ); +static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, DWORD flags, WINE_MODREF** pwm, BOOL system ); static NTSTATUS process_attach( LDR_DDAG_NODE *node, LPVOID lpReserved ); static FARPROC find_ordinal_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports, DWORD exp_size, DWORD ordinal, LPCWSTR load_path ); @@ -517,8 +518,8 @@ static WINE_MODREF *find_basename_module( LPCWSTR name ) mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; for (entry = mark->Flink; entry != mark; entry = entry->Flink) { - LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); - if (RtlEqualUnicodeString( &name_str, &mod->BaseDllName, TRUE )) + WINE_MODREF *mod = CONTAINING_RECORD(entry, WINE_MODREF, ldr.InLoadOrderLinks); + if (RtlEqualUnicodeString( &name_str, &mod->ldr.BaseDllName, TRUE ) && !mod->system) { cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr); return cached_modref; @@ -760,8 +761,9 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS if (!(wm = find_basename_module( mod_name ))) { + WINE_MODREF *imp = get_modref( module ); TRACE( "delay loading %s for '%s'\n", debugstr_w(mod_name), forward ); - if (load_dll( load_path, mod_name, 0, &wm ) == STATUS_SUCCESS && + if (load_dll( load_path, mod_name, 0, &wm, imp->system ) == STATUS_SUCCESS && !(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS)) { if (!imports_fixup_done && current_modref) @@ -778,7 +780,7 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS if (!wm) { ERR( "module not found for forward '%s' used by %s\n", - forward, debugstr_w(get_modref(module)->ldr.FullDllName.Buffer) ); + forward, debugstr_w(imp->ldr.FullDllName.Buffer) ); return NULL; } } @@ -926,6 +928,7 @@ void * WINAPI RtlFindExportedRoutineByName( HMODULE module, const char *name ) */ static BOOL import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *descr, LPCWSTR load_path, WINE_MODREF **pwm ) { + BOOL system = current_modref->system || (current_modref->ldr.Flags & LDR_WINE_INTERNAL); NTSTATUS status; WINE_MODREF *wmImp; HMODULE imp_mod; @@ -954,7 +957,7 @@ static BOOL import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *descr, LP } status = build_import_name( buffer, name, len ); - if (!status) status = load_dll( load_path, buffer, 0, &wmImp ); + if (!status) status = load_dll( load_path, buffer, 0, &wmImp, system ); if (status) { @@ -1224,7 +1227,7 @@ static NTSTATUS fixup_imports_ilonly( WINE_MODREF *wm, LPCWSTR load_path, void * prev = current_modref; current_modref = wm; assert( !wm->ldr.DdagNode->Dependencies.Tail ); - if (!(status = load_dll( load_path, L"mscoree.dll", 0, &imp )) + if (!(status = load_dll( load_path, L"mscoree.dll", 0, &imp, FALSE )) && !add_module_dependency_after( wm->ldr.DdagNode, imp->ldr.DdagNode, NULL )) status = STATUS_NO_MEMORY; current_modref = prev; @@ -1996,7 +1999,7 @@ static NTSTATUS perform_relocations( void *module, IMAGE_NT_HEADERS *nt, SIZE_T */ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, void **module, const SECTION_IMAGE_INFORMATION *image_info, const struct file_id *id, - DWORD flags, WINE_MODREF **pwm ) + DWORD flags, BOOL system, WINE_MODREF **pwm ) { static const char builtin_signature[] = "Wine builtin DLL"; char *signature = (char *)((IMAGE_DOS_HEADER *)*module + 1); @@ -2021,6 +2024,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, if (id) wm->id = *id; if (image_info->LoaderFlags) wm->ldr.Flags |= LDR_COR_IMAGE; if (image_info->u.s.ComPlusILOnly) wm->ldr.Flags |= LDR_COR_ILONLY; + wm->system = system; set_security_cookie( *module, map_size ); @@ -2475,7 +2479,7 @@ static WINE_MODREF *find_existing_module( HMODULE module ) */ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, HANDLE mapping, const SECTION_IMAGE_INFORMATION *image_info, const struct file_id *id, - DWORD flags, WINE_MODREF** pwm ) + DWORD flags, BOOL system, WINE_MODREF** pwm ) { void *module = NULL; SIZE_T len = 0; @@ -2497,7 +2501,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam #ifdef _WIN64 if (!convert_to_pe64( module, image_info )) status = STATUS_INVALID_IMAGE_FORMAT; #endif - if (!status) status = build_module( load_path, nt_name, &module, image_info, id, flags, pwm ); + if (!status) status = build_module( load_path, nt_name, &module, image_info, id, flags, system, pwm ); if (status && module) NtUnmapViewOfSection( NtCurrentProcess(), module ); return status; } @@ -2532,7 +2536,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, { SECTION_IMAGE_INFORMATION image_info = { 0 }; - if ((status = build_module( load_path, &win_name, &module, &image_info, NULL, flags, &wm ))) + if ((status = build_module( load_path, &win_name, &module, &image_info, NULL, flags, FALSE, &wm ))) { if (module) NtUnmapViewOfSection( NtCurrentProcess(), module ); return status; @@ -2577,7 +2581,7 @@ static WINE_MODREF *build_main_module(void) #endif status = RtlDosPathNameToNtPathName_U_WithStatus( params->ImagePathName.Buffer, &nt_name, NULL, NULL ); if (status) goto failed; - status = build_module( NULL, &nt_name, &module, &info, NULL, DONT_RESOLVE_DLL_REFERENCES, &wm ); + status = build_module( NULL, &nt_name, &module, &info, NULL, DONT_RESOLVE_DLL_REFERENCES, FALSE, &wm ); RtlFreeUnicodeString( &nt_name ); if (!status) return wm; failed: @@ -2965,18 +2969,25 @@ done: * Load a PE style module according to the load order. * The loader_section must be locked while calling this function. */ -static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, DWORD flags, WINE_MODREF** pwm ) +static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, DWORD flags, WINE_MODREF** pwm, BOOL system ) { UNICODE_STRING nt_name; struct file_id id; HANDLE mapping = 0; SECTION_IMAGE_INFORMATION image_info; - NTSTATUS nts; + NTSTATUS nts = STATUS_DLL_NOT_FOUND; ULONG64 prev; TRACE( "looking for %s in %s\n", debugstr_w(libname), debugstr_w(load_path) ); - nts = find_dll_file( load_path, libname, &nt_name, pwm, &mapping, &image_info, &id ); + if (system && system_dll_path.Buffer) + nts = search_dll_file( system_dll_path.Buffer, libname, &nt_name, pwm, &mapping, &image_info, &id ); + + if (nts) + { + nts = find_dll_file( load_path, libname, &nt_name, pwm, &mapping, &image_info, &id ); + system = FALSE; + } if (*pwm) /* found already loaded module */ { @@ -3009,7 +3020,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, DWORD fl break; case STATUS_SUCCESS: /* valid PE file */ - nts = load_native_dll( load_path, &nt_name, mapping, &image_info, &id, flags, pwm ); + nts = load_native_dll( load_path, &nt_name, mapping, &image_info, &id, flags, system, pwm ); break; } @@ -3071,7 +3082,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH LdrLoadDll(LPCWSTR path_name, DWORD flags, RtlEnterCriticalSection( &loader_section ); - nts = load_dll( path_name, dllname ? dllname : libname->Buffer, flags, &wm ); + nts = load_dll( path_name, dllname ? dllname : libname->Buffer, flags, &wm, FALSE ); if (nts == STATUS_SUCCESS && !(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS)) { @@ -3853,7 +3864,7 @@ static void init_wow64( CONTEXT *context ) NTSTATUS status; static const WCHAR wow64_path[] = L"C:\\windows\\system32\\wow64.dll"; - if ((status = load_dll( NULL, wow64_path, 0, &wm ))) + if ((status = load_dll( NULL, wow64_path, 0, &wm, FALSE ))) { ERR( "could not load %s, status %x\n", debugstr_w(wow64_path), status ); NtTerminateProcess( GetCurrentProcess(), status ); @@ -4003,7 +4014,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR if (NtCurrentTeb()->WowTebOffset) init_wow64( context ); - if ((status = load_dll( NULL, L"kernel32.dll", 0, &kernel32 )) != STATUS_SUCCESS) + if ((status = load_dll( NULL, L"kernel32.dll", 0, &kernel32, FALSE )) != STATUS_SUCCESS) { MESSAGE( "wine: could not load kernel32.dll, status %x\n", status ); NtTerminateProcess( GetCurrentProcess(), status );
1
0
0
0
Zebediah Figura : ntdll: Allow loading system DLLs from a path specified at configure time.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 7e926a9aa9ce31154d623019344eb834f6b6229d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7e926a9aa9ce31154d623019…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Nov 12 11:55:37 2021 -0600 ntdll: Allow loading system DLLs from a path specified at configure time. Many distributions provide MinGW-compiled system DLLs which are currently bundled with Wine. Unfortunately, while MinGW pkg-config can be used to detect the linking path, there is no standardized runtime path, and many distributions in fact use different paths. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 14 ++++++++++++++ configure.ac | 2 ++ dlls/ntdll/Makefile.in | 1 + dlls/ntdll/loader.c | 3 +++ dlls/ntdll/unix/env.c | 30 ++++++++++++++++++++++++++++++ dlls/ntdll/unix/loader.c | 23 +++++++++++++++++++++++ dlls/ntdll/unix/unix_private.h | 1 + 7 files changed, 74 insertions(+) diff --git a/configure b/configure index a2298117ae1..ded6e71b815 100755 --- a/configure +++ b/configure @@ -834,6 +834,7 @@ build_os build_vendor build_cpu build +system_dllpath target_alias host_alias build_alias @@ -931,6 +932,7 @@ with_xrender with_xshape with_xshm with_xxf86vm +with_system_dllpath with_wine_tools with_wine64 enable_largefile @@ -2719,6 +2721,9 @@ Optional Packages: --without-xshape do not use the Xshape extension --without-xshm do not use XShm (shared memory extension) --without-xxf86vm do not use XFree video mode extension + --with-system-dllpath=PATH + load external PE dependencies from colon-separated + path PATH --with-wine-tools=DIR use Wine tools from directory DIR --with-wine64=DIR use the 64-bit Wine in DIR for a Wow64 build --with-x use the X Window System @@ -4765,6 +4770,14 @@ fi +# Check whether --with-system-dllpath was given. +if test ${with_system_dllpath+y} +then : + withval=$with_system_dllpath; system_dllpath=$withval + +fi + + # Check whether --with-wine-tools was given. if test ${with_wine_tools+y} then : @@ -23020,6 +23033,7 @@ LIBS = $LIBS build_alias = $build_alias host_alias = $host_alias target_alias = $target_alias +system_dllpath = $system_dllpath build = $build build_cpu = $build_cpu build_vendor = $build_vendor diff --git a/configure.ac b/configure.ac index 1c716b4ec00..4f7c7209da9 100644 --- a/configure.ac +++ b/configure.ac @@ -90,6 +90,8 @@ AC_ARG_WITH(xshm, AS_HELP_STRING([--without-xshm],[do not use XShm (shared AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree video mode extension]), [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; ac_cv_header_X11_extensions_xf86vmproto_h=no; fi]) +AC_ARG_WITH(system-dllpath,AS_HELP_STRING([--with-system-dllpath=PATH],[load external PE dependencies from colon-separated path PATH]), + AC_SUBST(system_dllpath,[$withval])) AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR])) AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build])) diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in index d3be1fad0bc..7e823208840 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in @@ -72,5 +72,6 @@ EXTRA_OBJS = unix/version.o unix_loader_EXTRADEFS = \ -DBINDIR=\"${bindir}\" \ + -DSYSTEMDLLPATH=\"${system_dllpath}\" \ -DDLL_TO_BINDIR=\"`${MAKEDEP} -R ${dlldir} ${bindir}`\" \ -DBIN_TO_DATADIR=\"`${MAKEDEP} -R ${bindir} ${datadir}/wine`\" diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index e32df565c64..aec404f8c9b 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -95,6 +95,7 @@ static int free_lib_count; /* recursion depth of LdrUnloadDll calls */ static ULONG path_safe_mode; /* path mode set by RtlSetSearchPathMode */ static ULONG dll_safe_mode = 1; /* dll search mode */ static UNICODE_STRING dll_directory; /* extra path for LdrSetDllDirectory */ +static UNICODE_STRING system_dll_path; /* path to search for system dependency dlls */ static DWORD default_search_flags; /* default flags set by LdrSetDefaultDllDirectories */ static WCHAR *default_load_path; /* default dll search path */ @@ -3993,6 +3994,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR load_global_options(); version_init(); + get_env_var( L"WINESYSTEMDLLPATH", 0, &system_dll_path ); + wm = build_main_module(); wm->ldr.LoadCount = -1; diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 0f195a33846..f36899fe880 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -1281,6 +1281,35 @@ static void add_path_var( WCHAR **env, SIZE_T *pos, SIZE_T *size, const char *na } +static void add_system_dll_path_var( WCHAR **env, SIZE_T *pos, SIZE_T *size ) +{ + WCHAR *path = NULL; + size_t path_len = 0; + DWORD i; + + for (i = 0; system_dll_paths[i]; ++i) + { + WCHAR *nt_name = NULL; + + if (!unix_to_nt_file_name( system_dll_paths[i], &nt_name )) + { + size_t len = wcslen( nt_name ); + path = realloc( path, (path_len + len + 1) * sizeof(WCHAR) ); + memcpy( path + path_len, nt_name, len * sizeof(WCHAR) ); + path[path_len + len] = ';'; + path_len += len + 1; + free( nt_name ); + } + } + if (path_len) + { + path[path_len - 1] = 0; + append_envW( env, pos, size, "WINESYSTEMDLLPATH", path ); + free( path ); + } +} + + /************************************************************************* * add_dynamic_environment * @@ -1303,6 +1332,7 @@ static void add_dynamic_environment( WCHAR **env, SIZE_T *pos, SIZE_T *size ) } sprintf( str, "WINEDLLDIR%u", i ); append_envW( env, pos, size, str, NULL ); + add_system_dll_path_var( env, pos, size ); append_envA( env, pos, size, "WINEUSERNAME", user_name ); append_envA( env, pos, size, "WINEDLLOVERRIDES", overrides ); if (unix_cp.data) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 00b07edb1f3..f19d1d68dc7 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -388,6 +388,7 @@ const char *data_dir = NULL; const char *build_dir = NULL; const char *config_dir = NULL; const char **dll_paths = NULL; +const char **system_dll_paths = NULL; const char *user_name = NULL; SECTION_IMAGE_INFORMATION main_image_info = { NULL }; static HMODULE ntdll_module; @@ -546,6 +547,27 @@ static void set_dll_path(void) } +static void set_system_dll_path(void) +{ + const char *p, *path = SYSTEMDLLPATH; + int count = 0; + + if (path && *path) for (p = path, count = 1; *p; p++) if (*p == ':') count++; + + system_dll_paths = malloc( (count + 1) * sizeof(*system_dll_paths) ); + count = 0; + + if (path && *path) + { + char *path_copy = strdup(path); + for (p = strtok( path_copy, ":" ); p; p = strtok( NULL, ":" )) + system_dll_paths[count++] = strdup( p ); + free( path_copy ); + } + system_dll_paths[count] = NULL; +} + + static void set_home_dir(void) { const char *home = getenv( "HOME" ); @@ -620,6 +642,7 @@ static void init_paths( char *argv[] ) } set_dll_path(); + set_system_dll_path(); set_home_dir(); set_config_dir(); } diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index b499978b2fe..9a9f60a1678 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -113,6 +113,7 @@ extern const char *build_dir DECLSPEC_HIDDEN; extern const char *config_dir DECLSPEC_HIDDEN; extern const char *user_name DECLSPEC_HIDDEN; extern const char **dll_paths DECLSPEC_HIDDEN; +extern const char **system_dll_paths DECLSPEC_HIDDEN; extern PEB *peb DECLSPEC_HIDDEN; extern USHORT *uctable DECLSPEC_HIDDEN; extern USHORT *lctable DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : ntdll: Merge the calls to find_builtin_without_file().
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: f10a85de60ee42bd4abef24396b1f5a0156fae9f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f10a85de60ee42bd4abef243…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 24 14:19:50 2021 +0100 ntdll: Merge the calls to find_builtin_without_file(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 508e4214f19..e32df565c64 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2786,6 +2786,14 @@ static NTSTATUS find_builtin_without_file( const WCHAR *name, UNICODE_STRING *ne NTSTATUS status = STATUS_DLL_NOT_FOUND; BOOL found_image = FALSE; + if (contains_path( name )) return status; + + if (!is_prefix_bootstrap) + { + /* 16-bit files can't be loaded from the prefix */ + if (!name[1] || wcscmp( name + wcslen(name) - 2, L"16" )) return status; + } + if (!get_env_var( L"WINEBUILDDIR", 20 + 2 * wcslen(name), new_name )) { len = new_name->Length; @@ -2885,10 +2893,7 @@ static NTSTATUS search_dll_file( LPCWSTR paths, LPCWSTR search, UNICODE_STRING * paths = ptr; } - if (found_image) - status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; - else if (is_prefix_bootstrap && !contains_path( search )) - status = find_builtin_without_file( search, nt_name, pwm, mapping, image_info, id ); + if (found_image) status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; done: RtlFreeHeap( GetProcessHeap(), 0, name ); @@ -2936,14 +2941,14 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, UNI } if (RtlDetermineDosPathNameType_U( libname ) == RELATIVE_PATH) + { status = search_dll_file( load_path, libname, nt_name, pwm, mapping, image_info, id ); + if (status == STATUS_DLL_NOT_FOUND) + status = find_builtin_without_file( libname, nt_name, pwm, mapping, image_info, id ); + } 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:
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200