Hardware Delphi

function CDRomDrive: string;
var
DriveNum: Integer;
DriveChar: Char;
DriveType: TDriveType;
DriveBits: set of 0..25;
begin
Integer(DriveBits) := GetLogicalDrives;
Result := '';
for DriveNum := 0 to 25 do
begin
if not (DriveNum in DriveBits) then Continue;
DriveChar := Char(DriveNum + Ord('a'));
DriveType := TDriveType(GetDriveType(PChar(DriveChar + ':\')));
case DriveType of
dtFloppy : ;
dtFixed : ;
dtNetwork : begin
end;
dtCDROM : begin
Result := Uppercase(DriveChar + ':\');
Exit;
end;
dtRAM : ;
end;
end;
end;