+ Reply to Thread
Results 1 to 2 of 2

Thread: How to get state of a application? Whether it is running/hang or not?

  1. #1

    How to get state of a application? Whether it is running/hang or not?

    I want to display status of an application.

    I have process id and process handle available.

    Now, I want to know whether process is running or hung.

    How can I do this?

    Please help.

    WIN32/MFC can be very helpful.

  2. #2
    Approach 1:

    If you have window handle to that process then you can use 'SendMessageTimeout' API.

    Send some kind of message to the process and wait for some time.

    application should be able to get and process the message.

    Approach 2:

    You can use WaitForSingleObject with process handle for some time. And get an idea whether application is running or not.

    Hope this helps.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

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