![]() |
【转帖】odrxgetmodelergeometrycreatorservice90 problem
odrxgetmodelergeometrycreatorservice() problem
odrxgetmodelergeometrycreatorservice() problem i am using static dwgdirect (/md) in a dll with visual c++ 6.0. i am trying to use the odrxgetmodelergeometrycreatorservice() function as shown in acissavedialog.cpp in the odamfcapp project. here is my code: code: #include "rxdynamicmodule.h" #ifndef _toolkit_in_dll_ odrx_declare_static_module_entry_point(modelermodule); odrx_begin_static_module_map() odrx_define_static_application(dd_t("modelergeometry"), modelermodule) odrx_end_static_module_map() #endif toolkit_export odrxclassptr odrxgetmodelergeometrycreatorservice(); bool myfunction(const cstring stracisfilename) { odstaticrxobject<myservices> services; odinitialize(&services); services.disableoutput(true); { odstreambufptr pbuffer = services.createfile(odstring(stracisfilename)); odarray<odmodelergeometryptr> models; odrxclassptr pservice = odrxgetmodelergeometrycreatorservice(); if(!pservice.get()) { afxmessagebox(_t("unable to create modeler service")); return false; } odmodelergeometrycreatorptr pcreator = pservice->create(); if(!pcreator.get()) { afxmessagebox(_t("unable to create modeler")); return false; } if(pcreator->createmodeler(models, pbuffer) != eok) { afxmessagebox(_t("unable to read acis file")); return false; } ... (some more stuff).... } oduninitialize(); return true; } the problem is that the odrxgetmodelergeometrycreatorservice() function does not create a valid pservice and hence does not proceed further. as you can see i have put all the macros i thought necessary above the function. i must be missing something. i have linked to the following libs: dd_vc6md_br.lib dd_vc6md_alloc.lib dd_vc6md_gi.lib dd_vc6md_acisrenderer.lib dd_vc6md_acisbuilder.lib dd_vc6md_modelergeometry.lib dd_vc6md_db.lib dd_vc6md_ge.lib dd_vc6md_gs.lib dd_vc6md_root.lib dd_vc6md_spatialindex.lib any ideas why i cannot get a good pservice? deelip menezes ========== deelip # 10th october 2007, 03:55 am registered user join date: sep 2003 location: goa, india posts: 16 silly me! i forgot to call odrx_init_static_module_map(); in the function. deelip menezes ========== deelip none ? | ? thread tools display modes linear mode search this thread rate this thread excellent good average bad terrible posting rules you may post new threads you may post replies you may post attachments you may edit your posts is on are on code is off html code is off forum jump user control panel private messages subscriptions who's online search forums forums home general topics news questions and remarks business issues industry commentary general software issues documentation issues future directions dwg libraries dwgdirect.net dwgdirect, c++ version dwgdirectx, activex version adtdirect/c3ddirect opendwg toolkit/viewkit dgn libraries dgndirect, c++ version (2.x+) dgndirect libraries (legacy 0.99xx) all times are gmt -7. the time now is 09:33 pmfff">. - - - copyright ?2000 - 2009, jelsoft enterprises ltd. copyright 1998-2008 open design alliance inc. silly me! i forgot to call odrx_init_static_module_map(); in the function. deelip menezes ========== |
所有的时间均为北京时间。 现在的时间是 06:41 PM. |