/* Now set up some basic Initial TEB Parameters */
InitialTeb->AllocatedStackBase = (PVOID)Stack;
InitialTeb->StackBase = (PVOID)(Stack + StackReserve);
+ InitialTeb->PreviousStackBase = NULL;
+ InitialTeb->PreviousStackLimit = NULL;
/* Update the Stack Position */
Stack += StackReserve - StackCommit;
RelativeName.Handle = NULL;
/* Find the application name */
- RtlDosPathNameToNtPathName_U(lpApplicationName,
- ApplicationName,
- NULL,
- &RelativeName);
+ if (!RtlDosPathNameToNtPathName_U(lpApplicationName,
+ ApplicationName,
+ NULL,
+ &RelativeName))
+ {
+ return STATUS_OBJECT_PATH_NOT_FOUND;
+ }
+
DPRINT("ApplicationName %wZ\n", ApplicationName);
DPRINT("RelativeName %wZ\n", &RelativeName.DosPath);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to open file\n");
- SetLastErrorByStatus (Status);
+ SetLastErrorByStatus(Status);
return Status;
}