From 17c57737c93a563e7ff156ba937bd50320c01156 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 27 Sep 2007 18:53:23 +0200 Subject: [PATCH] ntoskrnl.exe: Fix the PsCreateSystemThread() prototype and declare it in wdm.h. Add a prototype for PsTerminateSystemThread(). --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- include/ddk/wdm.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 87b0ef5797e..4eec5f52271 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -483,7 +483,7 @@ void WINAPI MmFreeNonCachedMemory( void *addr, SIZE_T size ) NTSTATUS WINAPI PsCreateSystemThread(PHANDLE ThreadHandle, ULONG DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, HANDLE ProcessHandle, PCLIENT_ID ClientId, - PVOID StartRoutine, PVOID StartContext) + PKSTART_ROUTINE StartRoutine, PVOID StartContext) { if (!ProcessHandle) ProcessHandle = GetCurrentProcess(); return RtlCreateUserThread(ProcessHandle, 0, FALSE, 0, 0, diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index f9e2a5fd2a8..c78e2dadc3a 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -37,6 +37,7 @@ struct _DEVICE_OBJECT; struct _DRIVER_OBJECT; typedef VOID (WINAPI *PKDEFERRED_ROUTINE)(struct _KDPC *, PVOID, PVOID, PVOID); +typedef VOID (WINAPI *PKSTART_ROUTINE)(PVOID); typedef NTSTATUS (WINAPI *PDRIVER_INITIALIZE)(struct _DRIVER_OBJECT *, PUNICODE_STRING); typedef NTSTATUS (WINAPI *PDRIVER_DISPATCH)(struct _DEVICE_OBJECT *, struct _IRP *); @@ -889,11 +890,13 @@ ULONG WINAPI KeQueryTimeIncrement(void); PVOID WINAPI MmAllocateNonCachedMemory(SIZE_T); void WINAPI MmFreeNonCachedMemory(PVOID,SIZE_T); +NTSTATUS WINAPI PsCreateSystemThread(PHANDLE,ULONG,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PKSTART_ROUTINE,PVOID); #define PsGetCurrentProcess() IoGetCurrentProcess() #define PsGetCurrentThread() ((PETHREAD)KeGetCurrentThread()) HANDLE WINAPI PsGetCurrentProcessId(void); HANDLE WINAPI PsGetCurrentThreadId(void); BOOLEAN WINAPI PsGetVersion(ULONG*,ULONG*,ULONG*,UNICODE_STRING*); +NTSTATUS WINAPI PsTerminateSystemThread(NTSTATUS); NTSTATUS WINAPI ZwAddBootEntry(PUNICODE_STRING,PUNICODE_STRING); NTSTATUS WINAPI ZwAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);