GetExtendedData Example for Visual Basic
Dim x As Long
Dim n As Long
Dim szOut As String
Dim ExtData
Dim Data
Dim ttt(0 To 4) As Byte
'create the Associate Class as Request
LEADDICOMNet1.CreateAssociate True
'set the Associate to the default
LEADDICOMNet1.DefaultAssociate LEADDICOMNet1.hPDU
'add some extended data for the first presentation context
ttt(0) = 0
ttt(1) = 1
ttt(2) = 1
ttt(3) = 0
ttt(4) = 1
ExtData = ttt
LEADDICOMNet1.SetExtendedData LEADDICOMNet1.hPDU, 1, ExtData, 5
'now, display the information
n = LEADDICOMNet1.GetExtendedDataLength (LEADDICOMNet1.hPDU, 1)
szOut = "Extended Data" & Chr(13)
Data = LEADDICOMNet1.GetExtendedData(LEADDICOMNet1.hPDU, 1)
For x = 0 To n - 1
szOut = szOut & CStr(x) & " = "
szOut = szOut & CStr(Data(x)) & Chr(13)
Next
MsgBox szOut