Hi,
I have a C# library with some interfaces and need to use it from an MFC application.
To accomplish this, i registered C# dll as COM and i used the COM interfaces from a C++ dll. This C++ dll is statically linked to the MFC app and uses its methods.
E.g.:
CSharpTest.dll (Register it as COM)
| CSharpDependent1.dll
| CSharpDependent2.dll
| ......
CPPTest.dll -- Uses COM interfaces and makes methods for MFC app
MFCApp.exe -- Uses the methods from CPPTest.dll by static linking
| CPPTest.dll
The problem is, to launch MFCApp.exe, i need to have the CPPTest.dll (of course!) and copy CSharpTest.dll and all its dependent dlls to the exe folder.
But, I need to have those C# dlls in some other folder and still make MFCApp.exe work without any issues.
P.S: It is not good to have C# dlls inside the folder of a C++ application.
Could you please provide a solution?
Regards,
Vineeth
What I have tried:
From Googling it, I found some ways like modify PATH environment variable, etc. but none of them was clear to me.