IMAPI IDiscMaster::SetActiveDiscRecorder() problem

I’ve recently purchased an Iomega SuperDVD USB2 DVD recorder / rewriter (IOMEGA DVDRW8440E2D-B USB Device).

I can burn files to a CD-RW in this drive using Windows Explorer no problem.

But whenever I try to write to the disk using IMAPI IDiscMaster::SetActiveDiscRecorder() returns IMAPI_E_MEDIUM_NOTPRESENT.

I can burn to the same CD-RW disc using my internal drive (_NEC CD-RW NR-9300A) using the IMAPI interface.

Has anyone else had problems using IMAPI with DVD drives? (I presume the problem is with DVD recorders and not because it’s an external drive).

I’ve tested this code on an internal DVD recorder drive and it works fine burning to a CDR/RW.

So the revised question is, has anyone had problems / successes using IMAPI with external DVD recorders.

Found the problem.

If the external unit is the only drive in the system then it works fine.

Anyone know what I’m doing wrong, as Windows Explorer seems to be able to burn CDs with any drive in the system.

The simplified version (removed error handling, etc) of my code is :

<code>
CComQIPtr<IDiscMaster> spDiscMaster;

spDiscMaster.CoCreateInstance(__uuidof(MSDiscMasterObj));

spDiscMaster->Open();

CComQIPtr<IJolietDiscMaster> spJolietDiscMaster;

spDiscMaster->SetActiveDiscMasterFormat(IID_IJolietDiscMaster,
reinterpret_cast<void**>(&spJolietDiscMaster));

CComQIPtr<IEnumDiscRecorders> spEnumDiscRecorders;

spDiscMaster->EnumDiscRecorders(&spEnumDiscRecorders);

spEnumDiscRecorders->Next(KDiscRecordersArraySize, pDiscRecorders, &DiscRecordersCount);

// Returns IMAPI_E_MEDIUM_NOTPRESENT if we try pDiscRecorders[1]
// when multiple drives are in the system
spDiscMaster->SetActiveDiscRecorder(pDiscRecorders[0]);
</code>

Does anyone know of a way around this problem? Possibly deactivating the CD reocrding functionality on the drives you don’t want to use.