mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 19:43:31 +08:00
[SMSS] Implement SmpStartCsr
This commit is contained in:
parent
98882fb089
commit
735d2b4c93
@ -153,8 +153,44 @@ SmpStartCsr(IN PSM_API_MSG SmApiMsg,
|
||||
IN PSMP_CLIENT_CONTEXT ClientContext,
|
||||
IN HANDLE SmApiPort)
|
||||
{
|
||||
DPRINT1("%s is not yet implemented\n", __FUNCTION__);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
PSM_START_CSR_MSG SmStartCsr = &SmApiMsg->u.StartCsr;
|
||||
UNICODE_STRING InitialCommand;
|
||||
HANDLE InitialCommandProcess, InitialCommandProcessId, WindowsSubSysProcessId;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = SmpLoadSubSystemsForMuSession(&SmStartCsr->MuSessionId,
|
||||
&WindowsSubSysProcessId,
|
||||
&InitialCommand);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("SMSS: SmpLoadSubSystemsForMuSession failed with status 0x%08x\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (SmStartCsr->Length)
|
||||
{
|
||||
InitialCommand.Length = InitialCommand.MaximumLength = SmStartCsr->Length;
|
||||
InitialCommand.Buffer = SmStartCsr->Buffer;
|
||||
}
|
||||
|
||||
Status = SmpExecuteInitialCommand(SmStartCsr->MuSessionId,
|
||||
&InitialCommand,
|
||||
&InitialCommandProcess,
|
||||
&InitialCommandProcessId);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("SMSS: SmpExecuteInitialCommand failed with status 0x%08x\n", Status);
|
||||
/* FIXME: undo effects of SmpLoadSubSystemsForMuSession */
|
||||
ASSERT(FALSE);
|
||||
return Status;
|
||||
}
|
||||
|
||||
NtClose(InitialCommandProcess);
|
||||
|
||||
SmStartCsr->WindowsSubSysProcessId = WindowsSubSysProcessId;
|
||||
SmStartCsr->SmpInitialCommandProcessId = InitialCommandProcessId;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
|
@ -289,6 +289,13 @@ SmpCheckDuplicateMuSessionId(
|
||||
IN ULONG MuSessionId
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
SmpExecuteInitialCommand(IN ULONG MuSessionId,
|
||||
IN PUNICODE_STRING InitialCommand,
|
||||
IN HANDLE InitialCommandProcess,
|
||||
OUT PHANDLE ReturnPid);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
SmpExecuteImage(
|
||||
|
Loading…
Reference in New Issue
Block a user