Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, NeroCOM - How does one Read/Write Packets? at International Chat: Software related forum; I have written onto a blank DVD+RW a few files using the NERO_BURN_OPTIONS.NERO_BURN_OPTION_CREATE_UDF_FS option. Nero Burning Rom recognises the CD as an UDF cd, so it's fine there. I am using C# and NeroCOM, and would like to be able to read and write packets. At this


Reply
 
Thread Tools
Old 14-07-2004   #1 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 5
NeroCOM - How does one Read/Write Packets?

I have written onto a blank DVD+RW a few files using the NERO_BURN_OPTIONS.NERO_BURN_OPTION_CREATE_UDF_FS option. Nero Burning Rom recognises the CD as an UDF cd, so it's fine there.

I am using C# and NeroCOM, and would like to be able to read and write packets. At this moment, this is the code I'm trying out:

Code:
Nero DVDBurners = new NeroClass();
try
{
	NeroDrives DVDWRoms = DVDBurners.GetDrives(NERO_MEDIA_TYPE.NERO_MEDIA_DVD_P_RW);
	NeroDrive DVDBurner = (NeroDrive) DVDWRoms.Item(0);
	//INeroFileSystemBlockWriter BlkWrt = DVDBurner.CreateBlockWriter(AccessMode.ePacketWriting);
	INeroFileSystemBlockReader BlkRd = DVDBurner.CreateBlockReader(AccessMode.eNoWriting);
	NeroFSSecNo startSec = new NeroFSSecNoClass();
	startSec.LoPart = 1;
	startSec.HiPart = 1;
	NeroFSSecNo secWritten = new NeroFSSecNoClass();
	secWritten.LoPart = 2;
	secWritten.HiPart = 2;
	NeroFSSecNo sec2Write = new NeroFSSecNoClass();
	sec2Write.LoPart = 0;
	sec2Write.HiPart = 0;
	Object pvarBuffer = new object();
	BlkRd.ReadSectorsBuffered(ref pvarBuffer, startSec, secWritten, ref sec2Write); //BlkWrt.WriteSectorsBuffered( pvarBuffer,
}
catch (System.Exception ee)
{
	System.Windows.Forms.MessageBox.Show("Nero Exception: " + ee.Message + ee.StackTrace);
}
At the indigo line, It throws an error: "Nero Exception: The parameter is incorrect." What is the correct usage of the Read/WriteSectorsBuffered so that I can read as well as write to an UDF formatted DVD+RW?
smohalanobish is offline   Reply With Quote
Old 14-07-2004   #2 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
HiPart and LoPart should be treated as 64-bit integers. Try assigning zero to HiPart instead of 1 or 2. The way you wrote it startSec is 0x100000001 and secWritten is 0x200000002.

Other than this, pvarBuffer should be a VARIANT.
alexp is offline   Reply With Quote
Old 15-07-2004   #3 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 5
Re: NeroCOM - How does one Read/Write Packets?

Quote:
In vb.net in case of absence of any specific variable type, it will be declared as object type. Whereas in Vb it is considered as Variant data Type
http://www.dotnetspider.com/Technolo...QuestionId=222
So, I think I did no wrong by declaring it as an Object.
C# & VB.NET have a System.Int64 object, so it didn't occour to me that HiPart & LoPart might be of a 64-bit integer.

Ok, despite setting the high bits to 0 and low bits appropriately, I am not able to read anything. It still returns the error

Nero Exception : The parameter is incorrect. at NEROLib.NeroFileSystemBlockClass.ReadSectorsBuffered(Object& pvarBuffer, NeroFSSecNo pStartSector, NeroFSSecNo pNoSectors, NeroFSSecNo& ppNoSectorsRead)
smohalanobish is offline   Reply With Quote
 
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
nerocom and vb6.0 - Write Error when creating Audio CD...HELP! Ron_C Nero SDK Discussion Forum 2 21-04-2006 14:09
Stumped, ND-3500a won't write packets motrix NEC / Optiarc Burner 1 04-07-2005 11:24
Help: NEC2500A can write DVD/DVDRW but can't read nor write CD sillycat NEC / Optiarc Burner 11 06-10-2004 14:37
How to set write speed?(NeroCom) Tors Nero SDK Discussion Forum 3 30-04-2004 13:50
Cant read and write Dvds but can neither read or write cds Abraxus BTC/ Emprex Burner 1 11-12-2003 18:02


All times are GMT +2. The time now is 09:44.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0