网站首页  词典首页

请输入您要查询的函数:

 

术语 resumethread
释义 ResumeThread
语法:
C++
DWORD WINAPI ResumeThread(
__in HANDLE hThread
);
ResumeThread函数
递减线程的挂起计数。当暂停计数递减为零,该线程执行的恢复。
参数
hThread [in]
一个句柄,线程重新启动。
这种处理必须有THREAD_SUSPEND_RESUME访问权限。有关更多信息,请参见线程安全和访问权限。
返回值
如果函数成功,返回值是线程的前暂停计数。
如果函数失败,返回值(DWORD值)-1。为了获得更多错误信息,调用GetLastError。
备注
该ResumeThread函数检查挂起的主题线程数。如果暂停计数为零,该线程目前没有暂停。否则,受线程的暂停计数递减。如果结果值为零,那么这一问题的线程恢复执行。
如果返回值为0,则指定的线程并没有停止。如果返回值是1,在指定的线程暂停,但重新启动。如果返回值大于1,则指定的线程仍然暂停。
请注意,虽然调试事件的报告,在报告过程中的所有线程被冻结。调试器将使用SuspendThread和ResumeThread功能限制,可以设置线程在执行过程中。通过暂停在除一个报告调试事件进程中的所有线程,是有可能的“单步”单个线程。其他线程没有公布的继续运作,如果他们已暂停。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
OpenThread
进程和线程函数
暂停线程的执行
SuspendThread
主题
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==ResumeThread Function
Decrements a thread's suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed.
Syntax
C++
DWORD WINAPI ResumeThread(
__in HANDLE hThread
);
Parameters
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 .
Return Value
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.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
OpenThread
Process and Thread Functions
Suspending Thread Execution
SuspendThread
Threads
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms685086(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:15:25