[PATCH] ws2_32: Use kernelbase directly

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue Aug 11 06:04:12 CDT 2020


Hi Stefan,

On 11/8/20 8:49 pm, Stefan Dösinger wrote:
> Am 11.08.20 um 01:25 schrieb Alistair Leslie-Hughes:
>> Hi Nikolay,
>>
>> On 10/8/20 9:00 pm, Nikolay Sivov wrote:
>>> What difference does this make?
>>>
>> Really the only difference is that it stops one extra function call.
> The PE forward should get resolved at load time if I understand it
> right. If it is not, benchmarks showing it to be a problem are needed.
> 
In this case, ws2_32 then kernel32 has a -import on these functions, so 
the the first forward would be resolved but then kernel32 has the 
function wrapped in the hot swap goodness to call the kernalbase one.

>> Since these functions have been moved to kernelbase,  doesn't it make
>> sense to point the forward to where it actually is?
> 
> Yeah, but that's a kernel32.dll implementation detail that ws2_32
> shouldn't rely on without good reason.
> 
> Another possible consideration is compatibility with what native ws2_32
> imports. If e.g. is is liked to kernelbase on modern windows and some
> application breaks because kernel32.dll get loaded although it should
> not then that would be a sound reason to change the import in our ws2_32
> too.
> On Windows 10, ws2_32 only has a kernelbase.dll reference.

Regards
Alistair.



More information about the wine-devel mailing list