VBA and usb_tc08_get_formatted_info

Post general discussions on using our drivers to write your own software here
Post Reply
NeilJordan
User
User
Posts: 3
Joined: Thu Jun 29, 2006 9:12 am

VBA and usb_tc08_get_formatted_info

Post by NeilJordan »

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)

Michael
Advanced User
Advanced User
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire

Post by Michael »

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
Michael - Tech Support
Pico Technology
Web Support Forum

NeilJordan
User
User
Posts: 3
Joined: Thu Jun 29, 2006 9:12 am

Post by NeilJordan »

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.

Michael
Advanced User
Advanced User
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire

Post by Michael »

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
Michael - Tech Support
Pico Technology
Web Support Forum

Post Reply