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

    Crash application Under VISTA

    Scheduled Pinned Locked Moved SDK Help
    1 Posts 0 Posters 125 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 01/04/2008 at 23:12, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R10 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      one project source code of plugins builde to .cdl64  that working fine under xp and other  except vista when I to do something. anyone can give me some advice?  whether where need to setting in vs2005 environment?
       
      arise  c4d application crash when do something, code is here:
       
      std::string SaveCurFile()
      {
       Filename file;
       char szTitle[] = {"Save this file to upload"};
       String DlgTitle(szTitle);
       file.FileSelect(FSTYPE_ANYTHING, GE_SAVE, &DlgTitle);
       
       String savefilename = file.GetString();
       if ( savefilename.GetLength() == 0)
       {
        return "";
       }

      LONG index;
       char szDC4d[] = {".c4d"};
       char szC4d[] = {"c4d"};
       char szDot[] = {"."};
       if(savefilename.FindLast(String(szDot),&index))
       {
        if(savefilename.ComparePart(String(szDC4d),savefilename.GetLength()-(index),index) != 0)
        {
         savefilename = savefilename+String(szDC4d);
         file.SetString(savefilename);
        }
        if(index == savefilename.GetLength()-1)
        {
         savefilename = savefilename+String(szC4d);
         file.SetString(savefilename);
        }
       }
       else
       {
        savefilename = savefilename+String(szDC4d);
        file.SetString(savefilename);
       }

      SaveDocument(GetActiveDocument(),file,TRUE, FORMAT_C4DEXPORT);
       String filename(file.GetString());
         
        LONG len = filename.GetCStringLen(St8bit)+1;
       char *pwstr = new CHAR[len];
       memset( pwstr, 0, sizeof(CHAR)*(len));
       filename.GetCString(pwstr,len, St8bit);
       std::string pathname;
       pathname = pwstr;
       delete[] pwstr;
       
       return pathname;
       
       
      }

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