以下在 process.start 情况下工作得很好。
private string Path()
{
RegistryKey Key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wizet\\");
RegistryKey Location = Key.OpenSubKey("MapleStory");
return Location.GetValue("ExecPath").ToString();
}
public bool Launch()
{
maplestory = new ProcessStartInfo();
maplestory.FileName = Path() + @"\MapleStory.exe";
maplestory.Arguments = "WebStart";
MapleStory = Process.Start(maplestory);
}
如果我要使用 CreateProcess,我现在应该在哪里放置“.Arguments”,以及在哪里放置 CREATE_SUSPENDED?
CreateProcess(AppName, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, false, 0, IntPtr.Zero, null, ref si, out pi);