T
thincoder
Unregistered / Unconfirmed
GUEST, unregistred user!
各位富翁好,学习制作dll文件,将例子中的代码重新敲入,编译时出现错误,分析之后也没有找出原因,请教各位高手。代码如下:library MyDll;{ 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, Dialogs, windows; function Triple(N:Integer):integer;stdcall; begin result:=N+3; end; function Double(N:Integer):integer;stdcall; begin result:=N+2; end; function Triple1(N:Integer):integer;stdcall; begin showmessage('计算N+3'); result:=N+3; end; function Double1(N:Integer):integer;stdcall; begin messagebox(0,'计算N+2','计算N+2',mb_OK); end; exports Triple name 'Tr', Double name 'Do', Triple1 name 'Trm', Double1 name'Dom'; Triple,Double,Triple1,Double1;{$R *.res}beginend.出现的错误提示是:[Error]Project1.dpr[41]elaration expected but identifier 'Triple'found我检查以后发现函数Triple也定义了,也没有写错啊,不知为何出现这样的错误,感谢高手帮助。谢谢。