NtRaiseHandError (ntdll)
Last changed: -88.168.112.37

.
Summary

C# Signature:

[DllImport("ntdll.dll")]

private static extern uint NtRaiseHardError(

    uint ErrorStatus,
    uint NumberOfParameters,
    uint UnicodeStringParameterMask,
    IntPtr Parameters,
    uint ValidResponseOption,
    out uint Response

);

VB Signature:

<DllImport("ntdll.dll")>

Private Shared Function NtRaiseHardError(ByVal ErrorStatus As UInteger, ByVal NumberOfParameters As UInteger, ByVal UnicodeStringParameterMask As UInteger, ByVal Parameters As IntPtr, ByVal ValidResponseOption As UInteger, <Out> ByRef Response As UInteger) As UInteger

End Function

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

Requires the SeShutdownPriviledge, otherwise will fail.

Tips & Tricks:

Please add some!

Sample Code:

Console.Write("Press any key to trigger a BSOD. Suck My Dick!");

Console.ReadKey();

NtRaiseHandError(0xC0000420,0,0,0,6,out uint res);