我那里错了(关于DLL的问题)?
以下代码:
library Project1;{ 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. }uses
SysUtils,
Classes;{$R *.res}
Function INaa(Integer1:Integer):Integer;stdcall;
begin
Result:=Integer1+1; //我自己定义的函数
end;
//异出表
exports
INaa INDEX 0;
begin
end. 以下是错误信息:
[Warning] Project1.dpr(24): Symbol 'INDEX' is specific to a platform
===================================================
如果用(name)来标识,在(EXE)中告诉我找不到入口点?
为什么?
以下代码:
library Project1;{ 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. }uses
SysUtils,
Classes;{$R *.res}
Function INaa(Integer1:Integer):Integer;stdcall;
begin
Result:=Integer1+1; //我自己定义的函数
end;
//异出表
exports
INaa INDEX 0;
begin
end. 以下是错误信息:
[Warning] Project1.dpr(24): Symbol 'INDEX' is specific to a platform
===================================================
如果用(name)来标识,在(EXE)中告诉我找不到入口点?
为什么?
exports
INaa;
begin
INaa INDEX 0 Name 'MyINaa';
INaa;
begin
exports
INaa;
如果一定要的话exports
INaa index 0 name 'MyINaa';在Exe中调用的时候这样写
Function INaa(Integer1:Integer):Integer;stdcall;external 'Project1.dll' name 'MyInaa' ;