Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How can I get a thread suspended-status?

How can I get a thread suspended-status?

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robert Buldoc
    wrote on last edited by
    #1

    How can I get a thread status (wether it's suspended or not?) I looked at all Process and Thread functions and couldn't find a way on how to retrieve that information? Any ideas would be appreciated!!! Rob

    C 1 Reply Last reply
    0
    • R Robert Buldoc

      How can I get a thread status (wether it's suspended or not?) I looked at all Process and Thread functions and couldn't find a way on how to retrieve that information? Any ideas would be appreciated!!! Rob

      C Offline
      C Offline
      cmk
      wrote on last edited by
      #2

      Robert Buldoc wrote: How can I get a thread status (wether it's suspended or not?) I looked at all Process and Thread functions and couldn't find a way on how to retrieve that information? You could always call SuspendThread(), look at the previous suspend count, then call ResumeThread(). Or, you could lookup the thread structure (http://www.microsoft.com/mspress/books/sampchap/4354b.asp[^]) and try to query the SuspendCount value directly. I decided to store the suspend state as a flag in my thread class. ...cmk Save the whales - collect the whole set

      R 1 Reply Last reply
      0
      • C cmk

        Robert Buldoc wrote: How can I get a thread status (wether it's suspended or not?) I looked at all Process and Thread functions and couldn't find a way on how to retrieve that information? You could always call SuspendThread(), look at the previous suspend count, then call ResumeThread(). Or, you could lookup the thread structure (http://www.microsoft.com/mspress/books/sampchap/4354b.asp[^]) and try to query the SuspendCount value directly. I decided to store the suspend state as a flag in my thread class. ...cmk Save the whales - collect the whole set

        R Offline
        R Offline
        Robert Buldoc
        wrote on last edited by
        #3

        Thanks for yoru reply! I think I am gonna use the thread structure!

        C 1 Reply Last reply
        0
        • R Robert Buldoc

          Thanks for yoru reply! I think I am gonna use the thread structure!

          C Offline
          C Offline
          cmk
          wrote on last edited by
          #4

          Robert Buldoc wrote: I think I am gonna use the thread structure! That way madness lies. You have been warned. :) (Let me know if you get it to work) ...cmk Save the whales - collect the whole set

          R 1 Reply Last reply
          0
          • C cmk

            Robert Buldoc wrote: I think I am gonna use the thread structure! That way madness lies. You have been warned. :) (Let me know if you get it to work) ...cmk Save the whales - collect the whole set

            R Offline
            R Offline
            Robert Buldoc
            wrote on last edited by
            #5

            lol..you already scared me!!;P I think I should use a flag also..

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups