UserDialogCallback first time called with DLG_WAITCD_DONE

vbimport

#1

hi,

i’ve a dialog to burn a list of files on cd or dvd. it’s just like the sample “nerofiddles” but qt as gui.
the imagerecorder works as expected, but if i select a dvd- or cd-recorder the first time the callback “userdialog” is called the (nerouserulginout)type is dlg_waitcd_done and the burn process aborts.
the nero sample works fine.

any ideas?

this is the trimmed source as close to nero’s sample as possible (but still not working):

mbAborted = false;

NeroAPIGlueConnect (NULL);

WORD majhi, majlo, minhi, minlo;
NeroGetAPIVersionEx(&majhi, &majlo, &minhi, &minlo, NULL);

// setup of structures that the NeroAPI needs
strcpy(pcNeroFilesPath, “NeroFiles”);
strcpy(pcVendor, “ahead”);
strcpy(pcSoftware, “Nero - Burning Rom”);
strcpy(pcLanguageFile, “Nero.txt”);

nsSettings.nstNeroFilesPath = pcNeroFilesPath;
nsSettings.nstVendor = pcVendor;
nsSettings.nstSoftware = pcSoftware;
nsSettings.nstLanguageFile =pcLanguageFile;
nsSettings.nstIdle.ncCallbackFunction = IdleCallback;
nsSettings.nstIdle.ncUserData = this;
nsSettings.nstUserDialog.ncCallbackFunction = UserCallback;
nsSettings.nstUserDialog.ncUserData = this;

npProgress.npAbortedCallback = AbortedCallback;
npProgress.npAddLogLineCallback = AddLogLineCallback;
npProgress.npDisableAbortCallback = NULL;
npProgress.npProgressCallback = ProgressCallback;
npProgress.npSetPhaseCallback = SetPhaseCallback;
npProgress.npUserData = this;
npProgress.npSetMajorPhaseCallback=NULL;
npProgress.npSubTaskProgressCallback=NULL;

NEROAPI_INIT_ERROR initErr = NeroInit (&nsSettings, NULL);
switch (initErr)
{
case NEROAPI_INIT_OK:
case NEROAPI_INIT_INVALID_ARGS:
case NEROAPI_INIT_INVALID_SERIAL_NUM:
default:
break;
}
// get a list of available drives
pndiDeviceInfos = NULL;
pndiDeviceInfos = NeroGetAvailableDrivesEx (MEDIA_CD, NULL);

strcpy(mniiFile.fileName, fileName); 
strcpy(mniiFile.sourceFilePath, filePath);
mniiFile.isDirectory=FALSE;
mniiFile.isReference=FALSE;
mniiFile.nextItem=NULL;

writeCD.nwcdpCDStamp=NULL;
writeCD.nwcdArtist=NULL;
writeCD.nwcdTitle=NULL;
writeCD.nwcdCDExtra=FALSE;
writeCD.nwcdNumTracks=0;
writeCD.nwcdMediaType = MEDIA_CD;

NERO_SCSI_DEVICE_INFO* nsdiDevice = &pndiDeviceInfos->nsdisDevInfos[0];
ndhDeviceHandle = NeroOpenDevice(nsdiDevice);

writeCD.nwcdIsoTrack = NeroCreateIsoTrackEx(&mniiFile, "new", NCITEF_CREATE_ISO_FS|NCITEF_USE_JOLIET);
int iRes = NeroBurn(ndhDeviceHandle, NERO_ISO_AUDIO_CD, &writeCD, NBF_WRITE, 0, &npProgress);
NeroFreeIsoTrack(writeCD.nwcdIsoTrack);
NeroCloseDevice(ndhDeviceHandle);
mbAborted = false;
switch(iRes)
  {
    case NEROAPI_BURN_OK:
    case NEROAPI_BURN_UNKNOWN_CD_FORMAT:
    case NEROAPI_BURN_INVALID_DRIVE:
    case NEROAPI_BURN_FAILED:
    case NEROAPI_BURN_FUNCTION_NOT_ALLOWED:
    case NEROAPI_BURN_DRIVE_NOT_ALLOWED:
	case NEROAPI_BURN_USER_ABORT:
	case NEROAPI_BURN_BAD_MESSAGE_FILE:
    default:
	  break;
  }