如题~

解决方案 »

  1.   

    这个问题我也碰到过,不过很容易解决,按以下的方法就可以了!!  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. 
      

  2.   

    最重要是以下两点,都是解决上述问题的方法:
    (1)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.
    (2)To avoid using BORLNDMM.DLL, pass string information using PChar or ShortString parameters.
      

  3.   

    1楼说滴对啊,当DLL中传递字符串参数时就要将ShareMem单元添加到每个调用DLL的单元的uses中。
      

  4.   

    楼主传的是String吧
    用pchar