NeroEstimateTrackSize() always returns -1

Whenever I use the NeroEstimateTrackSize() function the result is always -1.

I use the same function to create the CNeroIsoTrack* pointer as I do in my BurnCD function (which works a treat).

Here is my code:

==============================================

UINT CNeroInterface::EstimateSize()
{
UINT nSize;
BOOL bRetVal = TRUE;
CNeroIsoTrack* pTrack = NULL;
NERO_ISO_ITEM* pItem = NULL;
NERO_FILESYSTEMTRACK_OPTIONS* pTrackOptions;
CString Buffer;

if(NULL == (pTrackOptions = new
NERO_FILESYSTEMTRACK_OPTIONS))
return 0;

if(FALSE == (m_bNeroInitialised = InitialiseNero()))
{
delete pTrackOptions;
return 0;
}

if(FALSE != GetIsoTrack(&pTrack, &pItem))
{
memset(pTrackOptions, 0, sizeof
NERO_FILESYSTEMTRACK_OPTIONS));

pTrackOptions->netsStructureSize =
    sizeof(NERO_FILESYSTEMTRACK_OPTIONS);
pTrackOptions->netspCDStamp = NULL;
pTrackOptions->netsMediaType = MEDIA_CD;
pTrackOptions->netsDeviceHandle = m_NeroDeviceHandle;
pTrackOptions->netsFlags = GetBurnFlags();
pTrackOptions->netsFSContainer = NULL;
pTrackOptions->netsFSContainerFlags = 0;

nSize = NeroEstimateTrackSize(pTrack, NETS_EXACT_SIZE,
    pTrackOptions);

}

if(pItem)
DeleteIsoItemTree(pItem);

delete pTrackOptions;

if(FALSE == CleanUp())
bRetVal = FALSE;

return nSize;
}

==============================================

My InitialiseNero() function calls:

NeroAPIGlueConnect()
NeroInit()
NeroGetAvailableDrivesEx()
NeroOpenDevice()

with all the required parameters and is also used by my BurnCD() function and works correctly.

The GetIsoTrack() function is based on the same function in NeroCmd - CBurnContext::GetIsoTrack and again is used by my BurnCD() function and works correctly.

The GetBurnFlags() function is also used in my BurnCD function, but are normally set to:

NBF_WRITE | NBF_DISABLE_ABORT | NBF_BUF_UNDERRUN_PROT |
NBF_DETECT_NON_EMPTY_CDRW | NBF_CD_TEXT | NBF_VERIFY;

I have tried all combinations of the dwFlags member of the NeroEstimateTrackSize() function:

NETS_FILESYSTEM_OVERHEAD
NETS_DATA
NETS_EXACT_SIZE

but with the same results.

Any help with my problem would be greatly appreciated.

I am using Nero SDK version 1.04 and Nero Burning Rom V6.0.0.0

Best regards

codekiddie

If you take a minute to look at the comments in NeroAPI.h you will realize that you need at least version 6.0.0.14 in order for NeroEstimateTrackSize to work.

Please update your installation and retry.

Thanks for that.

In my rush to add the functionality, I forgot to check the obvious.

Regards

codekiddie

Does anyone know of a way to calculate the size of the ISO track in Nero prior to version 6.0.0.14?