Microsoft KB Archive/312039

= BUG: Error Message When You Call FtpGetFile and FtpPutFile Functions: 0x00000057 - ERROR_INVALID_PARAMETER =

Article ID: 312039

Article Last Modified on 7/27/2004

-

APPLIES TO


 * Microsoft Windows CE Platform Software Development Kit for Handheld PC 2000

-



This article was previously published under Q312039



SYMPTOMS
After you successfully open a WinInet FTP connection by using the InternetOpen and InternetConnect functions, calls to the FtpGetFile and FtpPutFile functions invariably fail, and the GetLastError function returns the following error message:

0x00000057 - ERROR_INVALID_PARAMETER



RESOLUTION
To work around this issue, read and write the files manually to implement FTP file exchanges. To do this, follow these steps:
 * 1) Open the connection by using InternetOpen, followed by InternetConnect.
 * 2) Open the local file by using the CreateFile function.
 * 3) Open the remote file by using the FtpOpenFile function.
 * 4) Read the FTP or local file by using the InternetReadFile or ReadFile function, respectively.
 * 5) Write to FTP or a local file by using the InternetWriteFile or WriteFile function, respectively.
 * 6) Close the local file handle by using the CloseHandle function.
 * 7) Close the FTP file handle by using the InternetCloseHandle function.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Keywords: kberrmsg kbbug kbpending KB312039

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.