Im using curl function ( using C ) to download files from remote machine which is accessable via https. I used fopen() to create files and given the FILE* pointer to fwrite(). The problem is im able to download files upto 2 GB. I think this is the limitaion of fopen() in 32 bit windows machines. Is there any way to download files larger than 2 GB. because my files are huge like 50-100 GB. nevermind about the speed and transfer rate...
The code snippet is attached how im using curl to download those files..
I need answers for the following questions.
1. Is there way to use curl to download large files > 2GB. i.e any curl option need to be set?
2.How to overcome the fopen() limitations in 32 bit machines or how to use fopen64() in 32 bit machines. As i also tried #define _FILE_OFFSET_BITS 64
3. Is there anyway to use the handle given by CreateFile() to fwrite() ?
Thanks in advance
curl_easy_setopt( curl, CURLOPT_URL, "https://myhostname/myfile" );
curl_easy_setopt(curl, CURLOPT_USERPWD, "login:pwd");
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt( curl, CURLOPT_FILE, FILE*);
curl_easy_setopt( curl, CURLOPT_HEADER ,0);