H
hunzean
Unregistered / Unconfirmed
GUEST, unregistred user!
我调用DLL的源码如下:
unit UntMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ActiveX;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
function GetRecordCount:integer;cdecl
external
'testdll.dll';//这句出错
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Text := inttostr(GetRecordCount);
end;
end.
编译时无法通过。
[Error] Field definition not allowed after methods or properties
请问各位是什么问题?
unit UntMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ActiveX;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
function GetRecordCount:integer;cdecl
external
'testdll.dll';//这句出错
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Text := inttostr(GetRecordCount);
end;
end.
编译时无法通过。
[Error] Field definition not allowed after methods or properties
请问各位是什么问题?