-
I am trying to kill an app running off a cd in Windows NT. I have had no success with sending wm_close or wm_terminate; I have been unable to use other API calls to any success. Can anyone find a method that works and describe it in great detail? Thank you very much for your time.
Joe
-
Try wm_kill and wm_destroy. This isn't a joke.
-
Should I use it with the sendmessage API?
-
Yes. SendMessage asks the app to close. If that doesn't work either, you can kill the thread forcefully, but any prompts (save, for example) won't be generated...it'll be like if you hit ctrl-alt-delt
-
Hitting ctrl-alt-del doesn't alway's helps, because you can hide your proggies from the ctrl-alt-del-list.
-
That was just an analogy...not really using ctrl-alt-del. I had an app that wouldn't respond to Sendmessage, so I killed the entire thread (thru code)...it works but you'd lose any close-out processing from the app. Hopefully, the constants you gave him will work. :)
-
How do you induce a ctrl alt delete type close then. Everytime I have tried, it hasn't worked. Could you describe the parameters in great detail as well? thanx
-
When you press ctr-alt-del and terminate an app, Windows sends these messages to the app you selected:
WM_Close
WM_Destroy
WM_NCDestroy
-
are you sure it works in NT?
-
-
Thank you very much. It almost works but not quite. I still prompts if you wish to close the program. Do you know how to avoid that? thanx again
-
SendMessage works in NT too...you can try SendMessage with something like Notepad and it'll work, but not all apps respond to it because SendMessage only asks the app to close. Let me just clear this up though -- I only used the ctrl-alt-delt description as an analogy to indicate that any close-out processing in the app would be lost. I didn't say to actually use Ctrl-Alt-Delt.
What you can do if SendMessage doesn't work is kill the thread that the app is running in. It uses APIs to enumerate and kill the thread which Aaron Young did previously and reiterated in http://forums.vb-world.net/showthrea...threadid=15739.
[Edited by WadeD on 08-15-2000 at 04:52 PM]