NtRaiseException - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTXCAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
NtRaiseException(
    _In_ PEXCEPTION_RECORD ExceptionRecord,
    _In_ PCONTEXT ContextRecord,
    _In_ BOOLEAN FirstChance
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwRaiseException(
    _In_ PEXCEPTION_RECORD ExceptionRecord,
    _In_ PCONTEXT ContextRecord,
    _In_ BOOLEAN FirstChance
    );

#endif

View code on GitHub

Function NtRaiseException is typically used inside KiUserExceptionDispatcher function for inform system about exception in current process.

ExceptionRecord

Pointer to EXCEPTION_RECORD structure containing typical information about error.

ThreadContext

Pointer to CONTEXT structure.

HandleException

If not set, calling process is killed. If set, system tries to execute actually enabled Exception Handler procedure with parameters specified aa ExceptionRecord and ThreadContext.

Documented by

See also