cs_Pitt
Messages postés1Date d'inscriptionjeudi 10 janvier 2002StatutMembreDernière intervention17 septembre 2002
-
17 sept. 2002 à 15:15
thiosyiasar
Messages postés186Date d'inscriptionlundi 11 mars 2002StatutMembreDernière intervention30 novembre 2010
-
18 sept. 2002 à 20:55
voila mon probleme j'utilise une api pour teste l'etat de la connection a internet mais lorsque je debranche mon cable reseau(je suis connecter au web via le lan) il me dit que je suis toujours connecter.
voici mon code:
Option Explicit
Private Declare Function InternetGetConnectedStateEx Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal lpszConnectionName As String, ByVal dwNameLen As Integer, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
Dim Msg As String
Dim Ret As Long
Msg = String$(255, vbNullChar)
Ret = InternetGetConnectedStateEx(Ret, Msg, 254, 0)
MsgBox IIf(Ret = 1, "Vous êtes connectés à Internet en utilisant " & Msg, "Vous n'êtes pas connectés"), vbInformation
End Sub