Y
Yash
Hi,
Through my VB .NET code , I am trying to invoke a perl script. My aim
is to write lines to the script and read from it.
With ProcInfo
.Arguments = Enricher.EnrichScript + " " + enArgs
.RedirectStandardInput = True
.RedirectStandardOutput = True
.RedirectStandardError = True
.UseShellExecute = False
.CreateNoWindow = True
End With
Me.EnrichProcess.StartInfo = ProcInfo
Me.EnrichProcess.Start()
The effective invocation is C:\perl\bin\perl a.pl 1 2 3.
I am able to write one line to the script, which reaches the script
properly:
Me.EnrichProcess.StandardInput.WriteLine("ABC")
After this the VB .NET program tries to read a line
stat = Me.EnrichProcess.StandardOutput.ReadLine()
This statment hangs.
The script when run manually at command prompt, immediately outputs a
string and a newline character after reading a line. But when invoked
programmatically , the ReadLine hangs( blocks).
Can somebody point out the problem?
Thanks
Yash
Through my VB .NET code , I am trying to invoke a perl script. My aim
is to write lines to the script and read from it.
With ProcInfo
.Arguments = Enricher.EnrichScript + " " + enArgs
.RedirectStandardInput = True
.RedirectStandardOutput = True
.RedirectStandardError = True
.UseShellExecute = False
.CreateNoWindow = True
End With
Me.EnrichProcess.StartInfo = ProcInfo
Me.EnrichProcess.Start()
The effective invocation is C:\perl\bin\perl a.pl 1 2 3.
I am able to write one line to the script, which reaches the script
properly:
Me.EnrichProcess.StandardInput.WriteLine("ABC")
After this the VB .NET program tries to read a line
stat = Me.EnrichProcess.StandardOutput.ReadLine()
This statment hangs.
The script when run manually at command prompt, immediately outputs a
string and a newline character after reading a line. But when invoked
programmatically , the ReadLine hangs( blocks).
Can somebody point out the problem?
Thanks
Yash