NtRaiseHardError - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

NTSYSCALLAPI
NTSTATUS
NTAPI
NtRaiseHardError(
    _In_ NTSTATUS ErrorStatus,
    _In_ ULONG NumberOfParameters,
    _In_ ULONG UnicodeStringParameterMask,
    _In_reads_(NumberOfParameters) PULONG_PTR Parameters,
    _In_ ULONG ValidResponseOptions,
    _Out_ PULONG Response
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwRaiseHardError(
    _In_ NTSTATUS ErrorStatus,
    _In_ ULONG NumberOfParameters,
    _In_ ULONG UnicodeStringParameterMask,
    _In_reads_(NumberOfParameters) PULONG_PTR Parameters,
    _In_ ULONG ValidResponseOptions,
    _Out_ PULONG Response
    );

#endif

View code on GitHub

This function sends HARDERROR_MSG LPC message to listener (typically CSRSS.EXE). See NtSetDefaultHardErrorPort for more information.

ErrorStatus

Error code.

NumberOfParameters

Number of optional parameters in Parameters array.

UnicodeStringParameterMask

Optional string parameter (can be only one per error code).

*Parameters

Array of DWORD parameters for use in error message string.

ResponseOption

See HARDERROR_RESPONSE_OPTION for possible values description.

Response

Pointer to HARDERROR_RESPONSE enumeration.


NtRaiseHardError is easy way to display message in GUI without loading Win32 API libraries.

Documented by

See also