Enumerating Digital Signatures Example for Visual Basic
Sub EnumerateSignatures(objDS As LEADDicomDS)
' We will enumerate the Digital Signatures in the main Data Set
Dim lSignaturesCount As Long
objDS.SetCurrentElement 0
lSignaturesCount = objDS.GetSignaturesCount ()
If lSignaturesCount = 0 Then
MsgBox "No Digital Signatures in the main Data Set.", , "Sample"
Exit Sub
End If
Dim sMsg As String
If lSignaturesCount = 1 Then
sMsg = "There is 1 Digital Signature in the main Data Set. " & _
"Do you want to examine it?"
Else
sMsg = "There are " & lSignaturesCount & _
" Digital Signatures in the main Data Set. " & _
"Do you want to examine them?"
End If
If MsgBox(sMsg, vbYesNo, "Sample") <> vbYes Then
Exit Sub
End If
Dim I As Long
For I = 0 To lSignaturesCount - 1
objDS.MoveSignature I
' Refer to Examining a Digital Signature Example for Visual Basic
' for the procedure ExamineSignature
ExamineSignature objDS, objDS.CurrentElement.hElement
objDS.SetCurrentElement 0
Next
End Sub