fpc/packages/cdrom/examples/showcds.pp
marco 40fe6d6b94 * cdrom
git-svn-id: trunk@10001 -
2008-01-26 23:18:37 +00:00

23 lines
418 B
ObjectPascal

program showcds;
{$mode objfpc}
{$h+}
uses cdrom,sysutils;
Var
Drives : Array[1..10] of String;
I,Count : Integer;
begin
Try
Count:=GetCDRomDevices(Drives);
Writeln('This PC has ',count,' CD-ROM drives');
For I:=1 to count do
Writeln('Drive ',i,' on device: ',Drives[i]);
Except
On E : exception do
Writeln(E.ClassName,' exception caught with message: ',E.Message);
end;
end.