diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 79c45c7fe97..209410caeb1 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -3181,6 +3181,23 @@ BOOLEAN WINAPI KeAreApcsDisabled(void) return !!critical_region; } +/*********************************************************************** + * KeBugCheck (NTOSKRNL.@) + */ +void WINAPI KeBugCheck(ULONG code) +{ + KeBugCheckEx(code, 0, 0, 0, 0); +} + +/*********************************************************************** + * KeBugCheckEx (NTOSKRNL.@) + */ +void WINAPI KeBugCheckEx(ULONG code, ULONG_PTR param1, ULONG_PTR param2, ULONG_PTR param3, ULONG_PTR param4) +{ + ERR( "%x %lx %lx %lx %lx\n", code, param1, param2, param3, param4 ); + ExitProcess( code ); +} + /*********************************************************************** * ProbeForRead (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index afe216b7729..d119f37d02f 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -525,8 +525,8 @@ @ stub KeAddSystemServiceTable @ stdcall KeAreApcsDisabled() @ stub KeAttachProcess -@ stub KeBugCheck -@ stub KeBugCheckEx +@ stdcall KeBugCheck(long) +@ stdcall KeBugCheckEx(long long long long long) @ stdcall KeCancelTimer(ptr) @ stub KeCapturePersistentThreadState @ stdcall KeClearEvent(ptr) diff --git a/include/ddk/ntddk.h b/include/ddk/ntddk.h index 4afef81f242..8c7ead7fb65 100644 --- a/include/ddk/ntddk.h +++ b/include/ddk/ntddk.h @@ -217,6 +217,7 @@ NTSTATUS WINAPI IoQueryDeviceDescription(PINTERFACE_TYPE,PULONG,PCONFIGURATION_ void WINAPI IoRegisterDriverReinitialization(PDRIVER_OBJECT,PDRIVER_REINITIALIZE,PVOID); NTSTATUS WINAPI IoRegisterShutdownNotification(PDEVICE_OBJECT); BOOLEAN WINAPI KeAreApcsDisabled(void); +void WINAPI DECLSPEC_NORETURN KeBugCheck(ULONG); NTSTATUS WINAPI KeExpandKernelStackAndCallout(PEXPAND_STACK_CALLOUT,void*,SIZE_T); void WINAPI KeSetTargetProcessorDpc(PRKDPC,CCHAR); BOOLEAN WINAPI MmIsAddressValid(void *); diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index f79b36a94dd..e3333e9e2bd 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1613,6 +1613,7 @@ void WINAPI KeAcquireSpinLock(KSPIN_LOCK*,KIRQL*); KIRQL WINAPI KeAcquireSpinLockRaiseToDpc(KSPIN_LOCK*); #endif void WINAPI KeAcquireSpinLockAtDpcLevel(KSPIN_LOCK*); +void WINAPI DECLSPEC_NORETURN KeBugCheckEx(ULONG,ULONG_PTR,ULONG_PTR,ULONG_PTR,ULONG_PTR); BOOLEAN WINAPI KeCancelTimer(KTIMER*); void WINAPI KeClearEvent(PRKEVENT); NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE,BOOLEAN,LARGE_INTEGER*);