cURL / Mailing Lists / curl-library / Single Mail

curl-library

Questions and corrections regarding libcurl as a DLL

From: Bob Schader <bobs_at_product-des.com>
Date: Thu, 1 Feb 2001 12:16:32 -0500

I now have a test app that can PUT a file to our server using libcurl
statically. I have also managed to compile libcurl as a DLL, but had
to make some changes to the libcurl.def file. The last eight exported
functions need to have "curl_" prepended to them. Actually, the last
2 need to be "Curl_" instead of "curl_", I found out.

Also, for necessary platform naming compatibility (used in standards
like JNI for java, etc) I renamed the DLL so that it is "curl.dll" This insures
that if and when I get a JNI interface made (looking at using swig, but need
to create wrapper functions to hide var arg calls), the same java interface
handed a lib spec of "curl" will automatically translate that to "curl.dll" on
windows and "libcurl.so" on Unix, etc.

Now, my test app works fine with static linking to libcurl, but it bombs out in
curl_easy_perform using the DLL. I saw something in the FAQ about having
to specify your own write function if you use a dll, because you can't pass a
pointer to a file through to a dll. Should I assume that I need to do the same
thing for reading a file using CURLOPT_READFUNCTION ?
______________________________________________________________________
Bob Schader
Computer Systems Manager
Product Design International, Inc.
4880 36th St. SE, Suite 100
Grand Rapids, MI 49512

Voice: (616) 667-2600 x104
Fax: (616) 667-2692

_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-02-01