I am trying to read anything from a single byte up to 2Mb of data back into a Visual Basic program. Until now I have been using something like
Dim Response as string * 60000
ibrda hDevice, Response
which works fine up to the magic 65536ish string size limit, but I want more!
Ideally reading into a very large byte array would suffice, e.g.
Dim ByteBuffer(0 To 2000000 - 1) As Byte
ibrd hDevice, ByteBuffer
But I cannot find a way to get the gpib-32.dll to accept the ByteBuffer as a destination in Visual Basic, even though ibrd32 is declared in vbib-32.bas as accepting Any type as a destination, and a Long as a count, implying the the 65536 limit doesn't apply for that call.
It may be possibl
e to use repeated ibrd calls until one such call fails to fill the buffer, concatenating the results each time, but this seems a crude solution when the DLL would appear to be able to do the job in one go.
Using ibrdf may work, but would rather not use a file as intermediate storage.
TIA