Board index » delphi » passing an adoconnection to a DLL written visual basic

passing an adoconnection to a DLL written visual basic

D6

Hi

My company has started cooperating a bit with another software company wich
use visual basic. ( sorry for them )

I'll like to know if it is possible to pass an adoconnection to a dll
written in visual basic. I suppose that it would be impossible for a visual
basic DLL to work with a TAdoConnection variable, but can I pass a Handle or
address space to the dll, so it would be able to use my adoconnection.

thanks

Asger

 

Re:passing an adoconnection to a DLL written visual basic


IN DELPHI, After of import dll in VB
--------------------------------------------------------------------
uses AdoDb_tlb;

  Planes.ConexionActiva:=

connection15(GConexion.ConnectionObject);
-------------------------------------------------------------------
IN VISUAL BASIC

'Las siguiente propiedades se utilizan para realizar la conexion al servidor
Public Property Set ConexionActiva(ByVal conect As ADODB.Connection)
  'Establecer la conexion en el caso de que no este asignada
   If CnConexion.State = ADODB.adStateClosed Then
     Set CnConexion = conect
   End If

End Property

Public Property Get ConexionActiva() As ADODB.Connection
    Set ConexionActiva = CnConexion
End Property
----------------------------------------------------------------------------
----------------------------------

"Asger" <As...@spam.com> escribi en el mensaje
news:3e43cae8$2@newsgroups.borland.com...

Quote
> D6

> Hi

> My company has started cooperating a bit with another software company
wich
> use visual basic. ( sorry for them )

> I'll like to know if it is possible to pass an adoconnection to a dll
> written in visual basic. I suppose that it would be impossible for a
visual
> basic DLL to work with a TAdoConnection variable, but can I pass a Handle
or
> address space to the dll, so it would be able to use my adoconnection.

> thanks

> Asger

Re:passing an adoconnection to a DLL written visual basic


Thanks for the answer.

I sorry but I can't realy understand what you mean ! Can I just simply pass
the TAdoConnection.ConnectionObject ? Something like :

  procedure RunTheVBdll ( connenctionObj: Connection15 );  external
'Dllfromvb.dll'  index 1
....
implementation
....
....
   RunTheVBdll ( MyAdoconnection.ConnectionObject ) ;

 I'll hope you will reply this messages, else thanks for the first reply.

Asger

Quote

> IN DELPHI, After of import dll in VB
> --------------------------------------------------------------------
> uses AdoDb_tlb;

>   Planes.ConexionActiva:=

> connection15(GConexion.ConnectionObject);
> -------------------------------------------------------------------
> IN VISUAL BASIC

> 'Las siguiente propiedades se utilizan para realizar la conexion al
servidor
> Public Property Set ConexionActiva(ByVal conect As ADODB.Connection)
>   'Establecer la conexion en el caso de que no este asignada
>    If CnConexion.State = ADODB.adStateClosed Then
>      Set CnConexion = conect
>    End If

> End Property

> Public Property Get ConexionActiva() As ADODB.Connection
>     Set ConexionActiva = CnConexion
> End Property
> --------------------------------------------------------------------------
--
> ----------------------------------

> "Asger" <As...@spam.com> escribi en el mensaje
> news:3e43cae8$2@newsgroups.borland.com...
> > D6

> > Hi

> > My company has started cooperating a bit with another software company
> wich
> > use visual basic. ( sorry for them )

> > I'll like to know if it is possible to pass an adoconnection to a dll
> > written in visual basic. I suppose that it would be impossible for a
> visual
> > basic DLL to work with a TAdoConnection variable, but can I pass a
Handle
> or
> > address space to the dll, so it would be able to use my adoconnection.

> > thanks

> > Asger

Other Threads