If by "running", you mean a separate process:
Use the class System.Diagnostics.Process
available in .NET:
myProcess.StartInfo.FileName = "notepad.exe";
myProcess.StartInfo.CreateNoWindow = false;
myProcess.Start();
如果你指使用C++中开发的批号,你可使用<代码>。 平台:
using System;
using System.Runtime.InteropServices;
class PlatformInvokeTest
{
//First param is of course either in your PATH, or an absolute path:
[DllImport("msvcrt.dll", EntryPoint="puts", CallingConvention=CallingConvention.Cdecl)]
public static extern int PutString(string c);
[DllImport("msvcrt.dll", CallingConvention=CallingConvention.Cdecl)]
internal static extern int _flushall();
public static void Main()
{
PutString("Test");
_flushall();
}
}