GetPresentationAbstract Example for Delphi

var
   x: Integer;
   strout: String;
   strResult: String;
   nID: Integer;
begin
   //create the Associate Class as Request
   LEADDICOMNet1.CreateAssociate (True);
   //set the Associate to the default
   LEADDICOMNet1.DefaultAssociate (LEADDICOMNet1.hPDU);

   //get abstracts for each Presentation Context
   strOut:= '';
   for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
   begin
      nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
      strResult:= LEADDICOMNet1.GetPresentationAbstract (LEADDICOMNet1.hPDU, nID);
      strOut:= strOut + strResult;
      strOut:= strOut + Chr(13);
   end;
   ShowMessage(strOut);

   //change the abstracts
   for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
   begin
      nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
      LEADDICOMNet1.SetPresentationAbstract (LEADDICOMNet1.hPDU, nID, UID_CR_IMAGE_STORAGE);
   end;

   //redisplay
   strOut:= '';
   for x:= 0 to LEADDICOMNet1.GetPresentationCount (LEADDICOMNet1.hPDU) - 1 do
   begin
      nID:= LEADDICOMNet1.GetPresentationID (LEADDICOMNet1.hPDU, x);
      strOut:= strOut + LEADDICOMNet1.GetPresentationAbstract (LEADDICOMNet1.hPDU, nID);
      strOut:= strOut + Chr(13);
   end;
   ShowMessage(strOut);

   LEADDICOMNet1.FreeAssociate (LEADDICOMNet1.hPDU);
end;