SendNDeleteRequest Example for Delphi
var
strClassUID: String;
strInstanceUID: String;
nID: Integer;
hPDU: LongInt;
nRet: Integer;
begin
hPDU:= LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet);
strClassUID:= InputBox('Enter SOP Class to Delete:', 'Delete', UID_SC_IMAGE_STORAGE);
strInstanceUID:= InputBox('Enter SOP Instance to Delete:', 'Delete', '1.2.840.113619.2.30.1.1762288927.1489.906240296.255');
//send a Delete Request Command to the server
nID:= LEADDICOMNet1.FindPresentationAbstract (hPDU, strClassUID);
if(nID = 0)then
begin
nRet:= LEADDicomDS1.FindUID (strClassUID);
if(nRet = 0)then
ShowMessage('Abstract Syntax, ' + LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name + ', Not Supported by Association!')
else
ShowMessage('Abstract Syntax, ' + strClassUID + ', Not Supported by Association!');
Exit;
end;
LEADDICOMNet1.SendNDeleteRequest(LEADDICOMNet1.hNet, nID, 999, strClassUID, strInstanceUID);
end;