Test and Measurement Forum

VBA and usb_tc08_get_formatted_info

Post general discussions on using our drivers to write your own software here

VBA and usb_tc08_get_formatted_info

Postby NeilJordan » Thu Jun 29, 2006 9:48 am

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)
NeilJordan
User
User
 
Posts: 3
Joined: Thu Jun 29, 2006 9:12 am

Postby Michael » Fri Jun 30, 2006 10:34 am

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
Michael
Zen Master
Zen Master
 
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire

Postby NeilJordan » Mon Jul 03, 2006 9:23 am

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.
NeilJordan
User
User
 
Posts: 3
Joined: Thu Jun 29, 2006 9:12 am

Postby Michael » Thu Jul 06, 2006 9:03 am

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
Michael
Zen Master
Zen Master
 
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests