G
Guest
hi i have a commandline that send data to 8 USB printer, but when one of the
printer is not working, the other 7 will also hanged. How can i use threading
to separate the 8 printing process?
For x = 0 To 7
If USBHandle(x) > 0 And USBAddressOn(x) = True Then
RetVal = WriteFile(USBHandle(x), ByteData(0), Len(Chunk),
ReturnBytes, OverLapped)
If ReturnBytes <> Len(Chunk) Then
PrintChunkUSB = -1
USBErrorFlag(x) = True
Exit Function
End If
End If
Next x
printer is not working, the other 7 will also hanged. How can i use threading
to separate the 8 printing process?
For x = 0 To 7
If USBHandle(x) > 0 And USBAddressOn(x) = True Then
RetVal = WriteFile(USBHandle(x), ByteData(0), Len(Chunk),
ReturnBytes, OverLapped)
If ReturnBytes <> Len(Chunk) Then
PrintChunkUSB = -1
USBErrorFlag(x) = True
Exit Function
End If
End If
Next x