Brooks Brown

Why not make the IMAPI v1 Shim source code available to developers (I may not be using the right name for this - I mean the IMAPI v1 implementation using IMAPI v2.) My understanding is that it's based on IMAPI2 which is already public, so I don't imagine it exposes any industry secrets that Microsoft doesn't want exposed. It would make a very nice body of sample code for IMAPI2.

Regards,
Brooks


Re: Optical Platform Discussion IMAPI v1 Shim source code

Henry Gabryjelski - MSFT

Hi Brooks,

Thank you for your suggestion.

The question of what sources go into the SDK is never an easy one. The IMAPIv1 shim works, but due to its history is not code that I would recommend basing any other samples upon. In particular, it has to deal with the IMAPIv1 property bags, IStorage, and lots of junk that are just removed (with simplified alternatives) for IMAPIv2. imapi2sample is, I believe, based on unit test code that we run on builds of IMAPIv2, and shows the use of quite a few of the interfaces.

hope that helps,






Re: Optical Platform Discussion IMAPI v1 Shim source code

Brooks Brown

Hi Henry,

Thanks for your response. I can understand that the shim source may be, in some cases, an example of how _not_ to use IMAPIv2.

A couple things got me thinking about this:

1. The shim code appeared to be failing when writing DVDs on Vista. This is why we started looking at IMAPIv2, however, IMAPIv2 seems to have some problems as well such as not being available for XP without a separate install, and the issue in my post "imapi2sample with multisession UDF...". It would be nice to have some insight into why the IMAPIv1 implementation wasn't working for DVDs on Vista. Perhaps I'll post a question about this.

2. The shim code appears to detect when a disc has been formatted as "Live File System" (in IDiscMaster:Tongue TiedetActiveDiscRecorder), but I can't find a way of doing this in IMAPIv2. If I could detect "Live File System" formatted discs and avoid trying to burn them, this would help me to make my IMAPIv2 code shippable, although, ideally, we'd like to be able to write to "Live File System" formatted discs.

By the way, I really appreciate this forum and your and your colleagues' willingness to respond to posts.

Regards,
Brooks




Re: Optical Platform Discussion IMAPI v1 Shim source code

David Burg - MSFT

1. IMAPIv1 does not support DVDs period. Whether it is using the original IMAPIv1 on XP or the shim on top of Vista's IMAPIv2. We assume IMAPIv1 applications were developped without DVD in mind thus introducing DVD underneath them with the shim would be risking regressions in these applications.

2. SetActiveDiscRecorder will validate it can write to the disc by testing if either it is blank or if an import file system succeeds. If both fail, it is not a disc that may be mastered. You should be able to easily do the same in your application. Then for writing using Live File System, you may simply use regular file access api from Win32 api.






Re: Optical Platform Discussion IMAPI v1 Shim source code

Brooks Brown

Hi David,

Thanks for the information.

I am very surprised that IMAPIv1 doesn't support DVDs because we have been using it in our application for years to burn DVDs on XP. I am not being sarcastic here as I realize that it is possible for something to work but not be supported.

I am very pleased to learn how to write to Live File System discs. Somehow I missed the documentation about this. A day or two of frustration. Too bad.

My one remaining problem, then, from my other post, "imapi2sample with multisession UDF disk goes into infinite loop on ImportFileSystem", is that when I run the imapi2sample program and try to import from a Live File System disc, I get varying behavior that includes an infinite loop and crashing in ImportFileSystem. This, of course, makes me nervous about using it as a way of detecting Live File System discs. Since the problems aren't happening when my IMAPIv1 app is calling ImportFileSystem behind the scenes, maybe the problem is something specific to imapi2sample.

Thanks for your help on this.

Regards,
Brooks