> Actually this isn't even working for me. I just compiled the libpq dll with
> /MT (multithreaded), and I still get corruption in my app. I even tried
> libpq compiled with multithreaded-debug (/MTd), which my app is using now,
> and still same problem.
No, you need to use multithreaded DLL (/MD in VC6) for both the dll and your program,
then it works.
But since that is not optimal (can't use debug runtime unless you have a second
debug dll (/MDd)), I also think a callback function would be good to have in addition
to linking libpq.dll with /MD.
Informix e.g. supplies SqlFreeMem( void * MemAddr, int FreeType );
Andreas