realbasic-nug
[Top] [All Lists]

Ejecting a CD?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Ejecting a CD?
From: Thomas Reed <thomasareed at earthlink dot net>
Date: Fri, 4 Jan 2002 11:04:43 -0600
I'm writing a Finder-like app for young kids, and I've hit a wall on one 
thing.

Much of the software I want to be able to launch requires that the CD be 
in the drive -- otherwise, the software doesn't run.  I've got everything 
set so that if a kid selects one of these items, it'll search the list of 
mounted volumes and find out if the appropriate CD is there or not.

However, what I want to happen at that point is where I'm having trouble. 
 If the CD isn't there, I want whatever CD is in the drive to be 
unmounted and ejected to allow for insertion of the proper CD.  But I'm 
not sure how to figure out which volume is a CD-ROM so I can eject it!  
Further, if I ever want to release this, I'd probably need to be able to 
handle conditions like multiple CD-ROM drives so that it'll only eject a 
CD if all the drives are full, and so it'll eject a different CD if it's 
unable to eject the first one it tries.  Stuff like that.

Any ideas?

-Thomas

Personal web page:                 http://home.earthlink.net/~thomasareed/
My shareware:            http://home.earthlink.net/~thomasareed/shareware/
Pixel Pen web pub. guide: http://home.earthlink.net/~thomasareed/pixelpen/

Love thy neighbor -- but don't get caught.




<Prev in Thread] Current Thread [Next in Thread>