Procedure getcdrom (var CD: char);
VAR
Str: string;
Drivers: integer;
Driver: char;
I, TEMP: INTEGER;
Begin
Drivers: = getLogicalDrives;
Temp: = (1 and drivers);
For i: = 0 to 26 do
Begin
IF Temp = 1 THEN
Begin
Driver: = char (i integer ('a'));
Str: = driver ':';
If GetDriveType (Pchar (STR)) = drive_cdrom then
Begin
Cd: = driver;
EXIT;
END;
END;
Drivers: = (Drivers SHR 1);
Temp: = (1 and drivers);
END;
END;