M
Markus Eßmayr
Hello!
As we use .NET technology to build our applications, we also create several
components using it.
To be able to use the components in unmanaged applications, we expose the
public interfaces to COM.
On my workstation, I have .NET 1.0, 1.1 and 2.0 installed.
We now found out, that the .NET runtime always loads the latest version of
itself, if any .NET based COM object is created.
We know, that there are ways to force the loader to use a specific version
of the runtime, but the following topic is not completely clear:
Somebody offers a COM object developed using .NET technology and builds that
using one of the available runtime versions (lets say 2.0).
Another guy, offering another COM object builds that using version 1.1.
A third guy builds an unmanaged application using both COM objects.
Lets say, the application has two functions, A (using COM object 1) and B
(using COM object 2).
If the user activates A before B, COM object 1 gets created first, and
runtime version 2.0 gets loaded into the process. So, COM object 2 will be
executed with runtime version 2.0 too.
If the user does it the opposite way, COM object 1 will be run with runtime
version 1.1.
Thats the way I think it would be!
I know that the best way is to ensure, that all used COM objects are built
with the same runtime version, but what if you don't have a way to do that!?
(if they are developed by external companies)
Use out-of-process COM servers?
Any suggestions!
Thanks, Max
As we use .NET technology to build our applications, we also create several
components using it.
To be able to use the components in unmanaged applications, we expose the
public interfaces to COM.
On my workstation, I have .NET 1.0, 1.1 and 2.0 installed.
We now found out, that the .NET runtime always loads the latest version of
itself, if any .NET based COM object is created.
We know, that there are ways to force the loader to use a specific version
of the runtime, but the following topic is not completely clear:
Somebody offers a COM object developed using .NET technology and builds that
using one of the available runtime versions (lets say 2.0).
Another guy, offering another COM object builds that using version 1.1.
A third guy builds an unmanaged application using both COM objects.
Lets say, the application has two functions, A (using COM object 1) and B
(using COM object 2).
If the user activates A before B, COM object 1 gets created first, and
runtime version 2.0 gets loaded into the process. So, COM object 2 will be
executed with runtime version 2.0 too.
If the user does it the opposite way, COM object 1 will be run with runtime
version 1.1.
Thats the way I think it would be!
I know that the best way is to ensure, that all used COM objects are built
with the same runtime version, but what if you don't have a way to do that!?
(if they are developed by external companies)
Use out-of-process COM servers?
Any suggestions!
Thanks, Max