cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Integration in a DLL

From: Rathi, Dinesh <drathi_at_informatica.com>
Date: Wed, 1 Feb 2006 17:28:15 +0530

One of the common crashes on windows with dlls comes when you have
different C runtime libraries for your dlls and exes and do a new in dll
code and delete in exe or vice-versa. This results in an invalid heap
memory kind of crash. You can rectify it by making sure that all dlls/
exes are using multithreaded C runtime dll.

Thanks
Dinesh

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Wednesday, February 01, 2006 5:21 PM
To: libcurl development
Subject: Re: Integration in a DLL

On Wed, 1 Feb 2006, JCDUS wrote:

> I made a DLL that sends HTTP POST requests using LibCurl, but it seems
like
> there's a problem as when I try to call the exported functions from
within
> my .Exe, I get some EAccessViolations exceptions.

To me, this sounds like you've mixed some kind of memory areas or libc
things
or so that you need to take care of with those Windows compilers.

> I also integrated my functions in a "self-made" libcurl, and I can use
this
> DLL with success.

Exactly how does this differ from the first approach?

> Have you got any idea why I can't use the DLL that loads the libcurl
DLL ?

Can you possibly show us a tiny example that fails and include details
on how
you build the DLLs? I don't much about Windows building, but I figure
someone
else might be able to spot something if you provide details.

-- 
  Commercial curl and libcurl Technical Support:
http://haxx.se/curl.html
Received on 2006-02-01