Multi-session and NBF_DISABLE_EJECT problem?

vbimport

#1

when I burn a multi-session cd using NeroAPI, if I use NBF_DISABLE_EJECT flag, it works. If not use NBF_DISABLE_EJECT flag, it close the whole disk. MyBurn function code is:

BOOL CDECL MyBurn(BOOL simulate, BOOL eject, BOOL dao, BOOL blankdisk)
{

DWORD dwFlags = (simulate ? NBF_SIMULATE : NBF_WRITE);
dwFlags |= NBF_BUF_UNDERRUN_PROT;
if (!eject)		dwFlags |= NBF_DISABLE_EJECT;	
if (blankdisk)	dwFlags |= NBF_DETECT_NON_EMPTY_CDRW;
if (!dao)		dwFlags |= NBF_CLOSE_SESSION;

...
case nbDataCD:
case nbAudioCD:
	{
	if (nCDFormat==nbAudioCD) dwFlags |= NBF_CD_TEXT;
		
	res = NeroBurn (NeroDeviceHandle,NERO_ISO_AUDIO_CD ,pWriteCD,dwFlags, dwSpeed, &NeroProgress);
	}
	break;
         ...

return (res==NEROAPI_BURN_OK);

}

if call myburn(false, false, false, false), it works. But if call myburn(false, true, false, false), it doesn’t work. How to solve this problem?