-
这个是旅行查询系统,模拟查询旅游路线。欢迎使用,希望大家提供意见。...
这个是旅行查询系统,模拟查询旅游路线。欢迎使用,希望大家提供意见。-This is a travel query system, simulating travel route inquiries. Welcome, I hope to advise the U.S..
- 2022-01-25 23:30:03下载
- 积分:1
-
根据给定的对象和路径,获得其子孙成员
根据给定的对象和路径,获得其子孙成员-According to the objects and paths, access to their children and grandchildren members
- 2022-03-22 03:35:33下载
- 积分:1
-
Visual C++下开发的用于和DSP通信的程序,该程序用用于调试DSP时一些数据的观测和记录...
Visual C++下开发的用于和DSP通信的程序,该程序用用于调试DSP时一些数据的观测和记录-Visual C++ under development and DSP communications for the program for debugging DSP with some of the observations and record data
- 2022-03-18 08:27:20下载
- 积分:1
-
data structure 2nd edition (C) of the source code, such as the purchase of this...
数据结构第二版(C++)上的源程序代码,如买了这本书的,可下载-data structure 2nd edition (C) of the source code, such as the purchase of this book, downloadable
- 2023-09-04 01:50:03下载
- 积分:1
-
cplex de jie shao The art and science of road maintenance during adverse winter...
cplex介绍,The art and science of road maintenance during adverse winter conditions has long been hampered by a lack of true integration of weather information into operations. Beginning in 1999,-cplex de jie shao The art and science of road maintenance during adverse winter conditions has long been hampered by a lack of true integration of weather information into operations.
- 2022-05-27 13:18:47下载
- 积分:1
-
This is a Windows help file, I wanted to learn windows programming learn it on t...
这是个Windows帮助文档,想学windows编程的人就下来学吧-This is a Windows help file, I wanted to learn windows programming learn it on the down
- 2022-07-06 23:33:22下载
- 积分:1
-
简易登录注册平台
一款简易登录注册平台....................................................................................................................................................................................................................................................................
- 2022-12-16 10:55:04下载
- 积分:1
-
这个fortran程序,主要是如何让fortran输出时不按列输出,而是按行输出,然后在一定条件时回车换行,如何操作里面都有详细说明(fortran)...
这个fortran程序,主要是如何让fortran输出时不按列输出,而是按行输出,然后在一定条件时回车换行,如何操作里面都有详细说明(fortran)-The fortran program, mainly how to make fortran output when the output is not listed, but by the line output, and then under certain conditions when the carriage return line feed, how to operate it has a detailed description (fortran)
- 2023-01-05 00:25:03下载
- 积分:1
-
Delphi中利用Tbitmap实现窗体图形动态打印
Delphi中利用Tbitmap实现窗体图形动态打印-Delphi use Tbitmap achieve Form Dynamic Graphics Print
- 2022-02-03 14:27:45下载
- 积分: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