PrimoBurner for .NET  5.0
CD, DVD and Blu-ray Software Development Kit
Loading...
Searching...
No Matches
DiscCopy Class Reference

Copies CD, DVD and BD discs. More...

Public Member Functions

bool CopyBD (Device destinationDevice, Device sourceDevice)
 Copies a blu-ray disc from one device to a blank blu-ray disc in another device.
 
bool CopyBD (Device destinationDevice, Device sourceDevice, bool useTemporaryFiles)
 Copies a blu-ray disc from one device to a blank blu-ray disc in another device.
 
bool CopyCD (Device destinationDevice, Device sourceDevice)
 Copies a CD from one device to a blank CD in another device.
 
bool CopyCD (Device destinationDevice, Device sourceDevice, bool useTemporaryFiles, CDCopyReadMethod readMethod, CDCopyWriteMethod writeMethod)
 Copies a CD from one device to a blank CD in another device.
 
bool CopyDVD (Device destinationDevice, Device sourceDevice)
 Copies a DVD from one device to a blank DVD in another device.
 
bool CopyDVD (Device destinationDevice, Device sourceDevice, bool useTemporaryFiles)
 Copies a DVD from one device to a blank DVD in another device.
 
bool CreateImageFromBD (string imageFile, Device sourceDevice)
 Creates a disc image from a blu-ray disc.
 
bool CreateImageFromCD (string imageFile, PrimoSoftware.Burner.Device sourceDevice)
 Creates an image from a CD.
 
bool CreateImageFromCD (string imageFile, PrimoSoftware.Burner.Device sourceDevice, CDCopyReadMethod readMethod)
 Creates an image from a CD.
 
bool CreateImageFromDVD (string imageFile, Device sourceDevice)
 Creates an image from a DVD.
 
bool WriteImageToBD (Device destinationDevice, string imageFile)
 Writes a disc image to a blank blu-ray disc.
 
bool WriteImageToCD (Device destinationDevice, string imageFile)
 Writes image to blank CD.
 
bool WriteImageToCD (Device destinationDevice, string imageFile, CDCopyWriteMethod writeMethod)
 Writes image to blank CD.
 
bool WriteImageToDVD (Device destinationDevice, string imageFile)
 Writes image to a blank DVD.
 

Properties

bool DeleteImageAfterBurn [get, set]
 Gets/sets a value indicating that DiscCopy will delete the source image files after the image is burned on the target disc.
 
ErrorInfo Error [get]
 Returns information about the last error that occurred while using the DiscCopy object.
 
Device ErrorDevice [get]
 Returns the device that registered the original error.
 
bool SimulateWrite [get, set]
 Gets/sets a value indicating that DiscCopy will simulate burning.
 

Events

EventHandler< DiscCopyContinueCopyEventArgsOnContinueCopy
 Raised to check if burning should continue.
 
EventHandler< DiscCopyProgressEventArgsOnProgress
 The OnProgress method is called by DiscCopy instance to report the number of bytes written to the target medium.
 
EventHandler< DiscCopyStatusEventArgsOnStatus
 Raised to report the burning status.
 
EventHandler< DiscCopyTrackStatusEventArgsOnTrackStatus
 Raised to report the burning progress for individual tracks.
 

Detailed Description

Copies CD, DVD and BD discs.

NOTES:

When creating a disc image the source medium content is read as binary data and stored in an image description file and one or more binary files.

When burning an image to a disc the image description file tells how the content/s of the binary file/s should be written on the target disc, so that it becomes a replica of the source disc. For this reason not all media types could be copied on any other media type.

Version
3.0
See also
DiscCopy.WriteImageToCD, DiscCopy.WriteImageToDVD, DiscCopy.WriteImageToBD

Member Function Documentation

◆ CopyBD() [1/2]

bool CopyBD ( Device  destinationDevice,
Device  sourceDevice 
)

Copies a blu-ray disc from one device to a blank blu-ray disc in another device.

Parameters
destinationDeviceA Device instance that describes the physical device containing the BD medium to write the image to.
sourceDeviceA Device instance describing the physical device that contains the BD medium to be copied.

The method will create an image of the source device in temporary file/s and then will use that image to write to the destination device. The following restrictions apply:

  • If the source medium is a BD-RE, the resulting image could be written on any type of blank BD. In this case, an image is made of the entire disc, so it may take some time.
  • If the source medium is a BD-ROM, the resulting image could be written on any type of blank BD.
  • If the source medium is a BD-R in Sequential Recording Mode (SRM), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) only.
  • If the source medium is a BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW) only.

