Saturday, December 27, 2008

MSDN Deployment forum

In the MFC 6 installer, it was easy to register a DirectShow filter (foo.ax): you added a COM object in Associations view, specified the CLSID, and if you also specified Context = vsiccInProcServer32 and DefInProcType = emdhServer, a wonderful thing happened: if the filter was already registered by a different application, the new installation would increment a reference count somewhere, so that uninstalling the new application wouldn't remove the filter. Very cool.

I can't figure out how to make this happen in the 2005/2008 .NET installer. The Associations view is gone, replaced by the File Types editor, which doesn't do COM objects, just file associations. The only way I've found to install a DirectShow filter at all is by using Register = vsdrfCOMSelfReg, but this approach doesn't handle sharing: uninstalling the application removes the filter unconditionally, even if previously installed applications depend on it. I tried setting SharedLegacyFile = True but it didn't work. Not good! What to do?

No comments: