mirror of
https://github.com/reactos/reactos.git
synced 2026-07-07 00:44:22 +08:00
Fixed application file name (absolute path) in command line.
svn path=/trunk/; revision=566
This commit is contained in:
@@ -426,11 +426,24 @@ WINBOOL STDCALL CreateProcessW(LPCWSTR lpApplicationName,
|
||||
ULONG InitialViewSize;
|
||||
PROCESS_BASIC_INFORMATION ProcessBasicInfo;
|
||||
ULONG retlen;
|
||||
DWORD len = 0;
|
||||
|
||||
DPRINT("CreateProcessW(lpApplicationName '%w', lpCommandLine '%w')\n",
|
||||
lpApplicationName,lpCommandLine);
|
||||
|
||||
wcscpy(TempCommandLine, lpApplicationName);
|
||||
|
||||
if (lpApplicationName[1] != ':')
|
||||
{
|
||||
len = GetCurrentDirectoryW(MAX_PATH,TempCommandLine);
|
||||
if (TempCommandLine[len - 1] != L'\\')
|
||||
{
|
||||
TempCommandLine[len] = L'\\';
|
||||
TempCommandLine[len + 1] = 0;
|
||||
}
|
||||
wcscat(TempCommandLine,lpApplicationName);
|
||||
}
|
||||
else
|
||||
wcscpy(TempCommandLine, lpApplicationName);
|
||||
|
||||
if (lpCommandLine != NULL)
|
||||
{
|
||||
wcscat(TempCommandLine, L" ");
|
||||
|
||||
Reference in New Issue
Block a user