-
视觉基本写事件
visual basic写的基于事件驱动的串口通讯控件,大家可以使用-visual basic to write event-driven based on the serial communication control, we can use
- 2022-02-26 08:29:54下载
- 积分:1
-
Windows下的高精度计时和高频事件的产生 在开发 Windows 下的应用程序时,经常需要用的计时,尤其在一些对时间要求比较高的程序中,计时的精确性是很重要...
Windows下的高精度计时和高频事件的产生 在开发 Windows 下的应用程序时,经常需要用的计时,尤其在一些对时间要求比较高的程序中,计时的精确性是很重要的,本文介绍了两种精确计时的方法,计时的精度可以达到ms级,而且可以认为它是精确的,可以在大多数情况下作为时间的基准。-under Windows precision timing and the selection of high-frequency events in the development of Windows applications, we often need to use the time, especially in some of the high demand on time the procedure, the accuracy of time is very important, this paper introduces two methods of precision timing, timing accuracy can be achieved ms level, but also that it is accurate, in most cases, as time benchmarks.
- 2022-02-16 10:03:00下载
- 积分:1
-
poj1010sticks源代码,欢迎大家下载
poj1010sticks源代码,欢迎大家下载-poj1010sticks source code, welcome you to download
- 2023-07-26 19:15:03下载
- 积分:1
-
签页形式的对话框
签页形式的对话框-signed forms of dialog page
- 2022-01-25 21:24:52下载
- 积分:1
-
Simulate the mouse, easy
模拟鼠标,易语言源码,仅供易语言初学者参考。-Simulate the mouse, easy-language source code, easy language for beginners for reference purposes only.
- 2022-03-19 05:17:46下载
- 积分:1
-
一个收发邮件的收发程序的邮件
VC实现的一个EMAIL收发程序-VC of a transceiver procedures EMAIL
- 2022-08-25 14:05:03下载
- 积分:1
-
文件修改监控
ReadDirectoryChangesW 有同步和异步2种方式,
根据前面打开的文件夹对象句柄决定。
1. 异步方式,如果 CreateFile 指定了打开类型 FILE_FLAG_OVERLAPPED 就是异步方式,ReadDirectoryChangesW 调用的时候就需要指定 OVERLAPPED 参数.
接下来对文件夹I/O变化的响应判断有多种方式。
A通过不断的调用HasOverlappedIoCompleted函数(非阻塞,参数就是前面的OVERLAPPED 对象指针)的返回值来判断是否发生了 关注文件句柄的I/O操作。如果发生变化,再执行你的 switch(Buffer[0].Action) 操作过程。
B GetOverlappedResult 读取 OVERLAPPED 对象的结果。(阻塞)
C 完成端口 GetQueuedCompletionStatus (阻塞)。
其中阻塞方式,必须采用多线程的方式,否则你的主线程被阻塞的话,对话框就动不了了。非阻塞方式也可用多线程,结合hEvent对象来使用。
2.同步方式,如果CreateFile不指定FILE_FLAG_OVERLAPPED ,就是同步方式。
同步方式操作比较简单。lz的程序看来就是使用的同步方式。
在同步下,ReadDirectoryChangesW 将被阻塞,直到一个文件夹句柄的I/O操作到来,然后才能判断。所以lz的程序会死掉。
同步方式必须采用多线程,再创建一个线程,线程函数采用如下方式:
UINT ThreadProc(PVOID)
{
CreateFile();
while(1) // 如果只想监视一次文件的I/O变化,可不用while循环。
{
- 2022-03-10 05:44:52下载
- 积分:1
-
wince下的注册表编辑器(ARM4I)
好东西! 在winCE下的修改注册表的软件....
wince下的注册表编辑器(ARM4I)
好东西! 在winCE下的修改注册表的软件.-wince under the Registry Editor (ARM4I) good stuff! In winCE under the amended registration Table software.
- 2023-02-19 21:05:03下载
- 积分:1
-
自己做的贪吃蛇代码,比较简单易懂,
自己做的贪吃蛇代码,比较简单易懂,-The Snake make their own code, and relatively easy to understand
- 2022-02-07 12:20:10下载
- 积分:1
-
imitate a resource for the dialog management procedures, and by CTreeCtl CListCt...
一个模拟资源的对话框管理程序,并由CTreeCtl CListCtl实现。
- 2022-02-20 14:15:14下载
- 积分:1