I am trying to create a DLL that uses the CURL library.
The docs say that curl_global_init() must be called once and before anything else.
My question is, what is correct ? to have an Init() function exported by the DLL that calls curl_global_init() and must be called initially, or call curl_global_init() in DllMain() ?
Thanks.
Digging more into it, and following advice from the CURL website it appears that the correct procedure is to have a static global object whose constructor calls curl_global_init() and whose destructor calls curl_global_cleanup().