Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Kill a process
Message
 
À
29/03/2004 13:02:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00890217
Message ID:
00890549
Vues:
31
>>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,

I think you've still got it wrong. See Re: Acrobat/AcroRd.exe never kill process when closed Thread #888048 Message #888113 for illustration of correct declaration and usage of GetExitCodeProcess.

Mike
Montage

"Free at last..."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform