-/* $Id: pdata.c,v 1.2 2002/03/11 20:45:07 hyperion Exp $
+/* $Id: pdata.c,v 1.3 2002/03/21 22:43:13 hyperion Exp $
*/
/*
* COPYRIGHT: See COPYING in the top level directory
IN PUNICODE_STRING ImageFile
)
{
+ NTSTATUS nErrCode;
UNICODE_STRING wstrEmpty = {0, 0, NULL};
UNICODE_STRING wstrCommandLine = {0, 0, NULL};
- NTSTATUS nErrCode;
__fildes_t * fdDescriptor;
int i;
+ /* RtlInitUnicodeString(&wstrEmpty, L""); */
/* TODO: error checking */
/* build the command line string from argument count and argument vector */
}
}
-#ifndef NDEBUG
- wstrCommandLine.MaximumLength = wstrCommandLine.Length + sizeof(WCHAR);
- wstrCommandLine.Buffer = __realloc(wstrCommandLine.Buffer, wstrCommandLine.MaximumLength);
- wstrCommandLine.Buffer[wstrCommandLine.Length / sizeof(WCHAR)] = 0;
-
- INFO("command line is \"%ls\"\n", wstrCommandLine.Buffer);
-#endif
-
- RtlCreateProcessParameters
+ nErrCode = RtlCreateProcessParameters
(
ProcessParameters,
ImageFile,
- &wstrEmpty,
+ NULL,
&wstrEmpty,
&wstrCommandLine,
0,
__free(pnArgLengths);
__free(pnEnvVarsLengths);
*SerializedProcessData = 0;
- return;
+ return nErrCode;
}
INFO("%d bytes actually allocated\n", ulAllocSize);
/* success */
*SerializedProcessData = pspdProcessData;
+
+ return (STATUS_SUCCESS);
}
/* unserialize a process data block. Dynamic data will be moved into the default