 |
| Terminating all running applications from a VFP program |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
| Before you begin: |
 |
Handle this code carefully, because it terminates the running applications regardless of their state, unsaved data, I/O streams etc.
See also:
Enumerating Processes -- WinNT
Enumerating Processes -- Win9*/Me
|
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 3759 bytes Created: 2002-01-08 07:07:00 Modified: 2011-12-10 09:20:22 Visits in 7 days: 43 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
The GetWindow function is used to obtain handles to all windows siblings to the main VFP window (having the equal rank), excluding the Program Manager window.
Ths PostMessage function called with WM_SYSCOMMAND and SC_CLOSE works more effectively.
That is for sure, the both ways can be of some sort destructive for the application. Especially the TerminateProcess is. Check description for this function on the MSDN. |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|