j'ai trouvé mais impossible de télécharger !!!! http://www.vbfrance.com/codes/NETSTAT-AVEC-NOM-PROCESS_20003.aspx
a tous ces sites ou ils faut s'inscrire !
"olivier" a écrit dans le message de news:
Bonjour,
comment faire un "netstat" en .net et récuperer les résultats ? ps : sans passer par un fichier temporaire mais vraiment en .net ?
merci
Gilles TOURREAU
Le Wed, 12 Sep 2007 18:07:27 +0200, olivier a écrit:
Bonjour,
comment faire un "netstat" en .net et récuperer les résultats ? ps : sans passer par un fichier temporaire mais vraiment en .net ?
merci
Extrait du MSDN :
// Start the child process. Process p = new Process(); // Redirect the output stream of the child process. p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "Write500Lines.exe"; p.Start(); // Do not wait for the child process to exit before // reading to the end of its redirected stream. // p.WaitForExit(); // Read the output stream first and then wait. string output = p.StandardOutput.ReadToEnd(); p.WaitForExit();
Cordialement
-- Gilles TOURREAU
S.A.R.L. P.O.S Le spécialiste en motoculture depuis + de 30 ans ! http://www.pos.fr
Le Wed, 12 Sep 2007 18:07:27 +0200, olivier <aa@aa.fr> a écrit:
Bonjour,
comment faire un "netstat" en .net et récuperer les résultats ?
ps : sans passer par un fichier temporaire mais vraiment en .net ?
merci
Extrait du MSDN :
// Start the child process.
Process p = new Process();
// Redirect the output stream of the child process.
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "Write500Lines.exe";
p.Start();
// Do not wait for the child process to exit before
// reading to the end of its redirected stream.
// p.WaitForExit();
// Read the output stream first and then wait.
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
Cordialement
--
Gilles TOURREAU
gilles.tourreau@pos.fr
S.A.R.L. P.O.S
Le spécialiste en motoculture depuis + de 30 ans !
http://www.pos.fr
Le Wed, 12 Sep 2007 18:07:27 +0200, olivier a écrit:
Bonjour,
comment faire un "netstat" en .net et récuperer les résultats ? ps : sans passer par un fichier temporaire mais vraiment en .net ?
merci
Extrait du MSDN :
// Start the child process. Process p = new Process(); // Redirect the output stream of the child process. p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "Write500Lines.exe"; p.Start(); // Do not wait for the child process to exit before // reading to the end of its redirected stream. // p.WaitForExit(); // Read the output stream first and then wait. string output = p.StandardOutput.ReadToEnd(); p.WaitForExit();
Cordialement
-- Gilles TOURREAU
S.A.R.L. P.O.S Le spécialiste en motoculture depuis + de 30 ans ! http://www.pos.fr