Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WestWind wwIPStuff Libary
Message
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Miscellaneous
Thread ID:
00735722
Message ID:
00735725
Views:
8
Hi,
I never use wwIPStuff for HTTP, instead I am using it for FTP purposes.
I used to face the same problem as you mentioned while send/receive file with FTP.
The problem caused by
     IF (lnRetval = 1 AND lnBytesRead = 0) OR (lnRetval = 0)
         EXIT
      ENDIF
InternetReadFile() may return 0 even thought it read data sucessfully, and wwiptstuff will stop reading file and assume it is sucess.

My workaround are change the code above to:
       IF (lnRetVal = 1 AND lnBytesRead = 0)
           *** Done
           EXIT
        ENDIF
        IF lnRetVal = 0
		   THIS.nError = GetLastError()
		   THIS.cErrorMsg = THIS.GetSystemErrorMsg()

           =FCLOSE(lhFileHandle)
           ERASE (lcTargetFile)
           EXIT
        ENDIF
and also check the size of the file on remote server and the one downloaded to local disk. If both of them are same, then I "assume" the transmission is succesffuly otherwise failed.

HTH

Pls inform me if you have better solution

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Previous
Reply
Map
View

Click here to load this message in the networking platform