In any other case the method will return 0 and DiscCopy.Error property will return
DiscCopyError.IncompatibleMedia value.

NOTE: A blank BD-R in Sequential Recording Mode (SRM) can be formatted for Pseudo Overwrite (POW) using
Device.FormatBD with BDFormatType.BdFull and BDFormatSubType.BdRSrmPow as parameters.

Version
3.6.0
Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, DiscCopy.Error, DiscCopy.ErrorDevice

References DiscCopy.CopyBD().

Referenced by DiscCopy.CopyBD().

◆ CopyBD() [2/2]

bool CopyBD ( Device  destinationDevice,
Device  sourceDevice,
bool  useTemporaryFiles 
)

Copies a blu-ray disc from one device to a blank blu-ray disc in another device.

Parameters
destinationDeviceA Device instance that describes the physical device containing the BD medium to write the image to.
sourceDeviceA Device instance describing the physical device that contains the BD medium to be copied.
useTemporaryFilesSet this parameter to true to create an image of the source disc and store it in temporary image files before burning it to destination disc (after the burning is complete the temporary image files are deleted). Set it to false to use "On the fly" copying in which case no temporary files will be created but the read and write operations will be simultaneous. The default value for this parameter is true.

The following restrictions apply:

  • If the source medium is a BD-RE, the resulting image could be written on any type of blank BD. In this case, an image is made of the entire disc, so it may take some time.
  • If the source medium is a BD-ROM, the resulting image could be written on any type of blank BD.
  • If the source medium is a BD-R in Sequential Recording Mode (SRM), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) only.
  • If the source medium is a BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW) only.

In any other case the method will return 0 and DiscCopy.Error property will return
DiscCopyError.IncompatibleMedia value.

NOTE: A blank BD-R in Sequential Recording Mode (SRM) can be formatted for Pseudo Overwrite (POW) using
Device.FormatBD with BDFormatType.BdFull and BDFormatSubType.BdRSrmPow as parameters.

Version
3.6.0
Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, DiscCopy.Error, DiscCopy.ErrorDevice

◆ CopyCD() [1/2]

bool CopyCD ( Device  destinationDevice,
Device  sourceDevice 
)

Copies a CD from one device to a blank CD in another device.

Parameters
destinationDeviceA Device instance that describes the physical device containing the CD medium to write the image to.
sourceDeviceA Device instance describing the physical device that contains the CD medium to be copied.

The method will create an image of the source device in temporary file/s and then will use that image to write to the destination device. The following restrictions apply:

  • If the source medium is a CD-R, the resulting image could be written on any type of CD blank.
  • If the source medium is a CD-RW, the resulting image could be written on any type of CD blank.

    IMPORTANT: DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy.ErrorDevice property will return an instance of the device set in the destinationDevice parameter.

Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, CDCopyReadMethod, CDCopyWriteMethod, DiscCopy.Error, DiscCopy.ErrorDevice

References DiscCopy.CopyCD().

Referenced by DiscCopy.CopyCD().

◆ CopyCD() [2/2]

bool CopyCD ( Device  destinationDevice,
Device  sourceDevice,
bool  useTemporaryFiles,
CDCopyReadMethod  readMethod,
CDCopyWriteMethod  writeMethod 
)

Copies a CD from one device to a blank CD in another device.

Parameters
destinationDeviceA Device instance that describes the physical device containing the CD medium to write the image to.
sourceDeviceA Device instance describing the physical device that contains the CD medium to be copied.
useTemporaryFilesSet this parameter to true to create an image of the source disc and store it in temporary image files before burning it to destination disc (after the burning is complete the temporary image files are deleted). Set it to false to use "On the fly" copying in which case no temporary files will be created but the read and write operations will be simultaneous. The default value for this parameter is true.
readMethodRead method to be used. The default value is CDCopyReadMethod.CdFullRaw.
writeMethodA CDCopyWriteMethod value defining the how the image will be written on the target CD. The default value is CDCopyWriteMethod.CdFullRaw.

The following restrictions apply:

  • If the source medium is a CD-R, the resulting image could be written on any type of CD blank.
  • If the source medium is a CD-RW, the resulting image could be written on any type of CD blank.

    IMPORTANT: DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy.ErrorDevice property will return an instance of the device set in the destinationDevice parameter).

Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, CDCopyReadMethod, CDCopyWriteMethod, DiscCopy.Error, DiscCopy.ErrorDevice

◆ CopyDVD() [1/2]

bool CopyDVD ( Device  destinationDevice,
Device  sourceDevice 
)

Copies a DVD from one device to a blank DVD in another device.

Parameters
destinationDeviceA Device instance that describes the physical device containing the DVD medium to write the image to.
sourceDeviceA Device instance describing the physical device that contains the DVD medium to be copied.

The method will create an image of the source device in temporary file/s and then will use that image to write to the destination device. The following restrictions apply:

  • If the source medium is a DVD-RAM, the resulting image could be written on any type of DVD blank.
  • If the source medium is a DVD+RW, the resulting image could be written on any type of DVD blank. In this case, an image is made of the entire disc (4.37 GB), so it may take some time.
  • If the source medium is a DVD-ROM, the resulting image could be written on any blank.
  • If the source medium is a DVD-R, the resulting image could be written on any DVD-R blank, or a DVD-RW blank erased for sequential recording.
  • If the source medium is a DVD-R DL, the resulting image could be written on a DVD-R DL blank.
  • If the source medium is a DVD-RW in sequential recording mode, the resulting image could be written on a DVD-RW blank erased for sequential recording, or a DVD-R blank.
  • If the source medium is a DVD-RW in Restricted Overwrite mode, the resulting image could be written on a blank of the same (DVD-RW RO) type.
  • If the source medium is a DVD+R, the resulting image could be written on a DVD+R blank.
  • If the source medium is a DVD+R DL, the resulting image could be written on a DVD+R DL blank.

In any other case the method will return 0 and DiscCopy.Error property will return
DiscCopyError.IncompatibleMedia value.

IMPORTANT NOTE: DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy.Error property will return a device error).

Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, DiscCopy.Error, DiscCopy.ErrorDevice

References DiscCopy.CopyDVD().

Referenced by DiscCopy.CopyDVD().

◆ CopyDVD() [2/2]

bool CopyDVD ( Device  destinationDevice,
Device  sourceDevice,
bool  useTemporaryFiles 
)

Copies a DVD from one device to a blank DVD in another device.

Parameters
destinationDeviceA Device instance that describes the physical device containing the DVD medium to write the image to.
sourceDeviceA Device instance describing the physical device that contains the DVD medium to be copied.
useTemporaryFilesSet this parameter to true to create an image of the source disc and store it in temporary image files before burning it to destination disc (after the burning is complete the temporary image files are deleted). Set it to false to use "On the fly" copying in which case no temporary files will be created but the read and write operations will be simultaneous. The default value for this parameter is true.

The following restrictions apply:

  • If the source medium is a DVD-RAM, the resulting image could be written on any type of DVD blank.
  • If the source medium is a DVD+RW, the resulting image could be written on any type of DVD blank. In this case, an image is made of the entire disc (4.37 GB), so it may take some time.
  • If the source medium is a DVD-ROM, the resulting image could be written on any blank.
  • If the source medium is a DVD-R, the resulting image could be written on any DVD-R blank, or a DVD-RW blank erased for sequential recording.
  • If the source medium is a DVD-R DL, the resulting image could be written on a DVD-R DL blank.
  • If the source medium is a DVD-RW in sequential recording mode, the resulting image could be written on a DVD-RW blank erased for sequential recording, or a DVD-R blank.
  • If the source medium is a DVD-RW in Restricted Overwrite mode, the resulting image could be written on a blank of the same (DVD-RW RO) type.
  • If the source medium is a DVD+R, the resulting image could be written on a DVD+R blank.
  • If the source medium is a DVD+R DL, the resulting image could be written on a DVD+R DL blank.

In any other case the method will return 0 and DiscCopy.Error property will return
DiscCopyError.IncompatibleMedia value.

IMPORTANT NOTE: DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy.Error property will return a device error).

Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, DiscCopy.Error, DiscCopy.ErrorDevice

◆ CreateImageFromBD()

bool CreateImageFromBD ( string  imageFile,
Device  sourceDevice 
)

Creates a disc image from a blu-ray disc.

Images from BDs with open sessions are not created. In those cases the method returns false and DiscCopy.Error property will report DiscCopyError.SourceDiscLastSessionOpen value). Exceptions are BD+RE and BD-R SRM+POW media - images are always created from such discs.

Version
3.6.0
Parameters
imageFileFull path to the image file (including the file name and the extension).
sourceDeviceA Device instance describing the physical device that contains the BD medium to be copied.
Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, DiscCopy.Error, DiscCopy.ErrorDevice

◆ CreateImageFromCD() [1/2]

bool CreateImageFromCD ( string  imageFile,
PrimoSoftware::Burner::Device  sourceDevice 
)

Creates an image from a CD.

Parameters
imageFileFull path to the image file (including the file name and the extension).
sourceDeviceA Device instance describing the physical device that contains the CD medium to create an image of.
Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, CDCopyReadMethod, DiscCopy.Error, DiscCopy.ErrorDevice

References DiscCopy.CreateImageFromCD().

Referenced by DiscCopy.CreateImageFromCD().

◆ CreateImageFromCD() [2/2]

bool CreateImageFromCD ( string  imageFile,
PrimoSoftware::Burner::Device  sourceDevice,
CDCopyReadMethod  readMethod 
)

Creates an image from a CD.

Parameters
imageFileFull path to the image file (including the file name and the extension).
sourceDeviceA Device instance describing the physical device that contains the CD medium to create an image of.
readMethodRead method to be used. The default value is CDCopyReadMethod.CdFullRaw
Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, CDCopyReadMethod, DiscCopy.Error, DiscCopy.ErrorDevice

◆ CreateImageFromDVD()

bool CreateImageFromDVD ( string  imageFile,
Device  sourceDevice 
)

Creates an image from a DVD.

Parameters
imageFileFull path to the image file (including the file name and the extension).
sourceDeviceA Device instance describing the physical device that contains the DVD medium to be copied.

Images from DVDs with open sessions/tracks are not created. In those cases the method returns false and DiscCopy.ErrorDevice property will return an instance of the device set in the sourceDevice parameter. Exceptions are DVD+RW and DVD RAM media - images are always created from such discs.

Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, DiscCopy.Error, DiscCopy.ErrorDevice

◆ WriteImageToBD()

bool WriteImageToBD ( Device  destinationDevice,
string  imageFile 
)

Writes a disc image to a blank blu-ray disc.

The following restrictions apply:

  • If the source medium is a BD-RE, the resulting image could be written on any type of blank BD. In this case, an image is made of the entire disc, so it may take some time.
  • If the source medium is a BD-ROM, the resulting image could be written on any type of blank BD.
  • If the source medium is a BD-R in Sequential Recording Mode (SRM), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) only.
  • If the source medium is a BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW) only.

In any other case the method will return 0 and DiscCopy.Error property will return
DiscCopyError.IncompatibleMedia value.

NOTE: A blank BD-R in Sequential Recording Mode (SRM) can be formatted for Pseudo Overwrite (POW) using
Device.FormatBD with BDFormatType.BdFull and BDFormatSubType.BdRSrmPow as parameters.

Version
3.6.0
Parameters
destinationDeviceA Device instance that describes the physical device containing the BD medium to write the image to.
imageFileFull path to the image file (including the file name and the extension) of the image file to be written.
Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, DiscCopy.Error, DiscCopy.ErrorDevice

◆ WriteImageToCD() [1/2]

bool WriteImageToCD ( Device  destinationDevice,
string  imageFile 
)

Writes image to blank CD.

Parameters
destinationDeviceA Device instance that describes the physical device containing the CD medium to write the image to.
imageFileFull path to the image file (including the file name and the extension) of the image file to be written.

The following restrictions apply:

  • If the source medium is a CD-R, the resulting image could be written on any type of CD blank.
  • If the source medium is a CD-RW, the resulting image could be written on any type of CD blank.

    IMPORTANT: DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy.ErrorDevice property will return an instance of the device set in the destinationDevice parameter.

Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, CDCopyWriteMethod, DiscCopy.Error, DiscCopy.ErrorDevice

References DiscCopy.WriteImageToCD().

Referenced by DiscCopy.WriteImageToCD().

◆ WriteImageToCD() [2/2]

bool WriteImageToCD ( Device  destinationDevice,
string  imageFile,
CDCopyWriteMethod  writeMethod 
)

Writes image to blank CD.

Parameters
destinationDeviceA Device instance that describes the physical device containing the CD medium to write the image to.
imageFileFull path to the image file (including the file name and the extension) of the image file to be written.
writeMethodA CDCopyWriteMethod value defining the how the image will be written on the target CD. The default value is CDCopyWriteMethod.CdFullRaw

The following restrictions apply:

  • If the source medium is a CD-R, the resulting image could be written on any type of CD blank.
  • If the source medium is a CD-RW, the resulting image could be written on any type of CD blank.

    IMPORTANT: DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy.ErrorDevice property will return an instance of the device set in the destinationDevice parameter.

Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, CDCopyWriteMethod, DiscCopy.Error, DiscCopy.ErrorDevice

◆ WriteImageToDVD()

bool WriteImageToDVD ( Device  destinationDevice,
string  imageFile 
)

Writes image to a blank DVD.

Parameters
destinationDeviceA Device instance that describes the physical device containing the DVD medium to write the image to.
imageFileFull path to the image file (including the file name and the extension) of the image file to be written.

The following restrictions apply:

  • If the source medium is a DVD-RAM, the resulting image could be written on any type of DVD blank.
  • If the source medium is a DVD+RW, the resulting image could be written on any type of DVD blank. In this case, an image is made of the entire disc (4.37 GB), so it may take some time.
  • If the source medium is a DVD-ROM, the resulting image could be written on any blank.
  • If the source medium is a DVD-R, the resulting image could be written on any DVD-R blank, or a DVD-RW blank erased for sequential recording.
  • If the source medium is a DVD-R DL, the resulting image could be written on a DVD-R DL blank.
  • If the source medium is a DVD-RW in sequential recording mode, the resulting image could be written on a DVD-RW blank erased for sequential recording, or a DVD-R blank.
  • If the source medium is a DVD-RW in Restricted Overwrite mode, the resulting image could be written on a blank of the same (DVD-RW RO) type.
  • If the source medium is a DVD+R, the resulting image could be written on a DVD+R blank.
  • If the source medium is a DVD+R DL, the resulting image could be written on a DVD+R DL blank. In any other case the method will return 0 and DiscCopy.Error property will return DiscCopyError.IncompatibleMedia value.

IMPORTANT NOTE: DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy.Error property will return a device error.

Returns
true - Success

false - Error. Check DiscCopy.Error for the actual reason.

See also
Device, DiscCopy.Error, DiscCopy.ErrorDevice

Property Documentation

◆ DeleteImageAfterBurn

bool DeleteImageAfterBurn
getset

Gets/sets a value indicating that DiscCopy will delete the source image files after the image is burned on the target disc.

This setting is ignored during burning simulation .

The default behavior will not delete the image files after the burning is complete.

See also
DiscCopy.SimulateWrite, DiscCopy.WriteImageToCD, DiscCopy.WriteImageToDVD, DiscCopy.WriteImageToBD

◆ Error

ErrorInfo Error
get

Returns information about the last error that occurred while using the DiscCopy object.

If the Facility property of the DiscCopy Error returns ErrorFacility.Device then the DiscCopy.ErrorDevice will hold the instance of the Device object that has registered the error.

◆ ErrorDevice

Device ErrorDevice
get

Returns the device that registered the original error.

This property is valid when DiscCopy.Error has a
ErrorFacility.Device facility.

The value of this property if updated after each call of createImageFrom..., writeImnageTo... and copy... methods. If the DiscCopy error is not a device one, then this property will return null. Note that the instance returned from this property is valid until the original device is disposed (source or destination one, depending on the last executed DiscCopy method), after that the value returned from this property should not be used. In case the device cannot be determined the property will return null even if the DiscCopy.Error property has a
ErrorFacility.Device facility.

See also
DiscCopy.CreateImageFromCD, DiscCopy.CopyCD, DiscCopy.CreateImageFromDVD, DiscCopy.CopyDVD, DiscCopy.CreateImageFromBD, DiscCopy.CopyBD

◆ SimulateWrite

bool SimulateWrite
getset

Gets/sets a value indicating that DiscCopy will simulate burning.

By default this property is set to false.

Event Documentation

◆ OnContinueCopy

EventHandler<DiscCopyContinueCopyEventArgs> OnContinueCopy

Raised to check if burning should continue.

The event handler receives an argument (could be null) of type DiscCopyContinueCopyEventArgs containing data related to this event.

◆ OnProgress

EventHandler<DiscCopyProgressEventArgs> OnProgress

The OnProgress method is called by DiscCopy instance to report the number of bytes written to the target medium.

The event handler receives an argument of type DiscCopyProgressEventArgs containing data related to this event.

◆ OnStatus

EventHandler<DiscCopyStatusEventArgs> OnStatus

Raised to report the burning status.

The event handler receives an argument of type DiscCopyStatusEventArgs containing data related to this event.

◆ OnTrackStatus

EventHandler<DiscCopyTrackStatusEventArgs> OnTrackStatus

Raised to report the burning progress for individual tracks.

The event handler receives an argument of type DiscCopyTrackStatusEventArgs containing data related to this event.