GetPresentationResult Example for Visual Basic
Dim x As Long
Dim out$
Dim result As Integer
Dim nID As Integer
'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
MsgBox 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
MsgBox out$
LEADDICOMNet1.FreeAssociate LEADDICOMNet1.hPDU