Код длл:
Код:
function ShowMyDLLForm(var OutParam1 : Integer; var OutParam2 : String) : Boolean;
begin
With TForm1.Create(Nil) Do
Begin
Edit1.Text := IntToStr(outParam1);
Edit2.Text := OutParam2;
Result := ShowModal = mrOK;
OutParam1 := StrToint(Edit1.Text);
OutParam2 := Edit2.Text;
Free;
End;
end;
код вызова (импорт пропущен):
Код:
var
I : Integer;
S : String;
begin
I := 5;
S := 'call from main';
if ShowMyDLLForm(I,S)
Then ShowMessage(Format('OK. New values is ''%d'' and ''%s''.',[I,S]))
Else ShowMessage('Cancel');
end;