Bonjour,
Je voudrais stopper et désactiver des services en c++
j'ai utiliser ce code :
System::ServiceProcess::ServiceController^ serviceController1;
this->serviceController1->ServiceName = L"MON SERVICE";
if(this->serviceController1->Status.ToString() == L"Running")
this->serviceController1->Stop();
Jusque là ça va^^
Comment attendre que le service soit stoppé ?
J'ai vu sur msdn qu'il y a une méthode ServiceController::WaitForStatus Method (http://msdn.microsoft.com/en-us/library/w52kaf2y.aspx), mais je ne sais pas comment l'implémenter.
Comment faire pour désactiver ce service ?
Merci