(SOLVED) button1.click must declare a body because it is not marked abstract in C#

-5

Please help me! I do not know what is happening here. I'm trying to make a program that makes a BSOD. The program consists of a form, with a button, that when pressed it will make a BSOD. Now, I'm not sure that you can invoke a BSOD from a form.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication2
{
    public partial class Form2 : Form
    {
        public Form2()
        {
         
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e);
        
            [DllImport("ntdll.dll")]
        public static extern uint RtlAdjustPrivilege(int Privilege, bool bEnablePrivilege, bool IsThreadPrivilege, out bool PreviousValue);

        [DllImport("ntdll.dll")]
        public static extern uint NtRaiseHardError(uint ErrorStatus, uint NumberOfParameters, uint UnicodeStringParameterMask, IntPtr Parameters, uint ValidResponseOption, out uint Response);

        static unsafe void Main(string[] args)
        {
            Boolean t1;
            uint t2;
            RtlAdjustPrivilege(19, true, false, out t1);
            NtRaiseHardError(0xc0000022, 0, 0, IntPtr.Zero, 6, out t2);
        }
    }
}
c#
asked on Stack Overflow Jan 17, 2021 by dragogos dragogos • edited Jan 18, 2021 by dragogos dragogos

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0