Block Writing

vbimport

#1

I used NeroCom from Nero 6.6.0.6 Line allocated by red color gives out exception " Supplied parameter is of incorect type ". You could not prompt why so occurs? Or prompt as it is possible to create in another way an image of CD disk with data.


NeroClass engine=new NeroClass();
NeroDrives lstDrives = engine.GetDrives(NERO_MEDIA_TYPE.NERO_MEDIA_DVD_ANY);
NeroDrive read_drive = (NeroDrive)lstDrives.Item(0); \\Real drive with CD disk
NeroDrive write_drive = (NeroDrive)lstDrives.Item(2); \\Nero Image Recoder
INeroFileSystemBlockReader  br=read_drive.CreateBlockReader(AccessMode.eNoWriting);
write_drive.InitImageRecorder("d:\\image1.iso",NERO_MEDIA_TYPE.NERO_MEDIA_PACKETW);
INeroFileSystemBlockWriter bw =write_drive.CreateBlockWriter(AccessMode.ePacketWriting);
NeroFSPartitionInfo pInf = br.get_PartitionInfo(i);
object pBuf= new object(); 
NeroFSSecNo k = new NeroFSSecNoClass();
k.HiPart=0;
k.LoPart=256;
try 
{	
   br.ReadSectorsBuffered(ref pBuf,pInf.PartitionStart,k,ref k);
   bw.WriteSectorsBuffered(ref pBuf,pwInf.PartitionStart,k,ref k);}
catch (System.Exception ee)
{
   System.Windows.Forms.MessageBox.Show("Nero Exception: " + ee.Message + ee.StackTrace);
}