Skip to content
Search

WindowsApi:SuspendThread

lastmod 2018-08-17created 2016-04-052 edits

Suspends a thread. If the function succeeds, it returns the suspend count.

On failure it returns (DWORD)-1, and error information can be obtained through GetLastError().

Warning

Suspending a thread while it is allocating/freeing memory can bring the system down. It is therefore recommended to stop the thread yourself from inside it, using something like a Boolean variable. For related information, see the CreateThread() usage warning section.

See also