i have some code to kill a process

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?

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'

Comments
not helpful

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.

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.

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

This article has been dead for over six months. Start a new discussion instead.