永发信息网

如何把String类型参数传递给DLL?

答案:3  悬赏:0  手机版
解决时间 2021-01-28 04:18
  • 提问者网友:欺烟
  • 2021-01-27 14:35
如何把String类型参数传递给DLL?
最佳答案
  • 五星知识达人网友:刀戟声无边
  • 2021-01-27 15:47
delphi不是说的很清跋扈吗?你没看啊?Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select with your DLL. To avoid using BORLNDMM.DLL, pass string information using PChar or ShortString parameters. Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function results. This applies to all strings passed to and from your DLL--even those that are nested in records and classes. ShareMem is the interface unit to the BORLNDMM.DLL shared memory manager, which must be deployed along
全部回答
  • 1楼网友:玩家
  • 2021-01-27 18:06
pchar('asdfsdf');来转换吧我在应用过程发明,它是必须完全 配的,不知对否,总之我应用时,用这种办法解决过
  • 2楼网友:纵马山川剑自提
  • 2021-01-27 16:54
如不雅exe和dll都是delphi编的,你可以用var v: string传递数据。如不雅不是,则必定要用pchar,因为string是delphi专有的,c/c++不辨认,会出乱子的。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