OVERLAPPED

王朝百科·作者佚名  2010-04-06
窄屏简体版  字體: |||超大  

OVERLAPPED结构类型声明如下:

typedef struct _OVERLAPPED{

DWORD Internal;//操作系统保留,指出一个和系统相关的状态

DWORD InternalHigh;//指出发送或接收的数据长度

DWORD Offset;//文件传送的开始位置

DWORD OffsetHigh;//文件传送的字节偏移量的高位字

HANDLE hEvent;//指定一个I/O操作完成后触发的事件

}OVERLAPPED;

OVERLAPPED主要是设置异步I/O操作,异步I/O操作是指应用程序可以在后台读或者写数据,而在前台做其他事情。

Allen denver在他的《Serial Communication in Win32》中是这样解释OVERLAPPED I/O的:我个人认为还是比较准确的

Overlapped I/O is not as straightforward as nonoverlapped I/O, but allows more flexibility and efficiency. A port open for overlapped operations allows multiple threads to do I/O operations at the same time and perform other work while the operations are pending. Furthermore, the behavior of overlapped operations allows a single thread to issue many different requests and do work in the background while the operations are pending.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航