Fermer un programme extérieur avec son nom sous VC.Net 2003?
milobac
Messages postés12Date d'inscriptionsamedi 19 janvier 2002StatutMembreDernière intervention 4 mai 2003
-
3 mai 2003 à 10:54
roswell117
Messages postés61Date d'inscriptionjeudi 31 janvier 2002StatutMembreDernière intervention18 novembre 2005
-
9 mai 2003 à 14:33
Bonjour,
J'aimerais fermer un programme extérieur au mien à partir de son nom (le prog. extérieur peut être mis à jour, mais son nom ne change pas) avec VS.Net 2003.
J'ai trouvé des sources pour VC++ 6, mais elles ne marchent pas :(.
Merci d'avance.
A voir également:
Fermer un programme extérieur avec son nom sous VC.Net 2003?
Haldwin
Messages postés77Date d'inscriptionlundi 15 avril 2002StatutMembreDernière intervention16 juin 2004 4 mai 2003 à 12:01
Voila la docs MSDN:
BOOL TerminateProcess(
HANDLE hProcess, // handle to the process
UINT uExitCode // exit code for the process
);
Parameters
hProcess
Handle to the process to terminate.
Windows NT: The handle must have PROCESS_TERMINATE access.
uExitCode
Specifies the exit code for the process and for all threads terminated as a result of this call. Use the GetExitCodeProcess function to retrieve the process's exit value. Use the GetExitCodeThread function to retrieve a thread's exit value.
Return Values
If the function succeeds, the return value is nonzero.