Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shut down a program started with the RUN command
Message
From
07/08/1999 09:15:01
 
 
To
07/08/1999 06:31:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00250898
Message ID:
00251042
Views:
16
>Hi Ed,
>
>Thanks for the reply. I looked for SendMessage() in the help file but there is no listing for it. Is that an API call? Where can I find info on it? The program is a DDE server that doesn't support DDE calls to itself so it has to be something else.
>

SendMessage() is a Win32 API call that sends a standard message to a specific Window; there are samples of how to use it in various entries in the FAQ under Win32 and Other AIs, mostly stuff by George Tasker. There have been several threads about this in the past several months.

API_APPRUN can also shut down anything that it starts up, but it uses TerminateProcess() to do this, and that's a messy shutdown - it simply blows away the process and doesn't allow it to try to initiate an orderly shutdown like SendMessage() might allow using a WM_CLOSE message. However, terminateProcess() always works, regardless of the type of app running,and regardless of whether the app is capable of processing standard Windows messages (great for killing things that get locked up in an infinite loop, for example.)

>Thanks
>
>>>How do I shut down a program started with the run command?
>>>
>>
>>Rather than using RUN, use my API_APPRUN class, which has a method to kill what it launches (in a messy fashion.) If it's a WinApp, you'd best investigate using SendMessage() to get it to shut down.
>>
>>>Thanks
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform