Results 1 to 4 of 4

Thread: FtpFindFirstFile returns blank file name

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    4

    FtpFindFirstFile returns blank file name

    I am converting an FTP class that I was using in VB 6 to Visual Studio 05. I have been able to successfully connect to the FTP site by using the InternetOpen and InternetConnect API calls. After connecting to the site, I want to grab file/folder attributes of files/folders on the FTP site. To do this, I use the FtpFindFirstFile API call. However, whenever I call this function, the call always returns an empty cFileName in the pData structure. (A WIN32_FIND_DATA structure) I am using the below function call.

    hFind = FtpFindFirstFile(hConnection, "*.*", pData, 0, 0)

    Does anyone have any ideas why this would be the case? I run the same code in VB 6 and the FtpFindFirstFile API call returns the folder name just fine. Note, NO error is thrown when I run this in VS '05. So... any ideas?

    Thank you.

    Matt

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: FtpFindFirstFile returns blank file name

    Quote Originally Posted by lunow160
    I am converting an FTP class that I was using in VB 6 to Visual Studio 05.
    By this I'm guessing you mean VB.NET 2005

    What is the .NET code that you are using?

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    4

    Re: FtpFindFirstFile returns blank file name

    Hi Hack,
    I've since went to strictly VB.Net 2005 syntax. My post here was a last resort since I was unable to find virtually any documentation on this. I have started a new post under the .NET forum location that contains a different question. If you would like to close this thread, please do so. I gave up trying to convert and run the 6 API code.

    Thanks,
    Matt.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: FtpFindFirstFile returns blank file name

    Quote Originally Posted by lunow160
    I gave up trying to convert and run the 6 API code.
    Probably a wise move.

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