unit testocx;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, ETESNMMSLib_TLB;type
TForm1 = class(TForm)
ConnectModem: TButton;
InitModel: TButton;
SendSMS: TButton;
Exit: TButton;
DisConnectModem: TButton;
SendMMS: TButton;
EtesnMMS1: TEtesnMMS;
procedure InitModelClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.InitModelClick(Sender: TObject);
var nRes:integer;
begin
nRes:=etesnmms1.InitModel('C:\RecvMMS',7,1,101,1);
if(nRes>0)
then begin
showMessage('初始化控件成功,已找到加密狗!');
if(nRes=0)
then begin
ShowMessage('初始化失败,未找到加密狗');
if(nRes=-4)
then begin ShowMessage('初始化失败,不支持的加密狗类型');
end;
end;
end;end;错误提示:
[Error] testocx.pas(67): Declaration expected but end of file found
[Fatal Error] ocx.dpr(5): Could not compile used unit 'testocx.pas'小弟初学delphi,不懂,谢谢您的回复。谢谢。
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, ETESNMMSLib_TLB;type
TForm1 = class(TForm)
ConnectModem: TButton;
InitModel: TButton;
SendSMS: TButton;
Exit: TButton;
DisConnectModem: TButton;
SendMMS: TButton;
EtesnMMS1: TEtesnMMS;
procedure InitModelClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.InitModelClick(Sender: TObject);
var nRes:integer;
begin
nRes:=etesnmms1.InitModel('C:\RecvMMS',7,1,101,1);
if(nRes>0)
then begin
showMessage('初始化控件成功,已找到加密狗!');
if(nRes=0)
then begin
ShowMessage('初始化失败,未找到加密狗');
if(nRes=-4)
then begin ShowMessage('初始化失败,不支持的加密狗类型');
end;
end;
end;end;错误提示:
[Error] testocx.pas(67): Declaration expected but end of file found
[Fatal Error] ocx.dpr(5): Could not compile used unit 'testocx.pas'小弟初学delphi,不懂,谢谢您的回复。谢谢。
可这个控件在vc里都是正常的呀。