Result:= False;
if ADisc = '' then
 Abort;
S:= ADisc + ':';
if GetDriveType(PChar(S)) = DRIVE_CDROM then
 begin
 Flags:= mci_Open_Type or mci_Open_Element;
 with OpenParm do
  begin
  dwCallback:= 0;
  lpstrDeviceType:= 'CDAudio';
  lpstrElementName:= PChar(S);
  end;
 Res:= mciSendCommand(0, mci_Open, Flags, Longint(@OpenParm));
 if Res <> 0 then
  Exit;
 DeviceID:= OpenParm.wDeviceID;
 try
  Res:= mciSendCommand(DeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0);
  if Res = 0 then
   Exit;
  Result:= True;
 finally
  mciSendCommand(DeviceID, mci_Close, Flags, Longint(@OpenParm));
  end;
 end; 