Detect cdrom drive letter

How can I see what the drive letter from the first cdromplayer is?

Thanks
Vincent
VincentgAsked:
Who is Participating?
 
MadshiCommented:
Vincent,

use this function:

function TellMeFirstCDRom : char;
var c1 : cardinal;
begin
  c1:=GetLogicalDrives;
  for result:='A' to 'Z' do
    if odd(c1 shr (ord(result)-ord('A'))) then begin
      if GetDriveType(PChar(result+':\'))=DRIVE_CDROM then
        exit;
  result:=#0;
end;

Regards, Madshi.
0
 
VincentgAuthor Commented:
Edited text of question
0
 
VincentgAuthor Commented:
Thanks a lot Madshi....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.