2010-06-28 115 views
0

我想打电话给第三方软件在.NET应用程序(C#) 的代码如下:的win32系统未处理的异常

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(); 

但它抛出一个异常的Win32系统未处理的异常

请帮助

回答

0

你应该真的发布实际的错误信息以及实际的路径,以使它更容易,但似乎你可能会使用错误的参数。 相反,设置文件路径,你应该通过它的文件名之前,所以以下可能的工作参数:

Process proc = new Process(); 
proc.EnableRaisingEvents = false; 
proc.StartInfo.FileName = System.IO.Path.Combine("filepath", "filename"); 
proc.Start(); 

你可以找到更多信息,包括样本,在MSDN页Process.Starthere

+0

非常感谢... :)它的工作 – user362130 2010-06-28 09:55:57