NeroCom with Delphi

vbimport

#1

Hi all,

I dont know where to start…

I tried to import NeroCom to delphi but I got all kind of errors…

and also I dont know how to use it after the import…

Does anyone have a Delphi example of Using NeroCom + Events???

Any Help will be appriciated!

Haim


#2

It’s a long way to go…
First, you have to install NeroCom via Project -> Import Type Library. Now, for some reasone I can’t figure out, Delphi 7 can’t import event classes. So I used a free program named EventSinkImp to generate a Delphi package containing the event classes (I did it long time ago, I can’t remember how to use that program in detail, sorry). Double-click on Delphi package file, compile than install.
Now, place on your form Nero objects you need. I used Nero (of course), NeroISOTrack (cause I need to create a data cd) and NeroLibINeroDriveEvents cause I was interested to handle only burn completed event generated by a drive. To obtain a drive list, you have to call Nero.GetDrives method. Then you have to associate the event class with the drive using Connect method, e.g.:

drives: NeroDrives;
drive: INeroDrive;

drives := Nero.GetDrives(NERO_MEDIA_CDR);
// Select first CDR drive
drive := drives.Item(0);
// Now associate with event class
NEROLibINeroDriveEvents.Connect(drive);

Using Delphi object inspector palette, override NEROLibINeroDriveEvents methods you need.