请问这个如何做啊。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。各位大侠看看。。。。。
DLL 中:
function PutIndata(s1, s2: Integer ): Boolean; stdcall;
begin
Result := False;
with dm.tbl_test do
begin
try
Open;
Append;
FieldByName('m1').Value := s1;
FieldByName('m2').Value := s2;
post;
Close;
Result := True;
except
Result := False;
end;
end;
end;
调用:
function PutIndata(s1, s2: Integer ): Boolean; stdcall; external '11.dll';
procedure TForm1.Button1Click(Sender: TObject);
begin
if PutIndata(1, 1) then ShowMessage('ok')
else ShowMessage('no');
end;