mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +00:00
[SMSS] Implement SmpStartCsr
This commit is contained in:
parent
98882fb089
commit
735d2b4c93
2 changed files with 45 additions and 2 deletions
|
@ -153,8 +153,44 @@ SmpStartCsr(IN PSM_API_MSG SmApiMsg,
|
||||||
IN PSMP_CLIENT_CONTEXT ClientContext,
|
IN PSMP_CLIENT_CONTEXT ClientContext,
|
||||||
IN HANDLE SmApiPort)
|
IN HANDLE SmApiPort)
|
||||||
{
|
{
|
||||||
DPRINT1("%s is not yet implemented\n", __FUNCTION__);
|
PSM_START_CSR_MSG SmStartCsr = &SmApiMsg->u.StartCsr;
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
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
|
NTSTATUS
|
||||||
|
|
|
@ -289,6 +289,13 @@ SmpCheckDuplicateMuSessionId(
|
||||||
IN ULONG MuSessionId
|
IN ULONG MuSessionId
|
||||||
);
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
SmpExecuteInitialCommand(IN ULONG MuSessionId,
|
||||||
|
IN PUNICODE_STRING InitialCommand,
|
||||||
|
IN HANDLE InitialCommandProcess,
|
||||||
|
OUT PHANDLE ReturnPid);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
SmpExecuteImage(
|
SmpExecuteImage(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue