I'm using the following function to burn a disc in VB using NeroCOM and it works perfectly:
Code:
Public Function BurnData(strName As String, lSpeed As Long, Optional blnClearData As Boolean = True, _
Optional nmtDiscType As NERO_MEDIA_TYPE = NERO_MEDIA_CD, Optional nbfExtraFlags As NERO_BURN_FLAGS, _
Optional nboExtraOptions As NERO_BURN_OPTIONS) As Long
Dim ISOTrack As New NeroISOTrack
'Check if NeroDrive is set
If NeroDrive Is Nothing Then
BurnData = -1 'Drive not set!
Exit Function
End If
'Set track name
ISOTrack.Name = strName
'Set track root folder
ISOTrack.RootFolder = NeroData
'Set the burn options
ISOTrack.BurnOptions = NERO_BURN_OPTION_CREATE_ISO_FS + _
NERO_BURN_OPTION_RELAX_JOLIET + NERO_BURN_OPTION_USE_JOLIET _
+ nboExtraOptions
'Burn the Data Disc using the set up IsoTrack
NeroDrive.BurnIsoAudioCD "", "", 0, ISOTrack, Nothing, Nothing, _
NERO_BURN_FLAG_WRITE + nbfExtraFlags, lSpeed, nmtDiscType
'Check if data is to be cleared
If blnClearData = True Then
'Clear the data
ClearData
End If
End Function So I tried to change it to the following to estimate the track size:
Code:
Public Sub EstimateDataTrackSize(Optional nmtDiscType As NERO_MEDIA_TYPE = NERO_MEDIA_CD, _
Optional blnClearData As Boolean = True, Optional nbfExtraFlags As NERO_BURN_FLAGS, _
Optional nboExtraOptions As NERO_BURN_OPTIONS)
Dim ISOTrack As New NeroISOTrack
Dim nfstoSize As New NeroFileSystemTrackOptions
Dim nfsdcData As New NeroFileSystemDescContainer
'Check if NeroDrive is set
If NeroDrive Is Nothing Then
'Drive not set!
Exit Sub
End If
'Set track root folder
ISOTrack.Name = "Data"
ISOTrack.RootFolder = NeroData
ISOTrack.BurnOptions = NERO_BURN_OPTION_CREATE_ISO_FS + _
NERO_BURN_OPTION_RELAX_JOLIET + NERO_BURN_OPTION_USE_JOLIET _
+ nboExtraOptions
'Set the File System Track Options
nfstoSize.MediaType = nmtDiscType
nfstoSize.BurnFlags = NERO_BURN_FLAG_WRITE + nbfExtraFlags
nfsdcData.BurnOptions = ISOTrack.BurnOptions
'nfsdcData.Root(0) = NeroData
nfstoSize.FileSystemDescContainer = nfsdcData
'Estimate Data Track Size
NeroDrive.EstimateTrackSize ISOTrack, NETS_EXACT_SIZE, nfstoSize
'Check if data is to be cleared
If blnClearData Then
'Clear the Nero Data Folder
ClearData
End If
End Sub However, OnDoneEstimateTrackSize always returns True for bOk and 600 for BlockSize. Do I need to add the files to nfsdcData.RootDirectoryContainer and nfsdcData.Root or am I missing something else?
I'm using NeroSDK 1.05 and have Nero 6.6 (Reloaded) on Windows XP SP2.
Thanks in advance for any help, I've been stuck on this for days.