No such host is known
Process netUtility = new Process(); netUtility.StartInfo.FileName = "net.exe"; netUtility.StartInfo.CreateNoWindow = true; netUtility.StartInfo.Arguments = "view"; netUtility.StartInfo.RedirectStandardOutput = true; netUtility.StartInfo.UseShellExecute = false; netUtility.StartInfo.RedirectStandardError = true; netUtility.Start(); StreamReader streanreader = new StreamReader (netUtility.StandardOutput.BaseStream, netUtility.StandardOutput.CurrentEncoding); string line = ""; while ((line = streanreader.ReadLine()) != null) { if (line.StartsWith("\\")) { string myIP = Convert.ToString(System.Net.Dns.GetHostEntry(line.Substring(2).Substring(0, line.Substring(2).IndexOf(" ")).ToUpper()).AddressList[0].ToString()); textclientip.Text=listBox1.Items.Add(myIP).ToString(); comboBox1.Items.Add(myIP); //textclientip.Text = listBox1.Text; } } streanreader.Close(); netUtility.WaitForExit(1000); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)