> Hello.
> 
> Has anybody got any experience using libpq.dll from Visual Basic
> (currently using Visual Studio 6), and if so, do you have the
> declarations handy. I have a little trouble finding out how the PGconn
> and PGresult should look like, and as far as I know these are required
> to use the connect and execute functions in the library.
> 
> Yours faithfully.
> Finn Kettner.
> PS. If anybody know a program to automatically extract informations
> from a dll and create a api.txt file for Visual Basic, then please let
> me know.

I don't know exactly which format VB expects, but you can get a list of
exports from the DLL using:
dumpbin /exports libpq.dll

If you also need the function definitions, check libpq-fe.h for C style
syntax. (It's in src/interfaces/libpq)

As a sidenote, you may be much better off using ADO with the ODBC driver -
it's definitly move VB-friendly.

//Magnus

Thu, 24 Aug 2000 16:51:28 +0200
Magnus Hagander <mha@sollentuna.net>
RE: libpq.dll and VB
On 24 Aug 00 at 16:51, Magnus Hagander wrote about RE: [HACKERS] 
libpq.dll and VB:

> > Has anybody got any experience using libpq.dll from Visual Basic
> > (currently using Visual Studio 6), and if so, do you have the
> > declarations handy. I have a little trouble finding out how the PGconn
> > and PGresult should look like, and as far as I know these are required
> > to use the connect and execute functions in the library.

> > PS. If anybody know a program to automatically extract informations
> > from a dll and create a api.txt file for Visual Basic, then please let
> > me know.

> I don't know exactly which format VB expects, but you can get a list
> of exports from the DLL using: dumpbin /exports libpq.dll

Yes, I've tried that, but unfortunately, that is not exactly the 
format that VB need, but I have considered using it as a starting 
point.

> If you also need the function definitions, check libpq-fe.h for C
> style syntax. (It's in src/interfaces/libpq)

I need function definitions and structure (called Type in VB) 
definitions, and yes I have looked in libpq-fe.h, actually this is 
the placed where the dll is build :-). But as mentioned earlier, the 
structures for PGconn and PGresult is not in this file (they are 
typedef'ed directly from pg_conn and pg_result, which I can't find in 
any of the included files, so I actually wonder how the dll is build 
in the first place???).

> As a sidenote, you may be much better off using ADO with the ODBC
> driver - it's definitly move VB-friendly.

Yes, but what I forgot to tell you, is that I'm trying to create a 
activex control, which is to be placed on a (intranet) web page, 
using the Esker plugin, so ODBC is not the best way to go, as that 
would need a ODBC-connection be set up on each client machine, which 
are to use the activex control, so that's why I need to go directly 
to the dll file (which can be fetched from the page). To set up an 
ODBC connection you would need to install the psqlodbc.dll anyway, so 
why not take the direct way.

Yours faithfully.
Finn Kettner.

Fri, 25 Aug 2000 12:58:43 +0100
"Finn Kettner" <fk@akf.dk>
RE: libpq.dll and VB