[fpc-pascal] FPC and CD-ROMs

Alexey Pavluchenko pavluchenko at isp.kiev.ua
Mon Jul 25 16:14:02 CEST 2005


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 certain
P> CD-ROM drive? I write Certain because I ave more than one so I have to
P> specify which.
P> Is there some API call to do this? I searched the help files but I didn't
P> 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.

-- 
Best regards,
 Alexey






More information about the fpc-pascal mailing list