The BinaryFile library includes many methods for working with binary files.
Before using these methods you need to first add a reference to BinaryFile.dll and then
create an object of this type.
Afterwards, initialize the object using New1.
The BinaryFile object receives a file connection (Stream) of a randomly opened file.
The methods include writing and reading different types of data from a file.
After reading or writing a value from the file, the file pointer moves forward to the next
Methods for setting the absolute or relative position of the file pointer (next byte to read).
And method for embedding and retrieving files to a file.
'First add an object named bin (of BinaryFile type).
bin.Position = 0 'Return the pointer to the start
productName = bin.ReadString
price = bin.ReadDouble 'Types must match
count = bin.ReadInt16
msgbox("Product: " & productName & crlf & "Price:
" & price & crlf
& "Amount: " & count)