mirror of
https://github.com/reactos/reactos.git
synced 2024-07-30 08:08:56 +00:00
Fixed KeRaiseUserException to return old EIP.
svn path=/trunk/; revision=9834
This commit is contained in:
parent
7ebb752f56
commit
814c815bc1
|
@ -79,7 +79,7 @@ KiDeliverNormalApc(VOID);
|
|||
BOOLEAN STDCALL KeRemoveQueueApc (PKAPC Apc);
|
||||
PLIST_ENTRY STDCALL KeRundownQueue(IN PKQUEUE Queue);
|
||||
|
||||
VOID STDCALL
|
||||
NTSTATUS STDCALL
|
||||
KeRaiseUserException(NTSTATUS ExceptionCode);
|
||||
|
||||
|
||||
|
|
|
@ -746,14 +746,16 @@ KeInitExceptions(VOID)
|
|||
* @implemented
|
||||
*/
|
||||
|
||||
VOID STDCALL
|
||||
NTSTATUS STDCALL
|
||||
KeRaiseUserException(IN NTSTATUS ExceptionCode)
|
||||
{
|
||||
/* FIXME: This needs SEH */
|
||||
ULONG OldEip;
|
||||
PKTHREAD Thread = KeGetCurrentThread();
|
||||
|
||||
PKTHREAD Thread = KeGetCurrentThread();
|
||||
|
||||
ProbeForWrite(&Thread->Teb->ExceptionCode, sizeof(NTSTATUS), sizeof(NTSTATUS)); /* NT doesn't check this -- bad? */
|
||||
Thread->TrapFrame->Eip = (ULONG_PTR)LdrpGetSystemDllRaiseExceptionDispatcher();
|
||||
Thread->Teb->ExceptionCode = ExceptionCode;
|
||||
ProbeForWrite(&Thread->Teb->ExceptionCode, sizeof(NTSTATUS), sizeof(NTSTATUS)); /* NT doesn't check this -- bad? */
|
||||
OldEip = Thread->TrapFrame->Eip;
|
||||
Thread->TrapFrame->Eip = (ULONG_PTR)LdrpGetSystemDllRaiseExceptionDispatcher();
|
||||
Thread->Teb->ExceptionCode = ExceptionCode;
|
||||
return((NTSTATUS)OldEip);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue