Hi all!
Thanks for the response!! My problem was similar to
http://archives.postgresql.org/pgsql-interfaces/2004-04/msg00057.php
Every time the server send a notice my application crashed.
The solution stated there, was that I should link the static version
ct32mt.lib with my project. It worked!!!