G
gw820522
Unregistered / Unconfirmed
GUEST, unregistred user!
我建了个dll,内容如下:
library mydll;
uses
SysUtils,
Classes,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
exports getForm index 1;
begin
end.
getForm 是 unit1中的一个function,返回一个Tform
但编译时系统提示:Undeclared identifier:'getForm'
请问哪里写错了?
那个unit1是这样的:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function getForm(app:Tapplication):Tform1;
stdcall;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
edit2.Text:=edit1.text;
end;
function TForm1.getForm(app: Tapplication): Tform1;
begin
result:=nil;
end;
end.
library mydll;
uses
SysUtils,
Classes,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
exports getForm index 1;
begin
end.
getForm 是 unit1中的一个function,返回一个Tform
但编译时系统提示:Undeclared identifier:'getForm'
请问哪里写错了?
那个unit1是这样的:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function getForm(app:Tapplication):Tform1;
stdcall;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
edit2.Text:=edit1.text;
end;
function TForm1.getForm(app: Tapplication): Tform1;
begin
result:=nil;
end;
end.