如果你是调用win api 那么简单地用DllImport就可以了
[DllImport("kernel32.dll")]
internal static extern Boolean ClearCommError(IntPtr hFile, out UInt32 lpErrors, IntPtr lpStat);DllImport 属性还有其他属性设置,查MS帮助
[DllImport("kernel32.dll")]
internal static extern Boolean ClearCommError(IntPtr hFile, out UInt32 lpErrors, IntPtr lpStat);DllImport 属性还有其他属性设置,查MS帮助
private static extern int FindWindow(string lpClassName,string lpWindowName);以上是一个调用API函数的例子,至于打开光驱的代码你把e-mail留下,明天我把代码mail给你!
http://www.ccw.com.cn/htm/center/prog/02_10_9_6.asp
[email protected]