CnPack Forum


 
Subject: 把组件包的rs232封装到dll中,调用完成返回后的函数出错
peterml
新警察
Rank: 1



UID 40609
Digest Posts 0
Credits 32
Posts 9
点点分 32
Reading Access 10
Registered 2008-6-29
Status Offline
Post at 2009-6-15 13:57  Profile | Blog | P.M. 
把组件包的rs232封装到dll中,调用完成返回后的函数出错

如题,动态库用delphi2007封装,主程序也是delphi2007,调用函数调用完StartComm函数,返回就出错。跟踪进去看不出有什么逻辑错误。
请教:在动态库里生成TRS232组件,如TRS232.Create(Nil) 行不行?,必须从主程序传递application过来吗(没试过,不知行不行)。动态库里组件都是对象自己create生成的,没有用form放入可视控件的方式。
我的目的是把访问串口的控件封装到dll里给别人用,别人就不需要知道串口用什么控件也不用安装组件包了。请高手指教。可通过邮箱联系:email: peterml@sohu.com
Top
solokey
新警察
Rank: 1



UID 30253
Digest Posts 0
Credits 28
Posts 12
点点分 28
Reading Access 10
Registered 2007-11-2
Status Offline
Post at 2009-7-17 13:05  Profile | Blog | P.M. 
线程事件返回的时候或许要使用主线程同步(没看过源码,猜测).
Top
 




All times are GMT++8, the time now is 2024-4-24 07:11

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.007459 second(s), 8 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP