Multiple USB-IRTs using VB NET

Interested in integrating USB-UIRT support into an application? Look here!

Moderator: jrhees

Multiple USB-IRTs using VB NET

Postby ALEGON » Mon May 27, 2013 4:07 pm

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
Catch ex As Exception
Retorno = ex.Message
End Try
Retorno = "Erro IR Handle"
End If

End Function
Posts: 8
Joined: Thu May 13, 2010 7:49 pm
Location: BRASIL

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest