Nbf_detect_empty_cdrw

vbimport

#1

I am playing around with NeroCMD to get familiar with the API. I am using the --detect_non_empty_cdrw option. I write the first file OK to the CD-RW. But when I write the second file I get no callback and no message on the screen to say that the CD is not empty. Any ideas?
(I am using XP and Nero 6, running NeroCMD in VC++.NET.)


#2

I have checked that the correct bit is set in dwFlags before calling NeroBurn.


#3

Have you modified NeroCMD or do you have a problem with the original source? What does your command line look like?


#4

I have not changed NeroCMD. I have written my own small exe using a lot of the code from NeroCMD and that has the same symptoms.
The command line is:

NeroCMD --write --drivename e --real --disable_eject --close_session --detect_non_empty_cdrw --iso test --iso-mode2 --create_udf_fs c:\oldpath.txt


#5

Ah! I have discovered that it is because I have the --close_session option on the write of the first session. If I remove that, the callback works when I try to write the second session. But this means I can only write one session to the CD. Correct?
In my app, I want to write a file to CD-RW, but I don’t know if there are any sessions on the CD already. I have to set --close_session in case I want to write more sessions later. During my tests using NeroCMD, I found that --import gave an error if the CD was empty. So I have to detect if there are any sessions on the CD-RW already.
In summary, how can I write multiple sessions to a CD-RW?
Urgent help required please!


#6

But this means I can only write one session to the CD. Correct?

No. This means, that NeroAPI just writes a new session to the disc if it is not closed. If the free capacity would not be sufficient for the new data, it would ask for erasing also if the CD is not closed.

In my app, I want to write a file to CD-RW, but I don’t know if there are any sessions on the CD already.

You can use NeroGetCDInfo to get information about the inserted CD.

In summary, how can I write multiple sessions to a CD-RW?

You mean writing a new session which includes the files of the previous session?

  • Use NeroGetCDInfo to check how many session are already on CD.
  • Use NeroImportDataTrack / NeroImportIsoTrackEx specifiying the last session as session to import.
  • Append you new iso items to the iso item tree
  • Burn the resulting iso item tree.