I am trying to write to a binary file that is read with Delphi as well as with LabView. While writing strings in the binary file Delphi uses 1 byte at the beginning for the string length and then writes the string. LabView does it differently though. Any Ideas of how can I write a byte array of a string replicating the Delphi format?
Thanks in advance
Solved! Go to Solution.
switch off the array/string size when writing the string to your binary file (it's an input parameter of the WriteBinaryFile function)!
Then write your own string length indication byte in front of the string (or prepend the length byte to the string data)…
You can simply everytime write at fisrt time an octet into binary file, before to write your data(String).
This obligate you to use fonction write to Binary file two time successively.
I am in the boat of prepending the length byte to your data before writing to the file.