char fullfileName[100]; strcpy(fullfileName,"hzb.dwg"); AcDbDatabase* pCurDb; pCurDb=acdbCurDwg(); Acad::ErrorStatus es; AcDbDatabase* pDb = new AcDbDatabase(Adesk::kFalse); es=pDb->readDwgFile(fullfileName); if(es!=Acad::eOk) { ads_printf("\n The %c file was not found. ",fullfileName); delete pDb; return es; } es=pCurDb->insert(AcGeMatrix3d::kIdentity,pDb); if( es!= Acad::eOk) { delete pCurDb; return es; } delete pDb; return es; 为什么执行到 delete pDb就报错提示“致命错误:heap error”,其它部分执行正常,这段代码从网上摘抄的,不只哪位大侠知道原因,在下不胜感激,我用的是AutoCAD R14. |