[PATCH 1/2] kernelbase: Don't return ERROR_INSUFFICIENT_BUFFER from GetEnvironmentVariableW.

Zebediah Figura z.figura12 at gmail.com
Mon Jan 20 11:46:19 CST 2020

On 1/16/20 10:26 PM, Vladimir Panteleev wrote:
> On Thu, 16 Jan 2020 at 08:43, Zhiyi Zhang <zzhang at codeweavers.com> wrote:
>> Wine already has tests for SetEnvironmentVariableW in dlls/kernel32/tests/environ.c.
>> I think you should add new tests there instead of creating a new one in kernelbase.
> Good idea, thanks.
> It looks like there is another problem. Wine's current behavior for
> the thing I'm trying to fix is "correct" in that it correctly emulates
> Windows versions before 7. However, the affected Windows program
> expects the W7+ behavior, and doesn't support older Windows versions
> anyway. What can be done about this? if (...GetVersion()...) ...old
> behavior... else ...w7+ behavior...? Or should it be changed to just
> do what W7 does?

As far as I'm aware it's generally fine to change Wine to 
(unconditionally) emulate newer Windows behaviour rather than older if a 
program depends on it, especially if the older behaviour is obviously 
"broken" in some manner (e.g. contradicts the documentation or is 
otherwise insane.)

More information about the wine-devel mailing list