Advertisement
5_2007-2008 Windows #174628

Cdopener

Opens and closes a cd tray

AI

Ringkasan AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kode Sumber
original-source
import com.ms.win32.*;
public class Cdopener
{
	private static String OPEN = "set cdaudio door open";
	private static String CLOSE = "set cdaudio door open";
	private static final int MAX_ERROR_SIZE = 64;
	private static StringBuffer sbreturn = new StringBuffer(MAX_ERROR_SIZE);
	
	public static void main (String[] args)
	{
		//call open() to open it and close() in the main method to
        //close it
	}
	
	public static void open()
	{
	 Winmm.mciSendString(OPEN,sbreturn,127,0);		
	}
	
	public static void close()
	{
	 Winmm.mciSendString(CLOSE,sbreturn,127,0);		
	}
}

Upload
Komentar Asli (3)
Dipulihkan dari Wayback Machine