Const BUFFER_SIZE = 16384
Const nREAD = 1
Type PacketTable
hEvent As Long
Active As Boolean
Overlap As OVERLAPPED
Size As Long
Buffer(BUFFER_SIZE) As Byte
Length As Long
Type As Integer
End Type
Const RECV_MAX = 32
Dim RecvTab(RECV_MAX) As PacketTable
Dim EventTab(RECV_MAX) As Long
Dim InBuff(1514) As Byte
Dim OutBuff(1514) As Byte
Function Bind(hVxD As Long, inBuffer As String) As Boolean
Dim hEvent As Long
Dim cbRet As Long
Dim ovlp As OVERLAPPED