NetReceiveNGetResponse Example for VB.NET
'LEADDICOMNet1 is a predefined LEADDicomNet object
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "TreeView1" of type
"TreeView" from ".NET Framework".
'This example uses the predefined variable "gszGetFile" of type
"String"
Private Sub LEADDICOMNet1_NetReceiveNGetResponse(ByVal
hNet As Integer, ByVal nPresentationID As Short, ByVal nMessageID As Short,
ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As
Integer, ByVal hDS As Integer) Handles LEADDICOMNet1.NetReceiveNGetResponse
Dim NewNode
As System.Windows.Forms.TreeNode
Dim nRet
As Short
Dim szName
As String
NewNode = New System.Windows.Forms.TreeNode("Command Set - " & "N-GET-RESPONSE")
TreeView1.Nodes.Add(NewNode)
NewNode.EnsureVisible()
NewNode.Nodes.Add("Presentation
ID: " & CStr(nPresentationID))
NewNode.Nodes.Add("Message
ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet
= 0) Then
szName
= LEADDICOM1.CurrentUID.Name
NewNode.Nodes.Add("Affected
SOP Class: " & szName & " - " & pszClass)
Else
NewNode.Nodes.Add("Affected
SOP Class: " & pszClass)
End If
NewNode.Nodes.Add("Affected
SOP Instance: " & pszInstance)
NewNode.Nodes.Add("Status:
" & CStr(nStatus))
If
(hDS <> 0) Then
'gszGetFile
represent the file path to store the dataset.
nRet
= LEADDICOM1.SaveExtDS(hDS, gszGetFile, 0)
TreeView1.Nodes.Add("Data
Set - " & gszGetFile)
NewNode.EnsureVisible()
End If
End Sub