C 如何開啟關閉CDROM

2021-04-17 08:18:04 字數 656 閱讀 9783

using system;

using system.text;

using system.runtime.interopservices;

class closecd

{ [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 = mcisendstring( "set cdaudio door closed", null, 0, intptr.zero );

seover="window.status='正文--c#如何

開啟關閉

cdrom';return true">

doc開啟關閉mysql 如何開啟 關閉資料庫歸檔

1 單機模式下 如果開啟歸檔,請保證 log archive start true 開啟自動歸檔,否則只能手工歸檔,如果是關閉了歸檔,則設定該引數為false。10g之後廢除該引數,不需要設定。log archive dest 歸檔日誌存放路徑 alter system set log archiv...

如何開啟或關閉SELinux

centos的 etc sysconfig selinux 修改檔案 etc sysconfig selinux this file controls the state of selinux on the system.selinux can take one of these three val...

Delphi程式中彈出和關閉CD ROM

要在delphi程式中控制cd rom的彈出和關閉,可以利用mmsystem.pas單元的mci media control inte ce 函式。有2個函式可以達到同樣的效果。乙個是mcisendcommand函式,另乙個是mcisendstring函式。下面分別用這2個函式寫的opencddri...