|
-
Jun 17th, 2009, 09:37 AM
#1
Thread Starter
Member
Suspend/Pause Application
I have a vb6 app that needs to suspend/pause another application currently running. Is there a way to handle this using the windows api or other method?
Thanks in advance for the assistance.
-
Jun 17th, 2009, 06:55 PM
#2
Fanatic Member
Re: Suspend/Pause Application
I am not sure if you can pause an application process because it consists of several threads, but you can pause a thread, and resume it. I suppose you need to do following:
1. Enumerate running processes to find process you are looking for by its name
2. Find process ID of that process
3. Enumerate all threads related to that process ID
- Open threads to obtain thread handle
- You must open thread with specific access rights that allow you to pause it
4. Pause threads one by one
5. Resume paused threads
6. Close all open handles 
You could start with examining this:
http://msdn.microsoft.com/en-us/libr...35(VS.85).aspx
Here is some explanation how to enumerate threads:
http://www.vbforums.com/showthread.php?t=573011
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
|