Bonjour,
J’essaie actuellement de d’arrêter et démarrer le service "Mysql" sur mon PC via Delphi, j'ai donc recherché la commande mais je ne comprends pas trop comment l'utiliser :
http://msdn.microsoft.com/en-us/library/ms686321.aspx
Je dois certainement utiliser 'startservice', mais ignore comment
Pourriez vous m'éclairer s'il vous plait
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 procedure Start_Service(Srv_Hwnd:Sc_Handle); Var ArrayOfArguments : PChar; begin ArrayOfArguments := nil; if StartService(Handle_Service, 0, ArrayOfArguments) =0 then MessageDlg(SysErrorMessage(GetLastError), mtError, [mbOK], 0); end;
Merci
Partager