THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/03/2004 at 07:07, xxxxxxxx wrote:
Cinema 4D Version: 8.207
Platform: Windows ;
Language(s) : C++ ;
I open a text file with BaseFile and try to load a String with ReadString....this failes with with an "not enough working memory" exception..... Its just a normal text file, edited by hand with windows editor, tried ANSI coding and UTF-8 coding......
On 29/03/2004 at 07:35, xxxxxxxx wrote:
the ReadString/WriteString read and write the String object (like ReadVector). ReadString read NOT a ASCII line or a whole file!
You have to use ReadBytes in an buffer and convert it to String object.
On 29/03/2004 at 23:07, xxxxxxxx wrote:
Hm.....right, I tried to save some Strings with WriteString, the format is different. ReadBytes is a little awkward, now I use ReadChar, this one seems to read just one character...as I expected ReadString to read one terminated string. So I will have to write my own ReadString, reading characters in a loop until end of file or line feed.....shouldn't there be a function for that in sdk? The resource files are ordinary text files, and have to be read by cinema, so inside cinema there surely is a function like this, just the hook is missing....
Sometimes I really wish, that I could use mfc directly in sdk....for example I use the windows font engine within my plugin, was heavy work of building libs, defines, undefines and so to make it possible.....