cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: why CURL_GLOBAL_NOTHING makes CURLE_COULDNT_RESOLVE_HOST on Windows

From: Guenter Knauf <eflash_at_gmx.net>
Date: Wed, 2 Apr 2008 06:19:27 +0200

Hi,
> This error has cost me MANY hours of debugging and I want to know if there
> is an explanation behind it.
> I called curl_global_init() with CURL_GLOBAL_NOTHING. This worked on Linux
> as expected, however on Windows it made curl_easy_perform() fail with
> CURLE_COULDNT_RESOLVE_HOST (6). I changed it to CURL_GLOBAL_ALL and it
> started working. I then changed it back to CURL_GLOBAL_NOTHING and to my
> surprise it did not fail anymore!!!
> Can someone explain to me what's going on?
On Windows the Winsock layer must be initialized with WSA* functions, and the wanted Winsock version must be passed in, and that's what CURL_GLOBAL_WIN32 and CURL_GLOBAL_ALL does (_ALL includes SSL initialize)....

Guenter.
Received on 2008-04-02