VBA and usb_tc08_get_formatted_info

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
NeilJordan
User
User


Joined: 29 Jun 2006
Posts: 3

PostPosted: Thu Jun 29, 2006 9:48 am    Post subject: VBA and usb_tc08_get_formatted_info Reply with quote

I am using the TC08 (USB) via VBA in Access 2003.

I don't have a problem opening, closing and getting data from the unit, however when I try to get information from the unit (I ideally need to get the serial number), using the following code, Access crashes (sometimes without the crash diagnosis box).

It does this consistently and I believe I have the most recent driver (1.3.0.0)


Dim x As Integer
Dim UnitInfo As String
x = usb_tc08_get_formatted_info(tc08_handle, UnitInfo, 256)
Back to top
Michael
Guru
Guru


Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire

PostPosted: Fri Jun 30, 2006 10:34 am    Post subject: Reply with quote

Hello,

I have not been able to repeat the problem here.

Have you tried the usb_tc08_get_unit_info call?

This may perform better as long as you declare the USBTC08_INFO correctly.

Best regards,
Michael
Back to top
NeilJordan
User
User


Joined: 29 Jun 2006
Posts: 3

PostPosted: Mon Jul 03, 2006 9:23 am    Post subject: Reply with quote

No, I haven't tried that, in part because it doesn't seem to be declared in the vb example.

I am trying to declare it and use it, but not having too much success.
Back to top
Michael
Guru
Guru


Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire

PostPosted: Thu Jul 06, 2006 9:03 am    Post subject: Reply with quote

Hello,

Here is the function declaration for you. You will need to add this to the declaration file.

Declare Function usb_tc08_get_unit_info Lib "c:\usbtc08.dll" (ByVal handle As Integer, ByRef usbtc08Info As USBTC08_INFO) As Integer

Copy this to your usbtc0832.bas file.

Best regards,
Michael
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group