Crash application Under VISTA
-
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;
}