Nero_import_data_track_result & naming a cd

Hi!

What’s the problem, when the importResult from the OnDoneImport2 event says: “NIDTR_DRIVE_ERROR”?

Is my drive not able to read the old session or …?

How do I name a CD? The name I provide in the BurnIsoAudioCD(…) method is not used.

Thanks!
Gerhard

What’s the problem, when the importResult from the OnDoneImport2 event says: “NIDTR_DRIVE_ERROR”?
You should check for LastError and LastDriveError properties and see what they say.

How do I name a CD? The name I provide in the BurnIsoAudioCD(…) method is not used.
You are probably using Title parameter for data disc name. This is not the proper way. Artist/Title are used when burning audio content. To name your ISO track you should use Name property of NeroISOTrack.

ImportResult: NIDTR_DRIVE_ERROR
LastDriveError: NDE_NO_ERROR
LastError: “”

The only thing, that looks not normal to me is, that my CD writer ist off (but also my second hard disk…).

What could be the problem?

Here is my code, with which I try to burn a multisession cd (c#; it’s just a sample application for testing…):

trackNumber is the number of sessions, which are already on the cd (from CDInfo; not in code included).


private	static void WriteNewSession()
{
	//Drive for burning
	NEROLib.NeroDrive neroDrive = (NEROLib.NeroDrive)allDrives[1];			

	//IsoTrack
	NEROLib.NeroISOTrackClass iso = new NEROLib.NeroISOTrackClass();			

	//Create a new root folder
	rootFolder = new NEROLib.NeroFolderClass();
	
	if (trackNumber > 0) 
	{
		//Event OnDoneImport				
		neroDrive.OnDoneImport2+= new NEROLib._INeroDriveEvents_OnDoneImport2EventHandler(neroDrive_OnDoneImport2);				

		//Import the last track
		neroDrive.ImportIsoTrack(trackNumber, NEROLib.NERO_IMPORT_ISO_TRACK_FLAGS.NERO_IMPORT_ISO_ONLY);
		
		
		Console.ReadLine();
	}			

	//Setting the root folder for the iso track
	iso.RootFolder = rootFolder;			

	//Adding file
	Random r = new Random();
	string temp = r.Next(50000).ToString();

	NEROLib.NeroFileClass file = new NEROLib.NeroFileClass();

	file.Name = temp + ".txt";
	file.SourceFilePath = @"C:\z_test\BackupWriter Testdateien\groß 1.txt";			

	rootFolder.Files.Add(file);

	//Name for the cd
	iso.Name = "" + temp;
	iso.INeroISOTrack_Name = "" + temp;
	iso.INeroISOTrack_RootFolder = rootFolder;

	//Burn options
	iso.BurnOptions = NEROLib.NERO_BURN_OPTIONS.NERO_BURN_OPTION_CREATE_ISO_FS | NEROLib.NERO_BURN_OPTIONS.NERO_BURN_OPTION_USE_JOLIET;

	//Events for burning
	neroDrive.OnProgress += new NEROLib._INeroDriveEvents_OnProgressEventHandler(OnProgress);
	neroDrive.OnDoneBurn += new NEROLib._INeroDriveEvents_OnDoneBurnEventHandler(neroDrive_OnDoneBurn);

	//burn the cd
	neroDrive.BurnIsoAudioCD(null, null, false, iso,null, null, NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_WRITE | NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_CLOSE_SESSION /*| NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_DISABLE_EJECT*/, 10, NEROLib.NERO_MEDIA_TYPE.NERO_MEDIA_CDR);

}

private static void OnProgress(ref int percent, ref bool done)
{
	if (done == false)
	{
		Console.WriteLine(percent + "% done...");
	}
	else
	{
		Console.WriteLine("Done burning...");
	}
}		

private static void neroDrive_OnDoneBurn(ref NEROLib.NERO_BURN_ERROR StatusCode)
{
	Console.WriteLine("============================================");
	Console.WriteLine("Burn done. (" + StatusCode.ToString() + ")");
	Console.WriteLine("============================================");
	
	if (NEROLib.NERO_BURN_ERROR.NERO_BURN_OK == StatusCode)
	{
		Console.WriteLine("============================================");
		Console.WriteLine("Burn done successful.");
		Console.WriteLine("============================================");
	}
	else
	{
		Console.WriteLine(nero.ErrorLog);
		Console.WriteLine("============================================");
		Console.WriteLine("Failure.");
		Console.WriteLine("============================================");
	}			
}		

private static void neroDrive_OnDoneImport2(bool bOk, NEROLib.NeroFolder pFolder, NEROLib.NeroCDStamp pCDStamp, NEROLib.NeroImportDataTrackInfo pImportInfo, NEROLib.NERO_IMPORT_DATA_TRACK_RESULT importResult)
{		
	Console.WriteLine("Ok                      : " + bOk);
	Console.WriteLine("NeroImportDataTrackInfo : " + pImportInfo.VolumeName);						
	Console.WriteLine("ImportResult            : " + importResult.ToString());			
	Console.WriteLine("LastDriveError          : " + nero.LastDriveError);			
	Console.WriteLine("LastError               : " + nero.LastError);			

	Console.WriteLine("Track " + trackNumber + " imported... [ENTER] to continue...");

	if (bOk == false)
	{
		Console.WriteLine("ErrorLog              : " + nero.ErrorLog);
	}
	else
	{
		rootFolder = pFolder;
	}		

	Console.WriteLine("
[ENTER] to continue...");
}

And here’s what my applications says at the OnDoneImport2 event:

Ok : False
NeroImportDataTrackInfo :
ImportResult : NIDTR_DRIVE_ERROR
LastDriveError : NDE_NO_ERROR
LastError :
Track 4 imported… [ENTER] to continue…

ErrorLog :
Windows XP 5.1
IA32
WinAspi: File ‘Wnaspi32.dll’: Ver=4.71 (0001), size=45056 bytes, created 14.08.2002 16:03:36
ahead WinASPI: File ‘c:\Programme\Nero\Nero\Wnaspi32.dll’: Ver=2.0.1.59, size=160016 bytes, created 16.12.2003 19:18:06
Nero API version: 6.3.1.6
Using interface version: 6.3.0.6
Installed in: c:\Programme\Nero\Nero
Application: Nero - Burning Rom\ahead

=== Scsi-Device-Map ===
DiskPeripheral : ST380020A IdeChnDr Port 0 ID 0 DMA: On
DiskPeripheral : ST380021A IdeChnDr Port 0 ID 1 DMA: Off
CdRomPeripheral : IDE DVD-ROM 16X IdeChnDr Port 1 ID 0 DMA: On
CdRomPeripheral : PHILIPS CDRW48P IdeChnDr Port 1 ID 1 DMA: Off

=== CDRom-Device-Map ===
IDE DVD-ROM 16X G: CDRom0
PHILIPS CDRW48P H: CDRom1

AutoRun : 0
Excluded drive IDs:
CmdQueuing : 1
CmdNotification: 2
WriteBufferSize: 83886080 (0) Byte
ShowDrvBufStat : 0
EraseSpeed : 0
BUFE : 0
Physical memory : 767MB (785908kB)
Free physical memory: 373MB (382284kB)
Memory in use : 51 %
Uncached PFiles: 0x0
Use Static Write Speed Table: 0
Use Inquiry : 1
Global Bus Type: default (0)
Check supported media : Disabled (0)

19.4.2004
NeroAPI

Existing drivers:
File ‘Drivers\ASPI32.SYS’: Ver=4.71 (0001), size=17005 bytes, created 14.08.2002 16:03:36
File ‘Drivers\PXHELP20.SYS’: Ver=2.02.62a, size=20016 bytes, created 28.10.2003 12:02:00 (Prassi/Veritas driver for win 2K)

Registry Keys:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\AllocateCDROMs : 0 (Security Option)

The only thing, that looks not normal to me is, that my CD writer ist off

Hmm, how do you expect to import a track from a CD writer that is off?

Hi!

Well, I don’t know why the CD writer is off. If I put in another CD, with data on it, I can read all the files and directories on it, but if I then run my sample application it still says, that my CD writer is off.

How can I change this?

What do you mean exactly with “your CD writer is off”?

=== Scsi-Device-Map ===
DiskPeripheral : ST380020A IdeChnDr Port 0 ID 0 DMA: On
DiskPeripheral : ST380021A IdeChnDr Port 0 ID 1 DMA: Off
CdRomPeripheral : IDE DVD-ROM 16X IdeChnDr Port 1 ID 0 DMA: On
CdRomPeripheral : PHILIPS CDRW48P IdeChnDr Port 1 ID 1 DMA: Off

That’s what nero.ErrorLog says (shown in my post above).

My CD writer is the last in the list.

Ah! So just DMA setting is off. This should generally be no problem.

Can you burn on the drive with Nero Burning ROM?

I’m able to burn with nero burning rom and nerocmd, but not with nerocom.

My sample code is above, and I don’t know why it doesn’t work…

But thanks for all your useful answers matze!!!

trackNumber is the number of sessions, which are already on the cd

I think, this is the problem. Try to subtract one. If you want to import session 1, the tracknumber to import should be zero.

hello!

I tra to update files from my HD to a DVDRW with a visual basic codefor microsoft access application.

So I need to get all tracks from my DVDRW to compare all the files from the DVDRW to these witch are in a folder in my HD.

It’s important that my access application determine itself the updating of the files in the DVDRW.

For the moment I need to know how to get the tracks count from DVDRW and how to
define the rootfolder to get all files.

I tried to translate the C# code in this forum but I can’t get the OnDoneCDInfo and the OnDoneImport2 elements to know the number of tracks and to access the root folder of the DVDRW to update the files.

This is the last element of a big application I need to use as soon as possible for my job and I can’t resolve it. so if someone can help me I would be very grateful to this person.