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


Commercial message



Nero SDK Discussion Forum Discuss, RUNTIME ERROR 380 "invalid property value" at International Chat: Software related forum; Hi: I just installed the Nero 6 version and the SDK tool kit and used the NeroCom sample named NeroFiddlesCom in Visual Basic. And it worked out perfectly. But I was looking for to burn a complete subdirectory with several files. After loking in the forum i located an excellent


Reply
 
Thread Tools
Old 12-11-2004   #1 (permalink)
New on Forum
 
Join Date: Nov 2004
Posts: 3
RUNTIME ERROR 380 "invalid property value"

Hi:

I just installed the Nero 6 version and the SDK tool kit and used the NeroCom sample named NeroFiddlesCom in Visual Basic. And it worked out perfectly. But I was looking for to burn a complete subdirectory with several files. After loking in the forum i located an excellent example from one of the registered users and the code is as follows:

Option Explicit

' load references
Public WithEvents Nero As Nero
Public WithEvents Drive As NeroDrive

' variable for holding number of existing sessions on disc when cd info read
Dim NumExistingTracks As Integer

'flag for checking if drive event finished
Dim DriveFinished As Boolean

' list of available drives
Dim Drives As INeroDrives

' main folder to be burnt
Dim Folder As INeroFolder
' main track to be burnt
Dim ISOTrack As NeroISOTrack

Private Sub AddMessage(ByVal Message As String)
lst_Messages.AddItem Message
If lst_Messages.ListCount <> 0 Then
lst_Messages.ListIndex = lst_Messages.ListCount - 1
lst_Messages.Refresh
End If
End Sub

' function for removing extra spaces and lines from messages
Private Sub SplitText(ByVal Data As String)
Dim Temp As String
Dim I As Integer

Temp = ""
For I = 1 To Len(Data)
If Mid$(Data, I, 1) = Chr$(13) Then
lst_Messages.AddItem Trim$(Temp)
Temp = ""
ElseIf Mid$(Data, I, 1) <> Chr$(10) Then
Temp = Temp + Mid$(Data, I, 1)
End If
Next
If Temp <> "" Then
AddMessage Trim$(Temp)
End If

End Sub

'Recursive function to build the Folders/Files to burn
Private Sub BuildFileFolderTree(ByRef nroFolderToUse As NeroFolder, ByRef folCurrent As Folder)
Dim folTMP As Folder
Dim filTMP As File
Dim nroFolTmp As NeroFolder
Dim nroFilTmp As NeroFile

'Add all files in the current directory
For Each filTMP In folCurrent.Files
Set nroFilTmp = New NeroFile
nroFilTmp.Name = filTMP.Name
nroFilTmp.SourceFilePath = filTMP.Path
nroFolderToUse.Files.Add nroFilTmp
Next

'Write the sub folders
For Each folTMP In folCurrent.SubFolders
Set nroFolTmp = New NeroFolder
nroFolTmp.Name = folTMP.Name
nroFolderToUse.Folders.Add nroFolTmp
Call BuildFileFolderTree(nroFolTmp, folTMP)
Next

End Sub

Private Sub cmd_Eject_Click()
Set Drive = Drives(lst_AvailableDevices.ListIndex)
Drive.EjectCD
End Sub

Private Sub cmd_Exit_Click()
cmd_Abort_Click
' wait for abort finished?
End
End Sub


Private Sub cmd_Load_Click()
Set Drive = Drives(lst_AvailableDevices.ListIndex)
Drive.LoadCD

End Sub




Private Sub Form_Initialize()
Dim myIndex As Integer

Set Nero = New Nero

fme_Progress.Visible = False
pgs_Burn.Value = 0
pgs_SubTask.Value = 0
lst_Messages.Clear

Set Drives = Nero.GetDrives(NERO_MEDIA_CDR + NERO_MEDIA_CDRW)

For myIndex = 0 To Drives.Count - 1
lst_AvailableDevices.AddItem Drives(myIndex).DeviceName, myIndex
Next

'set to second item as I have 2 CDs for bending machines normally would use first as only 1 or allow to select?
lst_AvailableDevices.ListIndex = 1

Set Folder = New NeroFolder

Set Drive = Drives(lst_AvailableDevices.ListIndex)
Drive.EjectCD

End Sub

Private Sub cmd_Abort_Click()
Nero.Abort
fme_Progress.Visible = False
End Sub

Private Sub cmd_Burn_Click()
Dim Source_Dir As String
Dim FSO As New FileSystemObject
Dim DateFolder As NeroFolder
Dim I As Integer
Dim X As Long
Dim Result

On Error GoTo exit_me:

'set to be whatever folder you need to backup
Set Drive = Drives(lst_AvailableDevices.ListIndex)
Source_Dir = "C:\unison\bend"
If opt_YBC.Value = True Then
Source_Dir = Source_Dir + "\ybc"
End If

