![]() |
【转帖】(access violation reading 0xcccccccc)在线等呢
(access violation reading 0xcccccccc)在线等呢
(access violation reading 0xcccccccc)在线等呢 (access violation reading 0xcccccccc) acad::errorstatus cmodifyent::changecolor(acdbobjectid entid, adesk::uint16 colorindex) { acdbentity *pentity; // 打开图形数据库中的对象 acdbopenobject(pentity, entid, acdb::kforwrite); // 修改实体的颜色 pentity->setcolorindex(colorindex); pentity->close(); return acad::eok; }这个是在cmodifyent定义的类,然后我在另一个类调用的时候出现这样的问题(在vc中编译是没有问题) 但是在cad里调用的时候就出现问题了,这个是调用函数 cmodifyent::changecolor(lineid, 1); --------------------------- g:\zuoye\createent\debug\createent.arx arx 命令中发生异常 --------------------------- 未处理的异常 c0000005 (access violation reading 0xcccccccc),地址: 3264e28h --------------------------- 确定 --------------------------- acad::errorstatus cmodifyent::changecolor(acdbobjectid entid, adesk::uint16 colorindex) { acdbentity *pentity=null; // 指针对象需要初始化 // 打开图形数据库中的对象 acad::errorstatus es=acdbopenobject(pentity, entid, acdb::kforwrite); // 修改实体的颜色 if(es==acad::eok && pentity!=null) // 确认entid有效且可以写方式打开 { pentity->setcolorindex(colorindex); pentity->close(); } return es; } |
所有的时间均为北京时间。 现在的时间是 07:52 PM. |