Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Kill a process
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00890217
Message ID:
00890521
Vues:
26
>seems to be what I need but I got the following error
>
>too many arguments
>
>
>    DECLARE SHORT GetExitCodeProcess IN WIN32API AS GetExitCodeProc ;
>        INTEGER hProcess, ;
>        @INTEGER lpdwExitCode
>    LOCAL nRetunCode
>    nReturnCode = 0
> 	
>    IF GetExitCodeProc(tnProcessToCheck, @nReturnCode)  && HERE HERE
>
Hi Selim,

The declaration is wrong. It should be no '@' in front of INTEGER
    DECLARE SHORT GetExitCodeProcess IN WIN32API AS GetExitCodeProc ;
        INTEGER hProcess, ;
        INTEGER lpdwExitCode

    IF (GetExitCodeProc(tnProcessToCheck, nReturnCode) != 259)
Also, for NT based system when you want to terminate a process, you must first open the process and set permission to terminate then you can terminate it.
Herman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform