-
打印方面的C程序,请观看
打印方面的C程序,请观看-the C program, please watch
- 2022-02-14 21:08:49下载
- 积分:1
-
FlexCell使用示例源码(VFP8)
FlexCell使用示例源码(VFP8)-FlexCell use the sample source code (VFP8)
- 2022-06-28 16:20:28下载
- 积分:1
-
on mouse called C code
关于C下调用鼠标的代码-on mouse called C code
- 2022-07-25 05:14:36下载
- 积分:1
-
一个计算机的程序 自己写的 不太的好!
这个程序是对面向对象的应用,他主要是使用了相应的过载的概念,使得计算机能自动识别的浮点,及其他的东西,还有就是相应的...
一个计算机的程序 自己写的 不太的好!
这个程序是对面向对象的应用,他主要是使用了相应的过载的概念,使得计算机能自动识别的浮点,及其他的东西,还有就是相应的虚数,这个市最重要啊的 -a computer to write the procedures themselves are less good! The process of object-oriented applications, he mainly uses corresponding to the concept of overload, making the computer can automatically identify the float, and other things, there is the corresponding virtual few of the city"s most important ah
- 2022-03-10 10:31:38下载
- 积分:1
-
Fairly good C++ Entry based on the use of tutorials, practical for beginners
相当不错的C++入门基础使用教程,实用初学者-Fairly good C++ Entry based on the use of tutorials, practical for beginners
- 2023-07-17 14:30:03下载
- 积分:1
-
c语言词法分析,功能比较全,大家随便看看吧,有界面
c语言词法分析,功能比较全,大家随便看看吧,有界面-The file is for accidence analysis fo C language and has lots of functions. It has the interface and please check it freely.
- 2022-05-28 13:52:11下载
- 积分:1
-
vc++链表,可以实现链表内的头文件等的链接
vc++链表,可以实现链表内的头文件等的链接-vc Chain, Chain can be achieved within the first links to documents
- 2022-02-06 03:11:29下载
- 积分:1
-
MATLAB对所的的一组数据利用经典谱(及FFT)进行频谱分析
MATLAB对所的的一组数据利用经典谱(及FFT)进行频谱分析-MATLAB by the right of a group of data using the classical spectrum (and FFT) spectrum analyzer
- 2022-02-28 15:35:21下载
- 积分:1
-
汇编学习书箱,对刚学汇编的朋友来说是很多的选择
汇编学习书箱,对刚学汇编的朋友来说是很多的选择-Compilation of the book to learn me, just school friends is a compilation of many choices
- 2022-07-05 13:46:04下载
- 积分: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