C#控制光驱开关的代码

13年前
光驱弹出与关闭    //using System.Runtime.InteropServices ;    [DllImport("winmm.dll")]    public static extern int mciSendString(string s1,string s2,int i1,int i2);    private void button1_Click(object sender, System.EventArgs e) {     mciSendString ("set cdaudio door open","",0,0);    }    private void button2_Click(object sender, System.EventArgs e) {     mciSendString ("set cdaudio door closed","",0,0);    }