README.md

December 4, 2022 ยท View on GitHub

Cdopener

Description

Opens and closes a cd tray

More Info

This code is actually visual j++ the package com.ms.win32 is not part of the java api and is not standard sun code.!!!!!!!!!!

You need a very up to date virual machine to interpret the java bytecode otherwise the code will not work, ie5 has a very good up to date virtual machine, i highly recomend this as it will make life a lot easier

Submitted On
ByJon Boyce
LevelUnknown
User Rating4.5 (18 globes from 4 users)
CompatibilityJava (JDK 1.1)
CategoryWindows
WorldJava
Archive File

Source Code

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);
	}
}