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.
Printable View
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.
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