Determining if a drive is a CDROM drive
   


This function determines if a drive is a CDROM drive. An example of using this function is shown in OpenCloseCDDrive().

function IsDriveCD(Drive: Char): boolean;
{ func to determine if a given drive is a CDROM drive. }
var
  DrivePath: string;
  DriveResult: integer;
begin
  DrivePath := Drive + ':\';
  DriveResult := GetDriveType(PChar(DrivePath));
  Result := DriveResult = DRIVE_CDROM;
end;


Blue Orb Software

[email protected]