IMAPI v1 error on Vista, works on XP

In testing my application with Vista I've found that the CD Burning module reports an error on Vista.

SetActiveDiscRecorder() fails with errorIMAPI_E_GENERIC. The format used is Red Book. The same code works in XP on the same computer.

The code creates theMSDiscMasterObj instance, callsOpen(),SetActiveDiscMasterFormat(IID_IRedbookDiscMaster), enumerates the installed CD recorders, then callsSetActiveDiscRecorder().

I understand that Imapi v2 is a redesigned version of Imapi v1 and that in Vista Imapi v1 is implemented on top of v2, but shouldn't existing v1 code should continue to work?

Thanks,
Flavio.

[831 byte] By [Flap] at [2008-2-22]
# 1

I also see a similar problem - The Code written for XP using IMAPI v1 fails to run on Vista.

The Call :

CJolietDiscMaster::AddData(IStorage* stg, BOOL bOverwrite)

returns the HRESULT :0x8004020e Cannot modify or delete an object that was added using the COM+ Admin SDK

Also,

CJolietDiscMaster::GetJolietProperties(IPropertyStorage** pstg)

throws an Access Violation Exception

Shouldn't the existing IMAPI code continue to work on Vista? Do I need to do something to get these APIs running?

DeepthiSingh at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Optical Platform Discussion...
# 2

Existing IMAPIv1 code should work on Vista. As part of our Vista test we have several IMAPIv1 client code and did not observe the failures reported here.

Are you able to provide a simple code sample to demonstrate the said problems?

DavidBurg-MSFT at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Optical Platform Discussion...
# 3
I created an IMAPI wrapper (for use from VB6) using the ActiveX Control Wizard in MSVC++ 6.0 SP6. It has the same problem on Vista! (Error code 0x8004020E). UAC is disabled and I am an administrator. It's a lot of code to post though. How would I do it?
DougGale at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Optical Platform Discussion...
# 4
I may put together a simple one-function program that reproduces the behavior. I'll post it here when I get around to it. I don't have vista at home so I have to bring it to work to test it on vista.
DougGale at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Optical Platform Discussion...
# 5

The function names in the OP look like the example from vbAccelerator. I'm getting the same problem trying to run this example:

http://vbaccelerator.com/home/NET/Code/Libraries/Writing_CDs/Writing_Audio_CDs/article.asp

This code should allow you to reproduce the problem.

I've run the code on XP SP2 and it works as expected but on vista the following error occurs:

Cannot modify or delete an object that was added using the COM+ Admin SDK (Exception from HRESULT: 0x8004020E)

regards,

Paul

PaulAChapman at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Optical Platform Discussion...

Software Development for Windows Vista

Site Classified