Visual Basic-Quellcode
- Sub Main(args() As String)
- Dim var As System.Net.NetworkInformation.Ping
- Dim ip As String = args(0), pfad As String = args(1), geraet As String = args(2)
- Dim txt As String = ""
- Dim reply As String = ""
- Dim time As String = ""
- If File.Exists(pfad) Then
- File.Delete(pfad)
- End If
- Using fs As New FileStream(pfad, FileMode.OpenOrCreate), sw As New StreamWriter(fs), ping As New Ping
- sw.Write(ip & " " & geraet & ";" & vbCrLf)
- Dim nw As New Network
- Do
- With ping.Send(ip)
- reply = .Status.ToString
- time = .RoundtripTime & "ms"
- End With
- txt = Now & ":" & Now.Millisecond & " " & time & " " & reply & ";" & vbCrLf
- sw.Write(txt)
- Console.Write(txt)
- sw.Flush()
- Loop
- sw.Close()
- Console.ReadKey()
- End Using
- End Sub
bitteschön, hoffe es hilft
In general (across programming languages), a pointer is a number that represents a physical location in memory. A nullpointer is (almost always) one that points to 0, and is widely recognized as "not pointing to anything". Since systems have different amounts of supported memory, it doesn't always take the same number of bytes to hold that number, so we call a "native size integer" one that can hold a pointer on any particular system. - Sam Harwell