Konu: İnternet bağlantısının kontrolünde sorun
Merhaba,
İnternet bağlantısının olup olmadığın kontrol etmek için aşağıdaki kodu kullanıyorum; ancak denemelerim sırasında bu kod doğru çalışmadığını farkettim yardım ederseniz sevinirim.
Bilgisayarım internete bağlıyken fonksiyon bağlı olduğuna dair doğru sonuç gönderiyor. Programdan çıkmadan bilgisayarımın ağ bağlantı kablosunu çıkartıp internet bağlantımı sonlandırdırdığımda fonksiyon hala internet bağlantısı olduğunu söylüyor. Bu sorunu çözmek için Clear Dlls komutunu kullandım. Bu komut bazen işimi çözdü ama hala tam olarak çalışmıyor.
Function InternetVarMi
LParameters tcSiteAdi As String
If Empty(m.tcSiteAdi)
m.tcSiteAdi = "http://www.google.com"
EndIf
Declare integer InternetCheckConnection in wininet.dll ;
string lpszUrl, integer dwFlags, integer dwReserved
Return (InternetCheckConnection(m.tcSiteAdi,1,0) != 0)
EndFunc