Windows API 之 CreateThread、WaitForSingleObject(未完)
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
Windows API 之 CreateThread、WaitForSingleObject(未完)的更多相关文章
- Windows API 之 CreateThread、GetExitCodeThread(未完)
GetExitCode Retrieves the termination status of the specified thread. BOOL WINAPI GetExitCodeThread( ...
- Hbase客户端API基础小结笔记(未完)
客户端API:基础 HBase的主要客户端接口是由org.apache.hadoop.hbase.client包中的HTable类提供的,通过这个类,用户可以完成向HBase存储和检索数据,以及删除无 ...
- Windows API 学习
Windows API学习 以下都是我个人一些理解,笔者不太了解windows开发,如有错误请告知,非常感谢,一切以microsoft官方文档为准. https://docs.microsoft.co ...
- 使用Windows API进行串口编程
使用Windows API进行串口编程 串口通信一般分为四大步:打开串口->配置串口->读写串口->关闭串口,还可以在串口上监听读写等事件.1.打开和关闭串口Windows中串口 ...
- Windows API串口编程详解
(一)Windows API串口通信编程概述 Windows环境下的串口编程与DOS环境下的串口编程有很大不同.Windows环境下的编程的最大特征之一就是设备无关性,它通过设备驱动程序将Window ...
- Linux与Windows API对比
对象 操作 Linux API Windows API 线程 创建 pthread_create() CreateThread() 退出 pthread_exit() ThreadExit() 等待 ...
- [python]爬代理ip v2.0(未完待续)
爬代理ip 所有的代码都放到了我的github上面, HTTP代理常识 HTTP代理按匿名度可分为透明代理.匿名代理和高度匿名代理. 特别感谢:勤奋的小孩 在评论中指出我文章中的错误. REMOTE_ ...
- Windows API学习---线程与内核对象的同步
前言 若干种内核对象,包括进程,线程和作业.可以将所有这些内核对象用于同步目的.对于线程同步来说,这些内核对象中的每种对象都可以说是处于已通知或未通知的状态之中.这种状态的切换是由Microsoft为 ...
- Windows API学习---插入DLL和挂接API
插入DLL和挂接API 在Microsoft Windows中,每个进程都有它自己的私有地址空间.当使用指针来引用内存时,指针的值将引用你自己进程的地址空间中的一个内存地址.你的进程不能创建一个其引用 ...
随机推荐
- Smarty 注册变量
关于smarty类的一些解析 特别注意左右分隔符<{}>,display------显示模板的内容(里面是.html文件),assign-------注册变量 <?php //是一个 ...
- Redis简介三
目录 一.Key 二.String 三.Hash 四.List 五.Set 六.SortedSet 七.Pub/Sub 八.Transaction 九.Script 十.Connection 十一.S ...
- sublime3安装
1.下载安装程序 http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%203059%20Setup.exe 2.下载注册机 http:/ ...
- 点赞增加的jquery写法
$('.dianzan').click(function(){ $(this).find('span').html(parseInt($(this).find('span').html())+1) } ...
- 把luasocket集成到c++中
建一个项目pro_test,创建一个运行目录test: 把luasocket/src文件夹中的*.lua拷贝到test/src文件夹中: 把socket.dll,mime.dll,lua5.1.dll ...
- openwrt默认不开启wifi
Openwrt默认不开启wifi,要开启的话, 修改这个文件: openwrt/trunk/package/kernel/mac80211/files/lib/wifi/mac80211.sh. 滚到 ...
- Entity Framework技巧系列之十一 - Tip 42 - 45
提示42. 怎样使用Code-Only创建一个动态模型 背景: 当我们给出使用Code-Only的例子,总是由创建一个继承自ObjectContext的强类型的Context开始.这个类用于引导模型. ...
- 使用queryperf对DNS服务器作压力测试
一.querperf简介 当我们把DNS服务器配置好后,我们肯定会想测试一下DNS服务器的性能如何,上线后如果请求数够多服务器还能否响应?于是,我们可以使用软件模拟环境,对DNS服务器作评估性的测试. ...
- Hibernate关于openSession和getCurrentSession的理解
来源(转载):http://blog.csdn.net/woshisap/article/details/7024482 1:getCurrentSession会把Session和当前的线程关联起来, ...
- windowSoftInputMode键盘把输入框挡住了
android:windowSoftInputMode="stateHidden|adjustResize" >