Results 1 to 2 of 2

Thread: FTP problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    3

    Post FTP problem

    Hello

    I'm implementing a small FTP program in which I want to read & write file
    directly to/from ftp server.First I used FtpOpenfile function to open the file & then I
    used InternetReadfile function to read the data. But problem is,InternetReadFile returns
    False value.


    Here is my code:

    abc = FtpOpenFile(hConnection,szFileRemote, GENERIC_READ, FTP_TRANSFER_TYPE_ASCII,0)

    If abc <> 0 Then

    'init temp string
    strTemp = ""

    Do

    dim sreadBuffer as string * 2048

    'read upto 1024 bytes of data...
    blnRC = InternetReadFile(abc, sReadBuffer, _
    Len(sReadBuffer), lngBytes)


    If blnRC Then

    ' save the data
    strTemp = strTemp & Left(strBuffer, lngBytes)

    'check eof (lngBytes = 0)
    If lngBytes = 0 Then

    'file's complete...send back the data
    read = strTemp
    End If
    End If

    Loop
    End If


    Pls help me..
    thx.
    Mona

  2. #2
    New Member
    Join Date
    May 2001
    Posts
    1

    Question

    I have a similar problem. What I want is to write directtly to a file on the FTP server.

    How can I do this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width