NeroEraseDisc Problem


I have been using NeroApi as an add-on for a program of mine for the last 3 year. Recently i upgrated my programming tool (from VS 6 to VS.NET 2003) but i did not change my code (vc++). After that i started to have problem burning with Nero. I fixed some stuff and it all came down to 1 problem that it has been bothering me for a long time (which worked before the update by the way).

My program is setup like this:

  1. I do all my initializations, create the ISO from a directory etc and everything works lovely
  2. When the user clicks on the burn button i call the function

NeroBurn(ndhDeviceHandle, NERO_ISO_AUDIO_CD, &writeCD,
NBF_WRITE, 0, &npProgress);

and everything works fine, the cd is written correctly and ejects when done (OK i have to close the application for the CD to show its contents but i don’t actualy care at this point)

My problem is when a full CD-RW is inserted. I managed to detect that is a full CD-RW media by doing somthing like this

NeroUserDlgInOut NERO_CALLBACK_ATTR CNeroFiddlesDlg::UserDialog(void
*pUserData, NeroUserDlgInOut type, void *data)
switch (type)

NERO_WAITCD_TYPE waitcdType = (NERO_WAITCD_TYPE) (int)data;
NeroEraseDisc(aDeviceHandle, 1, NEDF_DISABLE_EJECT, 0);

The behavior of the above code is that when a full CD-RW media is inserted it erases it succesfully, and when done it eject the media and gives a “Disk Not Empty” error. If i reinsert the media after that it recognises the media as CD-RW full once more, it erases it and continues with the burning which is done succesfully.

What do i do wrong? Is this a NeroSDK problem or i my stupid code? Please help!

Thank you in advance