Using NeroImportDataTrack, (NeroAPI, VC++)

vbimport

#1

Hello,

I try to import a data track from a CDRW data disc using the code below (the device handle is a valid one) -

NERO_ISO_ITEM *niiTmp;
void **ppCDStamp=NULL;
NERO_IMPORT_DATA_TRACK_RESULT nidtrResult;
NERO_IMPORT_DATA_TRACK_INFO pInfo;

niiTmp = NeroImportDataTrack(ndhDeviceHandle, 1, ppCDStamp,&pInfo, NIITEF_IMPORT_ISO_ONLY, &nidtrResult, NULL);

After the function call… niiTmp is NULL …nidtrResult = NIDTR_DRIVE_ERROR and on calling NeroGetLastDriveError() gives NDE_NO_ERROR …

Could somebody please point out where I could be going wrong and how is the NeroImportDataTrack() function correctly used.

Thanks a lot in advance.

regds


#2

You should actually use void * pCDStamp = NULL; instead of void **ppCDStamp=NULL;, and pass &pCDStamp. NeroImportDataTrack() wants you to pass a pointer to void* that will receive the cd stamp. If you take a moment to interpret what you have written you will realize that you are actually passing NULL.

Also, track numbers are zero based. So, by passing 1 you are actually importing the second track.