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
0x922360B0.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
