Please help me, I am urgently. I need to use 3 modules USBUIRT in my application. My application was made in visual basic dot net.
My Application :
Imports System
Imports System.Threading
Imports UsbUirt
Public Class ClsIR
Public Declare Function UUIRTOpen Lib "uuirtdrv.dll" () As Long
Public Declare Function UUIRTClose Lib "uuirtdrv.dll" (ByVal hHandle As Long) As Long
Public Declare Function UUIRTTransmitIR Lib "uuirtdrv.dll" ( _
ByVal sIRCode As String, _
ByVal uRepeatCount As Long, _
ByVal uInactivityWaitTime As Long, _
ByVal hEvent As IntPtr, _
ByVal reserved0 As IntPtr, _
ByVal reserved1 As IntPtr) As Boolean
' Global Variables:
Public IRDriverHandle As Long 'hold USB-UIRT driver handle
Public IRCode As String 'IR transmission code
Public IRCodeFormat As Long 'IR transmission format
Private WithEvents mc_Received As Controller
'
Private mc As New Controller 'var pour l'usb uirt
Private args As LearnCompletedEventArgs = Nothing
Private code_format As CodeFormat = CodeFormat.Pronto
Private learn_code_modifier As LearnCodeModifier = LearnCodeModifier.None
Public Function TransmiteIR(ByVal IRCode As String, ByRef Retorno As String) As Boolean
'Transmit IRCode using IRCodeFormat. Returns True if successful, False if not.
'Dim MC As New UsbUirt.Controller
IRDriverHandle = &H10
If IRDriverHandle <> 0 Then 'USB-UIRT is open. Transmit IR
Try
mc.Transmit(IRCode)
Catch ex As Exception
Retorno = ex.Message
End Try
Else
Retorno = "Erro IR Handle"
End If
End Function