PrimoBurner for .NET
5.0
CD, DVD and Blu-ray Software Development Kit
|
The BlockDevice interface provides methods for reading and writing data CD and DVD in packet mode. More...
Inherits IDisposable.
Public Member Functions | |
BlockDevice () | |
Constructor. | |
bool | Close () |
The Close method closes the block device object. | |
void | Dispose () |
Disposes Device and reclaims the resources used by the object. | |
bool | FinalizeDisc (DataFile fileSystemLayout, string volumeLabel, bool closeTrack, bool closeSession, bool closeDisc, bool dismount) |
Writes UDF file system structures at the beginning of the disc which makes it read compatible with all operating systems that support UDF. | |
bool | Open () |
The Open method opens the block device object. | |
bool | Open (BlockDeviceOpenFlags openFlags) |
The Open method opens the block device object. | |
bool | Open (BlockDeviceOpenFlags openFlags, Int32 startAddress) |
The Open method opens the block device object. | |
bool | Write (byte[] data, Int32 dataLength, ref Int32 bytesWritten) |
Obsolete. | |
bool | Write (byte[]data, Int32 offset, Int32 dataLength) |
This method writes a specified number of bytes to the block device starting at the current write address. | |
Properties | |
Device | Device [get, set] |
Gets/Sets the Device instance that will be used for burning. | |
ErrorInfo | Error [get] |
Returns information about the last error that occurred while using the BlockDevice object. | |
bool | IsFinalized [get] |
Indicates whether the disc has been finalized. | |
bool | SimulateBurn [get, set] |
Gets/Sets a flag indicating whether a simulated burn should be performed. | |
string | TempDiscID [get, set] |
Gets/Sets the temporary disc ID. | |
Int32 | WriteAddress [get] |
Gets the current write address. | |
The BlockDevice interface provides methods for reading and writing data CD and DVD in packet mode.
bool Close | ( | ) |
The Close method closes the block device object.
bool FinalizeDisc | ( | DataFile | fileSystemLayout, |
string | volumeLabel, | ||
bool | closeTrack, | ||
bool | closeSession, | ||
bool | closeDisc, | ||
bool | dismount | ||
) |
Writes UDF file system structures at the beginning of the disc which makes it read compatible with all operating systems that support UDF.
fileSystemLayout | The logical file structure of the image, a tree of files and directories that should be used as a file system layout. The first DataFile item in the directory tree is the root of the file system. |
volumeLabel | Volume label. The max length allowed for the volume label is 32 characters. Only capital letters from A to Z, digits from 0 to 9, and the special characters _ (underscore) are allowed. |
closeTrack | Indicates that the track should be closed. This parameter is ignored if closeSession is set to true. |
closeSession | Indicates that the session should be closed. This parameter is ignored if closeDisc is set to true. |
closeDisc | Indicates that the disc should be closed. |
dismount | Indicates whether the OS should dismount the disc after it is finalized. |
bool Open | ( | ) |
The Open method opens the block device object.
The medium in the device will be formatted and the device will be prepared for sequential writing.
References BlockDevice.Open().
Referenced by BlockDevice.Open(), and BlockDevice.Open().
bool Open | ( | BlockDeviceOpenFlags | openFlags | ) |
The Open method opens the block device object.
openFlags | Type of access to the object. An application can obtain read-only access, write-only access, or read/write access. The default value of this parameter is a combination of the BlockDeviceOpenFlags.Write and BlockDeviceOpenFlags.Format flags. |
References BlockDevice.Open().
bool Open | ( | BlockDeviceOpenFlags | openFlags, |
Int32 | startAddress | ||
) |
The Open method opens the block device object.
openFlags | Type of access to the object. An application can obtain read-only access, write-only access, or read/write access. The default value of this parameter is a combination of the BlockDeviceOpenFlags.Write and BlockDeviceOpenFlags.Format flags. |
startAddress | Sets the address where the write operation should start from. This value ot this parameter is used only when the target medium is either MediaProfile.DvdRam, or MediaProfile.DvdPlusRw, or MediaProfile.DvdPlusRwDL, or MediaProfile.DvdMinusRwRo, or MediaProfile.BdRe. |
bool Write | ( | byte[] | data, |
Int32 | dataLength, | ||
ref Int32 | bytesWritten | ||
) |
bool Write | ( | byte[] | data, |
Int32 | offset, | ||
Int32 | dataLength | ||
) |
This method writes a specified number of bytes to the block device starting at the current write address.
data | A buffer with the data that should be written to the device. |
dataLength | Number of bytes from the input buffer to write to the medium. The value of dataLength should be a multiple of BlockSize.Dvd (2048 bytes). |
offset | Offset in the input buffer where begins the data that needs to be written. |
|
get |
Returns information about the last error that occurred while using the BlockDevice object.
|
get |
Indicates whether the disc has been finalized.
This property should be used only after the device has been successfully opened with the Open method.
The method returns:
|
getset |
Gets/Sets a flag indicating whether a simulated burn should be performed.
The default value is false (no simulation).
|
getset |
Gets/Sets the temporary disc ID.
The temporary disc ID is written to the disc when the Open method is called for the first time on a blank disc. This property must be set before calling the Open method, or otherwise it will be ignored. Setting this property to null or empty string will cause BlockDevice to read the ID from the disc when the Open method is called.
The max length allowed for the disc ID is 32 characters. It is a good practice to use the volume label of a disc as a temporary disc id.
The temporary disc id is written at the beginning of a blank disc. Setting the temporary disc id for a partially written disc has no effect.
To read the temporary disc id call the Open method and specify the Read open flag.
The value of the Temporary Disc ID is undefined after the first finalization.
|
get |
Gets the current write address.
This property should be used only after the device has been successfully opened with the Open method.
The method will return 0xFFFFFFFF if there is an error while trying to get the current write address.