Jump to content

How do I programmatically end a process in windows


Recommended Posts

We are running a test on a circuit board. In order to test the unit we are required to use a .dll that the client wrote. The problem is if the board is bad the .dll hangs. Because the board is a security device we are not allowed to mess with the dll in any way and the source code is not available. The only way to fix the problem right now is to go into task manager and end the process.

Does any one have code that will do this programmatically or know what the API call would be

Link to comment
We are running a test on a circuit board. In order to test the unit we are required to use a .dll that the client wrote. The problem is if the board is bad the .dll hangs. Because the board is a security device we are not allowed to mess with the dll in any way and the source code is not available. The only way to fix the problem right now is to go into task manager and end the process.

Does any one have code that will do this programmatically or know what the API call would be

2429[/snapback]

Here are some VIs that use system exec to execute the tasklist and taskkill commands.

Download File:post-17-1098386155.zip

-Jim

Link to comment

Jim, I had wrote some functions, using .NET framework, this will work with 7.0 and up.. Code is at home, so I cannot post it right now.. If there is someone interested, I will post tomorrow..

This including:

functions : PIDs by names, names by PIDs, kills, CloseWindows, how many threads, memory counts, processor "busy" couns, child windows counts..

look at system.dll in .NET framework.

Besides, you could use pskill.exe from sysinternals.. You can kill by name there. This is easyest way..

/ProximaBleu

Link to comment
  • 8 months later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.