vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Schützen Sie Ihre Software vor Software-Piraterie - mit sevLock 1.0 DLL!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Ein- und Umsteiger
Code 1 
Autor: Drapondur
Datum: 26.05.06 15:56

Hallo,

jetzt doch der Code hierher statt Download (angepasst aus nem VB6-Code von hier: http://support.microsoft.com/?scid=kb%3Ben-us%3B300197&x=7&y=12)
weils schnell gehen muss

Option Strict Off
Imports System.Runtime.InteropServices
 
Namespace Icmp
    Public Class Ping
 
#Region "api"
        'Icmp constants converted from
        'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisd
        ' k/wmi/win32_pingstatus.asp
 
        Private Const ICMP_SUCCESS As Integer = 0
        Private Const ICMP_STATUS_BUFFER_TO_SMALL As Short = 11001 'Buffer Too 
        ' Small
        Private Const ICMP_STATUS_DESTINATION_NET_UNREACH As Short = 11002 _
          'Destination Net Unreachable
        Private Const ICMP_STATUS_DESTINATION_HOST_UNREACH As Short = 11003 _
        'Destination Host Unreachable
        Private Const ICMP_STATUS_DESTINATION_PROTOCOL_UNREACH As Short = 11004 _
        'Destination Protocol Unreachable
        Private Const ICMP_STATUS_DESTINATION_PORT_UNREACH As Short = 11005 _
        'Destination Port Unreachable
        Private Const ICMP_STATUS_NO_RESOURCE As Short = 11006 'No Resources
        Private Const ICMP_STATUS_BAD_OPTION As Short = 11007 'Bad Option
        Private Const ICMP_STATUS_HARDWARE_ERROR As Short = 11008 'Hardware 
        ' Error
        Private Const ICMP_STATUS_LARGE_PACKET As Short = 11009 'Packet Too Big
        Private Const ICMP_STATUS_REQUEST_TIMED_OUT As Short = 11010 'Request 
        ' Timed Out
        Private Const ICMP_STATUS_BAD_REQUEST As Short = 11011 'Bad Request
        Private Const ICMP_STATUS_BAD_ROUTE As Short = 11012 'Bad Route
        Private Const ICMP_STATUS_TTL_EXPIRED_TRANSIT As Short = 11013 _
          'TimeToLive Expired Transit
        Private Const ICMP_STATUS_TTL_EXPIRED_REASSEMBLY As Short = 11014 _
        'TimeToLive Expired Reassembly
        Private Const ICMP_STATUS_PARAMETER As Short = 11015 'Parameter Problem
        Private Const ICMP_STATUS_SOURCE_QUENCH As Short = 11016 'Source Quench
        Private Const ICMP_STATUS_OPTION_TOO_BIG As Short = 11017 'Option Too 
        ' Big
        Private Const ICMP_STATUS_BAD_DESTINATION As Short = 11018 'Bad 
        ' Destination
        Private Const ICMP_STATUS_NEGOTIATING_IPSEC As Short = 11032 _
          'Negotiating IPSEC
        Private Const ICMP_STATUS_GENERAL_FAILURE As Short = 11050 'General 
        ' Failure
 
        Private Const WINSOCK_ERROR As String = "Windows Sockets not responding" & _
          "correctly."
        Private Const INADDR_NONE As Integer = &HFFFFFFFF
        Private Const WSA_SUCCESS As Short = 0
        Private Const WS_VERSION_REQD As Integer = &H101S
 
        'Clean up sockets.
        'http://support.microsoft.com/default.aspx?scid=kb;EN-US;q154512
 
        Private Declare Function WSACleanup Lib "WSOCK32.DLL" () As Integer
 
        'Open the socket connection.
        'http://support.microsoft.com/default.aspx?scid=kb;EN-US;q154512
        Private Declare Function WSAStartup Lib "WSOCK32.DLL" (ByVal _
          wVersionRequired As Integer, ByRef lpWSADATA As WSADATA) As Integer
 
        'Create a handle on which Internet Control Message Protocol (ICMP) 
        ' requests can be issued.
        'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesd
        ' kr/htm/_wcesdk_icmpcreatefile.asp
        Private Declare Function IcmpCreateFile Lib "icmp.dll" () As Integer
 
 
        'Close an Internet Control Message Protocol (ICMP) handle that 
        ' IcmpCreateFile opens.
        'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesd
        ' kr/htm/_wcesdk_icmpclosehandle.asp
 
        Private Declare Function IcmpCloseHandle Lib "icmp.dll" (ByVal _
          IcmpHandle As Integer) As Integer
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Server Online?1.546.NET Anfänger23.05.06 20:55
Re: Server Online?1.140Maywood24.05.06 12:26
Re: Server Online?1.029Florian Bayer24.05.06 14:56
Re: Server Online?1.138Maywood26.05.06 12:49
Re: Server Online?1.297Drapondur26.05.06 14:14
Code 11.206Drapondur26.05.06 15:56
Code 21.157Drapondur26.05.06 15:58
Code 31.076Drapondur26.05.06 15:58
Re: Code 31.031Maywood28.05.06 13:57
Re: Code 3983Drapondur28.05.06 19:27
Re: Code 31.114Maywood28.05.06 20:07
Re: Code 31.157Drapondur28.05.06 21:04
Code Download1.069Drapondur28.05.06 22:49
Re: Code 31.020Maywood29.05.06 13:06
Re: Code 31.019Drapondur29.05.06 15:09
Re: Code 31.018Maywood30.05.06 21:27

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel