ResumeThread

ResumeThread subtracts one from a thread's suspend count. When the suspend count is reduced to zero, the execution of the thread is resumed.

Syntax

DWORD ResumeThread(
    HANDLE hThread
);

Parameters

hThread

A handle for the thread to be restarted.

Return Value

The thread's previous suspend count if the function succeeds, 0XFFFFFFFF if the function fails

To get extended error information, call GetLastError.

Remarks

ResumeThread checks the suspend count of the subject thread. If the suspend count is 0, the thread is not currently suspended and ResumeThread returns 0XFFFFFFFF. Otherwise, the subject thread's suspend count is reduced by one. If the resulting value is 0, then the execution of the subject thread is resumed.

If the return value is 0XFFFFFFFF, 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.

Requirements

Minimum Supported Version RTX64 2013
Header windows.h
Library Rtx_Rtss.lib

See Also:

SuspendThread