I am tying to create WebApp (using Asp.Net Core 2.2) for existing desktop app which is written in C++. From my webapp I am trying to invoke the process. Inside the c++ exe it is trying to load some DLL which is failing in my case. Same thing is working fine when i directly invoke the desktop app from cmd.
Please suggest how to rectify this problem.
This is my webapp code where i am invoking the exe -
- ProcessStartInfo sprbProcessInfo = new ProcessStartInfo();
- sprbProcessInfo.FileName = @"C:\Program Files\SmartPlant\Interop Publisher\SPRB.exe";
- sprbProcessInfo.Arguments = "\"" + strSrcFileFullPath + "\"" + " -b " + "\"" + strDestFileFullPath + "\"";
- sprbProcessInfo.RedirectStandardOutput = true;
- sprbProcessInfo.UseShellExecute = false;
- Process oTranslateProcess = new Process();
- oTranslateProcess.StartInfo = sprbProcessInfo;
- oTranslateProcess.Start();
- oTranslateProcess.WaitForExit();
- oTranslateProcess.Close();
This is what I am trying to do in my exe -
LoadLibrary (csSolidsFile); ===> this call is failing