几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】bmpou (http://www.dimcax.com/hust/showthread.php?t=15258)

yang686526 2009-05-04 04:55 PM

【转帖】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.


所有的时间均为北京时间。 现在的时间是 09:53 PM.