Hi there,
Please urgent help required for below issue.
I am running one fortran exe in .net application(calling from command line with the help of system diagnostic process).
If we directly click on fortran exe, it shows inputs to enter for fortran in command window, after input entered it gets executed. We want same behaviour but want to run fortran exe from .net application, If we click on button in vb.net form, this exe should get called and should show inputs to enter on the command line, once inputs entered it should execute. How to achieve this with .net application?
Right now, after clicking on button in vb.net form, exe get's opened in command window, but it is blank, and gets hanged.
Below is the error
forrtl: error (200): program aborting due to window-CLOSE event Image PC Routine Line Source
R540CS.exe 004622DA Unknown Unknown Unknown
R540CS.exe 0045F4C8 Unknown Unknown Unknown
R540CS.exe 00421A8E Unknown Unknown Unknown
R540CS.exe 00432154 Unknown Unknown Unknown
kernel32.dll 7C87655C Unknown Unknown Unknown
kernel32.dll 7C80B729 Unknown Unknown Unknown
Here is the code used,
Dim ProcArgs As String = String.Empty
Dim procInfo As ProcessStartInfo = Nothing
Dim myErrstreamReader As StreamReader = Nothing
Dim flag As Boolean = False
Dim strErrFileMsg As String = String.Empty
Try
ProcArgs = String.Format("""{0}""", strInputFile)
procInfo = New ProcessStartInfo
procInfo.FileName = ExeFile
procInfo.CreateNoWindow = False
procInfo.UseShellExecute = False
procInfo.RedirectStandardError = True
Using process As Process = process.Start(procInfo)
process.WaitForExit()
myErrstreamReader = process.StandardError
strErrFileMsg = myErrstreamReader.ReadToEnd.ToString
End Using
Please urgent help required for below issue.
I am running one fortran exe in .net application(calling from command line with the help of system diagnostic process).
If we directly click on fortran exe, it shows inputs to enter for fortran in command window, after input entered it gets executed. We want same behaviour but want to run fortran exe from .net application, If we click on button in vb.net form, this exe should get called and should show inputs to enter on the command line, once inputs entered it should execute. How to achieve this with .net application?
Right now, after clicking on button in vb.net form, exe get's opened in command window, but it is blank, and gets hanged.
Below is the error
forrtl: error (200): program aborting due to window-CLOSE event Image PC Routine Line Source
R540CS.exe 004622DA Unknown Unknown Unknown
R540CS.exe 0045F4C8 Unknown Unknown Unknown
R540CS.exe 00421A8E Unknown Unknown Unknown
R540CS.exe 00432154 Unknown Unknown Unknown
kernel32.dll 7C87655C Unknown Unknown Unknown
kernel32.dll 7C80B729 Unknown Unknown Unknown
Here is the code used,
Dim ProcArgs As String = String.Empty
Dim procInfo As ProcessStartInfo = Nothing
Dim myErrstreamReader As StreamReader = Nothing
Dim flag As Boolean = False
Dim strErrFileMsg As String = String.Empty
Try
ProcArgs = String.Format("""{0}""", strInputFile)
procInfo = New ProcessStartInfo
procInfo.FileName = ExeFile
procInfo.CreateNoWindow = False
procInfo.UseShellExecute = False
procInfo.RedirectStandardError = True
Using process As Process = process.Start(procInfo)
process.WaitForExit()
myErrstreamReader = process.StandardError
strErrFileMsg = myErrstreamReader.ReadToEnd.ToString
End Using