CreateObject Example for Visual Basic
'this sample will dynamically create a LEAD Dicom Kernel
'object and use it to unlock DICOM support
Dim factory As New LEADDicomFactory
Dim kernel As LEADDicomKernel
Dim szLic As String
szLic = "LEADTOOLS OCX Copyright (c) 1991-2005 LEAD Technologies, Inc."
Set kernel = factory.CreateObject("LEADDicomKernel.LEADDicomKernel", szLic)
kernel.EnableMethodErrors =False
kernel.UnlockSupport L_SUPPORT_DICOM, "MyUnlockKey"
If (kernel.IsSupportLocked(L_SUPPORT_DICOM)) Then
MsgBox "Unlock Failed!"
End If