![]() |
【转帖】odvectorizeex adapted not working
odvectorizeex adapted not working
odvectorizeex adapted not working hi, i am trying to adapt odvectorizeex to work with a host application using oda dlls, and i always get a crash. the offending code is as simple as: #include "mycommand.h" #include "exgssimpledevice.h" // the function called when my defined command is executed void mycmd(odedcommandcontext* pcmdctx) { oddbcommandcontextptr pdbcmdctx(pcmdctx); oddbdatabaseptr pdb = pdbcmdctx->database(); odgicontextfordbdatabaseptr pdwgcontext = odgicontextfordbdatabase::createobject(); pdwgcontext->setdatabase(pdb); odgsdeviceptr pdevice = exgssimpledevice::createobject(exgssimpledevice::k 3ddevice); // here it crashs my host application // ---- odgsdeviceptr pdevice = oddbgsmanager::setupactivelayoutviews(pdevice, pdwgcontext); // ---- odgsdcrect screenrect(odgsdcpoint(0, 0), odgsdcpoint(1000, 1000)); pdevice->onsize(screenrect); pdevice->update(); pdevice->release(); pdb->release(); } ------------------ i checked if pdevice is not valid or null, and so did with pdwgcontext. the two seems to be ok... have to say that exsimpledevide was modified in a manner it does nothing. they are the original files where parts where strings to console are written are deleted. please any help? maybe it is not possible to use it using oda dlls? just static links? maybe i have to separate exsimpledevice from the main code so it is loaded as a module? thanks in advance, israel is it possible that application uses oda dlls and modified odvectorizeex is statically linked with dwgdirect? where must be only once instance of dwgdirect in process. hi, thanks for the quick response. i have defined _toolkit_in_dll_ in my odvectorizeex modified project, so i don't think so. however, i think i have found the problem (i need some testing, but let's hope it is all ok)... i forgot to include odgsinitialize() at the very beginning :-( now it does not crash :-) regards, israel |
所有的时间均为北京时间。 现在的时间是 08:45 AM. |