[fpc-pascal] FPC and CD-ROMs

John Coppens john at jcoppens.com
Mon Jul 25 16:48:43 CEST 2005

On Mon, 25 Jul 2005 17:14:02 +0300
Alexey Pavluchenko <pavluchenko at isp.kiev.ua> wrote:

> Hello Pianoman,
> Monday, July 25, 2005, 1:35:21 PM, you wrote:
> P> Hi everyone. I have one simple question : How can i eject/close
> P> certain CD-ROM drive? I write Certain because I ave more than one so
> P> I have to specify which.
> P> Is there some API call to do this? I searched the help files but I
> P> didn't found very much about it.
> Under Win32 you should use DeviceIOControl function. The device should
> be opened first with CreateFile. Refer to the WinAPI reference (MSDN)
> for details.
> Under unices the approach is similar, the respective functions are
> open() and ioctl(). Again, see specific system docs for details.

You could also simply call the 'eject /dev/hdc' and 'mount /dev/hdc'
system commands under Un*x.


More information about the fpc-pascal mailing list