| View previous topic :: View next topic |
| Author |
Message |
Greg Perrott Guest
|
Posted: Tue May 11, 2004 9:46 am Post subject: How to detect number of CD/DVD drives |
|
|
Does anybody know how to detect the number of cd/dvd drives in a
acomputer and if the drive contains an audio cd?
|
|
| Back to top |
|
 |
Avatar Zondertau Guest
|
Posted: Wed May 12, 2004 6:09 am Post subject: Re: How to detect number of CD/DVD drives |
|
|
| Quote: | Does anybody know how to detect the number of cd/dvd drives in a
acomputer and if the drive contains an audio cd?
|
You can use the GetLogicalDrives API function to find out which drives
exist and then GetDriveType for each of them to find out which ones are
CD drives.
You may be able to find out if a drive contains an audio CD using the
multimedia api. You could use the source TMediaPlayer.Open as a basis
for writing code that opens the CD drive for audio playing and checks
if this causes an error.
|
|
| Back to top |
|
 |
Safari Guest
|
Posted: Sat May 15, 2004 10:41 pm Post subject: Re: How to detect number of CD/DVD drives |
|
|
Var Drive: PChar; Int: Char;
Begin
for Int := 'C' to 'Z' do
Begin
Drive := PChar(Int + ':');
if GetDriveType(Drive) = DRIVE_CDROM then
ComboBox1.Items.Add(Drive);
End;
End;
Safari
"Greg Perrott" <greg.perrott (AT) audiophiler (DOT) com> wrote
| Quote: | Does anybody know how to detect the number of cd/dvd drives in a
acomputer and if the drive contains an audio cd?
|
|
|
| Back to top |
|
 |
|