GetPresentationResult Example for VB.NET
'LEADDICOMNet1 is a predefined LEADDicomNet object
Private Sub TestGetPresentationResult ( )
Dim x As
Integer
Dim out
As String
Dim result
As Short
Dim nID
As Short
'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate(True)
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate(LEADDICOMNet1.hPDU)
'get current results for each Presentation Context
out = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
result = LEADDICOMNet1.GetPresentationResult(LEADDICOMNet1.hPDU, nID)
out = out & result
out = out & Chr(13)
Next
MessageBox.Show(out)
'change all results to 1
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
LEADDICOMNet1.SetPresentationResult(LEADDICOMNet1.hPDU, nID, 1)
Next
'redisplay
out = ""
For x = 0 To LEADDICOMNet1.GetPresentationCount(LEADDICOMNet1.hPDU) - 1
nID = LEADDICOMNet1.GetPresentationID(LEADDICOMNet1.hPDU, x)
out = out & LEADDICOMNet1.GetPresentationResult(LEADDICOMNet1.hPDU, nID)
out = out & Chr(13)
Next
MessageBox.Show(out)
LEADDICOMNet1.FreeAssociate(LEADDICOMNet1.hPDU)
End Sub