Re: Return structure from DLL to PL/SQL

From: Marc Billiet <first.last_at_hydro.com>
Date: Wed, 03 Apr 2002 14:00:24 GMT
Message-ID: <20020403.14002405_at_y1032696.hae.hydro.com>


You can write a wrapper for this, i.e. write your own dll containing a

function using only types supported by ORA FFI, which stores the parameters in that structure and calls the real function.

Marc

>>>>>>>>>>>>>>>>>> Oorspronkelijk bericht <<<<<<<<<<<<<<<<<<

Op 2002-03-28, 16:49:51, schreef peterv_at_in2.si (Peter Valencic) over het  

thema Return structure from DLL to PL/SQL:

> I have a function in DLL which return a pointer to a C Structure. How
 

> can I register such function in pl/sql?
 

> C structure is like this:
 

> typedef struct IHISD HPC DO {
> IHISD ALPHANUM title; /* length = 1 .. 7
 */
> IHISD ALPHANUM surname; /* length = 2 .. 24
 */
> IHISD ALPHANUM forename; /* length = 2 .. 24
 */
> IHISD ALPHANUM country code; /* length = 2 fixed
 */
> IHISD NUMERIC health insurance no; /* length = 9 fixed
 */
> IHISD NUMERIC card instance no; /* length = 1 .. 2
 */
> IHISD NUMERIC id number; /* length = 5 fixed
 */
> IHISD NUMERIC profession; /* length = 2 fixed
 */
> IHISD NUMERIC specialization; /* length = 2 fixed
 */
> IHISD ALPHANUM hcs country; /* length = 2 fixed
 */
> IHISD NUMERIC hcs id; /* length = 5 fixed
 */
> IHISD ALPHANUM hcs name; /* length = 2 .. 25
 */
> IHISD BCD hcs role; /* length = 2 fixed
 */
> } IHISD HPC DO;
 
> ---------
> I have read Oracle documentation, but only type of variables are:
> varchar,pls integer,number,binary integer... (look ORA FFI paackage)
 

> Please help...
 

> The DLL function is like this:
> long myFunction (int number,int *xx,IHISD HPC DO *datas)
 

> how to register such function????
> I don't have source code of DLL !!!
 

> please for help
 

> best regards
> peter
Received on Wed Apr 03 2002 - 16:00:24 CEST

Original text of this message