关于overlapped的简单问题。(50分)

  • 主题发起人 主题发起人 wsd
  • 开始时间 开始时间
W

wsd

Unregistered / Unconfirmed
GUEST, unregistred user!
各位高手,
能否讲解一下overlapped类型结构的参数含义以及使用方法?
overlapped类型结构前有时加@,这是什麽意思?
 
@ 是指针的意思。
什莫是 overlapped 8-)
 
摘自帮助:

The OVERLAPPED structure contains information used in asynchronous input and output (I/O).
typedef struct _OVERLAPPED { // o
DWORD Internal;
DWORD InternalHigh;
DWORD Offset;
DWORD OffsetHigh;
HANDLE hEvent;
} OVERLAPPED;

Members
Internal //系统保留
Reserved for operating system use. This member, which specifies a system-dependent status, is valid when the GetOverlappedResult function returns without setting the extended error information to ERROR_IO_PENDING.
InternalHigh //系统保留
Reserved for operating system use. This member, which specifies the length of the data transferred, is valid when the GetOverlappedResult function returns TRUE.
Offset //指定传送文件开始的位置
Specifies a file position at which to start the transfer. The file position is a byte offset from the start of the file. The calling process sets this member before calling the ReadFile or WriteFile function. This member is ignored when reading from or writing to named pipes and communications devices.
OffsetHigh //指定传送开始处的偏移量的高位字
Specifies the high word of the byte offset at which to start the transfer. This member is ignored when reading from or writing to named pipes and communications devices.
hEvent
Identifies an event set to the signaled state when the transfer has been completed. The calling process sets this member before calling the ReadFile, WriteFile, ConnectNamedPipe, or TransactNamedPipe function.

Remarks
You can use the HasOverlappedIoCompleted macro to determine whether an asynchronous I/O operation has completed. You can use the CancelIo function to cancel an asynchronous I/O operation.
@符号取其后标识符的地址
 
干什莫用的呢?
@指向一个函数。即调用他
 
多人接受答案了。
 

Similar threads

回复
0
查看
1K
不得闲
回复
0
查看
881
不得闲
D
回复
0
查看
2K
DelphiTeacher的专栏
D
后退
顶部