CDROM handling question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CDROM handling question

pianoman-3
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
----- Original Message -----
From: <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, November 21, 2006 12:00 PM
Subject: fpc-pascal Digest, Vol 27, Issue 34


> Send fpc-pascal mailing list submissions to
> [hidden email]
>
> 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
> [hidden email]
>
> You can reach the person managing the list at
> [hidden email]
>
> 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: ???? ??????????? <[hidden email]>
> Subject: Re: [fpc-pascal] Web site now translatable
> To: FPC-Pascal users discussions <[hidden email]>
> Message-ID: <[hidden email]>
> 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 <[hidden email]>
> Subject: Re: [fpc-pascal] Web site now translatable
> To: ???? ??????????? <[hidden email]>
> Message-ID: <[hidden email]>
> 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  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
> End of fpc-pascal Digest, Vol 27, Issue 34
> ******************************************
>

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: CDROM handling question

michael.vancanneyt


On Tue, 21 Nov 2006, 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: CDROM handling question

Henry Vermaak
On Tue, 21 Nov 2006, 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal