查看单个帖子
旧 2009-05-04, 04:55 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】bmpou

bmpout
bmpout
hello,
i can successfully convert drawings to bmps using the sample code in cmd_bmpout.cpp.
my problem is not being able to close the active document properly after conversion. i need to do this since i am doing batch processing.
my application is crashing in odarray<int, odmemoryallocator:length();
in the early versions of directdirect, there was sample code for onclosedocument but this has been eliminated in the newer versions.
i have been successful in batch printing by using the mfc cdoctemplate::closealldocuments function but this fails in bmp conversions.
thanks...
afaik there is nothing special about closing the document. there should be no open smartpointres left outside - that's the only thing to keep an eye on.
vladimir
thanks vladimir. i will look at the smart pointers. right now, it appears that pointers to pgs and pdevice have something to do with this problem if i release them.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)