MCPcopy Create free account
hub / github.com/HoShiMin/Kernel-Bridge / CreateUserThread

Function CreateUserThread

Kernel-Bridge/API/ProcessesUtils.cpp:205–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203
204 _IRQL_requires_max_(PASSIVE_LEVEL)
205 NTSTATUS CreateUserThread(
206 HANDLE hProcess,
207 IN _UserThreadRoutine StartAddress,
208 IN PVOID Argument,
209 BOOLEAN CreateSuspended,
210 OUT PHANDLE hThread,
211 OUT PCLIENT_ID ClientId
212 ) {
213 using _RtlCreateUserThread = NTSTATUS (NTAPI*)(
214 IN HANDLE ProcessHandle,
215 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
216 IN BOOLEAN CreateSuspended,
217 IN ULONG StackZeroBits,
218 IN OUT PULONG StackReserved,
219 IN OUT PULONG StackCommit,
220 IN PVOID StartAddress,
221 IN PVOID StartParameter,
222 OUT PHANDLE ThreadHandle,
223 OUT PCLIENT_ID ClientID
224 );
225 static auto _CreateUserThread =
226 static_cast<_RtlCreateUserThread>(Importer::GetKernelProcAddress(L"RtlCreateUserThread"));
227 return _CreateUserThread
228 ? _CreateUserThread(
229 hProcess,
230 NULL,
231 CreateSuspended,
232 0,
233 NULL,
234 NULL,
235 StartAddress,
236 Argument,
237 hThread,
238 ClientId
239 )
240 : STATUS_NOT_IMPLEMENTED;
241 }
242
243 _IRQL_requires_max_(PASSIVE_LEVEL)
244 NTSTATUS CreateSystemThread(

Callers 1

KbCreateUserThreadFunction · 0.85

Calls 1

GetKernelProcAddressFunction · 0.70

Tested by

no test coverage detected