易语言多线程控制模块源码
系统结构:启动线程_,创建进入许可证_,删除进入许可证_,进入许可区_,退出许可区_,等待线程_,挂起线程_,继续执行_,取线程返回值_,强制结束线程_,关闭线程句柄_,InitializeCriticalSection,DeleteCriticalSection,EnterCriticalSection,LeaveCriticalSection,CreateThread,CloseHandle,WaitForSingleObject,SuspendThread,TerminateThread,ResumeThread,GetExitCodeThread,
======程序集1
| |
| |------ _启动子程序
| |
| |------ _临时子程序
| |
| |------ 启动线程_
| |
| |------ 创建进入许可证_
| |
| |------ 删除进入许可证_
| |
| |------ 进入许可区_
| |
| |------ 退出许可区_
| |
| |------ 等待线程_
| |
| |------ 挂起线程_
| |
| |------ 继续执行_
| |
| |------ 取线程返回值_
| |
| |------ 强制结束线程_
| |
| |------ 关闭线程句柄_
| |
| |
======调用的Dll
| |
| |---[dll]------ InitializeCriticalSection
| |
| |---[dll]------ DeleteCriticalSection
| |
| |---[dll]------ EnterCriticalSection
| |
| |---[dll]------ LeaveCriticalSection
| |
| |---[dll]------ CreateThread
| |
| |---[dll]------ CloseHandle
| |
| |---[dll]------ WaitForSingleObject
| |
| |---[dll]------ SuspendThread
| |
| |---[dll]------ TerminateThread
| |
| |---[dll]------ ResumeThread
| |
| |---[dll]------ GetExitCodeThread
调用的DLL命令:
.DLL命令 InitializeCriticalSection, , "kernel32", , , 创建许可证
.参数 lpCriticalSection, 多线程许可证, 传址
.DLL命令 DeleteCriticalSection, , "kernel32", , , 删除许可证
.参数 lpCriticalSection, 多线程许可证, 传址
.DLL命令 EnterCriticalSection, , "kernel32", , , 进入许可区
.参数 lpCriticalSection, 多线程许可证, 传址
.DLL命令 LeaveCriticalSection, , "kernel32", , , 退出许可区
.参数 lpCriticalSection, 多线程许可证, 传址
.DLL命令 CreateThread, 整数型, "kernel32", , , 启动线程
.参数 lpThreadAttributes, 整数型
.参数 dwStackSize, 整数型
.参数 lpStartAddress, 子程序指针
.参数 lpParameter, 整数型
.参数 dwCreationFlags, 整数型
.参数 lpThreadId, 整数型, 传址
.DLL命令 CloseHandle, 整数型, "kernel32", "CloseHandle"
.参数 hObject, 整数型
.DLL命令 WaitForSingleObject, 整数型, "kernel32", "WaitForSingleObject", , 监测一个对象
.参数 hHandle, 整数型
.参数 dwMilliseconds, 整数型
.DLL命令 SuspendThread, 整数型, "kernel32", "SuspendThread", , 挂起线索
.参数 hThread, 整数型
.DLL命令 TerminateThread, 整数型, "kernel32", "TerminateThread", , 中止线索
.参数 hThread, 整数型
.参数 dwExitCode, 整数型
.DLL命令 ResumeThread, 整数型, "kernel32", "ResumeThread", , 开始暂停的线索
.参数 hThread, 整数型
.DLL命令 GetExitCodeThread, 整数型, "kernel32", "GetExitCodeThread"
.参数 hThread, 整数型
.参数 lpExitCode, 整数型, 传址
注:本站源码主要来源于网络收集。如有侵犯您的利益,请联系我们,我们将及时删除!
部分源码可能含有危险代码,(如关机、格式化磁盘等),请看清代码在运行。
由此产生的一切后果本站均不负责。源码仅用于学习使用,如需运用到商业场景请咨询原作者。
使用本站源码开发的产品均与本站无任何关系,请大家遵守国家相关法律。