I am working on a vb .net application to run a dos based executable that emulates old arcade systems.
The problem I am having is that i can execute one process only at a time. When I exit that process I can then execute another one. I want to be able to execute multiple processes of the same executable.
my code is below:
The problem I am having is that i can execute one process only at a time. When I exit that process I can then execute another one. I want to be able to execute multiple processes of the same executable.
my code is below:
Code:
Dim tiimgtargs, tiimgresult As String
If chksbridge.Checked = True Then
If System.IO.File.Exists(txtTIMGdir.Text & "\tiimagetool.exe") Then
tiimgresult = "TIIMAGETOOL Executubale File Found!"
Dim TIITProcess As New ProcessStartInfo
tiimgtargs = "-jar tiimagetool.jar BRIDGE " & cmbsbridge.SelectedItem.ToString & " 10000"
TIITProcess.FileName = "java"
TIITProcess.Arguments = tiimgtargs
TIITProcess.WorkingDirectory = txtTIMGdir.Text
Process.Start(TIITProcess)
Else
tiimgresult = "FAILURE : TIIMAGETOOL File Not Found!"
End If
End If
Static start_time As DateTime
Static stop_time As DateTime
Dim elapsed_time As TimeSpan
Dim mameresult As String
Dim myProcess As New Process
Dim myProcessStartInfo As New ProcessStartInfo(txtMessDir.Text & "\" & txtMExecut.Text)
myProcessStartInfo.WorkingDirectory = txtMessDir.Text
myProcessStartInfo.Arguments = GV.rom & GV.joy & GV.cartconfig & GV.slot2 & GV.slot3 & GV.slot4 & GV.slot5 & GV.slot6 & GV.slot7 & GV.slot8
myProcessStartInfo.UseShellExecute = False
myProcessStartInfo.RedirectStandardError = True
myProcess.StartInfo = myProcessStartInfo
start_time = Now
If System.IO.File.Exists(txtMessDir.Text & "\" & txtMExecut.Text) Then
mameresult = "MAME Executable File Found!"
Else
mameresult = "MAME Executable File NOT Found!"
End If
myProcess.Start()