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

Isenção de Responsabilidade para Conteúdo da KB Desativado

Este artigo foi escrito sobre produtos para os quais a Microsoft já não fornece suporte. Por conseguinte, este artigo é oferecido "tal como está" e não será mais atualizado.

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.
Propriedades

ID do Artigo: 312039 - Última Revisão: 27 de jul de 2004 - Revisão: 1

Comentários