Detecter un Lan et non une connection internet

pepe013 Messages postés 42 Date d'inscription jeudi 21 novembre 2002 Statut Membre Dernière intervention 2 juin 2006 - 7 févr. 2003 à 09:34
BasicInstinct Messages postés 1470 Date d'inscription mardi 5 février 2002 Statut Membre Dernière intervention 20 octobre 2014 - 7 févr. 2003 à 10:28
8-) pépé

Salut !!!

Pouvez vous me donner le code qui permet de detecter si un poste est connecter a un reseau local, et non celui pour detecter la connection internet

Merci c'est assez urgent

1 réponse

BasicInstinct Messages postés 1470 Date d'inscription mardi 5 février 2002 Statut Membre Dernière intervention 20 octobre 2014 12
7 févr. 2003 à 10:28
'Lut :))

Const NETWORK_ALIVE_AOL = &H4
Const NETWORK_ALIVE_LAN = &H1
Const NETWORK_ALIVE_WAN = &H2
Private Declare Function IsNetworkAlive Lib "SENSAPI.DLL" (ByRef lpdwFlags As Long) As Long
Private Sub Form_Load()
'KPD-Team 2001
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim Ret As Long
If IsNetworkAlive(Ret) = 0 Then
MsgBox "The local system is not connected to a network!"
Else MsgBox "The local system is connected to a " + IIf(Ret NETWORK_ALIVE_AOL, "AOL", IIf(Ret NETWORK_ALIVE_LAN, "LAN", "WAN")) + " network!"
End If
End Sub

:clown) BasicInstinct :clown)
0
Rejoignez-nous