一,新建
new->other->dll wizard
二,
library new;
uses
SysUtils,
Classes,
Dialogs;
{$R *.res}
procedure dll;
begin
showmessage('delphi');
end;
exports
dll;
begin
end.
三,保存,
四,project->build project
五,引用 :procedure dll; external 'new.dll';
{*********************************************
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure dll; external 'new.dll';
procedure TForm1.Button1Click(Sender: TObject);
begin
dll
end;
end.
**********************************************}