ResumeThread Procedure

Resumes the thread.

Syntax

[ lNumber = ] ResumeThread ( hThread )

The ResumeThread procedure syntax has the following parts:

 

Name

Type

Description

lNumber

Long

The thread’s previous suspend count if successful; 0xFFFFFFFF otherwise.

hThread

Val AHandle

Handle to the thread.

Comments

If the return value is zero, the current thread was not suspended. If the return value is one, the thread was suspended, but is now restarted. Any return value greater than one means the thread remains suspended.

This function is called to resume execution of a thread that was suspended by the SuspendThread member function. The suspend count of the current thread is reduced by one. If the suspend count is reduced to zero, the thread resumes execution; otherwise the thread remains suspended.

Example

The following example will resume a thread of handle hThread1 that was suspended and place the suspend count into lSuspendThreadCount1:

lSuspendThreadCount1=ResumeThread(hThread1)

See Also

CreateThread, ExitThread, Sleep, SuspendThread, TerminateThread