Ejemplo n.º 1
0
        /// <summary>
        /// This function retrieves the name of the device driver being used for a standard input, output, or error output operation.
        /// </summary>
        /// <param name="stream">The standard stream of interest</param>
        /// <returns>The current path for the standard stream</returns>
        public static string GetStdioPath(StdIoStream stream)
        {
            StringBuilder sb = new StringBuilder(256);

            NativeMethods.GetStdioPath(stream, sb, sb.Capacity);

            return(sb.ToString());
        }
Ejemplo n.º 2
0
 public static extern int SetStdioPath(StdIoStream id, string pwszPath);
Ejemplo n.º 3
0
 public static extern int GetStdioPath(StdIoStream id, StringBuilder pwszBuf, int lpdwLength);
Ejemplo n.º 4
0
 /// <summary>
 /// This function sets the standard input, output, or error output destination path.
 /// </summary>
 /// <param name="stream">Specifies the standard stream to modify</param>
 /// <param name="path">Specifies the device driver to which the output is sent. For example, "TEL1:" specifies the telnet device driver or "\MyLogFile.txt" for a text file output</param>
 public static void SetStdioPath(StdIoStream stream, string path)
 {
     NativeMethods.SetStdioPath(stream, path);
 }