开发者

Versioning windows COM objects

I am developing two applications which both have .NET4 assembly of the same name, different version. This assembly exposes some COM objects. Is it possible to install both applications, and maintain COM objects of both assemblies?

I have some decent experience with .NET assemblies, but not much COM. Thanks in advance for helping o开发者_开发技巧ut a neophyte.


Versioning in COM is performed, at a low level, by versioning the interfaces and changing the CLSID (AND IIDs of any changed interfaces). The ProgID of the control is also versioned by adding a .version number. Obviously the installation paths have to be different.

For example, to load internet explorer as a web control, you can create the object "shell.explorer" to create the latest version, "shell.explorer.1" "shell.explorer.2" etc. map to different versions of the shell.explorer control - registered under different CLSIDs - they share the same VersionIndependentProgID tho, so when an application tries to instantiate the versionless ProgID it gets the latest version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