From: Vladimir Panteleev Subject: Re: [PATCH 1/2] kernelbase: Don't return ERROR_INSUFFICIENT_BUFFER from GetEnvironmentVariableW. Message-Id: Date: Fri, 17 Jan 2020 04:26:03 +0000 In-Reply-To: <8bd11304-59d3-abc3-604f-11e84ceef2dc@codeweavers.com> References: <20200116083242.688444-1-git@vladimir.panteleev.md> <8bd11304-59d3-abc3-604f-11e84ceef2dc@codeweavers.com> On Thu, 16 Jan 2020 at 08:43, Zhiyi Zhang 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?