From e69d5f4655be3ce85217c75608d91ebc714c8dc3 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 5 Dec 2000 18:08:24 +0000 Subject: [PATCH] Fixed forwarding of current directory string svn path=/trunk/; revision=1450 --- reactos/lib/kernel32/process/create.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/reactos/lib/kernel32/process/create.c b/reactos/lib/kernel32/process/create.c index 892ca60e05b..3f72c0b541b 100644 --- a/reactos/lib/kernel32/process/create.c +++ b/reactos/lib/kernel32/process/create.c @@ -1,4 +1,4 @@ -/* $Id: create.c,v 1.30 2000/08/11 12:32:37 ekohl Exp $ +/* $Id: create.c,v 1.31 2000/12/05 18:08:24 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -112,7 +112,7 @@ CreateProcessA ( bInheritHandles, dwCreationFlags, lpEnvironment, - CurrentDirectoryU.Buffer, + (lpCurrentDirectory == NULL) ? NULL : CurrentDirectoryU.Buffer, (LPSTARTUPINFOW)lpStartupInfo, lpProcessInformation); @@ -396,6 +396,7 @@ WINBOOL STDCALL CreateProcessW(LPCWSTR lpApplicationName, PWCHAR e; ULONG i; ANSI_STRING ProcedureName; + UNICODE_STRING CurrentDirectoryW; DPRINT("CreateProcessW(lpApplicationName '%S', lpCommandLine '%S')\n", lpApplicationName,lpCommandLine); @@ -441,6 +442,10 @@ WINBOOL STDCALL CreateProcessW(LPCWSTR lpApplicationName, wcscat(TempCommandLine, lpCommandLine); } + /* Initialize the current directory string */ + RtlInitUnicodeString(&CurrentDirectoryW, + lpCurrentDirectory); + /* * Create the PPB */ @@ -452,7 +457,7 @@ WINBOOL STDCALL CreateProcessW(LPCWSTR lpApplicationName, RtlCreateProcessParameters(&Ppb, &CommandLine_U, NULL, - NULL, + (lpCurrentDirectory == NULL) ? NULL : &CurrentDirectoryW, NULL, lpEnvironment, NULL, @@ -473,7 +478,7 @@ WINBOOL STDCALL CreateProcessW(LPCWSTR lpApplicationName, /* * Create a new process - */ + */ Status = NtCreateProcess(&hProcess, PROCESS_ALL_ACCESS, NULL,