I have a C# app that loads a component (And associated helper functions) from a 32-bit COM (ActiveX) DLL.
This all works beautifully but my processing is pretty memory heavy (Especially when running on multi procesor machines) so I'd like to be able to load the ActiveX DLL out-of-process. My understanding (though my COM is pretty rusty) that this will allow me to access all the functionality via DCOM directly from a 64-bit application.
However there doesn't seem to be any way to encourage VS2010 to allow me to load the DLL out-of-process. It automatically generates the necessary glue code and it seems to load it via, the equivalent of, a CoCreateInstance with a CLSCTX_INPROC_SERVER. Is there anyway to tell it to load it as a CLSCTX_LOCAL_SERVER (which I believe wills tart it in its own process)?
Is the only way to write my own wrapper DLL/EXE that wraps the 32-bit DLL and then allows me to load THAT wrapper as an out-of-process server? The pain of doing this would be the not being able to, presumably, use the functionality in quite such a simple fashion.
Surely there is an easier way?
Any help would be hugely appreciated!