16,748
社区成员
发帖
与我相关
我的任务
分享
//下面的代码结构就是一个单元的整体结构了。
unit UnitName;
interface
//这儿是接口部分
implementation
//这儿是实现部分
//这儿,你加一个begin,编译器会给你优化掉的。 嘻~~.....
end.//这个end是单元的结束了
//下面代码是DLL工程的结构,在这儿,就不能省略了。。。。。
library Project2;
{ 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}
begin
end.