Hi Jan,
I have edit like below in the code, but doesn't works.
Try
success = False
If (Not (hidHandle.IsInvalid)) Then
'If (MyHid.Capabilities.OutputReportByteLength > 0) Then
Array.Resize(outputReportBuffer, MyHid.Capabilities.OutputReportByteLength)
outputReportBuffer(0) = 0
outputReportBuffer(1) = CByte(1)
If UBound(outputReportBuffer) > 1 Then
outputReportBuffer(2) = CByte(1)
End If
outputReportBuffer(3) = CByte(255)
outputReportBuffer(4) = CByte(255)
outputReportBuffer(5) = CByte(255)
outputReportBuffer(6) = CByte(255)
outputReportBuffer(7) = CByte(255)
outputReportBuffer(8) = CByte(255)
outputReportBuffer(9) = CByte(255)
outputReportBuffer(10) = CByte(255)
outputReportBuffer(11) = CByte(1)
outputReportBuffer(12) = CByte(2)
outputReportBuffer(13) = CByte(0)
outputReportBuffer(14) = CByte(0)
If (fileStreamdevicedata.CanWrite) Then
fileStreamdevicedata.Write(outputReportBuffer, 0, outputReportBuffer.Length)
success = True
Else
CloseCommunications()
' lstResults.Items.Add("The attempt to read an Input report has failed.")
End If
'If success Then
' ' lstResults.Items.Add("An Output report has been written.")
' ' lstResults.Items.Add(" Output Report ID: " & String.Format("{0:X2} ", outputReportBuffer(0)))
' ' lstResults.Items.Add(" Output Report Data:")
' 'txtBytesReceived.Text = ""
' 'For count = 1 To UBound(outputReportBuffer)
' ' 'byteValue = String.Format("{0:X2} ", outputReportBuffer(count))
' ' ' lstResults.Items.Add(" " & byteValue)
' 'Next count
'Else
' CloseCommunications()
' ' lstResults.Items.Add("The attempt to write an Output report failed.")
'End If
'Else
' lstResults.Items.Add("The HID doesn't have an Output report.")
'End If
success = False
If (MyHid.Capabilities.InputReportByteLength > 0) Then
Array.Resize(inputReportBuffer, MyHid.Capabilities.InputReportByteLength)
Dim ar As IAsyncResult = Nothing
transferInProgress = True
tmrReadTimeout.Start()
If (fileStreamdevicedata.CanRead) Then
fileStreamdevicedata.BeginRead(inputReportBuffer, 0, inputReportBuffer.Length, New AsyncCallback(AddressOf GetInputReportData), inputReportBuffer)
Else
CloseCommunications()
' lstResults.Items.Add("The attempt to read an Input report has failed.")
End If
End If
End If
Catch ex As Exception
DisplayException(Me.Name, ex)
Throw
End Try