几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】oles problem1 (http://www.dimcax.com/hust/showthread.php?t=17795)

yang686526 2009-05-06 09:21 PM

【转帖】oles problem1
 
ole's problem!
ole's problem!
hi, i use the following code to get ole object's data:
//to get data
......
oddbole2frameptr ptrdbole2frame = poddbent;
hglobal hmem = globalalloc(gmem_moveable|gmem_nodiscard,0);
oduint32 odlen = ptrdbole2frame->getcompounddocumentdatasize();
odflatmemstreamptr ptrmemstr = odflatmemstream::createnew(globallock(hmem),odlen) ;
ptrdbole2frame->getcompounddocument(*ptrmemstr);
.......
//
but, when running to "ptrdbole2frame->getcompounddocument(*ptrmemstr);", it throws an exception. why?
btw, i use the following code to get odoleitemhandler:
//
odoleitemhandler *pitemhanlder;
pitemhanlder = ptrdbole2frame->getitemhandler();
//
but it didn't work. it always has a assertion. why?
is there a example about to get ole object's data?
last edited by pqcyy; 16th june 2005 at 06:25 pmfff">.


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