ResumeThread

Allows a previously suspended thread to run

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:Thread

Syntax

  #include <nwthread.h>  
   
  int ResumeThread  (  
     int   threadID); 
  

Parameters

threadID
(IN) Specifies the ID of the thread to be resumed.

Return Values

The following table lists return values and descriptions.

Value

Hex

Name

Description

0

(0x00)

ESUCCESS

Thread was resumed.

9

 

EINVAL

Thread tried to resume itself.

19

 

EWRNGKND

Thread was not suspended.

22

(0x16)

EBADHNDL

Bad thread ID was passed in.

Remarks

The ResumeThread function reverses the effect of SuspendThread.

IMPORTANT:Your application must be aware of how its threads are suspended and must call ResumeThread only when it is appropriate. For example, if your application suspends a thread, it is appropriate for your application to resume the thread. However, it is not appropriate for your application to call ResumeThread for one of its threads that has been suspended by the OS, while the thread is running in OS code. Calling ResumeThread at an inappropriate time will cause unpredictable behavior.

See Also

ExitCritSec, SuspendThread