Class Name: |
HL7PlusDNSLookUp |
HL7+ Category: |
|
Description: |
General utility for quickly and easily detecting a network object and obtaining the TCP/IP Address |
*All example code is in Visual Basic.Net
'Where MyController is a HL7PlusController object Dim oDNS As HL7PlusDNSLookup oDNS = MyController.NewHL7PlusDNSLookup() If IsNothing(oDNS) Then 'An Error occurred, likely MyController.Isrunnable is False MessageBox.Show(MyController.LastError, "Error") Return End If With oDNS Dim sHost As String = "SomeComputerName" Dim sMsg As String = "" If .HostNameExists(sHost) Then sMsg = sHost & " EXISTS!" & Environment.NewLine & "IP Address Is: " & .IPAddressString MessageBox.Show(sMsg, "Success!") Else sMsg = sHost & " not found on the network." MessageBox.Show(sMsg, "Failed!") End If End With
|
|
|
This object class uses our standard HL7PlusException Class interface for error handling wherever possible.
See the HL7PlusException Implementation Reference
|