Solved

ejecting a cd

Posted on 1998-08-23
1
272 Views
Last Modified: 2010-04-30
I would like to make a small program to eject a cd and load a cd, but I cannot find the right command using MM32.
It seems to have every other command except that one.
How can I accomplish this?
Code please...
0
Comment
Question by:dtucker
1 Comment
 
LVL 3

Accepted Solution

by:
SPECIALIST earned 50 total points
ID: 1430507
This will work for you, I have the API followed by the code:

Windows API-

Declare Function mcisendstring Lib "MMSystem" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal wReturnLength As Integer, ByVal hCallback As Integer) As Long

'     'to close it:
retvalue = mcisendstring("set CDAudio door closed", returnstring, 127, 0)
'     'to open it
retvalue = mcisendstring("set CDAudio door open", returnstring, 127, 0)


SPECIALIST
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question