fme_Progress.Visible = True
fme_Messages.Visible = True
Me.Refresh

lst_Messages.Clear

cmd_Abort.Enabled = True
cmd_Burn.Enabled = False

Set Folder = New NeroFolder

'check if multisession data
DriveFinished = False
Drive.CDInfo NERO_READ_ISRC
' wait for event done and handled
While Not DriveFinished
X = DoEvents()
Wend

'if existing session then import the last one
If NumExistingTracks > 0 Then


'read in the last session
I = NumExistingTracks - 1
DriveFinished = False

Drive.ImportIsoTrack I, NERO_IMPORT_ISO_ONLY

' wait for event done and handled
While Not DriveFinished
X = DoEvents()
Wend

End If


Set DateFolder = New NeroFolder
Set ISOTrack = New NeroISOTrack

' if bend folder then change prefix below
DateFolder.Name = "YBC " + Format(Now, "dd") + "-" + Format(Now, "mm") + "-" + Format(Now, "yyyy") + "--" + Format(Now, "hh") + " " + Format(Now, "nn") + " " + Format(Now, "ss")
Folder.Folders.Add DateFolder

' recursively build folder tree
Call BuildFileFolderTree(DateFolder, FSO.GetFolder(Source_Dir))

ISOTrack.Name = "Unison"
ISOTrack.RootFolder = Folder
ISOTrack.BurnOptions = NERO_BURN_OPTION_CREATE_ISO_FS + NERO_BURN_OPTION_USE_JOLIET

' burn folder (check if underrun protection available and use if it is)
' makes CD ok but not readable in std cdrom - why?

If Drive.Capabilities And NERO_CAP_BUF_UNDERRUN_PROT Then
Drive.BurnIsoAudioCD "Unison", "Backup", 0, ISOTrack, Nothing, Nothing, NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_BUF_UNDERRUN_PROT + NERO_BURN_FLAG_CLOSE_SESSION, 0, NERO_MEDIA_CD
Else
Drive.BurnIsoAudioCD "Unison", "Backup", 0, ISOTrack, Nothing, Nothing, NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_CLOSE_SESSION, 0, NERO_MEDIA_CD
End If

Exit Sub

exit_me:
lst_Messages.AddItem Error$
cmd_Abort.Enabled = False
cmd_Burn.Enabled = True
fme_Progress.Visible = False
End Sub

Private Sub drive_OnAborted(Abort As Boolean)
Abort = False
cmd_Abort.Enabled = False
cmd_Burn.Enabled = True
'need drivefinished = true here? and flag to exit main routine?
End Sub

Private Sub drive_OnAddLogLine(TextType As NEROLib.NERO_TEXT_TYPE, Text As String)
SplitText Text
End Sub

' event for burn complete prints results to message list
Private Sub drive_OnDoneBurn(StatusCode As NEROLib.NERO_BURN_ERROR)

SplitText Nero.ErrorLog
SplitText Nero.LastError

If StatusCode <> NEROLib.NERO_BURN_OK Then
AddMessage "Burn not finished successfully: " & StatusCode
Else
AddMessage "Burn finished successfully"
End If

cmd_Abort.Enabled = False
cmd_Burn.Enabled = True
pgs_Burn.Value = 0
pgs_SubTask.Value = 0
fme_Progress.Visible = False
DriveFinished = True

End Sub

'event for read cd info done
Private Sub Drive_OnDoneCDInfo(ByVal pCDInfo As NEROLib.INeroCDInfo)
'set number of existing sessions
On Local Error GoTo NoTracks:

NumExistingTracks = pCDInfo.Tracks.Count
'set done flag
DriveFinished = True
Exit Sub

NoTracks:
NumExistingTracks = 0
DriveFinished = True
End Sub

'' importing of data done event
Private Sub Drive_OnDoneImport2(ByVal bOk As Boolean, ByVal pFolder As NEROLib.INeroFolder, ByVal pCDStamp As NEROLib.INeroCDStamp, ByVal pImportInfo As NEROLib.INeroImportDataTrackInfo, ByVal importResult As NEROLib.NERO_IMPORT_DATA_TRACK_RESULT)
Dim I As Integer

If bOk Then
'For I = 0 To pFolder.Folders.Count - 1
Set Folder = pFolder
'Folder.Folders.Add pFolder.Folders.Item(I)

'Next
'Folder.Files.Add pFolder.Files

Else
MsgBox "Error Reading In Data"
End If
' set done flag
DriveFinished = True
End Sub

Private Sub drive_OnDoneWaitForMedia(Success As Boolean)
AddMessage "Done waiting for media."

End Sub

Private Sub drive_OnProgress(ProgressInPercent As Long, Abort As Boolean)
Abort = False
pgs_Burn.Value = ProgressInPercent
End Sub

