Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How NT terminates processes ?
Message
De
06/06/2002 13:23:13
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00664618
Message ID:
00665585
Vues:
23
>>my program brings the same list of processes with the same process id as NT. but the terminateprocess function i use doens't terminate them.
>>i would like to know how NT does this operation ?
>
>How are you using it? See Message#496824 for an example.

TerminateProcess() will definitely shut down a process if it can be killed at all, however, it's almost always preferable to send a WM_CLOSE to the thread's message queue using SendMessage() to send it to the hWnd of the primary Window for the process or PostThreadMessage() to send it to the main thread handle and give it a chance to do an orderly shutdown rather than using TerminateProcess() indiscriminantly, since while it kills the process space, it doesn't release shared DLL or COM resources properly, nor does it release remoted file handles when it quits - it depends on the remote server determining that the client has ceased to be.
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform