diub-Dokumentation

Inhalt

Titel


3 diub.Burnin

Die Bibliothek diub.Burnin basiert auf der Arbeit von Eric Haddan. Ich habe aus den Kernfunktionen die Bibliothek diub.Burnin zur einfachen Nuztung gemacht. Sie steht für jeden frei zur Nutzung zur Verfügung. Der Quellcode steht auf Github bereit:

https://github.com/diub/Burnin

Quelle

https://www.codeproject.com/articles/24544/burning-and-erasing-cd-dvd-blu-ray-media-with-c-an

Lizenz

Die originale Arbeit unterliegt der Code Project Open License (CPOL) 1.02 vom 2024-01-11. Hier ein Auszug.

Preamble

This License governs Your use of the Work. This License is intended to allow developers to use the Source Code and Executable Files provided as part of the Work in any application in any form.

The main points subject to the terms of the License are:

  • Source Code and Executable Files can be used in commercial applications;
  • Source Code and Executable Files can be redistributed; and
  • Source Code can be modified to create derivative works.
  • No claim of suitability, guarantee, or any warranty whatsoever is provided. The software is provided "as-is".
  • The Article(s) accompanying the Work may not be distributed or republished without the Author's consent

This License is entered between You, the individual or other entity reading or otherwise making use of the Work licensed pursuant to this License and the individual or other entity which offers the Work under the terms of this License ("Author").

3.1 Laufwerke

Die Bibliothek verwendet primär die Kennungen der physischen Laufwerke! Eine Umsetzung von Laufwerksbuschstabe zu Kennung ist aber für fast alle Funktionen bereits implementiert (siehe auch Klasse BurninDevice).

Burnin burnin; burnin = new Burnin (); List<string> driveletters = burnin.ListDevicesLetters (); BurninDevice device = burnin.GetDevice (string DriveLetter);

3.2 Formatierung

bool b; Burnin burnin; burnin = new Burnin (); burnin.FormatEreaseStatusChanged += FormatEreaseProgress; // Laufwerk W: mit vollständiger Formatierung b = burnin.FormatMedia ("W:", true);

3.3 Öffnen, Schließen & Medium

// Öffnen, Schließen der Schublade

bool OpenTray (string Drive) ;

bool OpenTray (BurninDevice Device) ;

bool CloseTray (string Drive);

bool CloseTray (BurninDevice Device);

/// Ist ein Medium eingelegt?

bool IsLoaded (string Drive);

bool IsLoadedMedia (BurninDevice Device);

/// Ist ein leeres Medium eingelegt? Liefert auch False bei fehlendem Medium.

bool IsBlankMedia (string Drive) ;

bool IsBlankMedia (BurninDevice Device);

/// Abfrage auf ein eingelegtes *und* leeres Medium!

bool IsLoadedBlankMedia (string Drive);

bool IsLoadedBlankMedia (BurninDevice Device);

3.4 Brennen

int Burn (BurninDevice Device, string VolumeName, BurninItems MediaItems); // Beispiel: Burnin burnin; burnin = new Burnin (); // multiple Dateien mit vollständigem Pfad BurninItems items = new BurninItems (); items.AddFiles (FileToBurn, ...); BurninDevice device = burnin.GetDevice ("W:"); burnin.Burn (device, "MediumVolumeName", items)