g, inBuffer As String) As Boolean
Dim hEvent As Long
Dim cbRet As Long
Dim ovlp As OVERLAPPED
Dim result As Long
Dim cbIn As Long
cbIn = 5
hEvent = CreateEvent(0, 1, 0, vbNullString)
If hEvent = 0 Then
Bind = False
MsgBox "err bind"
Exit Function
End If
ovlp.hEvent = hEvent
''((0x8000) << 16) | ((0) << 14) | ((7) << 2) | (0))
Const IOCTL_PROTOCOL_BIND = &H8000001C
result = DeviceIoControlAsString(hVxD, _
IOCTL_PROTOCOL_BIND, _
ByVal inBuffer, _
cbIn, _
ByVal inBuffer, _
cbIn, _
cbRet, _
ovlp)
If (result = 0) Then
Call GetOverlappedResult(hVxD, ovlp, cbRet, True)
End If
Call CloseHandle(hEvent)
Bind = True
End Function
Function QueryPacket(ByVal hVxD As Long, ByVal ioctl As Long, ByVal cbIn As Long, ByVal cbOut As Long) As Long
Dim hEvent As Long
Dim cbRet As Long
Dim ovlp As OVERLAPPED
Dim result As Long
hEvent = CreateEvent(0, 1, 0, vbNullString)
If hEvent = 0 Then
Q