F
fanronghua
Unregistered / Unconfirmed
GUEST, unregistred user!
这两个结构 为什么不一样啊?
delphi 定义为
LPPER_IO_OPERATION_DATA = ^PER_IO_OPERATION_DATA;
PER_IO_OPERATION_DATA = packed record
Overlapped: Overlapped;
DataBuf: TWSABUF;
Buffer: array[0..DATA_BUFSIZE] of CHAR;
BytesSEND: DWord;
BytesRECV: DWord;
end;
VC 定义为
(* typedef struct _PER_IO_OPERATION_DATA
{
OVERLAPPED Overlapped;
WSABUF DataBuff[1];
char Buff[24];
BOOL OperationType;
}PER_IO_OPERATION_DATA,* LPPER_IO_OPERATION_DATA;
*)
delphi
if (GetQueuedCompletionStatus(CompletionPort, BytesTransferred,
DWord(PerHandleData), POverlapped(PerIoData), INFINITE) = False) then
begin
VC
bT = GetQueuedCompletionStatus(ComPort,
&BytesTransferred,(LPDWORD)&PerHandleData,
(LPOVERLAPPED *)&PerIoData,INFINITE);
这个有什么区别?
delphi 定义为
LPPER_IO_OPERATION_DATA = ^PER_IO_OPERATION_DATA;
PER_IO_OPERATION_DATA = packed record
Overlapped: Overlapped;
DataBuf: TWSABUF;
Buffer: array[0..DATA_BUFSIZE] of CHAR;
BytesSEND: DWord;
BytesRECV: DWord;
end;
VC 定义为
(* typedef struct _PER_IO_OPERATION_DATA
{
OVERLAPPED Overlapped;
WSABUF DataBuff[1];
char Buff[24];
BOOL OperationType;
}PER_IO_OPERATION_DATA,* LPPER_IO_OPERATION_DATA;
*)
delphi
if (GetQueuedCompletionStatus(CompletionPort, BytesTransferred,
DWord(PerHandleData), POverlapped(PerIoData), INFINITE) = False) then
begin
VC
bT = GetQueuedCompletionStatus(ComPort,
&BytesTransferred,(LPDWORD)&PerHandleData,
(LPOVERLAPPED *)&PerIoData,INFINITE);
这个有什么区别?