Creating ISO in VB.Net with nerocom please helpppp!

vbimport

#1

hi guys
it is great forum to get help.Thanks all
My problem is to create iso file with nerolib (Nero 1.3 Type Library) in vb.net

here sample kod i written (it is 601 times i tried )

\\\\

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mNero As New Nero
Dim mDrives As NeroDrives
Dim mDrive As NeroDrive
Dim virDrId As Byte
'mNero.APIVersion(0, 0, 0, 0)

'mNero = New NeroClass
mDrives = mNero.GetDrives(NERO_MEDIA_TYPE.NERO_MEDIA_CD)
Dim i As Integer
For i = 0 To mDrives.Count - 1
If mDrives.Item(i).HostAdapterName = “Virtual” Then
virDrId = i ’ it holds virtual recorder index
End If
Next
Dim file As New NeroFile
If op.ShowDialog = DialogResult.OK Then
file.SourceFilePath = op.FileName
file.Name = IO.Path.GetFileName(op.FileName)
End If
Dim miso As New NeroISOTrack
miso.RootFolder.Files.Add(file)
mDrive = mDrives.Item(virDrId)
'miso.BurnOptions = NERO_BURN_OPTIONS.NERO_BURN_OPTION_CREATE_ISO_FS
If mDrive.DeviceReady Then
Try
mDrive.BurnIsoAudioCD("", “”, False, miso, Nothing, Nothing,NERO_BURN_FLAGS.NERO_BURN_FLAG_CD_TEXT, 8, NERO_MEDIA_TYPE.NERO_MEDIA_CD)
Catch ex As Exception
MsgBox(ex.Message)
End Try

End If
MsgBox(“ok”)
End Sub

Private Sub mnero_OnFileSelImage(ByRef Filename As String) Handles mnero.OnFileSelImage
Filename = “c:\c.iso”
End Sub

\\

it works but there is no result,no iso file in c drive

please help

thank you all


#2

I am not sure if this is your problem but every example I have seen has the Nero and NeroDrive variables declared higher:



Private mNero As New Nero
Private mDrive As NeroDrive

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim mDrives As NeroDrives
    Dim virDrId As Byte
    'mNero.APIVersion(0, 0, 0, 0)

    'mNero = New NeroClass
    mDrives = mNero.GetDrives(NERO_MEDIA_TYPE.NERO_MEDIA_CD)
    Dim i As Integer
    For i = 0 To mDrives.Count - 1
        If mDrives.Item(i).HostAdapterName = "Virtual" Then
            virDrId = i ' it holds virtual recorder index
        End If
    Next
    Dim file As New NeroFile
    If op.ShowDialog = DialogResult.OK Then
        file.SourceFilePath = op.FileName
        file.Name = IO.Path.GetFileName(op.FileName)
    End If
    Dim miso As New NeroISOTrack
    miso.RootFolder.Files.Add(file)
    mDrive = mDrives.Item(virDrId)
    'miso.BurnOptions = NERO_BURN_OPTIONS.NERO_BURN_OPTION_CREATE_ISO_FS
    If mDrive.DeviceReady Then
        Try
            mDrive.BurnIsoAudioCD("", "", False, miso, Nothing, Nothing,NERO_BURN_FLAGS.NERO_BURN_FLAG_CD_TEXT, 8, NERO_MEDIA_TYPE.NERO_MEDIA_CD)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

    End If
    MsgBox("ok")
End Sub


Private Sub mnero_OnFileSelImage(ByRef Filename As String) Handles mnero.OnFileSelImage
    Filename = "c:\c.iso"
End Sub

#3

Try displaying the mNero.ErrorLog string…

I have just tried in Delphi - I too was unable to create an iso image :frowning:

Here is my try (mostly based on your code):


    ...
    NeroIso:= TNeroISOTrack.Create(nil);
    NeroFile := TNeroFile.Create(nil);
    NeroFile.Name := 'd:\ZipFind.wmv';
    NeroIso.RootFolder.Files.Add(NeroFile.DefaultInterface);

    Nero1.Connect;

    NeroIso.ConnectTo(NeroIso.DefaultInterface);

    if NeoDrives.Item(virId).DeviceReady then
      NeoDrives.Item(virId).BurnImage('d:	est.iso', NERO_BURN_FLAG_WRITE, 2000);

The ErrorLog I get is something about unable to read the image ‘d: est.iso’… the file I’m trying to create… any ideas?

TIA (Installled the sdk today)