From 4f0f7d5fdba44a1343e3a27e15e433a04a5f8c9c Mon Sep 17 00:00:00 2001 From: Carroll Vance Date: Thu, 20 Sep 2007 17:44:46 -0500 Subject: [PATCH] (ntoskrnl.exe) Added: PsCreateSystemThread (resubmit --- dlls/ntoskrnl.exe/ntoskrnl.c | 19 +++++++++++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 4b16c39..80edc25 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -477,6 +477,25 @@ void WINAPI MmFreeNonCachedMemory( void *addr, SIZE_T size ) VirtualFree( addr, 0, MEM_RELEASE ); } +/*********************************************************************** + * PsCreateSystemThread (NTOSKRNL.EXE.@) + */ +NTSTATUS WINAPI PsCreateSystemThread(PHANDLE ThreadHandle, ULONG DesiredAccess, + POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, + HANDLE ProcessHandle OPTIONAL, + PCLIENT_ID ClientId OPTIONAL, + PVOID StartRoutine, + PVOID StartContext) +{ + if (ProcessHandle!=0) + return RtlCreateUserThread(ProcessHandle, 0, FALSE, 0, 0, + 0, StartRoutine, StartContext, + ThreadHandle, ClientId); + else + return RtlCreateUserThread(GetCurrentProcess(), 0, FALSE, 0, 0, + 0, StartRoutine, StartContext, + ThreadHandle, ClientId); +} /*********************************************************************** * PsGetCurrentProcessId (NTOSKRNL.EXE.@) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 45449a0..56cb407 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -843,7 +843,7 @@ @ stub PsChargeProcessPagedPoolQuota @ stub PsChargeProcessPoolQuota @ stub PsCreateSystemProcess -@ stub PsCreateSystemThread +@ stdcall PsCreateSystemThread(ptr long ptr long ptr ptr ptr) @ stub PsDereferenceImpersonationToken @ stub PsDereferencePrimaryToken @ stub PsDisableImpersonation -- 1.4.4.2