D
dirk
Unregistered / Unconfirmed
GUEST, unregistred user!
还有,only you,照这里的说法,record、class中使用了string类型,都必须用到
sharemem单元才行,但是,大多数(也许是所有的)VCL中大概都用到string类型的变量,
那么就是说,凡是在dll中要用VCL组件(用到string变量的那些),就必须用sharemem,
那么,在程序发布时,就同时要把BORLNDMM.DLL也带上,发布吗?
这个好像比较麻烦,能向下面说的,用pchar代替string,但是用到string的record和
class怎么办?
{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
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
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }
sharemem单元才行,但是,大多数(也许是所有的)VCL中大概都用到string类型的变量,
那么就是说,凡是在dll中要用VCL组件(用到string变量的那些),就必须用sharemem,
那么,在程序发布时,就同时要把BORLNDMM.DLL也带上,发布吗?
这个好像比较麻烦,能向下面说的,用pchar代替string,但是用到string的record和
class怎么办?
{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
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
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }