Bonjour,
Je voudrais récupérer le résultat d'une commande, par exemple ping localhost.
La commande se lance bien, mais comment faire pour récuperer ce résultat.
Voici le bout de mon code pour lancer un process :
Le résultat doit etre dans une variable... Pour ensuite la retravailler.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11STARTUPINFO si; ZeroMemory(&si, sizeof(si)); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_NORMAL; PROCESS_INFORMATION pi; if (!CreateProcess(NULL, "ping localhost", NULL, NULL, true, HIGH_PRIORITY_CLASS, NULL, NULL, &si, &pi)){ wxMessageBox("Erreur", _T("Infos"), wxOK | wxICON_INFORMATION | wxCENTRE, this); }
Merci






Répondre avec citation
Partager