Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, EstimateTrackSize in VB at International Chat: Software related forum; I'm using the following function to burn a disc in VB using NeroCOM and it works perfectly: Code:


Reply
 
Thread Tools
Old 20-11-2004   #1 (permalink)
ADW
New on Forum
 
Join Date: Oct 2004
Posts: 4
EstimateTrackSize in VB

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.
ADW is offline   Reply With Quote
Old 25-11-2004   #2 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
Quote:
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.
You should use either the ISOTrack or nfstoSize.FileSystemDescContainer. If both are present, the latter takes precedence and it seems to be empty.
alexp is offline   Reply With Quote
Old 26-11-2004   #3 (permalink)
ADW
New on Forum
 
Join Date: Oct 2004
Posts: 4
Re: EstimateTrackSize in VB

Thanks alexp, not setting nfstoSize.FileSystemDescContainer makes it work perfectly.
ADW is offline   Reply With Quote
 
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call NeroDrive.EstimateTrackSize ae_srikanth Nero SDK Discussion Forum 0 25-08-2005 14:05
VB .Net Help NYASMark Nero SDK Discussion Forum 6 02-08-2004 13:55
Need a VB sample MasterOfDisaster Nero SDK Discussion Forum 3 05-07-2004 00:33
VCD using VB 6 Nesar Video Edit Software 1 12-03-2004 07:12
msgbox in vb collu luigi Nero SDK Discussion Forum 3 18-02-2004 00:09


All times are GMT +2. The time now is 23:41.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0