Y
yudi177
Unregistered / Unconfirmed
GUEST, unregistred user!
以下东动态库原程序有什么问题,什么能编译,但调用是出现 什么什么地址错误
library Project1;
uses
Sharemem,
Unit1 in 'Unit1.pas' {Form1};
exports
GetPassword;
{$R *.res}
begin
end.
//////////////////////////////////////////////////////////////////////
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
procedure GetPassword(Var username:string;var password:string);export;
implementation
{$R *.dfm}
procedure GetPassword(Var username:string;var password:string);
begin
form1:=tform1.Create(Application);
try
if form1.showModal=IDOK then
begin
username:=form1.Edit1.Text;
password:=form1.Edit2.Text;
end
else application.terminate;
finally
form1.Free;
end;
end;
end.
//------------------------------------------------------------------------
library Project1;
uses
Sharemem,
Unit1 in 'Unit1.pas' {Form1};
exports
GetPassword;
{$R *.res}
begin
end.
//////////////////////////////////////////////////////////////////////
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
procedure GetPassword(Var username:string;var password:string);export;
implementation
{$R *.dfm}
procedure GetPassword(Var username:string;var password:string);
begin
form1:=tform1.Create(Application);
try
if form1.showModal=IDOK then
begin
username:=form1.Edit1.Text;
password:=form1.Edit2.Text;
end
else application.terminate;
finally
form1.Free;
end;
end;
end.
//------------------------------------------------------------------------