|
-
Nov 29th, 2010, 05:07 PM
#1
Thread Starter
New Member
WMP SDK weird message.
Hi, everything works great, but for some reason when the burner starts it says the following:
"There is a problem with a file in your burn list. You can skip the file and burn the other files, or you can cancel burning and try to resolve the problem first by clicking the icon next to the file."
This message only appears if I simply launch the program then try to burn, but if I actually click Play on the windows media player object then click burn, it burns perfectly fine.. so not sure if something is not being initialized.
Below is my code
HTML Code:
'********WMP BURNER CODE**********
Private wmpBurner As IWMPCdromBurn
Private BurnerStatus As String = ""
Private StartWMPBurn As Boolean = True
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Create basic playlist
Dim playlst As IWMPPlaylist = wmpKJB.playlistCollection.newPlaylist("my new playlist")
Dim track() As String = Directory.GetFiles("C:\Grant")
For i As Integer = 0 To track.Length - 1
playlst.appendItem(wmpKJB.newMedia(track(i)))
Next
wmpKJB.currentPlaylist = playlst
wmpBurner.burnFormat = WMPBurnFormat.wmpbfAudioCD
wmpBurner.burnPlaylist = wmpKJB.currentPlaylist
wmpBurner.refreshStatus()
'Validate Disk and Drive
If wmpBurner.isAvailable("Burn") = False Then
MsgBox("The drive is NOT a CD Burner")
StartWMPBurn = False
End If
If wmpBurner.isAvailable("Disc") = False Then
MsgBox("Drive is empty, please insert a blank CD-R.")
StartWMPBurn = False
End If
If wmpBurner.isAvailable("Erase") = True Then
MsgBox("You are using a CD-RW isntead of a CD-R, do you want to continue?")
StartWMPBurn = False
End If
If wmpBurner.isAvailable("Write") = False Then
MsgBox("Please insert a blank CD-R.")
StartWMPBurn = False
End If
If StartWMPBurn = False Then
Exit Sub
End If
Try
'Get Status throughout burn
Update_Burn_Status(wmpBurner.burnState)
'progress and status timer
wmpBurner_PBTimer.Start()
'Start the burn
wmpBurner.startBurn()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Initialize_wmpBurner()
'Display Drive Letters in Drive List combobox
For i As Integer = 0 To wmpKJB.cdromCollection.count - 1
cboDrives.Items.Add(wmpKJB.cdromCollection.Item(i).driveSpecifier.ToString)
Next
If cboDrives.Items.Count <> 0 Then
cboDrives.SelectedIndex = 0
wmpBurner = CType(wmpKJB.cdromCollection.Item(cboDrives.SelectedIndex), IWMPCdromBurn)
End If
End Sub
I didn't include the instance declarations and other functions since they are irrelevant. I traced the error which is a windows media player prompt that is occuring in wmpBurner.startBurn() I am using 12 mp3 files as test music and none of the files are corrupt. Please help 
Thanks!
Last edited by Tyrocx; Nov 29th, 2010 at 05:15 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|