This function determines if a drive is a CDROM drive. An example of using this function is shown in OpenCloseCDDrive().
functionIsDriveCD(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;