NtSetDefaultHardErrorPort - NtDoc

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

// Misc.

NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetDefaultHardErrorPort(
    _In_ HANDLE DefaultHardErrorPort
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetDefaultHardErrorPort(
    _In_ HANDLE DefaultHardErrorPort
    );

#endif

View code on GitHub

NtSetDefaultHardErrorPort is typically called only once. After call, kernel set BOOLEAN flag named _ExReadyForErrors to TRUE, and all other tries to change default port are broken with STATUS_UNSUCCESSFUL error code.

PortHandle

HANDLE to named Port Object.


Listener of default HardError port receive HARDERROR_MSG LPC messages when any process call NtRaiseHardError function.

Documented by

Requirements

Privilege: SE_TCB_PRIVILEGE

See also