68{
75
76
79
81
82
85
86
88 {
89
90 VdmPower = 1;
91 }
92
93
98 0,
99 0,
102 {
103 DPRINT1(
"Failed to duplicate process handle: %lx\n",
Status);
105 }
106
107
111 &ThreadHandle,
112 0,
113 0,
116 {
120 }
121
122
123 if (VdmPower)
124 {
127 &VdmPower,
128 sizeof(VdmPower));
130 {
131 DPRINT1(
"Failed to get VDM powers\n");
135 }
136 }
137
138
140 {
142 }
143 if ((
Flags & 2) == 0)
144 {
145
147 }
148
149
150
151
153 ThreadHandle,
156 DebugFlags,
159 {
160 DPRINT1(
"Thread already dead\n");
161
162
164
166 }
167
168
170 {
171 DPRINT1(
"Failed to create process/thread structures: %lx\n",
Status);
173 }
174
175
177 {
179 Process->ClientId.UniqueThread,
180 0,
182 }
183
184
186 {
188
189 if (CreateProcessRequest->
VdmTask != 0)
190 {
191
193 &ConsoleRecord);
194 }
195 else
196 {
197
199 &ConsoleRecord);
200 }
201
202
204
205
207 }
208
209
211}
struct _BASE_API_MESSAGE * PBASE_API_MESSAGE
#define CsrGetClientThread()
@ CsrProcessCreateNewGroup
NTSTATUS NTAPI CsrCreateProcess(IN HANDLE hProcess, IN HANDLE hThread, IN PCLIENT_ID ClientId, IN PCSR_NT_SESSION NtSession, IN ULONG Flags, IN PCLIENT_ID DebugCid)
#define NT_SUCCESS(StatCode)
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
_In_ HANDLE ProcessHandle
#define NtCurrentProcess()
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSTATUS NTAPI NtSetInformationProcess(IN HANDLE ProcessHandle, IN PROCESSINFOCLASS ProcessInformationClass, IN PVOID ProcessInformation, IN ULONG ProcessInformationLength)
#define STATUS_THREAD_IS_TERMINATING
NTSTATUS NTAPI NtDuplicateObject(IN HANDLE SourceProcessHandle, IN HANDLE SourceHandle, IN HANDLE TargetProcessHandle OPTIONAL, OUT PHANDLE TargetHandle OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG HandleAttributes, IN ULONG Options)
NTSTATUS BaseSrvGetConsoleRecord(HANDLE ConsoleHandle, PVDM_CONSOLE_RECORD *Record)
NTSTATUS GetConsoleRecordBySessionId(ULONG TaskId, PVDM_CONSOLE_RECORD *Record)
#define CREATE_NEW_PROCESS_GROUP
_Must_inspect_result_ _In_ ULONG Flags
#define DUPLICATE_SAME_ACCESS