/// <summary> 通过模型创建初始化文件 </summary> public SOLUTION InitRestartSolution(RestartInfoModel parent, RestartInfoModel mode, string name, DateTime time, int index) { SOLUTION solution = new SOLUTION("SOLUTION"); INCLUDE include = new INCLUDE("INCLUDE"); include.FileName = name + "_init.inc"; include.FilePath = parent.FilePath + "\\" + include.FileName; solution.Add(include); RESTART restart = new RESTART("RESTART"); RESTART.Item item = new RESTART.Item(); item.fwjm0 = parent.FileName; item.cqss1 = (index).ToString(); restart.Items.Add(item); include.Add(restart); mode.InitPath = include.FilePath; return(solution); }
internal static extern int RegisterApplicationRestart([MarshalAs(UnmanagedType.BStr)] string pwzCommandLine, RESTART dwFlags);
internal static extern int GetApplicationRestartSettings(IntPtr hProcess, [Out, MarshalAs(UnmanagedType.BStr)] StringBuilder pwzCommandLine, ref uint pcchSize, out RESTART pdwFlags);