Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the right way to kill FP DOS from VFP?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00500406
Message ID:
00500620
Vues:
39
>>>Hiya John,
>>>
>>>I may try this. Also, FP DOS app (it is really just .FXP) may be run from the batch file before the VFP Monitor app even starts, and I am not sure how to get process handle in this case. Didn't work much with API stuff before. :)
>>
>>Nick,
>>
>>Without the process handle it's a problem. You can only shutdown a DOS session via SendMessage() if the process has already terminated. See "How do I close another application?". Of course, using a pif file to launch the program, can eliminate the need for this entirely.
>
>Hi George,
>
>So, the is no way to obtain the process handle knowing only hWND, is it? The VFP Monitor app can be shut down and restarted while the FoxPro DOS session is still running. I still can get it's hWND again after restarting the Monitor and use SendMessage(WM_DESTROY), but I would like to have more precise control on shutting down the server rather than rude WM_DESTROY. :)

Nick,

To the best of my knowledge, there's no way via a window handle to retrieve the handle to a specific process. I think that the only ways are to use either CreateProcess, or GetCurrentProcess.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform