Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    BaseFile.ReadString failes

    SDK Help
    0
    3
    387
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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:

      User Information:
      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......

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 29/03/2004 at 07:35, xxxxxxxx wrote:

        Hi,

        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.

        aws

        TZ

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          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.....

          1 Reply Last reply Reply Quote 0
          • First post
            Last post