SuspendThread
SuspendThread suspends the specified thread.
Syntax
DWORD SuspendThread(
HANDLE hThread
);
Parameters
hThread
The thread to suspend.
Return Value
The thread's previous suspend count if the function succeeds, 0XFFFFFFFF if the function fails
To get extended error information, use GetLastError.
Remarks
If the function succeeds, execution of the specified thread is suspended and the thread's suspend count is raised by one.
Suspending a thread causes the thread to stop executing.
Each thread has a suspend count (with a maximum value of MAXIMUM_SUSPEND_COUNT). If the suspend count is greater than zero, the thread is suspended; otherwise, the thread is not suspended and is eligible for execution. Calling SuspendThread causes the target thread's suspend count to be raised by one. Attempting to increment past the maximum suspend count causes an error without incrementing the count.
ResumeThread decrements the suspend count of a suspended thread.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | windows.h |
Library | Rtx_Rtss.lib |
See Also: