Is there are way to intercept NEROCOM if CD/DVD compliation is too big?




Is there a way to trap an event for when the CD/DVD can’t fit everything, before it’s too late?

Basically, I will have users pressing a button to burn a CD/DVD that is a directory’s file and all its subdirectories and files recursively. I’m trying to figure out how to work NeroCOM so that my program will automatically be smart enough to divvy the files up onto the necessary number of discs if they won’t fit on one. As it stands, Nero now says there is not enough room for my compilation on the disc, and it ejects the disk. I can’t find a way to intercept that to take an alternate path. :confused:

The “OnDoneCDInfo” event showed promised, but it doesn’t get fired until it’s too late. I figured that before I did anything, I could figure out how much space the disc has on it, and act accordingly. However, I can’t seem to find out how much space is available on the disc until it is too late.

Any advice would be appreciated.



You should use EstimateTrackSize on a NeroDrive in order to determine if the data will fit the disc prior to burning.

You can “intercept” the not-enough-room message in OnWaitCD event by waiting on NERO_WAITCD_NOTENOUGHSPACE, NERO_WAITCD_NOTENOUGHSPACERW or NERO_WAITCD_NOTENOUGHSPACE_80MIN.

What do you mean by OnDoneCDInfo not getting fired until it is too late?



Thanks for the prompt response. I will give your suggestion a try. I am VERY new to all this and I all I have to go on is the NeroCOM documentation.

In saying “OnDoneCDInfo” gets fired “too late”, I meant that I can’t use it up front before burning starts to figure out how much space I have available by doing the math with “FreeCapacityInBlocks”. Of course, the fact that the event has “OnDone” in its name should have been a hint to me that what I was trying wouldn’t work. :-\



i am using c#
in c # u can force events with application.DoEvents();
and dont let program to go furdher until event is over.
so you will get information from OnDoneCDInfo at the right time.

in VB it is simular i think just DoEvents


I am developing an dvd writing software. for that in my list the filenames are not going to be dupliactes only the directory names are.I modify merge isotrack as follows. it after returning to recursive call deletes all items and return what code i have to modify. i want it immediately. will u please make a solution for this.
bool CFile_writeDlg::MergeIsoTrack(NERO_ISO_ITEM **ppItemFirst, NERO_ISO_ITEM *pItemToAdd)
bool bSuccess=true,bReplace = true;
LPCSTR FileName1;
LPCSTR FileName2;

// Two loops. Outter loops the first tree, the inner loops the second
// tree.
for (; bSuccess && *ppItemFirst != NULL; ppItemFirst = &(*ppItemFirst)->nextItem)

for (NERO_ISO_ITEM ** ppItemSecond = &pItemToAdd; *ppItemSecond != NULL; )
// Compare entry names…

			if ((*ppItemFirst)->isDirectory == (*ppItemSecond)->isDirectory &&
				0 == stricmp (FileName1,FileName2))
			bool bReplace = true;

			// The items point to the same file/directory. We need
			// to remove one of them. Which one is removed depends
			// on whether "--backup" is specified on command line.
			// If it is a directory, make sure to recurse anyway
			// because the trees below may not be identical.
			if ((*ppItemFirst)->isDirectory)
				bSuccess = MergeIsoTrack (&(*ppItemFirst)->subDirFirstItem, (*ppItemSecond)->subDirFirstItem);
				(*ppItemSecond)->subDirFirstItem = NULL;
				if (!bSuccess) 
				// Since the item is a directory, we won't replace
				// the old one as it doesn't matter which one we
				// keep. Directory is just a name. It has no file
				// access time stamp.
				bReplace = false;
				// If there is a file name conflict between iso items
				// that don't belong to imported sessions, ask the user
				// what to do.
					// If no "--backup" was specified, always replace
					// the old files.
						// If there is a "--backup" command line,
						// replace the old one only if older in terms
						// of access times.
						time_t timeOld = mktime (&(*ppItemFirst)->entryTime);
						time_t timeNew = mktime (&(*ppItemSecond)->entryTime);
						bReplace = timeOld < timeNew;
			if (bReplace)
				// We will now switch places of items in the first and
				// second tree. Since one of the items has to be deleted
				// eventually, this operation will essentially keep
				// the item from the second tree and delete the item
				// from the first tree.
				NERO_ISO_ITEM * pTempItem = *ppItemSecond;
				*ppItemSecond = *ppItemFirst;
				*ppItemFirst = pTempItem;
				pTempItem = (*ppItemSecond)->nextItem;
				(*ppItemSecond)->nextItem = (*ppItemFirst)->nextItem;
				(*ppItemFirst)->nextItem = pTempItem;
			NERO_ISO_ITEM * pTempItem = *ppItemSecond;
			*ppItemSecond = pTempItem->nextItem;
			pTempItem->nextItem = NULL;
			DeleteIsoItemTree (pTempItem);

			// No match, advance to the next item.
				ppItemSecond = &(*ppItemSecond)->nextItem;

// Attach whatever is left of the new tree to the main tree.
*ppItemFirst = pItemToAdd;

// Returning true means, everything is fine, continue.
return bSuccess;