摘要: using System; using System.Text; using System.Runtime.InteropServices; class CloseCD { //API声明 [DllImport( "winmm.dll", EntryPoint="mciSendStringA", CharSet=CharSet.Ansi )] protected static extern int mciSendString( string lpstrCommand, StringBuilder lpstrReturnString, int uReturnLength, IntPtr hwndCallback ); public static void Main() { int ret = mciSendString( "set cdaudio door open", null, 0, IntPtr.Zero );//打开光区 Console.ReadLine(); ret = mciSendSt 阅读全文
posted @ 2009-02-05 11:40 逐步高 阅读(305) 评论(0) 推荐(0)