library cdejecter;
{$mode delphi}
{$codepage UTF8}
uses Classes, LazUTF8Classes, sysutils, cde_types, windows, mmsystem;
{$R *.res}
function GetCDDiscs: PWideChar;
var i, j : Integer;
    Buf : array [0..95] of Char;
    SL: TStringListUTF8;
begin
GetLogicalDriveStrings(96, Buf);
for j:=0 to 25 do
 if Buf[j*4+2] <> #92 then
  Break;
SL:= TStringListUTF8.Create;
for i:=0 to j-1 do
 begin
 if GetDriveType(@Buf[i*4])= DRIVE_CDROM then
  SL.Add(AnsiLowerCase(String(Buf[i*4])) + ':\');
 end;
SL.Delimiter:= ';';
Result:= PWideChar(SL.DelimitedText);
SL.Clear;
SL.Free;
end;
function GetVolumeInfo (const ADisc: WideChar): TDiscInfo;
{$IFDEF WINDOWS}
{$I wGetVolumeInfo_vars.inc}
{$ENDIF}
{$IFDEF UNIX}
{$I lGetVolumeInfo_vars.inc}
{$ENDIF}
begin
{$IFDEF WINDOWS}
{$I wGetVolumeInfo_core.inc}
{$ENDIF}
{$IFDEF UNIX}
{$I lGetVolumeInfo_core.inc}
{$ENDIF}
end;
function EjectCD (const ADisc: WideChar): Boolean;
{$IFDEF WINDOWS}
{$I wEjectCD_vars.inc}
{$ENDIF}
{$IFDEF UNIX}
{$I lEjectCD_vars.inc}
{$ENDIF}
begin
{$IFDEF WINDOWS}
{$I wEjectCD_core.inc}
{$ENDIF}
{$IFDEF UNIX}
{$I lEjectCD_core.inc}
{$ENDIF}
end;
exports GetCDDiscs, GetVolumeInfo, EjectCD;
begin
end.

