I am using the dpib32.pas library in Delphi 5, creating a generic send and receive application for a host of instruments over IEEE. In the library I have access to the Receive function Receive(0, dev, buf, 100, STOPend); but it requires a length to be stated for the size of the buffer. This perplexes me a little as the user will not always know how large the data returned will be. I could allow functions for the user to change the buffersize before their calls but I would rather find a way to dynamically increase the buffer or read from it in a loop so this does not have to occur. I've looked at using ibrd() instead but am having a little trouble figuring out how/if I should error trap the receive while the loop is runnin
g. Has anyone implemented, or can explain, how to handle the buffersize issue when you aren't sure how much data will be returned?