> Date: Wed, 26 Oct 2011 21:46:30 -0400
> From: bro...@deseret.com
> To: dbi-users@perl.org
> Subject: DBD-Oracle - obtaining OCI handles from $dbh
> 
> I have created some Perl bindings for some existing custom C++ 
> libraries.
> 
> One of these C++ libraries implements a class that uses Oracle
> OCI calls.
> 
> I would like to create a connection to the Oracle database 
> using Perl's DBI (DBD::Oracle) module, and then ideally share
> that connection with the C++ libraries.
> 
> This would require me to extract the Oracle OCI handles from
> the $dbh object...and then pass them to the C++ libraries.
> 
> What would be the best way to get access to the underlying
> Oracle OCI handles from a $dbh object?

Hmm! Interesting concept.  Which OCI handles are we talking about??
Like Matin said you would have to do that with .XS and you would pass I guess a 
pointer to the 
'C' struct that holds the pointers to DBD::Oraclles pointers? 
 
You would have to cast that struct into you C++ somehow??
 
There would be a good number of handles to pass over.  You might be able to 
find them by looking at the Perl process tree
and finding the SV that holds the struct and then sening that over?
 
All just guesses on my part.
 
Interesting concept non the less.
 
Cheers
John
                                          

Reply via email to