私は次のコードを使用しました:
static void Main(string[] args)
{
ProcessStartInfo perlStartInfo = new ProcessStartInfo(@"C:\strawberry\perl\bin\perl.exe");
perlStartInfo.Arguments = "c:\\ebm\\parse_ebm_log.pl";
perlStartInfo.UseShellExecute = false;
perlStartInfo.RedirectStandardOutput = true;
perlStartInfo.RedirectStandardError = true;
perlStartInfo.CreateNoWindow = false;
Process perl = new Process();
perl.StartInfo = perlStartInfo;
perl.Start();
perl.WaitForExit();
string output = perl.StandardOutput.ReadToEnd();
}
perl.MainModule を見ると、この例外があります: MainModule = 'perl.MainModule' throws an exception of type
'System.ComponentModel.Win32Exception' base {System.SystemException} = {"ReadProcessMemory または WriteProcessMemory 要求の一部のみが完了しました"}
x32プロセスでx64を実行できないと言ったときの同じperl.MainModuleの以前の例外により、ターゲットビルドはx64です(そのようなもの)