Please forgive me if this appears twice.
I’m using VB6 (SP5), XP Pro (SP2) and I have the latest version of nero installed. What I want to do is:
check for a cd / dvd in the drive
check if that is empty, rewritable etc…
Using the neroFilllesCOM example - I call the CDInfo and check the OnDoneCDInfo. If there is a cd / dvd in the drive I can get the info however if the drive is empty / open I get an error message. Here is my code, I think this must be a common problem and I have searched the list but I cannot figure it out can anyone please help.
Thanks in advance
Private Sub Burn_Click()
Dim drives As INeroDrives Set drives = nero.GetDrives(NERO_MEDIA_CDR) Set drive = drives(AvailableDevices.ListIndex) MsgBox drive.DriveLetter Call drive.CDInfo(NERO_READ_ISRC) 's = drive.CDRWErasingTime(True) ' Not rewritable 's = drive.EraseDisc(False, NERO_ERASE_MODE_DISABLE_EJECT)
Private Sub drive_OnDoneCDInfo(ByVal pCDInfo As NEROLib.INeroCDInfo)
' If (pCDInfo = [B]Nothing[/B]) Then ' Error invalid use of object ' If (pCDInfo = [B]Null[/B]) Then ' Runtime error 91; Object variable or With block variable not set If (pCDInfo.Tracks.Count > 0) Then MsgBox "Is Writable: " & pCDInfo.IsWriteable MsgBox "MediaType: " & pCDInfo.MediaType MsgBox "Tracks: " & pCDInfo.Tracks.Count Else MsgBox "No Tracks: CD / DVD Empty" End If Else MsgBox "No CD / DVD" End If