ISCLChallengeResponseSuccess Example for Delphi

procedure TForm1.LEADDicomNet1NetExternalAuthenticateISCL(ASender: TObject;
  hNet: Integer; var nChallenge, nResponse, nParameter: OleVariant);
begin
   nResponse:= nChallenge + nParameter;
   LEADDicomNet1.ISCLChallengeResponseSuccess:= True;
end;

Function TForm1.GetRandom(): Int64;
var
   RandVal: Int64;
begin
   RandVal:= Random(1) * $10000;
   RandVal:= RandVal * $10000 + Random(1) * $10000;
   RandVal:= RandVal * $10000 + Random(1) * $10000;
   RandVal:= RandVal * $10000 + Random(1) * $10000;

   Result:= RandVal;
end;

procedure TForm1.LEADDicomNet1NetGetChallengeISCL(ASender: TObject;
  hNet: Integer; var nChallenge, nParameter: OleVariant);
begin
   nChallenge:= GetRandom() + nParameter;
   LEADDICOMNet1.ISCLChallengeResponseSuccess:= True;
end;

procedure TForm1.LEADDicomNet1NetInternalAuthenticateISCL(ASender: TObject;
  hNet: Integer; var nChallenge, nResponse, nParameter: OleVariant);
begin
   nResponse:= nChallenge + nParameter;
   LEADDICOMNet1.ISCLChallengeResponseSuccess:= True;
end;