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.aihuau.com/a/8104070103/169846.html

更多阅读

皇室三姐妹 三兄弟娶三姐妹合力 把牛皮卖出牛肉的钱

 在湖南省新晃侗族自治县,很多当地人并不认识镜头里的这三个女人,可是一定听说过她们的故事。这个故事和三个女人的身份密切相关,她们是三姐妹。   罗亚琼:“我是老大,她是我姨娘的女儿。”  记者:“这是谁的女儿? ”  罗亚琼:“

运动员减肥食谱 运动员吃什么能减肥

 运动员吃什么能减肥爱华阅读配图  1、鸡蛋:鸡蛋中含有卵磷脂是一种乳化剂,可使脂肪胆固醇乳化成极小颗粒,从血管排除后为机体所利用。另外,鸡蛋可以使血液中的高密度脂蛋白增高可保护血管防止硬化。  2、西葫芦:这种平

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