My project is a dll for downloading and updating stock data in the metastock format. It's all binary for which I'm using;
Open "FileName" For Binary As #1 Len = Len(MyRec)
'do stuff here
Close #1
kind of statements and functions.
The problem I am head butting at the moment is when I open an existing file, delete some data (really just re-write it) I can not figure out how to shorten the file length.
Let's say, for simplicity, I just want to delete the last 28 bytes and save the changes. How do I close the file so that it is 28 bytes shorter than it was when I began? So far the only solution I can see is to delete and re-write the whole file except for the last 28 bytes which doesn't seem very efficient.
Open "FileName" For Binary As #1 Len = Len(MyRec)
'do stuff here
Close #1
kind of statements and functions.
The problem I am head butting at the moment is when I open an existing file, delete some data (really just re-write it) I can not figure out how to shorten the file length.
Let's say, for simplicity, I just want to delete the last 28 bytes and save the changes. How do I close the file so that it is 28 bytes shorter than it was when I began? So far the only solution I can see is to delete and re-write the whole file except for the last 28 bytes which doesn't seem very efficient.