Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the right way to kill FP DOS from VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00500406
Message ID:
00500470
Views:
27
Hi Nick,

Ok, the first time I see you starting a thread :) Did you check ExitWindowsEx May 30, 2000 12:11 API #12657?

I went to API section and searched by terminate. See, if something will work.

>Hi All,
>
>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?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform