Re: PQescapeBytea on Win32 - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: PQescapeBytea on Win32
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4961F66@m0114.s-mxs.net
Whole thread Raw
In response to PQescapeBytea on Win32  ("Key88 SF" <key88sf@hotmail.com>)
Responses Re: PQescapeBytea on Win32  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
> 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


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: request for sql3 compliance for the update command
Next
From: Michael Meskes
Date:
Subject: Mail problem