ntoskrnl.exe: Fix the PsCreateSystemThread() prototype and declare it in wdm.h.
Francois Gouget
fgouget at free.fr
Thu Sep 27 11:53:23 CDT 2007
Add a prototype for PsTerminateSystemThread().
---
The PSDK actually claims that PKSTART_ROUTINE is not a WINAPI function
but I very much doubt it so I added the WINAPI anyway. If that's wrong,
then it's the implementation of PsCreateSystemThread() (or
RtlCreateUserThread() and more) that needs fixing.
dlls/ntoskrnl.exe/ntoskrnl.c | 2 +-
include/ddk/wdm.h | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 87b0ef5..4eec5f5 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 f9e2a5f..c78e2da 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);
--
1.5.3.1
More information about the wine-patches
mailing list