endthreadex ResumeThread

线程恢复函数


ResumeThread Function


DWORD WINAPI ResumeThread(__inHANDLE hThread);


HANDLE hThread


你需要恢复线程的句柄


使用该函数能够激活线程的运行,使CPU分配资源让线程恢复运行


该函数和SuspendThread(hthread),线程挂起函数对应


消耗线程挂起的时间计数,直到时间计数为0,则激活线程


英文原文:


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


微软MSDN原文:


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(__inHANDLE 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, callGetLastError.


Remarks

TheResumeThreadfunction 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 theSuspendThreadandResumeThreadfunctions 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.


词条创建:西安 9571


China,xian,9571

endthreadex ResumeThread

  

爱华网本文地址 » http://www.413yy.cn/a/8104070103/169846.html

更多阅读

移动和联通的区别 联通和电信的区别

(来自网络)一、最大区别①移动1,在桌面上点右键,选择新建 — 文本文档;2,打开"新建文本文档",录入"移动"两字后保存,然后把文本关掉;3,重新打开"新建 文本文档",看到什么了?②联通1,在桌面上点右键,选择新建 — 文本文档;2,打开"新

生命动力课程 一堂有关“生命之水”的课程

   本8226;安德森(Ben Andersen)是一位苏格兰威士忌的品牌推广家,他的职责是负责全球最大的苏格兰威士忌品牌尊尼获加(Johnnie Walker)的品牌战略的制定、执行和平衡。他的团队专注于尊尼获加大家庭中的五个核心品“牌”的推广: 红牌

美丽的错误 要犯就犯美丽的错误

没有人可能不犯错误,企业亦然。通常情况下,一个人、一家企业越是要走远路、走新路,犯错误的可能性就越大、机率就越高。那么,可不可以为了避免犯错误,就不再去尝试着走新路、不去努力走远路呢?当然可以,事实上,有些人正是这样做的,他们不但

反思药交会:“纸纸黄金”换来“满地垃圾”?

反思药交会:“纸纸黄金”换来“满地垃圾”?昆明张三我一直以为,展会应该是个高尚文明的地方。不过从本届药交会首日表现出来的部分事情看,我竟然错了。据说,昨日在昆明国贸中心举办场的58届全国药品交易会上,仅仅开场半小时展会现场已

声明:《endthreadex ResumeThread》为网友如蜡烛分享!如侵犯到您的合法权益请联系我们删除