FindModule Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub TestFindModule ( )
   Dim nRet As Short
   LEADDICOM1.EnableMethodErrors = False
   nRet = LEADDICOM1.FindModule(LTDICLib.DicomModuleConstants.DICOM_MODULE_NM_TOMO_ACQUISITION)
   If nRet <> 0 Then
      MessageBox.Show("Not Found")
   Else
      LEADDICOM1.GetInfoDS()
      LEADDICOM1.FindModuleIOD(LEADDICOM1.InfoClass, LTDICLib.DicomModuleConstants.DICOM_MODULE_NM_TOMO_ACQUISITION)
      MessageBox.Show("Found Module " & LEADDICOM1.CurrentIOD.Name)
   End If
   LEADDICOM1.EnableMethodErrors = True
End Sub