Information générale
Catégorie:
Fonctions Windows API
In viewing Robert Abram’s FTP.prg I noticed that his #define INTERNET_CONNECT_FLAG_PASSIVE constant was blank. It is the only constant he defines without a value to follow. Sending that constant caused an “Unknown Error”.
I assigned that constant a value of 1 (this was a guess) and passed it instead of 0 in the InternetConnect call, so the code went from this:
#define INTERNET_CONNECT_FLAG_PASSIVE
lnConnect_Handle = InternetConnect(THIS.nInet_Handle, (THIS.cIPAddress), VAL(lcPort), ;
(THIS.cUserName), (THIS.cPassword), INTERNET_SERVICE_FTP, 0, 0)
to this:
#define INTERNET_CONNECT_FLAG_PASSIVE 1
lnConnect_Handle = InternetConnect(THIS.nInet_Handle, (THIS.cIPAddress), VAL(lcPort), ;
(THIS.cUserName), (THIS.cPassword), INTERNET_SERVICE_FTP, ;
INTERNET_CONNECT_FLAG_PASSIVE, 0)
After this change I have the same symptoms, that is, I can send to the one site but it hangs on the other. Does it look like I implemented the passive mode idea correctly?
- Paul
PS - How do you make the code segments of the message change its background?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement