简体   繁体   中英

win32 system unhandled exception

I want to call third party software in .net application (C#) the code is as follows:

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM