Ejemplo n.º 1
0
 private void button8_Click(object sender, EventArgs e)
 {
     textBox1.Text = AppDomain.CurrentDomain.BaseDirectory + "MyfirstDriver.sys";
     filePath      = textBox1.Text;
     ServiceName   = Path.GetFileNameWithoutExtension(filePath);
     DisplayName   = Path.GetFileNameWithoutExtension(filePath);
     textBox2.Text = ServiceName;
     textBox3.Text = DisplayName;
     DriverAPIInterface.Unload(1000).ToInt32(); //停止驱动
     DriverAPIInterface.Delete().ToInt32();     //卸载驱动
     ShowErrorMessage(DriverAPIInterface.Create(ServiceName, DisplayName, textBox1.Text).ToInt32());
     ShowErrorMessage(DriverAPIInterface.Load().ToInt32());
     RefreshStatus();
 }
Ejemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     ShowErrorMessage(DriverAPIInterface.Load().ToInt32());
     RefreshStatus();
 }