SendCEchoResponse Example for Delphi
procedure TForm1.LEADDicomNet1NetReceiveCEchoRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint;
const pszClass: WideString);
var
nRet: Integer;
NewNode: TTreeNode;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'C-ECHO-REQUEST');
NewNode.MakeVisible();
TreeView1.Items.AddChild(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.AddChild(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.AddChild(Newnode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.AddChild(Newnode, 'Affected SOP Class: ' + pszClass);
//use high-level method to send a response
LEADDICOMNet1.SendCEchoResponse(hNet, nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS);
end;