Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
InternetConnect
Message
De
25/04/2003 11:06:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
InternetConnect
Divers
Thread ID:
00781517
Message ID:
00781517
Vues:
59
Hi!

Does any one know why the last "Clear Dlls" takes about 60 seconds to execute?

Seems to be some sort of timeout/retry problem.

If the InternetConnect(...) function is not called then the last "Clear Dlls" executes right away. It seems that even though I call InternetCloseHandle(lnFTPSession) to close that FTP Session it does not really close it.

The Wininet.dll version I have is 6.0.2800.1106

Any help will be really appreciated.

Thanks

Sarosh
Local lnSession, lnFTPSession
Local lcHost, lnPort, lcUserName, lcPassword

lcHost     = "validftp.com"
lnPort     = 21
lcUserName = "validusername"
lcPassword = "validpassword"
Store 0 To lnSession, lnFTPSession

Declare Integer InternetOpen In WinINet.Dll ;
		String cAgent, ;
		Integer nType, ;
		String cProxy, ;
		String cBypass, ;
		Integer nFlags
Declare Integer InternetConnect In WinINet.Dll ;
		Integer nInternetSession, ;
		String cServer, ;
		Integer nPort, ;
		String cUserName, ;
		String cPassword, ;
		Integer nService, ;
		Integer nFlags, ;
		Integer nContext
Declare Integer InternetCloseHandle In WinINet.Dll ;
		Integer nInternetHandle

lnSession = InternetOpen("Wininet",0,.Null.,.Null.,0)

If Not lnSession = 0 Then
	lnFTPSession = InternetConnect(lnSession, ;
						lcHost, ;
						lnPort, ;
						lcUserName, ;
						lcPassword, ;
						1, 0x08000000, 0)
Endif

If lnFTPSession = 0 Then
	Messagebox("Error while Connecting to Host...", 16, "Connect")
Else
	Messagebox("Connected to Host...", 48, "Connect")
	InternetCloseHandle(lnFTPSession)
Endif

If Not lnSession = 0 Then
	InternetCloseHandle(lnSession)
Endif

Clear Dlls "InternetOpen"
Clear Dlls "InternetConnect"
Clear Dlls "InternetCloseHandle"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform