help chris
January 7th, 2000, 01:44 PM
I'm having a little bit of trouble with writing data into a binary file. The following is my code:
Dim file as Integer
Open "tmp.bin" for binary as file
Put #file, , memBuf
Close file
the contents of memBuf are exactly how I want it to be. However, when I open up "tmp.bin" in a hex editor, there are 4 bytes of data at the beggining of the file, the second two bytes are the length of the entire file. I do not want those four bytes to be inserted. I assume it must be my use of the "Put" command, but I am not aware of any other command to write to a file. I would appriciate any pointers you all may have.
thanks
Dim file as Integer
Open "tmp.bin" for binary as file
Put #file, , memBuf
Close file
the contents of memBuf are exactly how I want it to be. However, when I open up "tmp.bin" in a hex editor, there are 4 bytes of data at the beggining of the file, the second two bytes are the length of the entire file. I do not want those four bytes to be inserted. I assume it must be my use of the "Put" command, but I am not aware of any other command to write to a file. I would appriciate any pointers you all may have.
thanks