mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[KERNEL32] Fix RaiseException to correctly copy the passed in parameters as ULONG_PTR
Fixes C++ exception handling on x64.
This commit is contained in:
parent
4407e0aefa
commit
41c99aa60a
1 changed files with 7 additions and 5 deletions
|
@ -697,14 +697,16 @@ Quit:
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
WINAPI
|
WINAPI
|
||||||
RaiseException(IN DWORD dwExceptionCode,
|
RaiseException(
|
||||||
IN DWORD dwExceptionFlags,
|
_In_ DWORD dwExceptionCode,
|
||||||
IN DWORD nNumberOfArguments,
|
_In_ DWORD dwExceptionFlags,
|
||||||
IN CONST ULONG_PTR *lpArguments OPTIONAL)
|
_In_ DWORD nNumberOfArguments,
|
||||||
|
_In_opt_ const ULONG_PTR *lpArguments)
|
||||||
{
|
{
|
||||||
EXCEPTION_RECORD ExceptionRecord;
|
EXCEPTION_RECORD ExceptionRecord;
|
||||||
|
|
||||||
/* Setup the exception record */
|
/* Setup the exception record */
|
||||||
|
RtlZeroMemory(&ExceptionRecord, sizeof(ExceptionRecord));
|
||||||
ExceptionRecord.ExceptionCode = dwExceptionCode;
|
ExceptionRecord.ExceptionCode = dwExceptionCode;
|
||||||
ExceptionRecord.ExceptionRecord = NULL;
|
ExceptionRecord.ExceptionRecord = NULL;
|
||||||
ExceptionRecord.ExceptionAddress = (PVOID)RaiseException;
|
ExceptionRecord.ExceptionAddress = (PVOID)RaiseException;
|
||||||
|
@ -726,7 +728,7 @@ RaiseException(IN DWORD dwExceptionCode,
|
||||||
ExceptionRecord.NumberParameters = nNumberOfArguments;
|
ExceptionRecord.NumberParameters = nNumberOfArguments;
|
||||||
RtlCopyMemory(ExceptionRecord.ExceptionInformation,
|
RtlCopyMemory(ExceptionRecord.ExceptionInformation,
|
||||||
lpArguments,
|
lpArguments,
|
||||||
nNumberOfArguments * sizeof(ULONG));
|
nNumberOfArguments * sizeof(ULONG_PTR));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Better handling of Delphi Exceptions... a ReactOS Hack */
|
/* Better handling of Delphi Exceptions... a ReactOS Hack */
|
||||||
|
|
Loading…
Reference in a new issue