Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FTP - WinInet.dll
Message
De
22/08/2001 18:53:14
Antonio Lopes (En ligne)
BookMARC
Coimbra, Portugal
 
 
À
21/08/2001 19:09:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00547046
Message ID:
00547701
Vues:
26
Hi, Bruce

I suspect a flag problem (are you setting an asynchronous connection - don't know if it fires overlapped I/O).

You can try this code (it works for me, hopefully it will work for you).
DECLARE INTEGER InternetOpen in WinINet.dll ;
	STRING cAgente, INTEGER nType, STRING cProxy, STRING cBypass, INTEGER nFlags
DECLARE INTEGER InternetCloseHandle in WinINet.dll ;
	INTEGER nInternetHandle
DECLARE INTEGER InternetConnect in WinINet.dll ;
	INTEGER nInternetSession, STRING cServer, INTEGER nPort, ;
	STRING cUserName, STRING cPassword, INTEGER nService, INTEGER nFlags, INTEGER nContext
DECLARE INTEGER FtpSetCurrentDirectory IN WinINet.dll ;
	INTEGER nFtpSession, STRING cDirectory

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

* set as appropriate
lcServer = "myserver"
lcUserName = "anonymous"
lcPassword = "someone@somewhere.com"
lcDir = "/pub"

IF lnSession!=0
	lnFTPSession = InternetConnect(lnSession,lcServer,21,lcUserName,lcPassword,1,0x08000000,0)
	IF lnFTPSession!=0
		IF FtpSetCurrentDirectory(lnFTPSession,lcDir)!=0
			WAIT WINDOW "Successfully CD in remote host" NOCLEAR NOWAIT
		ENDIF
		InternetCloseHandle(lnFTPSession)
	ENDIF
	InternetCloseHandle(lnSession)
ENDIF
>I am trying to use the FtpSetCurrentDirectory method in the Wininet.dll. I am successful in getting an internet session(InternetOpen) and an FTP Session(InternetConnect). When I try to change directories using the FtpSetCurrentDirectory method I get the following error:
>
>Error #997 - "Overlapped I/O operation is in progress"
>
>Does anyone have any idea why this is occuring?

Bye
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform