ConformanceStatus example for Visual Basic
Private Sub LEADDICOM1_ConformanceStatus (ByVal nFlags As Integer)
Dim msg As String
Dim nRet As Integer
Dim szTag As String
Dim szTagL As String
Dim szTagR As String
Dim nLen As Integer
Dim x As Integer
'display info about non-standard element
Select Case nFlags
Case CALLBACK_ERROR_UNKNOWN_CLASS
msg = "Unknown Class" & Chr(13)
Case CALLBACK_ERROR_UNKNOWN_TAG
msg = "Unknown Tag" & Chr(13)
Case CALLBACK_ERROR_UNKNOWN_VR
msg = "Unknown VR" & Chr(13)
Case CALLBACK_ERROR_WRONG_VR
msg = "Error in VR" & Chr(13)
Case CALLBACK_ERROR_MIN_VM
msg = "Error in MinVM" & Chr(13)
Case CALLBACK_ERROR_MAX_VM
msg = "Error in MaxVM" & Chr(13)
Case CALLBACK_ERROR_DIVIDE_VM
msg = "Error in DivideVM" & Chr(13)
Case CALLBACK_ERROR_IMAGE
msg = "Error in Image" & Chr(13)
Case Else
Exit Sub
End Select
szTag = Hex$(LEADDICOM1.CurrentElement.Tag)
nLen = Len(szTag)
szTagR = Right$(szTag, 4)
szTagL = ""
For x = nLen To 7
szTagL = szTagL & CStr(0)
Next
szTagL = szTagL & Left$(szTag, nLen - 4)
szTag = szTagL & ":" & szTagR
msg = msg & "Tag: " & szTag
nRet = MsgBox(msg, vbOKCancel, "Non-Standard Element")
If (nRet = vbCancel) Then
LEADDICOM1.EnableConformanceStatus = False
End If
End Sub