I am developing a 64-bit VC ++ ATL COM server that basically just redirects all calls to the out-of-process COM server. So my COM server basically does nothing.
He originally used the C ++ runtime in the DLL ( /MD) compiler . I noticed that when I deploy it on a pure 64-bit Win2k3, regsvr32 fails with the error: LoadLibrary ({fileName}) failed - this application could not be started because the application configuration was incorrect. Reinstalling the application may fix this problem.
Google helps - the problem is that the VC ++ 9 runtime is not installed. The problem persists even when msvcr90.dll is in the same directory as my COM server. This, I believe, is related to how the search for dependent libraries works - it does not look at the same directory, and I need the msvcr90.dll file in Windows \ System32 or the like. Since this is a complication for my deployment, I switched to using the statically linked C ++ runtime (/ MTM compiler). Now it works great. The size of the DLL file is only 110 KB (45 KB), so it does not bother me.
Now I heard a lot about how bad it is to mix different versions of C ++ in one process - the state of CRT can be broken, hell can break, etc. Should I think about this and expect problems from changing / MD to / MT, especially since I don’t know which version the COM server users are using?
source
share