Reason for some process failures in kernel32 tests

Wagner Ferenc wferi at
Mon Jan 1 10:36:03 CST 2007

Paul Vriens < at> writes:

> On Mon, 2007-01-01 at 16:25 +0100, Wagner Ferenc wrote:
>> Paul Vriens < at> writes:
>>> The winetest gui shows that the working directory is (in this case)
>>> c:\temp\wct12. This value is however not passed to the tests when
>>> CreateProcess is run:
>>> main.c:
>>> 291     if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0,
>>> 292                          NULL, NULL, &si, &pi)) {
>>            ,--------------------------^
>> MSDN: If this parameter is NULL, the new process will have the same
>>       current drive and directory as the calling process.
>> The CreateProcess documentation is rather convoluted, though.  The
>> first NULL also seems risky on first read.
> That was exactly my point when putting in that piece of code :-).
> This also means (me thinks) that the start-directory is used instead of
> the working-directory.
> Another approach would be to have winetest change the directory to the
> working directory.

I was under the impression that winetest changed its working directory
to the temporary directory it creates.  Looks like it does not,
probably so that it can remove the directory in the end.  Either
main()'s tempdir variable should be passed to run_test() and later to
run_ex() for passing to CreateProcessA(), or the working directory
should be changed after creating and before removing it in main(), I

More information about the wine-devel mailing list