【www.tuzhexing.com--教育考试】
result = DeviceIoControl(hVxD, ioctl, InBuff(0), cbIn, InBuff(0), cbOut, cbRet, ovlp)
If result = 0 Then
If (GetLastError() = ERROR_IO_PENDING) Then
MsgBox “Ok0”
Else
Call CloseHandle(hEvent)
Exit Function
End If
If (0 = GetOverlappedResult(hVxD, ovlp, cbRet, 0)) Then
If (GetLastError() = ERROR_IO_INCOMPLETE) Then
MsgBox “ok2”
Else
Call CloseHandle(hEvent)
Exit Function
End If
End If
result = GetOverlappedResult(hVxD, ovlp, cbRet, 1)
End If