OnDoneBurn event does not fire

vbimport

#1

I’ve got a simple form, where amongst others there is a button, when clicked it calls a procedure that constructs the folders structure then isotrack and then calls drive.BurnIsoAudioCD(…). The DVD is written OK (actually is data DVD there, DVD+RW). The procedure starts like this:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Nero = New NEROLib.Nero()
Dim drives As NEROLib.NeroDrives
drives = Nero.GetDrives(NEROLib.NERO_MEDIA_TYPE.NERO_MEDIA_DVD_ANY)
drive = drives.Item(1)

Just before this procedure i got:

Private Sub drive_OnDoneBurn(ByRef StatusCode As NEROLib.NERO_BURN_ERROR) Handles drive.OnDoneBurn
If StatusCode = NEROLib.NERO_BURN_ERROR.NERO_BURN_OK Then
labelInfo.Text = “Uraa!”
MsgBox(“DVD-ul a fost scris cu succes!”, , )
Else
labelInfo.Text = “Au!”
MsgBox(“Probleme la scrierea DVD-ului!”, , )
End If
End Sub

in the declarations part of the form (at the very beginning) i got:

Friend WithEvents Nero As NEROLib.Nero
Friend WithEvents drive As NEROLib.NeroDrive

Now the problem is that the drive_OnDoneBurn procedure isn’t executed… oar at least i dont see it. Here is VB.NET and Nero Express 6.3.1.18 bundled.

Any ideas ?


#2

Ok, i’ve upgraded to the newest version of nero 6, but the problem persists. What i want to say, is that none of the Nero library objects event seems to be working. I declared already nero and drive with “WithEvents”… it is a Nero problem, or a general import library into project problem that must be solved anyhow?.. got VB.NET 2002.


#3

For posterity, i found the gold.
http://club.cdfreaks.com/showthread.php?s=&threadid=73160
Is where kevlam points to that outlook example on microsoft.com.
Do like pointed out on microsoft example, but with nerolib of course.