Thread: NeroCOM
View Single Post
Old 06-08-2003   #5 (permalink)
Stev
New on Forum
 
Join Date: Jul 2003
Posts: 2
In VB.NET I can't sink any type of event. In VB6 the example NeroFiddlesCOM works correctly but if I try the following code the event OnDoneCDInfo doesn't fire.


Public WithEvents nero As nero
Public WithEvents drive As NeroDrive

Private Sub Command1_Click()
Set nero = New nero
Dim drives As NeroDrives
Set drives = nero.GetDrives(NERO_MEDIA_CDR)
Set drive = drives(1) 'my cd-rom
drive.CDInfo (NERO_READ_ISRC)
End Sub

Private Sub drive_OnDoneCDInfo(ByVal pCDInfo As NEROLib.INeroCDInfo)
MsgBox "CDinfo done!"
End Sub


The difference I've seen beetwen VB.NET and VB6 is that when I call the CDInfo method (or other) in VB6 the task VB6 continues to use over 90% of the CPU time even after closing VB6; in VB.NET instead it seems nothing appends.
Stev is offline   Reply With Quote