You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LoadLastTrackLayout and DataDisc get ImageLayout is null
Library.EnableTraceLog();
Library.SetLicense("");
using var engine = new Engine();
engine.Initialize();
engine.OnDeviceChange += Engine_OnDeviceChange;
engine.OnMediaChange += Engine_OnMediaChange;
var driveLetter = "F";
var device = GetDevice(driveLetter, engine);
if (device == null)
{
return;
}
DataDisc dataDisc = new DataDisc();
dataDisc.Device = device;
// Set the session start address. This must be done before intializing the file system.
dataDisc.SessionStartAddress = device.NewSessionStartAddress;
int nPrevTrackNumber = GetLastCompleteTrack(device);
if (nPrevTrackNumber > 0)
{
// Set the track number here. DataDisc will load it later.
dataDisc.LoadTrackLayout = nPrevTrackNumber;
dataDisc.DataOverwrite = DataOverwriteFlags.Overwrite;
}
DataFile dataFile = dataDisc.ImageLayout;
// dataFile is null ,
Is the method I'm using incorrect? Can you provide me with a Demo? My requirement is that the burned data cannot be written to the HDD. The data needs to be read directly through the network and written to the disc, so I use BlockDevice for data writing. I need to retain already written data and append write new data.
Windows 11 x64 .net core
Version Windows 11 Professional Workstation Edition
Version 23H2
Installation date 2023/11/9
Operating system version 22631.3447
Processor 13th Gen Intel(R) Core(TM) i9-13900H 2.60 GHz
Onboard RAM 32.0 GB (31.8 GB available)
The text was updated successfully, but these errors were encountered:
dataDisc.ImageLayout is null because the ImageLayout (i.e. the file system tree) has not been set or loaded. dataDisc.LoadTrackLayout just instructs DataDisc to load the file system later from the corresponding disc track. That will happen at the time of next WriteToDisc() call.
If you have to use BlockDevice then you need to keep track of all the files that you manually write and use that information to create the file layout yourself, then pass the layout you created when you call BlockDevice.FinalizeDisc
We are in the process of porting all legacy samples to v5.0 but unfortunately have not gotten to do that for the .NET BlockDevice sample yet.
In general, I would study the BlockDevice sample. I think it pretty much covers your use case. Once you can run it for files just update the code to read file data from the network and you should be good.
LoadLastTrackLayout and DataDisc get ImageLayout is null
Is the method I'm using incorrect? Can you provide me with a Demo? My requirement is that the burned data cannot be written to the HDD. The data needs to be read directly through the network and written to the disc, so I use BlockDevice for data writing. I need to retain already written data and append write new data.
Windows 11 x64 .net core
The text was updated successfully, but these errors were encountered: