NetConnect Example for Delphi
procedure TForm1.LEADDicomNet1NetConnect (ASender: TObject; hNet,
nStatus: Integer);
var
strOut: String;
strTemp: String;
strPeerAddress: String;
nPort: Integer;
begin
strOut:= '*** NetConnect Event *** ' + Chr(13) + IntToStr(hNet) + ' Status = ' + IntToStr(nStatus);
strPeerAddress:= LEADDICOMNet1.GetPeerAddress (hNet);
nPort:= LEADDICOMNet1.GetPeerPort(hNet);
strTemp:= 'PeerAddress = ' + strPeerAddress + Chr(13) + 'Port = ' + IntToStr(nPort);
strOut:= strOut + Chr(13) + strTemp;
ShowMessage(strOut);
end;