diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2007-07-06 20:14:03 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2007-07-06 20:14:03 +0000 | 
| commit | e2bac4fe6f290af6408570f3ed918e4672866c31 (patch) | |
| tree | 4581a91a5d782ca71b4c298ccecfffd8e91dd4c3 /docs/examples | |
| parent | 836ffbfc222db3377b605b07b244023dc4b4aaf7 (diff) | |
add note about windows and dlls with CURLOPT_WRITEDATA
Diffstat (limited to 'docs/examples')
| -rw-r--r-- | docs/examples/ftpgetresp.c | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c index 82b1d36a7..cf61ded02 100644 --- a/docs/examples/ftpgetresp.c +++ b/docs/examples/ftpgetresp.c @@ -1,8 +1,8 @@  /***************************************************************************** - *                                  _   _ ____  _      - *  Project                     ___| | | |  _ \| |     - *                             / __| | | | |_) | |     - *                            | (__| |_| |  _ <| |___  + *                                  _   _ ____  _ + *  Project                     ___| | | |  _ \| | + *                             / __| | | | |_) | | + *                            | (__| |_| |  _ <| |___   *                             \___|\___/|_| \_\_____|   *   * $Id$ @@ -34,7 +34,7 @@ int main(int argc, char **argv)    CURLcode res;    FILE *ftpfile;    FILE *respfile; -   +    /* local file name to store the file as */    ftpfile = fopen("ftp-list", "wb"); /* b is binary, needed on win32 */ @@ -46,6 +46,8 @@ int main(int argc, char **argv)      /* Get a file listing from sunet */      curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");      curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile); +    /* If you intend to use this on windows with a libcurl DLL, you must use +       CURLOPT_WRITEFUNCTION as well */      curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);      curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);      res = curl_easy_perform(curl);  | 
