USB-UIRT Forum Forum Index USB-UIRT Forum
Plug-n-Play IR Solution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

vb6 sample help

 
Post new topic   Reply to topic    USB-UIRT Forum Forum Index -> Developers
View previous topic :: View next topic  
Author Message
vhoang
Guest





PostPosted: Thu Jul 07, 2005 5:45 am    Post subject: vb6 sample help Reply with quote

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?
Back to top
jrhees
Site Admin


Joined: 28 Jan 2003
Posts: 1652

PostPosted: Fri Jul 08, 2005 7:48 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
vhoang
Guest





PostPosted: Fri Jul 08, 2005 2:01 pm    Post subject: Reply with quote

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
-----------------------------------------
Back to top
jrhees
Site Admin


Joined: 28 Jan 2003
Posts: 1652

PostPosted: Sat Jul 09, 2005 6:01 am    Post subject: Reply with quote

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

-Jon
Back to top
View user's profile Send private message Send e-mail
bmcampjr



Joined: 05 Aug 2005
Posts: 3

PostPosted: Fri Aug 05, 2005 6:14 pm    Post subject: Access to VB Code Reply with quote

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,
Back to top
View user's profile Send private message
jrhees
Site Admin


Joined: 28 Jan 2003
Posts: 1652

PostPosted: Sat Aug 06, 2005 10:13 pm    Post subject: Reply with quote

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

-Jon
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    USB-UIRT Forum Forum Index -> Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group