示例#1
0
 /// <summary>
 /// Add a console alias string and target text.
 /// </summary>
 /// <param name="Source">The source text.</param>
 /// <param name="Target">The target (replacement) text.</param>
 /// <param name="ExeName">The name of the executable file for which the alias is
 /// to be defined.</param>
 public static void AddAlias(string Source, string Target, string ExeName)
 {
     if (!WinCon.AddConsoleAlias(Source, Target, ExeName))
     {
         throw new IOException("Unable to add alias", Marshal.GetLastWin32Error());
     }
 }