curl-library
Re: Help with C and curl
Date: Sun, 4 Oct 2009 10:55:00 +0300
.....
.....
CURL*(__stdcall *curl_easy_init)();
CURLcode (__stdcall *curl_global_init)(long flags);
CURLcode(__stdcall *curl_easy_setopt )(CURL *curl, CURLoption option, ...);
CURLcode (__stdcall *curl_easy_perform )(CURL *curl);
CURLcode(__stdcall *curl_easy_getinfo )(CURL *curl, CURLINFO info, ...);
void (__stdcall *curl_easy_cleanup )(CURL *curl);
struct curl_slist *(__stdcall *curl_slist_append )(struct curl_slist
*list,const char *string);
void (__stdcall *curl_slist_free_all)(struct curl_slist * list);
void (__stdcall *curl_global_cleanup)();
.....
.....
if( ( cl = LoadLibrary( "libcurl.dll" ) ) == NULL )
return 0;
curl_global_init =(CURLcode (__stdcall*)(long flags))GetProcAddress(cl,
"curl_global_init" );
curl_easy_init =(CURL*(__stdcall*)())GetProcAddress(cl, "curl_easy_init" );
curl_easy_setopt =(CURLcode(__stdcall *)(CURL *curl, CURLoption option,
...))GetProcAddress(cl, "curl_easy_setopt");
curl_easy_perform =(CURLcode(__stdcall *)(CURL *curl))GetProcAddress(cl,
"curl_easy_perform" );
curl_easy_cleanup =(void (__stdcall *)(CURL *curl))GetProcAddress(cl,
"curl_easy_cleanup" );
curl_easy_getinfo=(CURLcode(__stdcall *)(CURL *curl, CURLINFO info,
...))GetProcAddress(cl, "curl_easy_getinfo");
curl_slist_append=(curl_slist*(__stdcall *)(struct curl_slist *list,const
char *string))GetProcAddress(cl,"curl_slist_append");
curl_slist_free_all=(void(__stdcall *)(struct curl_slist
*list))GetProcAddress(cl,"curl_slist_free_all");
curl_global_cleanup=(void(__stdcall *)())GetProcAddress(cl,
"curl_global_cleanup" );
.....
.....
2009/10/4 Guenter <lists_at_gknw.net>
> Hi,
> pppsss7_at_gmail.com schrieb:
> > Im trying to use libcurl in my C code.
> > I have low level experience in C, but I try to use it and practice it
> > with curl lib and without. Ok its lyrics.
> ok, great that you took my first advice now - thanks.
>
> > I have simple code with libcurl:
> ...
> > What's wrong ? I try tu use %s and nothing true again.
> well, that's because you didnt take the second advice and did read our
> API docu, nor looked for learning the basics which explain how to use
> printf() correctly with the data types you pass in ...
> Dmitry gave you already some hints, and I give you some more:
> you can pretty well learn from our bunch of samples:
> http://curl.haxx.se/libcurl/c/example.html
> these are also included with our source releases.
> Please work a bit with these, and you get pretty quick a running sample.
>
> thanks, Gün.
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-04