Private Sub drive_OnSetPhase(Text As String)
SplitText Text
End Sub

Private Sub Drive_OnSubTaskProgress(ProgressInPercent As Long, Abort As Boolean)
Abort = False
pgs_SubTask.Value = ProgressInPercent
End Sub

Private Sub nero_OnMegaFatal()
AddMessage "A mega fatal error has occurred."
End Sub

Private Sub nero_OnNonEmptyCDRW(Response As NEROLib.NERO_RESPONSE)
AddMessage "CD-RW not empty!"
Response = NERO_RETURN_EXIT
End Sub

Private Sub nero_OnRestart()
AddMessage "The system is being restarted."
End Sub

Private Sub nero_OnWaitCD(WaitCD As NEROLib.NERO_WAITCD_TYPE, WaitCDLocalizedText As String)
SplitText WaitCDLocalizedText
End Sub

Private Sub nero_OnWaitCDDone()
AddMessage "Done waiting for CD."
End Sub

Private Sub nero_OnWaitCDMediaInfo(LastDetectedMedia As NEROLib.NERO_MEDIA_TYPE, LastDetectedMediaName As String, RequestedMedia As NEROLib.NERO_MEDIA_TYPE, RequestedMediaName As String)
AddMessage "Waiting for a particular media type: " + RequestedMediaName
End Sub

Private Sub nero_OnWaitCDReminder()
AddMessage "Still waiting for CD..."
End Sub

Public Sub Delay(ByVal Time As Single, Optional ByVal ForceWait As Boolean = False)
Dim Start
Dim X
Dim SleepVal As Long

Start = Timer
While Start + Time > Timer
If Start > Timer Then
Start = Timer
End If
If Not ForceWait Then
X = DoEvents()
End If
Wend

End Sub


But when I try running the application I get the error

RUNTIME ERROR 380 "Invalid property value"

Any suggestions:
jaruesga is offline   Reply With Quote
Old 12-11-2004   #2 (permalink)
New on Forum
 
Join Date: Nov 2004
Posts: 3
Re: RUNTIME ERROR 380 "invalid property value"

In the code below is where I get the RUNTIME ERROR 380

If Drive.Capabilities And NERO_CAP_BUF_UNDERRUN_PROT Then
Drive.BurnIsoAudioCD "Unison", "Backup", 0, ISOTrack, Nothing, Nothing, NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_BUF_UNDERRUN_PROT + NERO_BURN_FLAG_CLOSE_SESSION, 0, NERO_MEDIA_CD Else
Drive.BurnIsoAudioCD "Unison", "Backup", 0, ISOTrack, Nothing, Nothing, NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_CLOSE_SESSION, 0, NERO_MEDIA_CD
End If

Maybe I am missing a Reference or a Component

Thanks
jaruesga is offline   Reply With Quote
Old 15-11-2004   #3 (permalink)
CD Freaks Member
 
Join Date: Dec 2003
Location: uk
Posts: 234
Re: RUNTIME ERROR 380 "invalid property value"

Just tried the code and it worked fine. Did you paste the code over the code in the nero_fiddles example? as this is probably the easiest way. Do you have the Nero libary checked in your project references?

Mike
unison is offline   Reply With Quote
Old 15-11-2004   #4 (permalink)
CD Freaks Member
 
Join Date: Dec 2003
Location: uk
Posts: 234
Re: RUNTIME ERROR 380 "invalid property value"

Also what version of nero are you using?
unison is offline   Reply With Quote
Old 18-11-2004   #5 (permalink)
New on Forum
 
Join Date: Nov 2004
Posts: 3
Re: RUNTIME ERROR 380 "invalid property value"

Yes, I did copy the code over the neroFiddles example.
And also, yes, I have the Nero 1.3 type library reference checked.

The version of the Nero is 6.3.1.12 bundled
jaruesga is offline   Reply With Quote
Old 20-11-2004   #6 (permalink)
CD Freaks Member
 
Join Date: Dec 2003
Location: uk
Posts: 234
Re: RUNTIME ERROR 380 "invalid property value"

Try updating Nero to at least 6.3.1.17
unison 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
"invalid disc" error sometimes on Liteon LVW-5115GHC+ chatnoir73 Newbie Forum 3 03-08-2007 14:47
error message "cannot write medium - invalid disk type" Thomas82 Newbie Forum 6 21-03-2007 18:39
"Invalid block address" error in Nero 5.5.10 Mindoza Nero & InCD 2 10-09-2004 13:38
Prassi PrimoDVD runtime error "9" vasilis2000 Burning Software 9 05-12-2003 22:27
Lite-On LTR-48246s "Invalid Write State" "Could not perform EndTrack" Errors Doc Holliday LiteOn / PLDS/ Sony Burner 3 10-08-2003 14:06


All times are GMT +2. The time now is 18:11.


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