This is very odd.
We have some managed C++ (an assembly) which uses a .NET COM interop dll generated by TlbImp to make calls into a COM object. When we register the COM DLL we specify that we want it to execute within a surrogate (the "DLLSurrogate" registry entry).
Our COM DLL is 64-bit and is executing on a 64-bit platform.
When we integrate the assembly with a 32-bit application (which contains managed and unmanaged code) calls into the COM library execute within DllHost. A 64-bit build of the same application causes the calls to be executed within the calling process.
Pure unmanaged client applications (both 32 and 64 bit) execute properly on the 64-bit system which shows (I hope) that we have configured / installed the COM library properly.
This behaviour could indicate that the .NET COM Interop is ignoring the configuration information in the registry. The 32-bit client cannot load the 64-bit COM DLL into its address space and defaults to using a surrogate? Anyway, this behaviour is disastrous for us as the COM library contains a singleton representing access to some hardware and there maybe many client processes.
Has any one noted this behaviour before?
Thanks,
Mike D