I actualy was trying to say this.Actually I use a TFileStream. By using a TStream in then SaveTo/LoadFromStream methods I can use whatever TStream descendant I want without any problems.
Well I'm a hobbiest and don't exactly know the best ways (I learned from books and by simply trying things).
Writing a string as a pchar pointer:
[pascal]Stream.Write(pchar(s)^, len);[/pascal]
Writing on a perchar basis:
[pascal]Stream.Write(s[1], SizeOf(s[1]) * len);[/pascal]
I learned the writing strings and streams while messing with custom made solid archives (my own format). It took a while to come to the best method, yet I don't know if it's really the "best".
Bookmarks