NetReceiveNGetResponse Example for Visual Basic
Private Sub LEADDICOMNet1_NetReceiveNGetResponseNetReceiveNGetResponseEvent(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Integer, ByVal hDS As Long)
Private Sub LEADDICOMNet1_NetReceiveNGetResponse(ByVal hNet As Long, ByVal nPresentationID As Integer, ByVal nMessageID As Integer, ByVal pszClass As String, ByVal pszInstance As String, ByVal nStatus As Long, ByVal hDS As Long)
Dim NewNode As Node
Dim lParent As Long
Dim nRet As Integer
Dim szName As String
Set NewNode = TreeView1.Nodes.Add(, , , "Command Set - " & "N-GET-RESPONSE")
NewNode.EnsureVisible
lParent = NewNode.Index
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Presentation ID: " & CStr(nPresentationID))
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Message ID: " & CStr(nMessageID))
nRet = LEADDICOM1.FindUID(pszClass)
If (nRet = 0) Then
szName = LEADDICOM1.CurrentUID.Name
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & szName & " - " & pszClass)
Else
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Class: " & pszClass)
End If
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Affected SOP Instance: " & pszInstance)
Set NewNode = TreeView1.Nodes.Add(lParent, tvwChild, , "Status: " & CStr(nStatus))
If (hDS <> 0) Then
nRet = LEADDICOM1.SaveExtDS(hDS, gszGetFile, 0)
Set NewNode = TreeView1.Nodes.Add(, , , "Data Set - " & gszGetFile)
NewNode.EnsureVisible
End If
End Sub