Welcome![Sign In][Sign Up]
Location:
Search - ResumeThread

Search list

[Process-Thread070920171745

Description: 多线程控制,可以自己控制,createThread ResumeThread ,SuspendThread
Platform: | Size: 388738 | Author: zlt | Hits:

[Process-Thread070920171745

Description: 多线程控制,可以自己控制,createThread ResumeThread ,SuspendThread-Multi-threaded control, can control, createThread ResumeThread, SuspendThread
Platform: | Size: 388096 | Author: zlt | Hits:

[OS programJobObject

Description: 通过windows的内核对象JobObject实现对程序的运行时间和内存使用的控制,开发初衷是作为一个简陋的acm判题沙箱. 大致步骤: 1.通过CreateJobObject创建一个工作对象 2.通过SetInformationJobObject设置工作对象的参数,详见MSDN(http://msdn.microsoft.com/zh-cn/library/ms686216) 3.以CREATE_SUSPENDED方式启动进程,通过CreateProcessAsUser或者CreateProcess函数,可能还有其他函数,未做研究. 4.通过AssignProcessToJobObject将工作对象应用到指定进程中. 5.通过ResumeThread恢复已暂停的进程. 6.通过WaitForSingleObject等待正在运行的工作对象,设置好允许使用时间. 7.通过QueryInformationJobObject获取工作对象的最终状态.运行程序的退出状态可以通过GetExitCodeProcess获取. 8.扫尾工作(必须使用TerminateJobObject结束当前的工作对象,因为工作对象即便设置了PerProcessUserTimeLimit也无法使程序在超时后退出,没有研究原因). 编译时请包含Kernel32.lib.-By the windows kernel objects JobObject control program run time and memory usage, originally developed as a rudimentary the acm sentenced Title sandbox. Roughly steps: 1. Through CreateJobObject create a work object 2. Through SetInformationJobObject set object parameters, see the MSDN (http://msdn.microsoft.com/zh-cn/library/ms686216) start the process to CREATE_SUSPENDED way through CreateProcessAsUser or CreateProcess function, may have other functions, without making research. by AssignProcessToJobObject work object applied to the specified process. 5. through ResumeThread recovery process has been suspended. 6. WaitForSingleObject to wait for running work object, set up to allow the use of time. through QueryInformationJobObject get the final state of the work objects run the program exit the state by GetExitCodeProcess get off the work (must use TerminateJobObject the end of the current work object, because the work object even set PerProcessUserTimeLimit can not make the prog
Platform: | Size: 1024 | Author: | Hits:

[OS programResumeThread

Description: 代码展示的怎样恢复挂起的线程,使用toolhelp api 枚举线程 然后恢复-The code shows how to restore the suspended thread, the thread then use toolhelp api enumeration recovery
Platform: | Size: 312320 | Author: yucheng | Hits:

CodeBus www.codebus.net