943,852 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 620
  • C++ RSS
Apr 24th, 2009
0

terminating a process on vista

Expand Post »
i have some code to kill a process
C++ Syntax (Toggle Plain Text)
  1. TerminateProcess((HANDLE)sinfo->process->Handle, 0);
what happens is so the process freezes and starts eating up the processor... so i i try to terminate it, but it only goes white and that box pops up that says "bla bla bla" stopped working...
is there any way around this?
Similar Threads
Reputation Points: 10
Solved Threads: 8
Posting Whiz in Training
nschessnerd is offline Offline
216 posts
since Dec 2006
Apr 24th, 2009
-1

Re: terminating a process on vista

Hmm I'm not to familiar with that command, but it could have something to do with Vistas rediculous overhead such as data execution prevention or some other security 'feature'
Reputation Points: 352
Solved Threads: 109
Master Poster
skatamatic is online now Online
776 posts
since Nov 2007
Apr 24th, 2009
0

Re: terminating a process on vista

this also happens on win7
Reputation Points: 10
Solved Threads: 8
Posting Whiz in Training
nschessnerd is offline Offline
216 posts
since Dec 2006
Apr 24th, 2009
-7

Re: terminating a process on vista

Quote ...
Vistas rediculous overhead such as data execution prevention
Do you even know what you are talking about? DEP is a hardware feature (The NX bit) of all modern CPUS and its not exclusively a vista feature, its been around as a concept since the dawn of computing in the 1960s and has been supported on windows since XP SP2/Server 2003. It is also supported on MacOS X and the majority of unix/linux systems.

Secondly, it has very little overhead and is a key security feature in any modern system, as it helps prevent buffer overrun exploits (which account for the majority of windows security scares)

Do your homework before speaking in future.

Quote ...
some other security 'feature'
Security features are there for a reason. What the user is trying to do
(terminate a process) is not something you want to happen maliciously by any user-executed application. Such requests should not be performed automatically without a) the correct privileges and b)implicit user approval

RE: The OP's problem

a) what do you mean by "so i i try to terminate it, but it only goes white" - be more specific

b) when you say "that box pops up that says "bla bla bla" stopped working..." do you mean that the program is indeed terminated successfully?

If the process is terminated unclealy, its the windows default configuration to give such an error message.
Last edited by jbennet; Apr 24th, 2009 at 10:03 pm.
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is online now Online
16,517 posts
since Apr 2005
Apr 24th, 2009
0

Re: terminating a process on vista

Click to Expand / Collapse  Quote originally posted by jbennet ...
a) what do you mean by "so i i try to terminate it, but it only goes white" - be more specific

b) when you say "that box pops up that says "bla bla bla" stopped working..." do you mean that the program is indeed terminated successfully?

If the process is terminated unclealy, its the windows default configuration to give such an error message.
i mean like when a process freezes on windows and it gives the message about the program not exiting cleanly. But it keeps the process open, and i dont want that if its using all of my cpu
Reputation Points: 10
Solved Threads: 8
Posting Whiz in Training
nschessnerd is offline Offline
216 posts
since Dec 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Reading data from another file difficulty
Next Thread in C++ Forum Timeline: Ofstream Question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC