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

葛文耀:外资‘雪藏论’都是以讹传讹

 “外资‘雪藏论’都是以讹传讹,是缺乏常识的说法。”近日,上海家化(600315.SH)董事长葛文耀在接受世界企业家记者采访时称。   上海家化目前拥有美加净、六神、佰草集等诸多国人耳熟能详的日化品牌,也是硕果仅存的民族日化的国企。

第93节:优化(10)

系列专题:《行动的召唤:有效提升网络营销力》  皇家家电制造公司(R*yal Appliance Manufacturing)开发并且销售Dirt Devil牌地板护理电器。作为一家公司,它认为人们一般每四年就会购买新的吸尘器,而挑选和购买一个新的吸尘器大概要花两

员工生日祝福语 送领导的生日贺词

   让我保留这段芳香的记忆,珍藏这页美丽的友谊,在你生日的今天,请接受我深深的祝福——愿未来的生命成为一首五光十色的诗。  酒是温的好,菜是热的好,工作是乐的好,钱包是鼓的好;同事是铁的好;上司还是你最好。在您

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