unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function IFInitInterface(cp,dp:Cardinal;driverparam
Char):Bool;stdcall;External'smeidll.dll';
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var iret :integer;
begin
iRet:=IFInitInterface(5,1,pchar('192.168.0.2 5016 5000'));
if(iRet!=0)
MessageBox("初始化套接字成功!",MB_OK,0);
else
MessageBox("初始化套接字失?!",MB_OK,0);
end;
end.
為甚麼總是在iRet:=IFInitInterface(5,1,pchar('192.168.0.2 5016 5000'));出錯
[Error] Unit1.pas[33]:Incompatible: "Integer' and 'LongBoot"
[Error] Unit1.pass[34]:IIIegal character in input file:'!'($21)