Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the right way to kill FP DOS from VFP?
Message
De
26/04/2001 22:19:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00500406
Message ID:
00500494
Vues:
31
This message has been marked as a message which has helped to the initial question of the thread.
Hey Nick,

Have you looked at Ed's API_APPRUN files? If you launch a DOS EXE using it, it's really easy to manage and kill. I use this extensively.

>What is the right way to get rid of (close, destroy, kill, whatever) the application running in DOS window (under Windows NT) from VFP?
>
>VFP monitor app runs the instance of FoxPro DOS application. FoxPro DOS is in a constant DO WHILE loop.
>At some point my VFP monitor app decides that it does not need that FP DOS app instance running. The FP DOS app may hang or wait too long for the SQL SELECT statement result. I want to get rid of it. I know hWnd of this DOS window.
>
>I searched the previous threads and tried
>
>DECLARE INTEGER SendMessage IN WIN32API ;
> INTEGER hWnd, ;
> INTEGER Msg, ;
> INTEGER wParameter, ;
> INTEGER lParameter
> =SendMessage(lnhWnd, WM_CLOSE, 0, 0)
>
>That naturally waits a little and brings the Windows dialog "Windows cannot end this program... etc... End Now; Cancel.
>And I want to get rid of it immediately. I know there is TerminateProcess() API function, but I don't know how to properly use it in this case.
>
>Any hints? Or is there any other way?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform