Re: [PATCH 1/2] userenv: Improved CreateEnvironmentBlock implementation (try2)

2011-11-15 Thread Piotr Caban

On 11/14/11 18:26, Alexandre Julliard wrote:

Piotr Caban  writes:


+static void set_wow64_environment(WCHAR **env)
+{
+static const WCHAR archW[]= 
{'P','R','O','C','E','S','S','O','R','_','A','R','C','H','I','T','E','C','T','U','R','E',0};
+static const WCHAR arch6432W[] = 
{'P','R','O','C','E','S','S','O','R','_','A','R','C','H','I','T','E','W','6','4','3','2',0};


This stuff needs to be done depending on the 32/64 architecture of the
child process, so it probably shouldn't be done here. The variables
will be reset on every process startup anyway.

The environment may be used not only when creating new process. Windows 
7 is setting ProgramW64/ProgramFiles and 
CommonProgramFiles/CommonProgramW6432 in this function.


Piotr




Re: [PATCH 1/2] userenv: Improved CreateEnvironmentBlock implementation (try2)

2011-11-14 Thread Alexandre Julliard
Piotr Caban  writes:

> +static void set_wow64_environment(WCHAR **env)
> +{
> +static const WCHAR archW[]= 
> {'P','R','O','C','E','S','S','O','R','_','A','R','C','H','I','T','E','C','T','U','R','E',0};
> +static const WCHAR arch6432W[] = 
> {'P','R','O','C','E','S','S','O','R','_','A','R','C','H','I','T','E','W','6','4','3','2',0};

This stuff needs to be done depending on the 32/64 architecture of the
child process, so it probably shouldn't be done here. The variables
will be reset on every process startup anyway.

-- 
Alexandre Julliard
julli...@winehq.org