Windows API 之 CreateThread、WaitForSingleObject(未完)
2015-10-23 18:02
465 查看
WaitForSingleObject
Waits until the specified object is in the signaled state or the time-out interval elapses.DWORD WINAPI WaitForSingleObject( _In_ HANDLE hHandle, _In_ DWORD dwMilliseconds );
Remarks
The WaitForSingleObject function checks the current state of the specified object. If the object's state is nonsignaled, the calling thread enters the wait state until the object is signaled or the time-out interval elapses.The function modifies the state of some types of synchronization objects. Modification occurs only for the object whose signaled state caused the function to return. For example, the count of a semaphore object is decreased by one.
The WaitForSingleObject function can wait for the following objects:
Change notification
Console input
Event
Memory resource notification
Mutex
Process
Semaphore
Thread
Waitable timer
CreateThread
Creates a thread to execute within the virtual address space of the calling process.HANDLE WINAPI CreateThread( _In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes, _In_ SIZE_T dwStackSize, _In_ LPTHREAD_START_ROUTINE lpStartAddress, _In_opt_ LPVOID lpParameter, _In_ DWORD dwCreationFlags, _Out_opt_ LPDWORD lpThreadId );
参考:
MSDN:https://msdn.microsoft.com/en-us/library/ms687032.aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682453%28v=vs.85%29.aspx
相关文章推荐
- [iOS]Objective-C利用协议实现回调函数(类似java的回调函数)
- 一键横屏--------纠结了好久
- 细数Objective-C中的回调机制
- 文献阅读笔记: Real-time Multiple Objects Tracking with Occlusion Handling in Dynamic Scenes ---by 香蕉麦乐迪
- swift:Optional Type 、Swift和Objective-C混编的讲解
- Object-C与Swift的混合编程
- Objective-C学习-NSString的使用
- No default view was found for object type 10201 and query type 2
- 当一个GameObject有两个Collider组件时,Physics Material不起作用
- swift可以不继承NSObject
- JS解析XML数据,ActiveXObject("Microsoft.XMLDOM")对象兼容IE和火狐
- Objective - C 字符串 数组 字典 集合的基本使用
- Objective-C 类,对象,属性,方法
- Count in String and Object
- 动态代理
- PO BO VO DTO POJO DAO概念及其作用(转)
- Objective-C RunTime那些事儿
- Objective-C中不同方式实现锁
- Xcode升级后插件失效的原理与修复办法
- IOS开发系列--Objective-C之协议、代码块、分类