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
    • Recent
    • Tags
    • Users
    • Login

    reading serial from text-dokument

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 300 Views
    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 Offline
      Helper
      last edited by

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

      On 07/02/2010 at 05:25, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:      Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hello again,
      I have a Problem to get my serilization run....I want to deliver the users a Serial which is inside a Text-document. I cant figure out how to read out that serial from my txt.-document.
      This is my code so far....what I am doing wrong?
      I hope you can help me. 
      Greetings, Holger

      var key_file = plugin_path->GetClone();
          key_file->AddLast("serial.txt");
          var key_txt=new(BaseFile);
        
        
      key_txt->Open(key_file, GE_READ);
        
      var key_num = key_txt->ReadString(0,GE_XBIT);
      var key = ievaluate(key_txt);
        
        
      println (key);
        
      
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

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

        On 09/02/2010 at 03:06, xxxxxxxx wrote:

        this is how i do it

          
        String GetFileContent(const Filename& fn)   
        {   
             AutoAlloc<BaseFile> bfile;   
             if (!bfile)   
             {   
                  //MessageDialog("Test: BaseFile");   
                  return "";   
             }   
             if (!bfile->Open(fn, GE_READ, FILE_IGNOREOPEN, GE_INTEL))   
             {   
                  //MessageDialog("Test: bfile->Open");   
                  return "No Registration found!";   
             }   
                
             String line = "";   
             VLONG fileLength = bfile->GetLength();   
             CHAR c[2];   
             c[1] = 0;   
             CHAR* pc = &c;[0];   
             for (LONG i = 0L; i != fileLength; ++i)   
             {   
                  bfile->ReadChar(pc);   
                  // Line read from the file   
                  line += String(pc);   
             }   
             bfile->Close();   
             return line;   
        }   
        

        hope it helps

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

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

          On 09/02/2010 at 03:15, xxxxxxxx wrote:

          Taahnk you ello....I got it run.

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