[英]win32 system unhandled exception
I want to call third party software in .net application (C#) the code is as follows: 我想在.net应用程序(C#)中调用第三方软件,代码如下:
Process proc = new Process();
proc.EnableRaisingEvents = false;
\\name of the file
proc.StartInfo.FileName = "filename";
\\Path where the file is located
proc.StartInfo.Arguments = "filepath";
proc.Start();
but its throwing an exception Win32 system unhandled exception 但是它抛出异常Win32系统未处理的异常
Please help 请帮忙
You should really post the actual error message as well as the actual paths to make it easier, but it seems like you might be using the wrong arguments. 您实际上应该发布实际的错误消息以及实际的路径,以使其变得更加容易,但是似乎您使用的参数错误。 Rather that setting the filepath as the arguments you should be passing it before the filename so the following might work:
而是将文件路径设置为参数,您应该在文件名之前传递它,这样可能会起作用:
Process proc = new Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = System.IO.Path.Combine("filepath", "filename");
proc.Start();
You can find more information, including a sample, at the MSDN page for Process.Start
here . 您可以在MSDN页面上的
Process.Start
here上找到更多信息,包括示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.