reading serial from text-dokument



  • 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);
      
    
    


  • 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



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


Log in to reply