INeroDrives cannot be indexed?


I’m trying to use NeroCom from VB.NET. I’ve read this thread but I’m not too hot on all this COM stuff - I couldn’t quite follow it; although it seemed to work the same with just the registered NeroCOM.dll when I added in as a reference.

The problem I’m getting is when I try and reference a drive in the drives object. I’ve got a simple Sub:

Dim MyNero As NeroCOMNET.Nero
Dim drives As NeroCOMNET.INeroDrives
Dim myIndex As Integer
Dim drive As NeroCOMNET.INeroDrive

MyNero = New NeroCOMNET.Nero
drive = drives(0)

The complier flags the last line shown here with the error:
BC30547 : Interface ‘NeroCOMNET.INeroDrives’ cannot be indexed because it has no default property.

Can anyone give me any pointers / clues?

Thanks in advance.

As stated in NeroCOM user manual, Nerodrives is “a read-only collection of NeroDrive objects”.

And a collection can’t be properly indexed as an array.
Just use the Item method and everything should work.

Thanks for that - it’s just every example I’d seen seemed to do it that way. Works now!

Thanks very much :slight_smile:

Hi again!

After eventually getting NeroCom working in ASP - thanks to lots of help from the kind people of this forum - I’ve got another problem!

It looks like IIS is hiding the CD drives from NeroCOM when I access it through ASP.NET. When I get a list of NERO_MEDIA_CD drives via ASP.NET, only Image Recorder is listed; if I knock up a quick VB.NET program with the same code, all my CD drives are listed.

I tried disabling anonymous access on the site, but no change.

Can anyone give me any clues on how to get the COM to access the drives from behind IIS? Is this possible? I know there may be potential security issues, but this will only be hosted on a small network - not exposed to the world.

Thanks again for your time.