please dont rip this site Prev Next

ResumeThread info  Overview  Group

The ResumeThread function decrements a threadís suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed.

DWORD ResumeThread(

    HANDLE hThread 

// identifies thread to restart



Specifies a handle for the thread to be restarted.

Windows NT: The handle must have THREAD_SUSPEND_RESUME access to the thread. For more information, see Thread Objects.

Return Values

If the function succeeds, the return value is the threadís previous suspend count.

If the function fails, the return value is 0xFFFFFFFF. To get extended error information, call GetLastError.


The ResumeThread function checks the suspend count of the subject thread. If the suspend count is 0, the thread is not currently suspended. Otherwise, the subject threadís suspend count is decremented. If the resulting value is 0, then the execution of the subject thread is resumed.

If the return value is 0, the specified thread was not suspended. If the return value is 1, the specified thread was suspended but was restarted. If the return value is greater than 1, the specified thread is still suspended.

Note that while reporting debug events, all threads within the reporting process are frozen. Debuggers are expected to use the SuspendThread and ResumeThread functions to limit the set of threads that can execute within a process. By suspending all threads in a process except for the one reporting a debug event, it is possible to ďsingle stepĒ a single thread. The other threads are not released by a continue operation if they are suspended.

See Also


file: /Techref/os/win/api/win32/func/src/f74_12.htm, 2KB, , updated: 2000/4/7 12:19, local time: 2024/7/20 00:01,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> ResumeThread</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!