comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » DLM returning a pointer...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
DLM returning a pointer... [message #24777] Mon, 23 April 2001 12:38 Go to previous message
Randall Skelton is currently offline  Randall Skelton
Messages: 169
Registered: October 2000
Senior Member
Hi all,

I am trying to write a few IDL functions which mirror those of a C library
I frequently use for getting data directly from a unix database
connection. My problem is that the interface document states that the
internal C structures should not be directly used; rather, an additional
layer of abstraction should be used. The basic operation that I want in
IDL is the ability to (1) connect to the database, (2) give a string of
queries, (3) get a stream of data, and (4) close the connection.
Ideally, I would like each of these steps to be a separate IDL function
that mirrors the C functions. Implementing step 1 is proving to be
somewhat difficult with the abstraction requirement. In order to establish
a connection I use a C function:

DBcon *DBconSet(char *host, char *port, char *dbName, ...)

which returns DBconn (a nasty structure that, for the reasons above, I
don't want to emulate directly in IDL). Nevertheless, this structure is
passed in subsequent functions so I need the structure to proceed with
steps 2, 3, and 4.

DBresult *DBexecute(DBconn *connection, const char *query)
char *DBgetval(DBconn *connection, int tup, int index)

Is it possible to return a pointer from C -> IDL such that I can pass a
pointer of the DBcon memory block in subsequent functions from IDL -> C?

Does anyone have any code that shows how to do this?

Thanks in advance,
Randall
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: including literal PostScript
Next Topic: Re: including literal PostScript

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:17:41 PDT 2025

Total time taken to generate the page: 0.55902 seconds