dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosSuspendThread (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSPROCESS
 
USHORT DosSuspendThread(tid)
TID tid;    /* identifier of thread to suspend */
 
The DosSuspendThread function suspends the execution of a thread until a
call to the DosResumeThread function is made that specifies the suspended
thread's identifier.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
tid        Specifies the thread identifier of the thread to be suspended.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be the following:
 
     ERROR_INVALID_THREADID
 
Comments
 
The specified thread may not be suspended immediately if it has called a
system function that has locked some system resources; the locked resources
must be freed before the thread is suspended. The thread will not continue
to execute until a DosResumeThread function is called.
 
A thread can suspend threads only within its process.
 
You should not suspend a thread that is making use of Presentation Manager
resources, because this could lock up system resources, preventing other
applications from running.
 
See Also
 
DosCreateThread, DosEnterCritSec, DosResumeThread