iCAx开思网
标题:
通过VC编译的代码不能在ug中执行
[打印本页]
作者:
situzhi
时间:
2010-5-8 21:27
标题:
通过VC编译的代码不能在ug中执行
以下代码编译后,在ug中执行dll文件提示内存访问违例,请大家指点一二!
int i=0,f,t=0;
char canshu[100];
double data[8][3];
if((UF_CFI_ask_file_exist("F:\model.dxf",&t))!=0)
uc1601("不存在该文件!",1);
else
{
f=uc4504("F:\model.dxf",1,41);
do{
uc4514(f,canshu);
if(strcmp(canshu,"AcDbLine")==0)
{
uc4514(f,canshu);
if( strcmp(canshu," 10")==0 )
{uc4514(f,canshu);
data[i][0]=atof(canshu);}
if(strcmp(canshu," 20")==0)
{uc4514(f,canshu);
data[i][1]=atof(canshu);}
if(strcmp(canshu," 30")==0)
{uc4514(f,canshu);
data[i][2]=atof(canshu);}
i++;
if(strcmp(canshu," 11")==0)
{uc4514(f,canshu);
data[i][0]=atof(canshu);}
if(strcmp(canshu," 21")==0)
{uc4514(f,canshu);
data[i][1]=atof(canshu);}
if(strcmp(canshu," 31")==0)
{uc4514(f,canshu);
data[i][2]=atof(canshu);}
i++;
}
}while(strcmp(canshu,"EOF")!=0);
}
char info[100];
sprintf(info,"%f,%f,%f,%f,%f",data[0][0],data[0][1],data[0][2],data[1][0],data[1][1]);
uc1601(info,1);
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3