cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Big problem: uploaded sFtp file's size is 0KB!

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sat, 1 Nov 2008 09:09:04 -0700

On Sat, Nov 01, 2008 at 06:08:58PM +0800, changqin_gang wrote:
> As the code below shows, it succesfully created a file on specified sFtp server
> dierectory, however, the file's size was ZERO! No matter what the local file's
> size was!
>
> Why? Any thing wrong?

> BOOL bResult = ReadFile( (HANDLE) hFile, pBuffer, size * nmemb, &
> dwNumberOfBytesRead, NULL);
[...]>
> hFile = fopen(bsFileFullPath, "r");

Can you really call ReadFile() on a handle opened by fopen()? I suspect not...

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-11-01