Skip to content

Latest commit

 

History

History
113 lines (79 loc) · 4.3 KB

nf-processthreadsapi-resumethread.md

File metadata and controls

113 lines (79 loc) · 4.3 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:processthreadsapi.ResumeThread
ResumeThread function (processthreadsapi.h)
Decrements a thread's suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed.
ResumeThread
ResumeThread function
_win32_resumethread
base.resumethread
processthreadsapi/ResumeThread
winbase/ResumeThread
base\resumethread.htm
processthreadsapi
ffc4e474-635b-4bf7-a68f-073899fb3fde
12/05/2018
ResumeThread, ResumeThread function, _win32_resumethread, base.resumethread, processthreadsapi/ResumeThread, winbase/ResumeThread
processthreadsapi.h
Windows.h on Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008 Windows Server 2008 R2
Windows
Windows XP [desktop apps \| UWP apps]
Windows Server 2003 [desktop apps \| UWP apps]
Kernel32.lib; WindowsPhoneCore.lib on Windows Phone 8.1
Kernel32.dll; KernelBase.dll on Windows Phone 8.1
Windows
19H1
ResumeThread
processthreadsapi/ResumeThread
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
KernelBase.dll
API-MS-Win-Core-ProcessThreads-l1-1-0.dll
MinKernelBase.dll
API-MS-Win-Core-ProcessThreads-l1-1-1.dll
API-MS-Win-Core-ProcessThreads-l1-1-2.dll
api-ms-win-downlevel-kernel32-l1-1-0.dll
API-MS-Win-Core-ProcessThreads-L1-1-3.dll
ResumeThread

ResumeThread function

-description

Decrements a thread's suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed.

-parameters

-param hThread [in]

A handle to the thread to be restarted.

This handle must have the THREAD_SUSPEND_RESUME access right. For more information, see Thread Security and Access Rights.

-returns

If the function succeeds, the return value is the thread's previous suspend count.

If the function fails, the return value is (DWORD) -1. To get extended error information, call GetLastError.

-remarks

The ResumeThread function checks the suspend count of the subject thread. If the suspend count is zero, the thread is not currently suspended. Otherwise, the subject thread's suspend count is decremented. If the resulting value is zero, then the execution of the subject thread is resumed.

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

Note that while reporting debug events, all threads within the reporting process are frozen. Debuggers are expected to use the SuspendThread and ResumeThread functions to limit the set of threads that can execute within a process. By suspending all threads in a process except for the one reporting a debug event, it is possible to "single step" a single thread. The other threads are not released by a continue operation if they are suspended.

Windows Phone 8.1:  This function is supported for Windows Phone Store apps on Windows Phone 8.1 and later.

Windows 8.1 and Windows Server 2012 R2: This function is supported for Windows Store apps on Windows 8.1, Windows Server 2012 R2, and later.

-see-also

OpenThread

Process and Thread Functions

SuspendThread

Suspending Thread Execution

Threads