IsProcessCritical (ntdll)
Last changed: -81.213.59.146

.
Summary
Determines whether the specified process is considered critical.

C# Signature:

[DllImport("kernel32.dll", SetLastError=true)]
static extern bool IsProcessCritical(IntPtr hProcess, ref bool Critical);

VB Signature:

Declare Function IsProcessCritical Lib "kernel32.dll" (hProcess As IntPtr, ByRef Critical As Boolean) As Boolean

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

Available in Windows 8.1 [desktop apps only], Windows Server 2012 R2 [desktop apps only]

Tips & Tricks:

Please add some!

Sample Code:

{

    var procStatus = false;

    if (!IsProcessCritical(Process.GetCurrentProcess().Handle, ref procStatus))
    {
    procStatus = false;
    }

    return procStatus;

}

Documentation