Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-11

CDROM handling question

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Pianoman

Hello, I 'd like to ask how can I detect whether a CDROM drive is ejected. I have program which reads some data from CD after reading this data I eject the cd using some calls and user can replace the disk. How can I automatically close CD drive let's say after pressing enter? Regards
Pianoman

Earlier message 89 lines
----- Original Message ----- From: To: Sent: Tuesday, November 21, 2006 12:00 PM Subject: fpc-pascal Digest, Vol 27, Issue 34 > Send fpc-pascal mailing list submissions to > > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > or, via email, send a message with subject or body 'help' to > > > You can reach the person managing the list at > > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fpc-pascal digest..." > > > Today's Topics: > > 1. Re: Web site now translatable (???? ???????????) > 2. Re: Web site now translatable (Dani?l Mantione) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 21 Nov 2006 12:05:08 +0300 > From: ???? ??????????? > Subject: Re: [fpc-pascal] Web site now translatable > To: FPC-Pascal users discussions > Message-ID: > Content-Type: text/plain; charset=koi8-r > >> If you would like to make the FPC website available in your own language, > > What encoding does it need? UTF8, UTF16, language specific (for example, > five are supported by Opera for cyrillic text, windows-1251 is the most > common). > > I can translate from English into Russian (I can bet I'm not the only > one). > > > ------------------------------ > > Message: 2 > Date: Tue, 21 Nov 2006 10:10:59 +0100 (CET) > From: Dani?l Mantione > Subject: Re: [fpc-pascal] Web site now translatable > To: ???? ??????????? > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > > > Op Tue, 21 Nov 2006, schreef ???? ???????????: > >> > If you would like to make the FPC website available in your own >> > languag= > e, = > >> = > >> What encoding does it need? UTF8, UTF16, language specific (for = > >> example, five are supported by Opera for cyrillic text, windows-1251 is = > >> the most common). > > Whatever you prefer. The database uses UTF-8, but I can configure the = > > website generator to generate any encoding. > > Dani=EBl > > ------------------------------ > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > End of fpc-pascal Digest, Vol 27, Issue 34 > ****************************************** >

Reply by email

Michael Van Canneyt
to Pianoman
Pianoman wrote
Hello, I 'd like to ask how can I detect whether a CDROM drive is ejected. I have program which reads some data from CD after reading this data I eject the cd using some calls and user can replace the disk. How can I automatically close CD drive let's say after pressing enter?

That highly depends on the platform. What OS do you use ?

Michael.

Reply by email

Henry Vermaak
to Michael Van Canneyt
Pianoman wrote
Hello, I 'd like to ask how can I detect whether a CDROM drive is ejected. I have program which reads some data from CD after reading this data I eject the cd using some calls and user can replace the disk. How can I automatically close CD drive let's say after pressing enter?

Hello, if you're in linux you can get tray position with a CDROM_DRIVE_STATUS ioctl call. There is a CDROMCLOSETRAY ioctl defined, but it didn't work for me (as far as I remember).

Take a look at kernel docs for ioctl and cdrom.h.

Henry

Reply by email