cURL / Mailing Lists / curl-library / Single Mail

curl-library

memory alloc error ?

From: JCDUS <as_megas_at_yahoo.fr>
Date: Fri, 24 Mar 2006 16:30:10 +0100

Hello,

Here is my problem :
I made a DLL which loads dynamically libcurl with LoadLibrary() + GetProcAddress(). It contains two functions which are exported :

int InitSession(CURL** curl)
{
    *curl = curl_easy_init();
    return 0;
}

int CloseSession(CURL* curl)
{
     curl_easy_cleanup(curl);
}

Then, I load dynamically this DLL in my c++ app, and I call this simple function :

void XXX()
{
    CURL* session
    InitSession(&session);
    CloseSession(session);
}

There, I get a "Privileged instruction" when I run into a debug session in my DLL and I get out of the function CloseSession().
I've enclosed all my declarations with "extern "C"", do you see anything wrong ?

Thanks for your attention.

JC

        

        
                
___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
Received on 2006-03-24