vb6 sample help

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

Moderator: jrhees

vb6 sample help

Postby vhoang » Thu Jul 07, 2005 5:45 am

Expanded the vb6 sample to communicate with a event core I've been creating for fun but running into a strange problem. When I leave the application on for an extended period of time it would stop receiving IR events (~2 days). I am hoping this problem sounds familiar to someone. any suggestions welcomed.

Planning to create an event timer to cause the vb program to reinitialize itself but that is a crude bandage and does not explain what is happening.

I know the vb program is running because my core can send commands to the vb program and display it in a textbox but it seems like the vb's i/o to the uirt is failing. Is there a keepalive thing?
vhoang
 

Postby jrhees » Fri Jul 08, 2005 7:48 am

vhoang,

When it gets into a failure mode, does simply closing the app and reopening it get things working again, or do you have to close the app *and* unplug the USB-UIRT?

-Jon
jrhees
Site Admin
 
Posts: 1652
Joined: Tue Jan 28, 2003 11:49 pm

Postby vhoang » Fri Jul 08, 2005 2:01 pm

software only.

It starts working again when I shut down the app and start it again.

thinking about adding a button to launch the following code:

I will need to wait a few days for the stop then test the button...

-------------------------------------------------------
res = UUIRTClose(hDrvHandle)

' Obtain a handle to the USB-UIRT via the UUIRTOpen call. If successful, a handle
' is returned which we *must* use in all subsequent APi calls.
hDrvHandle = UUIRTOpen()

' If Open call failed, we will be returned an INVALID_HANDLE_VALUE and need to look
' at the error to determine what went wrong...
If hDrvHandle = INVALID_HANDLE_VALUE Then
If Err.LastDllError = UUIRTDRV_ERR_NO_DLL Then
Call MsgBox("Unable to find USB-UIRT Driver. Please make sure driver is Installed!", vbOKOnly, "ERROR")
ElseIf Err.LastDllError = UUIRTDRV_ERR_NO_DEVICE Then
Call MsgBox("Unable to connect to USB-UIRT device! Please ensure device is connected to the computer!", vbOKOnly, "ERROR")
ElseIf Err.LastDllError = UUIRTDRV_ERR_NO_RESP Then
Call MsgBox("Unable to communicate with USB-UIRT device! Please check connections and try again. If you still have problems, try unplugging and reconnecting your USB-UIRT. If problem persists, contact Technical Support!", vbOKOnly, "ERROR")
ElseIf Err.LastDllError = UUIRTDRV_ERR_VERSION Then
Call MsgBox("Your USB-UIRT's firmware is not compatible with this API DLL. Please verify you are running the latest API DLL and that you're using the latest version of USB-UIRT firmware! If problem persists, contact Technical Support!", vbOKOnly, "ERROR")
Else
Call MsgBox("Unable to initialize USB-UIRT (unknown error)!", vbOKOnly, "ERROR")
End If

End
Else
' If Open was successful, we'll want to register a receive callback function
' for the USB-UIRT API to call each time an IR code is received.
res = UUIRTSetReceiveCallback(hDrvHandle, AddressOf IRReceiveCallback, Me)
End If
-----------------------------------------
vhoang
 

Postby jrhees » Sat Jul 09, 2005 6:01 am

Hmmm.,.. very interesting -- let me know what you find.,

-Jon
jrhees
Site Admin
 
Posts: 1652
Joined: Tue Jan 28, 2003 11:49 pm

Access to VB Code

Postby bmcampjr » Fri Aug 05, 2005 6:14 pm

Could I get access to the VB code? We are trying to replace a serial IR Blaster and need the information on the API and DLL.

Thanks,
bmcampjr
 
Posts: 3
Joined: Fri Aug 05, 2005 5:38 pm

Postby jrhees » Sat Aug 06, 2005 10:13 pm

Please contact support@usbuirt.com for the code samples.

-Jon
jrhees
Site Admin
 
Posts: 1652
Joined: Tue Jan 28, 2003 11:49 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 14 guests

cron