I'm having trouble understanding the documentation for the listall function. It says most of the params are pointers to arrays of 127 elements. But the ActiveX version of the call: ListAllX(), it says they are of type BSTR FAR* - are they still 127 byte arrays of type BSTR FAR* or what? I can convert the BSTR types to char[] or CString but I can't find any coding examples. Thanks for your help.

#1
Posted 11 October 2013 - 01:02 PM
#2
Posted 11 October 2013 - 04:04 PM
For BSTR FAR* you pass a string. 10 characters represent a number, so say 2 devices are found (numberFound) there will be 20 characters representing the 2 product ID numbers in the productIDList. calMatrix is normally a 2d array (127 by 20), so one device will have 20 numbers (200 characters). The User's Guide section describes the BSTR FAR* strings in the User's Guide:
http://labjack.com/s...sers-guide/3.22
The VB6 examples contain some OCX examples:
http://labjack.com/s...es/visual-basic
The AIBurstX and AIStreamX examples demonstrate passing strings which are normally represented by 1 and 2D arrays. There isn't a ListAllX example, but you would perform the call like this in VB:
Dim lngErrorcode As Long Dim pID As String Dim ser As String Dim lID As String Dim pow As String Dim cal As String Dim fnd As Long Dim r1 As Long Dim r2 As Long lngErrorcode = Ljackuwx1.ListAllX(pID, ser, lID, pow, cal, fnd, r1, r2)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users