libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] pre-built dlls on windows


From: Doug
Subject: Re: [libmicrohttpd] pre-built dlls on windows
Date: Fri, 12 Sep 2014 16:27:56 -0700

Thanks, I can confirm your hack does work.

In the end, I wound up compiling the source directly in VS.  Less a pain than I 
originally thought it would be.

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of LRN
Sent: Thursday, September 11, 2014 9:17 PM
To: address@hidden; address@hidden
Subject: Re: [libmicrohttpd] pre-built dlls on windows

On 12.09.2014 2:22, Doug wrote:
> Hi,
> 
>  
> 
> I am using libmicrohttpd on windows with the pre-built 0.9.35-w32 
> bins, Visual Studio 2013.  I've got some of the samples working but 
> have run into an issue with methods that return a string I must free(ex:
> MHD_digest_auth_get_username uses strdup to return the name).  When I 
> attempt to free, I get asserts about the pointer not being valid.  The 
> expression hitting is: _CrtIsValidHeapPointer(pUserData).  Best I can 
> tell this the dll hell with the libmicrohttpd linking to one crt while 
> my console app is linking to another.
> 
>  
> 
> Does anyone have any experience here?

No, but i can confirm that libmicrohttpd built with mingw-w64 links to 
msvcrt.dll, whereas VS builds link to msvcrXXX.dll.

Quickest hack, i guess, is to LoadLibraryA("msvcrt.dll"), msvcrt_free = 
GetProcAddress (GetModuleHandleA ("msvcrt.dll"), "free"), then call
msvcrt_free() on the memory libmicrohttpd returns.

--
O< ascii ribbon - stop html email! - www.asciiribbon.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]