N
not aaron
I start out with a string. Which I then encode with my own algorithm
changing every characters ascii value depending on a key. I then save
it to a binary file.
When I generate the initial string, it shows up fine. When I encode
the string it shows up right. When I save the file it appends about 3
lines of random ascii characters (about the length of my original
string).
When I go back to decode the string, it works right for what it is
suppose to do, just those junk characters at the end of the file are
showing up as junk when I decode it. The application still works, it
just bothers me and looks strange.
I am using the following code to create the file:
////////
Dim ff As Integer = FreeFile()
FileOpen(ff, fileName, OpenMode.Binary, OpenAccess.ReadWrite)
FilePut(ff, encodedText)
FileClose(ff)
\\\\\\\\
Note: Before I write to the file, I msgbox the encodedText, and it
shows up right. After it's written, the file has junk at the end of
it.
How can I get the file to only produce what I want and nothing extra at
the end of it?
thanks
changing every characters ascii value depending on a key. I then save
it to a binary file.
When I generate the initial string, it shows up fine. When I encode
the string it shows up right. When I save the file it appends about 3
lines of random ascii characters (about the length of my original
string).
When I go back to decode the string, it works right for what it is
suppose to do, just those junk characters at the end of the file are
showing up as junk when I decode it. The application still works, it
just bothers me and looks strange.
I am using the following code to create the file:
////////
Dim ff As Integer = FreeFile()
FileOpen(ff, fileName, OpenMode.Binary, OpenAccess.ReadWrite)
FilePut(ff, encodedText)
FileClose(ff)
\\\\\\\\
Note: Before I write to the file, I msgbox the encodedText, and it
shows up right. After it's written, the file has junk at the end of
it.
How can I get the file to only produce what I want and nothing extra at
the end of it?
thanks