Delphi2007 写了个DLL,怎么在Delphi7调用错误
用delphi2007写了个DLL,
libray test;
uses
sharemem,
sysutils,
classes,
activex;
function getstr:string;
begin
result:='helll';
end;
exports
getstr;
begin
end;
这样也会有错误。有没有朋友做过。
[解决办法]
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.
no use string;
[解决办法]
知道还这么写,晕
[解决办法]
use Pchar replace String!