unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, ComCtrls, StdCtrls, Buttons, akrip32;
type
TForm1 =
class(TForm)
Drives: TListBox;
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
MyList : CDLIST;
i : Integer;
begin
Drives.Clear;
for i := 0
to 25
do
if GetLogicalDrives
and (1
shl i) <> 0
then
if GetDriveType(PAnsiChar(Chr(i + Ord('
A')) + '
:\')) = DRIVE_CDROM
then Drives.Items.Add(Chr(i + Ord('
A')) + '
- ');
MyList.Max := MAXCDLIST;
if MyList.Max > 0
then begin
GetCDList(MyList);
for i := 0
to MyList.Num - 1
do begin
Drives.Items[i] := Drives.Items[i]
+ '
['
+ IntToStr(MyList.Cd[i].ha)
+ '
:'
+ IntToStr(MyList.Cd[i].tgt)
+ '
:'
+ IntToStr(MyList.Cd[i].lun)
+ '
] '
+ trim (MyList.Cd[i].info.vendor)
+ '
'
+ trim (MyList.Cd[i].info.prodId);
end;
end;
end;
end.