Sign in Join
Wiki copytemporary

Revision 1 of 1, by Bart on 9-9-2020. The page as it is now.

CD open close/de

(Windows only)

Zurück zur Seite Code Beispiele.

Dieser Artikel beschäftigt sich mit der Windowsprogrammierung.

Die Prozedur öffnet bzw. schliesst ein CD / DVD Laufwerk.

pascal
uses
  MMSystem, ...;
  
  ...
  
procedure subCDAufZu(chrDriveChar: char; blnOeffnen: boolean);
begin
  if mciSendString(PChar('open ' + chrDriveChar + ': type cdaudio alias cdlw'),
    nil, 0, 0) = 0 then
  begin
    if blnOeffnen = True then
      mciSendString('set cdlw door open wait', nil, 0, 0)
    else
      mciSendString('set cdlw door closed wait', nil, 0, 0);
    mciSendString('close cdlw', nil, 0, 0);
  end;
end;
  
  ...

From the Free Pascal wiki, page "CD open close/de", as it stood on 2020-09-09 after a change by Bart, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.