We have an outdated application with a COM based plugin system. To register your own plugin, DllRegistryServer is DllRegistryServer , which registers the COM classes and adds some registry information for accounting. For .NET components, we have a COM server written in C # that calls RegistrationServices.RegisterAssembly . For maximum compatibility, this C # dll is for .NET v2.0. (Native) plugin registrar CoCreateInstance() C # server.
Since .NET plugins can focus on .NET v4.0, in the application configuration we have the following:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" /> <supportedRuntime version="v2.0.50727" /> </startup> </configuration>
The problem is that COM registration must be done in Vista or 7, so the plugin registrar is created using COM Elevation Moniker, which launches it outside the procedure in the system surrogate ( dllhost.exe ). This creates a problem because the config application is not applied to dllhost.exe .
We want to solve this problem without writing a custom surrogate, deploying two versions of the C # COM server, requiring v4.0 runtime or manually placing the CLR on it.
How to apply application configuration to an object created by Mon Elever COM module?
source share