|
-
Aug 11th, 2000, 10:46 AM
#1
Thread Starter
Hyperactive Member
I am writing a program for windows NT that will close an exe(when it is running I have the hwnd for it). I have tried the terminateprocess command but it is not working. Does the code for terminate process vary in NT. I am pretty sure it does, but not 100%. If it doesn't, could you give a detailed description of what the parameters are that are sent.
thank you for your time,
Joe
If anything is confusing please post and tell me to clarify.
-
Aug 11th, 2000, 10:49 AM
#2
Good Ol' Platypus
You run into lots of problems? Are you making an OS or something in Visual Basic? Unfortunately, I don't have NT, so I can't help you. But I would guess TerminateProcess would work, if you got the handle of the window with Findwindow. If you don't know the class-name, you can use SPY++ which comes with VS6 to find it.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Aug 11th, 2000, 11:00 AM
#3
Thread Starter
Hyperactive Member
Not quite
I am making a program that is able to close down programs from any device(almost like a program for ctrl alt delete with a few little twists).
Thanks anyway. Could you possibly describe to me about what has to be sent when you use TerminateProcess?
Joe
-
Aug 11th, 2000, 11:07 AM
#4
Good Ol' Platypus
I've never used terminateprocess myself, but there was one on this Q + A once. I'll do a search.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Aug 11th, 2000, 11:12 AM
#5
Good Ol' Platypus
http://forums.vb-world.net/showthrea...threadid=25427
Sam Finch shows us how.
And for the hWnd, use findwindow to get the hWnd. Example:
hWnd = FindWindow("IEFrame",vbNullString)
That would get the handle of Internet Explorer. I'm sure there's a process which lets us enumerate all of the available hWnds, because it's in Spy++. Anyway, hope I helped, see ya.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Aug 11th, 2000, 11:13 AM
#6
Good Ol' Platypus
And here:
http://forums.vb-world.net/showthrea...threadid=25871
Is the code to enumerate all available windows. Enjoy!
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Aug 11th, 2000, 12:29 PM
#7
Thread Starter
Hyperactive Member
I have tried the code for both before to no avail.
I have searched and found those threads before. Unfortunately, that code doesn't seem to work with NT. Maybe I am doing something wrong. Could you explain what each variable does that is being sent and a list of possible values?
thank you for your help,
Joe
-
Aug 11th, 2000, 01:42 PM
#8
Fanatic Member
I posted that enumeration code, it does work in NT, because the person who asked for it used NT. I don't know about TerminateProccess. goto www.vbapi.com. Thats were i got the code
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|