Results 1 to 2 of 2

Thread: Suspend/Pause Application

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2006
    Posts
    39

    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.

  2. #2
    Fanatic Member Dungeon Keeper's Avatar
    Join Date
    Mar 2008
    Posts
    590

    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
    No, that wont do!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width