IsMaxLengthEnabled Example for Delphi

var
   nLen: Integer;
begin
   //is max len enabled?
   if(LEADDICOMNet1.IsMaxLengthEnabled (LEADDICOMNet1.hPDU) = True)then
   begin
      //disable it
      //display old value
      nLen:= LEADDICOMNet1.GetMaxLength (LEADDICOMNet1.hPDU);
      ShowMessage(IntToStr(nLen));
      LEADDICOMNet1.SetMaxLength (LEADDICOMNet1.hPDU, False, nLen);
   end
   else
      //enable it
      LEADDICOMNet1.SetMaxLength (LEADDICOMNet1.hPDU, True, 8);
end;