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:
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").
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);
bool b; Burnin burnin; burnin = new Burnin (); burnin.FormatEreaseStatusChanged += FormatEreaseProgress; // Laufwerk W: mit vollständiger Formatierung b = burnin.FormatMedia ("W:", true);
// Ö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);
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)